diff options
author | Eric Dumazet <edumazet@google.com> | 2012-05-10 01:36:34 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-10 23:33:01 -0400 |
commit | 2dd875ff31ac7ff42d6fc7d7f78ac6c0635439f5 (patch) | |
tree | c75209ccd8374f9695d4ec854d5b4bfb80c5e0dc /net/sched/sch_atm.c | |
parent | a6700db17980972199e61c06be535a79e1b0b4e6 (diff) |
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_atm.c')
-rw-r--r-- | net/sched/sch_atm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c index a77a4fbc069a..8522a4793374 100644 --- a/net/sched/sch_atm.c +++ b/net/sched/sch_atm.c | |||
@@ -423,8 +423,6 @@ drop: __maybe_unused | |||
423 | } | 423 | } |
424 | return ret; | 424 | return ret; |
425 | } | 425 | } |
426 | qdisc_bstats_update(sch, skb); | ||
427 | bstats_update(&flow->bstats, skb); | ||
428 | /* | 426 | /* |
429 | * Okay, this may seem weird. We pretend we've dropped the packet if | 427 | * Okay, this may seem weird. We pretend we've dropped the packet if |
430 | * it goes via ATM. The reason for this is that the outer qdisc | 428 | * it goes via ATM. The reason for this is that the outer qdisc |
@@ -472,6 +470,8 @@ static void sch_atm_dequeue(unsigned long data) | |||
472 | if (unlikely(!skb)) | 470 | if (unlikely(!skb)) |
473 | break; | 471 | break; |
474 | 472 | ||
473 | qdisc_bstats_update(sch, skb); | ||
474 | bstats_update(&flow->bstats, skb); | ||
475 | pr_debug("atm_tc_dequeue: sending on class %p\n", flow); | 475 | pr_debug("atm_tc_dequeue: sending on class %p\n", flow); |
476 | /* remove any LL header somebody else has attached */ | 476 | /* remove any LL header somebody else has attached */ |
477 | skb_pull(skb, skb_network_offset(skb)); | 477 | skb_pull(skb, skb_network_offset(skb)); |