Thread (11 messages) 11 messages, 6 authors, 2011-01-21

Re: [PATCH] net_sched: accurate bytes/packets stats/rates

flat view

From: Changli Gao <hidden>
Date: 2011-01-17 00:10:12

On Mon, Jan 17, 2011 at 6:35 AM, Jarek Poplawski [off-list ref] wrote:
On Fri, Jan 14, 2011 at 11:03:42AM -0800, Stephen Hemminger wrote:
quoted
From Eric Dumazet [off-list ref]

In commit 44b8288308ac9d (net_sched: pfifo_head_drop problem), we fixed
a problem with pfifo_head drops that incorrectly decreased
sch->bstats.bytes and sch->bstats.packets

Several qdiscs (CHOKe, SFQ, pfifo_head, ...) are able to drop a
previously enqueued packet, and bstats cannot be changed, so
bstats/rates are not accurate (over estimated)

This patch changes the qdisc_bstats updates to be done at dequeue() time
instead of enqueue() time. bstats counters no longer account for dropped
frames, and rates are more correct, since enqueue() bursts dont have
effect on dequeue() rate.

Signed-off-by: Eric Dumazet <redacted>
Acked-by: Stephen Hemminger <redacted>

CC: Patrick McHardy <redacted>
CC: Jarek Poplawski <redacted>
CC: jamal <redacted>
...
quoted
--- a/net/sched/sch_drr.c     2011-01-14 09:19:00.830857886 -0800
+++ b/net/sched/sch_drr.c     2011-01-14 09:28:20.398631228 -0800
@@ -376,7 +376,6 @@ static int drr_enqueue(struct sk_buff *s
      }

      bstats_update(&cl->bstats, skb);
Why leave leaf classes with different stats?
HTB also has the same problem, and I have fixed in my own product, but
the patch was rejected.

http://patchwork.ozlabs.org/patch/6227/
Jarek P.
quoted
-     qdisc_bstats_update(sch, skb);

      sch->q.qlen++;
      return err;
...


-- 
Regards,
Changli Gao(xiaosuo@gmail.com)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help