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

szülő
86a7996cc8
commit
2ccccf5fb4
@@ -895,9 +895,10 @@ static void
|
||||
hfsc_purge_queue(struct Qdisc *sch, struct hfsc_class *cl)
|
||||
{
|
||||
unsigned int len = cl->qdisc->q.qlen;
|
||||
unsigned int backlog = cl->qdisc->qstats.backlog;
|
||||
|
||||
qdisc_reset(cl->qdisc);
|
||||
qdisc_tree_decrease_qlen(cl->qdisc, len);
|
||||
qdisc_tree_reduce_backlog(cl->qdisc, len, backlog);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user