Skip to content

Commit a5b9598

Browse files
vcgomesgregkh
authored andcommitted
taprio: Use taprio_reset_tc() to reset Traffic Classes configuration
[ Upstream commit 7c16680 ] 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]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ee6adcf commit a5b9598

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)