diff options
author | Eric Dumazet <edumazet@google.com> | 2012-05-10 07:36:34 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-11 05:33:01 +0200 |
commit | 2dd875ff31ac7ff42d6fc7d7f78ac6c0635439f5 (patch) | |
tree | c75209ccd8374f9695d4ec854d5b4bfb80c5e0dc /net/sched/sch_hfsc.c | |
parent | net, drivers/net: Convert compare_ether_addr_64bits to ether_addr_equal_64bits (diff) | |
download | linux-2dd875ff31ac7ff42d6fc7d7f78ac6c0635439f5.tar.xz linux-2dd875ff31ac7ff42d6fc7d7f78ac6c0635439f5.zip |
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_hfsc.c')
-rw-r--r-- | net/sched/sch_hfsc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c index 8db3e2c72827..6c2ec4510540 100644 --- a/net/sched/sch_hfsc.c +++ b/net/sched/sch_hfsc.c @@ -1609,7 +1609,6 @@ hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch) if (cl->qdisc->q.qlen == 1) set_active(cl, qdisc_pkt_len(skb)); - bstats_update(&cl->bstats, skb); sch->q.qlen++; return NET_XMIT_SUCCESS; @@ -1657,6 +1656,7 @@ hfsc_dequeue(struct Qdisc *sch) return NULL; } + bstats_update(&cl->bstats, skb); update_vf(cl, qdisc_pkt_len(skb), cur_time); if (realtime) cl->cl_cumul += qdisc_pkt_len(skb); |