From: Eric Dumazet Date: Sat, 14 Jul 2012 03:16:27 +0000 (+0000) Subject: netem: refine early skb orphaning X-Git-Tag: v3.6-rc1~125^2~152 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a308f40bfe27fcfd1db3970afe18b635f23c182;p=pandora-kernel.git netem: refine early skb orphaning netem does an early orphaning of skbs. Doing so breaks TCP Small Queue or any mechanism relying on socket sk_wmem_alloc feedback. Ideally, we should perform this orphaning after the rate module and before the delay module, to mimic what happens on a real link : skb orphaning is indeed normally done at TX completion, before the transit on the link. +-------+ +--------+ +---------------+ +-----------------+ + Qdisc +---> Device +--> TX completion +--> links / hops +-> + + + xmit + + skb orphaning + + propagation + +-------+ +--------+ +---------------+ +-----------------+ < rate limiting > < delay, drops, reorders > If netem is used without delay feature (drops, reorders, rate limiting), then we should avoid early skb orphaning, to keep pressure on sockets as long as packets are still in qdisc queue. Ideally, netem should be refactored to implement delay module as the last stage. Current algorithm merges the two phases (rate limiting + delay) so its not correct. Signed-off-by: Eric Dumazet Cc: Hagen Paul Pfeifer Cc: Mark Gordon Cc: Andreas Terzis Cc: Yuchung Cheng Acked-by: Stephen Hemminger Signed-off-by: David S. Miller --- Reading git-diff-tree failed