diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2012-02-15 20:28:25 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-19 18:57:50 -0500 |
commit | cd961c2ca98efbe7d738ca8720673fc03538b2b1 (patch) | |
tree | f53abc9d2ac6bdd0659c46e30ac44e2cbdf74f01 /net | |
parent | b01543dfe67bb1d191998e90d20534dc354de059 (diff) | |
download | linux-cd961c2ca98efbe7d738ca8720673fc03538b2b1.tar.bz2 |
netem: fix dequeue
commit 50612537e9 (netem: fix classful handling) added two errors in
netem_dequeue()
1) After checking skb at the head of tfifo queue for time constraints,
it dequeues tail skb, thus adding unwanted reordering.
2) qdisc stats are updated twice per packet
(one when packet dequeued from tfifo, once when delivered)
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/sched/sch_netem.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index e83d61ca78ca..5da548fa7ae9 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c @@ -501,9 +501,8 @@ tfifo_dequeue: /* if more time remaining? */ if (cb->time_to_send <= psched_get_time()) { - skb = qdisc_dequeue_tail(sch); - if (unlikely(!skb)) - goto qdisc_dequeue; + __skb_unlink(skb, &sch->q); + sch->qstats.backlog -= qdisc_pkt_len(skb); #ifdef CONFIG_NET_CLS_ACT /* @@ -539,7 +538,6 @@ deliver: qdisc_watchdog_schedule(&q->watchdog, cb->time_to_send); } -qdisc_dequeue: if (q->qdisc) { skb = q->qdisc->ops->dequeue(q->qdisc); if (skb) |