From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>
Subject: [PATCH net-next] sch_htb: report backlog information in htb classes
Date: Sat, 12 May 2012 00:31:34 +0200 [thread overview]
Message-ID: <1336775494.31653.297.camel@edumazet-glaptop> (raw)
From: Eric Dumazet <edumazet@google.com>
htb classes at level 0 can copy their qdisc child backlog to provide to
"tc -s class" users more relevant information. (packet counter is
correct but byte counter (backlog) is 0)
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
net/sched/sch_htb.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 9d75b77..0f4d534 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -1073,9 +1073,10 @@ static int htb_dump_class(struct Qdisc *sch, unsigned long arg,
spin_lock_bh(root_lock);
tcm->tcm_parent = cl->parent ? cl->parent->common.classid : TC_H_ROOT;
tcm->tcm_handle = cl->common.classid;
- if (!cl->level && cl->un.leaf.q)
+ if (!cl->level && cl->un.leaf.q) {
tcm->tcm_info = cl->un.leaf.q->handle;
-
+ sch->qstats.backlog = cl->un.leaf.q->qstats.backlog;
+ }
nest = nla_nest_start(skb, TCA_OPTIONS);
if (nest == NULL)
goto nla_put_failure;
next reply other threads:[~2012-05-11 22:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-11 22:31 Eric Dumazet [this message]
2012-05-11 22:41 ` [PATCH net-next] sch_htb: report backlog information in htb classes Eric Dumazet
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=1336775494.31653.297.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--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