From: Cong Wang <xiyou.wangcong@gmail.com>
To: netdev@vger.kernel.org
Cc: Cong Wang <xiyou.wangcong@gmail.com>,
Jamal Hadi Salim <jhs@mojatatu.com>
Subject: [Patch net-next 4/4] sch_dsmark: update backlog as well
Date: Mon, 12 Oct 2015 11:38:03 -0700 [thread overview]
Message-ID: <1444675083-9825-5-git-send-email-xiyou.wangcong@gmail.com> (raw)
In-Reply-To: <1444675083-9825-1-git-send-email-xiyou.wangcong@gmail.com>
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>
---
net/sched/sch_dsmark.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c
index cfddb1c..d0dff0c 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;
}
--
1.8.3.1
prev parent reply other threads:[~2015-10-12 18:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-12 18:37 [Patch net-next 0/4] net_sched: update backlog for hierarchical qdisc's Cong Wang
2015-10-12 18:38 ` [Patch net-next 1/4] net_sched: introduce qdisc_replace() helper Cong Wang
2015-10-14 1:54 ` David Miller
2015-10-15 4:13 ` Cong Wang
2015-10-14 11:56 ` Jamal Hadi Salim
2015-10-15 4:15 ` Cong Wang
2015-10-16 11:51 ` Jamal Hadi Salim
2015-10-12 18:38 ` [Patch net-next 2/4] net_sched: update hierarchical backlog too Cong Wang
2015-10-14 12:11 ` Jamal Hadi Salim
2015-10-15 4:32 ` Cong Wang
2015-10-16 12:22 ` Jamal Hadi Salim
2015-10-12 18:38 ` [Patch net-next 3/4] sch_htb: update backlog as well Cong Wang
2015-10-14 12:25 ` Jamal Hadi Salim
2015-10-15 4:21 ` Cong Wang
2015-10-16 12:19 ` Jamal Hadi Salim
2015-10-19 20:46 ` Cong Wang
2015-10-12 18:38 ` Cong Wang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1444675083-9825-5-git-send-email-xiyou.wangcong@gmail.com \
--to=xiyou.wangcong@gmail.com \
--cc=jhs@mojatatu.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).