diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2016-02-25 14:55:03 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-02-29 17:02:33 -0500 |
commit | bdf17661f63a79c3cb4209b970b1cc39e34f7543 (patch) | |
tree | 7e524b9e3447f49b22676a91ab0c110d0daa5c3e /net/sched | |
parent | 431e3a8e36a05a37126f34b41aa3a5a6456af04e (diff) | |
download | linux-rpi-bdf17661f63a79c3cb4209b970b1cc39e34f7543.tar.gz linux-rpi-bdf17661f63a79c3cb4209b970b1cc39e34f7543.tar.bz2 linux-rpi-bdf17661f63a79c3cb4209b970b1cc39e34f7543.zip |
sch_dsmark: update backlog as well
Similarly, we need to update backlog too when we update qlen.
Cc: 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')
-rw-r--r-- | net/sched/sch_dsmark.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c index cfddb1c635c3..d0dff0cd8186 100644 --- a/net/sched/sch_dsmark.c +++ b/net/sched/sch_dsmark.c @@ -258,6 +258,7 @@ static int dsmark_enqueue(struct sk_buff *skb, struct Qdisc *sch) return err; } + qdisc_qstats_backlog_inc(sch, skb); sch->q.qlen++; return NET_XMIT_SUCCESS; @@ -280,6 +281,7 @@ static struct sk_buff *dsmark_dequeue(struct Qdisc *sch) return NULL; qdisc_bstats_update(sch, skb); + qdisc_qstats_backlog_dec(sch, skb); sch->q.qlen--; index = skb->tc_index & (p->indices - 1); @@ -395,6 +397,7 @@ static void dsmark_reset(struct Qdisc *sch) pr_debug("%s(sch %p,[qdisc %p])\n", __func__, sch, p); qdisc_reset(p->q); + sch->qstats.backlog = 0; sch->q.qlen = 0; } |