diff options
-rw-r--r-- | net/sched/sch_netem.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index c412ad0d0308..298c0ddfb57e 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c | |||
@@ -380,7 +380,14 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) | |||
380 | return NET_XMIT_SUCCESS | __NET_XMIT_BYPASS; | 380 | return NET_XMIT_SUCCESS | __NET_XMIT_BYPASS; |
381 | } | 381 | } |
382 | 382 | ||
383 | skb_orphan(skb); | 383 | /* If a delay is expected, orphan the skb. (orphaning usually takes |
384 | * place at TX completion time, so _before_ the link transit delay) | ||
385 | * Ideally, this orphaning should be done after the rate limiting | ||
386 | * module, because this breaks TCP Small Queue, and other mechanisms | ||
387 | * based on socket sk_wmem_alloc. | ||
388 | */ | ||
389 | if (q->latency || q->jitter) | ||
390 | skb_orphan(skb); | ||
384 | 391 | ||
385 | /* | 392 | /* |
386 | * If we need to duplicate packet, then re-insert at top of the | 393 | * If we need to duplicate packet, then re-insert at top of the |