All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] net: netem: do not reorder when reordering is disabled
@ 2013-08-20 15:11 Ferry Huberts
  2013-08-20 15:11 ` [PATCH 2/2] net: netem: always adjust now/delay when not reordering Ferry Huberts
  0 siblings, 1 reply; 16+ messages in thread
From: Ferry Huberts @ 2013-08-20 15:11 UTC (permalink / raw)
  To: netdev

From: Ferry Huberts <ferry.huberts@pelagic.nl>

The case (q->reorder == 0 && get_crandom(&q->reorder_cor) == 0)
could result in reordering even though reordering is disabled.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
---
 net/sched/sch_netem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index 82f6016..abe5fa6 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -454,7 +454,7 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch)
 	sch->qstats.backlog += qdisc_pkt_len(skb);
 
 	cb = netem_skb_cb(skb);
-	if (q->gap == 0 ||		/* not doing reordering */
+	if (q->gap == 0 || q->reorder == 0 || /* not doing reordering */
 	    q->counter < q->gap - 1 ||	/* inside last reordering gap */
 	    q->reorder < get_crandom(&q->reorder_cor)) {
 		psched_time_t now;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-08-23 12:50 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-20 15:11 [PATCH 1/2] net: netem: do not reorder when reordering is disabled Ferry Huberts
2013-08-20 15:11 ` [PATCH 2/2] net: netem: always adjust now/delay when not reordering Ferry Huberts
2013-08-20 18:31   ` Sergei Shtylyov
2013-08-20 20:33   ` Eric Dumazet
2013-08-21  5:59     ` [PATCH v2 " Ferry Huberts
2013-08-21  6:14       ` Eric Dumazet
2013-08-21  7:04         ` Ferry Huberts
2013-08-21 13:30           ` Eric Dumazet
2013-08-21 14:02             ` mailings
2013-08-21 14:10               ` mailings
2013-08-21 15:17   ` [PATCH " Johannes Naab
2013-08-21 15:39     ` Eric Dumazet
2013-08-21 16:14       ` Ferry Huberts
2013-08-21 17:00         ` Eric Dumazet
2013-08-21 17:35           ` Stephen Hemminger
2013-08-23 12:50         ` Ferry Huberts

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.