Skip to content

Commit

Permalink
netem: update backlog after drop
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
stephen hemminger authored and David S. Miller committed Oct 11, 2013
1 parent 455cc32 commit 638a52b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/sched/sch_netem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 638a52b

Please sign in to comment.