diff options
author | Eric Dumazet <edumazet@google.com> | 2012-05-10 09:36:34 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-11 07:33:01 +0400 |
commit | 2dd875ff31ac7ff42d6fc7d7f78ac6c0635439f5 (patch) | |
tree | c75209ccd8374f9695d4ec854d5b4bfb80c5e0dc /net/sched/sch_htb.c | |
parent | a6700db17980972199e61c06be535a79e1b0b4e6 (diff) | |
download | linux-2dd875ff31ac7ff42d6fc7d7f78ac6c0635439f5.tar.xz |
net_sched: update bstats in dequeue()
Class bytes/packets stats can be misleading because they are updated in
enqueue() while packet might be dropped later.
We already fixed all qdiscs but sch_atm.
This patch makes the final cleanup.
class rate estimators can now match qdisc ones.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_htb.c')
-rw-r--r-- | net/sched/sch_htb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index acae5b0e3849..9d75b7761313 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c @@ -574,7 +574,6 @@ static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch) } return ret; } else { - bstats_update(&cl->bstats, skb); htb_activate(q, cl); } @@ -835,6 +834,7 @@ next: } while (cl != start); if (likely(skb != NULL)) { + bstats_update(&cl->bstats, skb); cl->un.leaf.deficit[level] -= qdisc_pkt_len(skb); if (cl->un.leaf.deficit[level] < 0) { cl->un.leaf.deficit[level] += cl->quantum; |