linux/net/sched
Eric Dumazet 5a308f40bf 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 <edumazet@google.com>
Cc: Hagen Paul Pfeifer <hagen@jauu.net>
Cc: Mark Gordon <msg@google.com>
Cc: Andreas Terzis <aterzis@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-16 23:08:33 -07:00
..
act_api.c pkt_sched: act_api: Move away from NLMSG_PUT(). 2012-06-26 21:39:32 -07:00
act_csum.c ipv6: correct the ipv6 option name - Pad0 to Pad1 2012-05-17 15:49:51 -04:00
act_gact.c pkt_sched: Stop using NLA_PUT*(). 2012-04-01 18:11:37 -04:00
act_ipt.c net: Convert net_ratelimit uses to net_<level>_ratelimited 2012-05-15 13:45:03 -04:00
act_mirred.c net: Convert net_ratelimit uses to net_<level>_ratelimited 2012-05-15 13:45:03 -04:00
act_nat.c pkt_sched: Stop using NLA_PUT*(). 2012-04-01 18:11:37 -04:00
act_pedit.c pkt_sched: Stop using NLA_PUT*(). 2012-04-01 18:11:37 -04:00
act_police.c pkt_sched: Stop using NLA_PUT*(). 2012-04-01 18:11:37 -04:00
act_simple.c pkt_sched: Stop using NLA_PUT*(). 2012-04-01 18:11:37 -04:00
act_skbedit.c pkt_sched: Stop using NLA_PUT*(). 2012-04-01 18:11:37 -04:00
cls_api.c pkt_sched: cls_api: Move away from NLMSG_NEW(). 2012-06-26 21:54:15 -07:00
cls_basic.c pkt_sched: Stop using NLA_PUT*(). 2012-04-01 18:11:37 -04:00
cls_cgroup.c cgroup: convert all non-memcg controllers to the new cftype interface 2012-04-01 12:09:55 -07:00
cls_flow.c pkt_sched: Stop using NLA_PUT*(). 2012-04-01 18:11:37 -04:00
cls_fw.c pkt_sched: Stop using NLA_PUT*(). 2012-04-01 18:11:37 -04:00
cls_route.c pkt_sched: Stop using NLA_PUT*(). 2012-04-01 18:11:37 -04:00
cls_rsvp6.c
cls_rsvp.c
cls_rsvp.h pkt_sched: Stop using NLA_PUT*(). 2012-04-01 18:11:37 -04:00
cls_tcindex.c pkt_sched: Stop using NLA_PUT*(). 2012-04-01 18:11:37 -04:00
cls_u32.c net: Convert net_ratelimit uses to net_<level>_ratelimited 2012-05-15 13:45:03 -04:00
em_canid.c net: em_canid: Ematch rule to match CAN frames according to their identifiers 2012-07-04 13:07:05 +02:00
em_cmp.c net_sched: cleanups 2011-01-19 23:31:12 -08:00
em_ipset.c net: sched: add ipset ematch 2012-07-12 07:54:46 -07:00
em_meta.c pkt_sched: Stop using NLA_PUT*(). 2012-04-01 18:11:37 -04:00
em_nbyte.c net_sched: cleanups 2011-01-19 23:31:12 -08:00
em_text.c net_sched: cleanups 2011-01-19 23:31:12 -08:00
em_u32.c net_sched: cleanups 2011-01-19 23:31:12 -08:00
ematch.c net: Convert net_ratelimit uses to net_<level>_ratelimited 2012-05-15 13:45:03 -04:00
Kconfig net: sched: add ipset ematch 2012-07-12 07:54:46 -07:00
Makefile net: sched: add ipset ematch 2012-07-12 07:54:46 -07:00
sch_api.c pkt_sched: sch_api: Move away from NLMSG_NEW(). 2012-06-26 21:54:15 -07:00
sch_atm.c sch_atm.c: get rid of poinless extern 2012-06-01 10:37:18 -04:00
sch_blackhole.c
sch_cbq.c pkt_sched: Stop using NLA_PUT*(). 2012-04-01 18:11:37 -04:00
sch_choke.c net: sched: factorize code (qdisc_drop()) 2012-05-04 11:50:05 -04:00
sch_codel.c fq_codel: should use qdisc backlog as threshold 2012-05-16 15:30:26 -04:00
sch_drr.c net_sched: update bstats in dequeue() 2012-05-10 23:33:01 -04:00
sch_dsmark.c net: sched: factorize code (qdisc_drop()) 2012-05-04 11:50:05 -04:00
sch_fifo.c pkt_sched: Stop using NLA_PUT*(). 2012-04-01 18:11:37 -04:00
sch_fq_codel.c fq_codel: should use qdisc backlog as threshold 2012-05-16 15:30:26 -04:00
sch_generic.c net: Convert net_ratelimit uses to net_<level>_ratelimited 2012-05-15 13:45:03 -04:00
sch_gred.c net: Convert net_ratelimit uses to net_<level>_ratelimited 2012-05-15 13:45:03 -04:00
sch_hfsc.c net_sched: update bstats in dequeue() 2012-05-10 23:33:01 -04:00
sch_htb.c net_sched: update bstats in dequeue() 2012-05-10 23:33:01 -04:00
sch_ingress.c net_sched: factorize qdisc stats handling 2011-01-10 16:07:54 -08:00
sch_mq.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
sch_mqprio.c pkt_sched: Stop using NLA_PUT*(). 2012-04-01 18:11:37 -04:00
sch_multiq.c pkt_sched: Stop using NLA_PUT*(). 2012-04-01 18:11:37 -04:00
sch_netem.c netem: refine early skb orphaning 2012-07-16 23:08:33 -07:00
sch_plug.c net_sched: sch_plug: plug_qdisc_ops is static 2012-02-13 16:04:40 -05:00
sch_prio.c pkt_sched: Stop using NLA_PUT*(). 2012-04-01 18:11:37 -04:00
sch_qfq.c pkt_sched: Stop using NLA_PUT*(). 2012-04-01 18:11:37 -04:00
sch_red.c pkt_sched: Stop using NLA_PUT*(). 2012-04-01 18:11:37 -04:00
sch_sfb.c pkt_sched: Stop using NLA_PUT*(). 2012-04-01 18:11:37 -04:00
sch_sfq.c pkt_sched: Stop using NLA_PUT*(). 2012-04-01 18:11:37 -04:00
sch_tbf.c pkt_sched: Stop using NLA_PUT*(). 2012-04-01 18:11:37 -04:00
sch_teql.c sch_teql: Convert over to dev_neigh_lookup_skb(). 2012-07-05 01:09:06 -07:00