linux/net/sched
Eric Dumazet 1ee5fa1e99 sch_red: fix red_change
Le mercredi 30 novembre 2011 à 14:36 -0800, Stephen Hemminger a écrit :

> (Almost) nobody uses RED because they can't figure it out.
> According to Wikipedia, VJ says that:
>  "there are not one, but two bugs in classic RED."

RED is useful for high throughput routers, I doubt many linux machines
act as such devices.

I was considering adding Adaptative RED (Sally Floyd, Ramakrishna
Gummadi, Scott Shender), August 2001

In this version, maxp is dynamic (from 1% to 50%), and user only have to
setup min_th (target average queue size)
(max_th and wq (burst in linux RED) are automatically setup)

By the way it seems we have a small bug in red_change()

if (skb_queue_empty(&sch->q))
	red_end_of_idle_period(&q->parms);

First, if queue is empty, we should call
red_start_of_idle_period(&q->parms);

Second, since we dont use anymore sch->q, but q->qdisc, the test is
meaningless.

Oh well...

[PATCH] sch_red: fix red_change()

Now RED is classful, we must check q->qdisc->q.qlen, and if queue is empty,
we start an idle period, not end it.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-01 19:24:38 -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 net: Fix files explicitly needing to include module.h 2011-10-31 19:30:28 -04: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_rsvp6.c [NET_SCHED]: Remove unnecessary includes 2007-07-10 22:16:41 -07:00
cls_rsvp.c [NET_SCHED]: Remove unnecessary includes 2007-07-10 22:16:41 -07:00
cls_rsvp.h pkt_sched: cls_rsvp.h was outdated 2011-09-15 14:49:43 -04:00
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 pkt_sched: Add qdisc->ops->peek() implementation. 2008-10-31 00:45:55 -07:00
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 ip: introduce ip_is_fragment helper inline function 2011-06-21 20:33:34 -07: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 Remove redundant variable/code in __qdisc_run 2011-07-15 08:08:26 -07:00
sch_gred.c net_sched: cleanups 2011-01-19 23:31:12 -08:00
sch_hfsc.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_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 net: Fix files explicitly needing to include module.h 2011-10-31 19:30:28 -04:00
sch_multiq.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_netem.c net: remove mm.h inclusion from netdevice.h 2011-06-21 19:17:20 -07: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: fix red_change 2011-12-01 19:24:38 -05:00
sch_sfb.c net_sched: sfb: optimize enqueue on full queue 2011-08-26 12:55:18 -04:00
sch_sfq.c sch_sfq: fix sfq_enqueue() 2011-08-01 02:27:21 -07:00
sch_tbf.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_teql.c sch_teql: fix lockdep splat 2011-11-30 17:10:49 -05:00