Skip to content

Commit

Permalink
pkt_sched: add DRR scheduler
Browse files Browse the repository at this point in the history
Add classful DRR scheduler as a more flexible replacement for SFQ.

The main difference to the algorithm described in "Efficient Fair Queueing
using Deficit Round Robin" is that this implementation doesn't drop packets
from the longest queue on overrun because its classful and limits are
handled by each individual child qdisc.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Nov 20, 2008
1 parent 0c19b0a commit 13d2a1d
Show file tree
Hide file tree
Showing 4 changed files with 533 additions and 0 deletions.
16 changes: 16 additions & 0 deletions include/linux/pkt_sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -500,4 +500,20 @@ struct tc_netem_corrupt

#define NETEM_DIST_SCALE 8192

/* DRR */

enum
{
TCA_DRR_UNSPEC,
TCA_DRR_QUANTUM,
__TCA_DRR_MAX
};

#define TCA_DRR_MAX (__TCA_DRR_MAX - 1)

struct tc_drr_stats
{
u32 deficit;
};

#endif
11 changes: 11 additions & 0 deletions net/sched/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,17 @@ config NET_SCH_NETEM

If unsure, say N.

config NET_SCH_DRR
tristate "Deficit Round Robin scheduler (DRR)"
help
Say Y here if you want to use the Deficit Round Robin (DRR) packet
scheduling algorithm.

To compile this driver as a module, choose M here: the module
will be called sch_drr.

If unsure, say N.

config NET_SCH_INGRESS
tristate "Ingress Qdisc"
depends on NET_CLS_ACT
Expand Down
1 change: 1 addition & 0 deletions net/sched/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ obj-$(CONFIG_NET_SCH_PRIO) += sch_prio.o
obj-$(CONFIG_NET_SCH_MULTIQ) += sch_multiq.o
obj-$(CONFIG_NET_SCH_ATM) += sch_atm.o
obj-$(CONFIG_NET_SCH_NETEM) += sch_netem.o
obj-$(CONFIG_NET_SCH_DRR) += sch_drr.o
obj-$(CONFIG_NET_CLS_U32) += cls_u32.o
obj-$(CONFIG_NET_CLS_ROUTE4) += cls_route.o
obj-$(CONFIG_NET_CLS_FW) += cls_fw.o
Expand Down
Loading

0 comments on commit 13d2a1d

Please sign in to comment.