diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2016-02-25 14:55:01 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-02-29 17:02:33 -0500 |
commit | 2ccccf5fb43ff62b2b96cc58d95fc0b3596516e4 (patch) | |
tree | d73ec90b0c0cfd1191ef35a4aa0eaea78af1f100 /net/sched/sch_drr.c | |
parent | 86a7996cc8a078793670d82ed97d5a99bb4e8496 (diff) |
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>
Diffstat (limited to 'net/sched/sch_drr.c')
-rw-r--r-- | net/sched/sch_drr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sched/sch_drr.c b/net/sched/sch_drr.c index b96c9a8e70ab..a63e879e8975 100644 --- a/net/sched/sch_drr.c +++ b/net/sched/sch_drr.c @@ -53,9 +53,10 @@ static struct drr_class *drr_find_class(struct Qdisc *sch, u32 classid) static void drr_purge_queue(struct drr_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 const struct nla_policy drr_policy[TCA_DRR_MAX + 1] = { |