From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: bloat-devel@lists.bufferbloat.net
Subject: [PATCH RFC 3/3] Make pfifo_fast track qlen stats.
Date: Mon, 10 Jun 2013 14:39:49 +0200 [thread overview]
Message-ID: <1370867989-7318-4-git-send-email-toke@toke.dk> (raw)
In-Reply-To: <1370867989-7318-1-git-send-email-toke@toke.dk>
---
net/sched/sch_generic.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 1b4e16d..0ca0d06 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -522,6 +522,8 @@ static int pfifo_fast_enqueue(struct sk_buff *skb, struct Qdisc *qdisc)
priv->bitmap |= (1 << band);
qdisc->q.qlen++;
+ qdisc->qstats.qlen++;
+ qdisc->qstats.backlog += qdisc_pkt_len(skb);
return __qdisc_enqueue_tail(skb, qdisc, list);
}
@@ -538,6 +540,8 @@ static struct sk_buff *pfifo_fast_dequeue(struct Qdisc *qdisc)
struct sk_buff *skb = __qdisc_dequeue_head(qdisc, list);
qdisc->q.qlen--;
+ qdisc->qstats.qlen--;
+ qdisc->qstats.backlog -= qdisc_pkt_len(skb);
if (skb_queue_empty(list))
priv->bitmap &= ~(1 << band);
--
1.8.3
next prev parent reply other threads:[~2013-06-10 12:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-10 12:39 [PATCH RFC 0/3] Broadcasting qdisc statistics via netlink Toke Høiland-Jørgensen
2013-06-10 12:39 ` [PATCH RFC 1/3] Broadcast qdisc statistics via netlink on packet dequeue Toke Høiland-Jørgensen
2013-06-10 17:20 ` Dave Taht
2013-06-11 7:15 ` Toke Høiland-Jørgensen
2013-06-10 12:39 ` [PATCH RFC 2/3] Add qdisc_stats_broadcast_interval sysctl parameter, and use it to limit stats broadcast interval Toke Høiland-Jørgensen
2013-06-10 12:39 ` Toke Høiland-Jørgensen [this message]
2013-06-17 19:07 ` [RFC PATCH v2] Broadcast qdisc statistics via netlink on packet dequeue Toke Høiland-Jørgensen
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=1370867989-7318-4-git-send-email-toke@toke.dk \
--to=toke@toke.dk \
--cc=bloat-devel@lists.bufferbloat.net \
/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