netem: update backlog after drop
authorstephen hemminger <stephen@networkplumber.org>
Sun, 6 Oct 2013 22:15:33 +0000 (15:15 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 Oct 2013 21:29:29 +0000 (17:29 -0400)
When packet is dropped from rb-tree netem the backlog statistic should
also be updated.

Reported-by: Сергеев Сергей <adron@yapic.net>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_netem.c

index a6d788d..6b75b67 100644 (file)
@@ -520,6 +520,7 @@ static unsigned int netem_drop(struct Qdisc *sch)
                        skb->next = NULL;
                        skb->prev = NULL;
                        len = qdisc_pkt_len(skb);
+                       sch->qstats.backlog -= len;
                        kfree_skb(skb);
                }
        }