Skip to content

Commit 7c16680

Browse files
vcgomesdavem330
authored andcommitted
taprio: Use taprio_reset_tc() to reset Traffic Classes configuration
When destroying the current taprio instance, which can happen when the creation of one fails, we should reset the traffic class configuration back to the default state. netdev_reset_tc() is a better way because in addition to setting the number of traffic classes to zero, it also resets the priority to traffic classes mapping to the default value. Fixes: 5a781cc ("tc: Add support for configuring the taprio scheduler") Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 49c684d commit 7c16680

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/sched/sch_taprio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1588,7 +1588,7 @@ static void taprio_destroy(struct Qdisc *sch)
15881588
}
15891589
q->qdiscs = NULL;
15901590

1591-
netdev_set_num_tc(dev, 0);
1591+
netdev_reset_tc(dev);
15921592

15931593
if (q->oper_sched)
15941594
call_rcu(&q->oper_sched->rcu, taprio_free_sched_cb);

0 commit comments

Comments
 (0)