net_sched: update hierarchical backlog too
When the bottom qdisc decides to, for example, drop some packet, it calls qdisc_tree_decrease_qlen() to update the queue length for all its ancestors, we need to update the backlog too to keep the stats on root qdisc accurate. Cc: Jamal Hadi Salim <jhs@mojatatu.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
86a7996cc8
commit
2ccccf5fb4
@@ -218,7 +218,8 @@ static int multiq_tune(struct Qdisc *sch, struct nlattr *opt)
|
||||
if (q->queues[i] != &noop_qdisc) {
|
||||
struct Qdisc *child = q->queues[i];
|
||||
q->queues[i] = &noop_qdisc;
|
||||
qdisc_tree_decrease_qlen(child, child->q.qlen);
|
||||
qdisc_tree_reduce_backlog(child, child->q.qlen,
|
||||
child->qstats.backlog);
|
||||
qdisc_destroy(child);
|
||||
}
|
||||
}
|
||||
@@ -238,8 +239,9 @@ static int multiq_tune(struct Qdisc *sch, struct nlattr *opt)
|
||||
q->queues[i] = child;
|
||||
|
||||
if (old != &noop_qdisc) {
|
||||
qdisc_tree_decrease_qlen(old,
|
||||
old->q.qlen);
|
||||
qdisc_tree_reduce_backlog(old,
|
||||
old->q.qlen,
|
||||
old->qstats.backlog);
|
||||
qdisc_destroy(old);
|
||||
}
|
||||
sch_tree_unlock(sch);
|
||||
|
Reference in New Issue
Block a user