linux-stable/net/sched
Eric Dumazet 50612537e9 netem: fix classful handling
Commit 10f6dfcfde (Revert "sch_netem: Remove classful functionality")
reintroduced classful functionality to netem, but broke basic netem
behavior :

netem uses an t(ime)fifo queue, and store timestamps in skb->cb[]

If qdisc is changed, time constraints are not respected and other qdisc
can destroy skb->cb[] and block netem at dequeue time.

Fix this by always using internal tfifo, and optionally attach a child
qdisc to netem (or a tree of qdiscs)

Example of use :

DEV=eth3
tc qdisc del dev $DEV root
tc qdisc add dev $DEV root handle 30: est 1sec 8sec netem delay 20ms 10ms
tc qdisc add dev $DEV handle 40:0 parent 30:0 tbf \
	burst 20480 limit 20480 mtu 1514 rate 32000bps

qdisc netem 30: root refcnt 18 limit 1000 delay 20.0ms  10.0ms
 Sent 190792 bytes 413 pkt (dropped 0, overlimits 0 requeues 0)
 rate 18416bit 3pps backlog 0b 0p requeues 0
qdisc tbf 40: parent 30: rate 256000bit burst 20Kb/8 mpu 0b lat 0us
 Sent 190792 bytes 413 pkt (dropped 6, overlimits 10 requeues 0)
 backlog 0b 5p requeues 0

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-30 17:12:23 -05:00
..
act_api.c net: Fix files explicitly needing to include module.h 2011-10-31 19:30:28 -04:00
act_csum.c net: sched: constify tcf_proto and tc_action 2011-07-06 02:52:16 -07:00
act_gact.c net: sched: constify tcf_proto and tc_action 2011-07-06 02:52:16 -07:00
act_ipt.c net: sched: constify tcf_proto and tc_action 2011-07-06 02:52:16 -07:00
act_mirred.c net_sched: fix port mirror/redirect stats reporting 2011-08-17 20:10:20 -07:00
act_nat.c net: sched: constify tcf_proto and tc_action 2011-07-06 02:52:16 -07:00
act_pedit.c net: sched: constify tcf_proto and tc_action 2011-07-06 02:52:16 -07:00
act_police.c net: sched: constify tcf_proto and tc_action 2011-07-06 02:52:16 -07:00
act_simple.c net: sched: constify tcf_proto and tc_action 2011-07-06 02:52:16 -07:00
act_skbedit.c net: sched: constify tcf_proto and tc_action 2011-07-06 02:52:16 -07:00
cls_api.c net: sched: constify tcf_proto and tc_action 2011-07-06 02:52:16 -07:00
cls_basic.c net: sched: constify tcf_proto and tc_action 2011-07-06 02:52:16 -07:00
cls_cgroup.c net: sched: constify tcf_proto and tc_action 2011-07-06 02:52:16 -07:00
cls_flow.c cls_flow: remove one dynamic array 2011-12-14 13:34:55 -05:00
cls_fw.c net: sched: constify tcf_proto and tc_action 2011-07-06 02:52:16 -07:00
cls_route.c net: sched: constify tcf_proto and tc_action 2011-07-06 02:52:16 -07:00
cls_rsvp.c
cls_rsvp.h pkt_sched: cls_rsvp.h was outdated 2011-09-15 14:49:43 -04:00
cls_rsvp6.c
cls_tcindex.c net: sched: constify tcf_proto and tc_action 2011-07-06 02:52:16 -07:00
cls_u32.c net: sched: constify tcf_proto and tc_action 2011-07-06 02:52:16 -07:00
em_cmp.c net_sched: cleanups 2011-01-19 23:31:12 -08:00
em_meta.c net: remove SK_ROUTE_CAPS from meta ematch 2011-07-14 14:45:59 -07: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_sched: cleanups 2011-01-19 23:31:12 -08:00
Kconfig networking: NET_CLS_ROUTE4 depends on INET 2011-05-19 19:23:28 -04:00
Makefile pkt_sched: QFQ - quick fair queue scheduler 2011-04-04 11:10:24 -07:00
sch_api.c net: sched: constify tcf_proto and tc_action 2011-07-06 02:52:16 -07:00
sch_atm.c net: remove interrupt.h inclusion from netdevice.h 2011-06-06 22:55:11 -07:00
sch_blackhole.c
sch_cbq.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2011-01-24 14:09:35 -08:00
sch_choke.c sch_red: generalize accurate MAX_P support to RED/GRED/CHOKE 2011-12-09 13:46:15 -05:00
sch_drr.c net_sched: accurate bytes/packets stats/rates 2011-01-20 23:31:33 -08:00
sch_dsmark.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2011-01-24 14:09:35 -08:00
sch_fifo.c net_sched: reduce fifo qdisc size 2011-03-03 11:10:02 -08:00
sch_generic.c net: Add queue state xoff flag for stack 2011-11-29 12:46:19 -05:00
sch_gred.c sch_gred: prefer GFP_KERNEL allocations 2011-12-16 15:40:33 -05:00
sch_hfsc.c sch_hfsc: report backlog information 2011-12-23 16:51:18 -05:00
sch_htb.c Fix common misspellings 2011-03-31 11:26:23 -03: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 mqprio: Avoid panic if no options are provided 2011-12-22 22:34:56 -05:00
sch_multiq.c net: Add queue state xoff flag for stack 2011-11-29 12:46:19 -05:00
sch_netem.c netem: fix classful handling 2011-12-30 17:12:23 -05:00
sch_prio.c net_sched: prio: use qdisc_dequeue_peeked 2011-08-09 21:52:11 -07:00
sch_qfq.c pkt_sched: QFQ - quick fair queue scheduler 2011-04-04 11:10:24 -07:00
sch_red.c sch_red: generalize accurate MAX_P support to RED/GRED/CHOKE 2011-12-09 13:46:15 -05:00
sch_sfb.c sch_sfb: use skb_flow_dissect() 2011-11-28 19:09:28 -05:00
sch_sfq.c sch_sfq: rehash queues in perturb timer 2011-12-21 15:44:34 -05:00
sch_tbf.c sch_tbf: report backlog information 2011-12-29 15:07:21 -05:00
sch_teql.c net: Rename dst_get_neighbour{, _raw} to dst_get_neighbour_noref{, _raw}. 2011-12-05 15:20:19 -05:00