Skip to content

Commit 759ae57

Browse files
congwangdavem330
authored andcommitted
net_sched: get rid of unnecessary dev_qdisc_reset()
Resetting old qdisc on dev_queue->qdisc_sleeping in dev_qdisc_reset() is redundant, because this qdisc, even if not same with dev_queue->qdisc, is reset via qdisc_put() right after calling dev_graft_qdisc() when hitting refcnt 0. This is very easy to observe with qdisc_reset() tracepoint and stack traces. Reported-by: Václav Zindulka <[email protected]> Tested-by: Václav Zindulka <[email protected]> Cc: Jamal Hadi Salim <[email protected]> Cc: Jiri Pirko <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 70f5096 commit 759ae57

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

net/sched/sch_generic.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,16 +1191,6 @@ static bool some_qdisc_is_busy(struct net_device *dev)
11911191
return false;
11921192
}
11931193

1194-
static void dev_qdisc_reset(struct net_device *dev,
1195-
struct netdev_queue *dev_queue,
1196-
void *none)
1197-
{
1198-
struct Qdisc *qdisc = dev_queue->qdisc_sleeping;
1199-
1200-
if (qdisc)
1201-
qdisc_reset(qdisc);
1202-
}
1203-
12041194
/**
12051195
* dev_deactivate_many - deactivate transmissions on several devices
12061196
* @head: list of devices to deactivate
@@ -1237,12 +1227,6 @@ void dev_deactivate_many(struct list_head *head)
12371227
*/
12381228
schedule_timeout_uninterruptible(1);
12391229
}
1240-
/* The new qdisc is assigned at this point so we can safely
1241-
* unwind stale skb lists and qdisc statistics
1242-
*/
1243-
netdev_for_each_tx_queue(dev, dev_qdisc_reset, NULL);
1244-
if (dev_ingress_queue(dev))
1245-
dev_qdisc_reset(dev, dev_ingress_queue(dev), NULL);
12461230
}
12471231
}
12481232

0 commit comments

Comments
 (0)