Patchwork netem: fix unwanted reordering

login
register
mail settings
Submitter Eric Dumazet
Date Feb. 16, 2012, 5:49 a.m.
Message ID <1329371375.5646.6.camel@edumazet-laptop>
Download mbox | patch
Permalink /patch/141503/
State Superseded
Delegated to: David Miller
Headers show

Comments

Eric Dumazet - Feb. 16, 2012, 5:49 a.m.
commit 50612537e9 (netem: fix classful handling) added in typo in
netem_dequeue() :

After checking skb at the head of tfifo queue for time constraints, it
dequeues tail skb, thus adding unwanted reordering.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
 net/sched/sch_netem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Eric Dumazet - Feb. 16, 2012, 6:13 a.m.
Le jeudi 16 février 2012 à 06:49 +0100, Eric Dumazet a écrit :
> commit 50612537e9 (netem: fix classful handling) added in typo in
> netem_dequeue() :
> 
> After checking skb at the head of tfifo queue for time constraints, it
> dequeues tail skb, thus adding unwanted reordering.
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> ---
>  net/sched/sch_netem.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Please dont apply this patch, there is a 2nd issue I must fix as well

(qdisc stats are updated twice)




--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index e83d61c..1db8ff0 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -501,7 +501,7 @@  tfifo_dequeue:
 
 		/* if more time remaining? */
 		if (cb->time_to_send <= psched_get_time()) {
-			skb = qdisc_dequeue_tail(sch);
+			skb = qdisc_dequeue_head(sch);
 			if (unlikely(!skb))
 				goto qdisc_dequeue;