Skip to contentSkip to conversation

iproute2: sch_rr support in tc

PATCH New PJ Waskiewicz 1 participant 2 messages Jun 18, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iproute2: sch_rr support in tc

This patch is to support the new sch_rr (round-robin) qdisc being proposed in NET for multiqueue network device support in the Linux network stack. It uses q_prio.c as the template, since the qdiscs are nearly identical, outside of the ->dequeue() routine.

I'm soliciting feedback for a 2.6.23 multiqueue submission. Thanks.

Signature · 1 line
PJ Waskiewicz <[email protected]>
#1 lore raw

PATCH 1/1 iproute2: Added support for RR qdisc (sch_rr)

Add tc support for the sch_rr qdisc. This qdisc supports multiple queues
on hardware. The syntax for sch_rr is the same as sch_prio.

---

 include/linux/pkt_sched.h |   11 ++++
 tc/Makefile               |    1 
 tc/q_rr.c                 |  113 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 125 insertions(+), 0 deletions(-)
include/linux/pkt_sched.h +11 -0
index d10f353..907412b 100644
@@ -22,6 +22,7 @@
 #define TC_PRIO_CONTROL			7
 
 #define TC_PRIO_MAX			15
+#define TC_RR_MAX			15
 
 /* Generic queue statistics, available for all the elements.
    Particular schedulers may have also their private records.
@@ -90,6 +91,16 @@ struct tc_fifo_qopt
 	__u32	limit;	/* Queue length: bytes for bfifo, packets for pfifo */
 };
 
+/* RR section */
+#define TCQ_RR_BANDS	16
+#define TCQ_MIN_RR_BANDS 2
+
+struct tc_rr_qopt
+{
+	int	bands;
+	__u8	priomap[TC_RR_MAX + 1];
+};
+
 /* PRIO section */
 
 #define TCQ_PRIO_BANDS	16
tc/Makefile +1 -0
index 9d618ff..62e2697 100644
@@ -9,6 +9,7 @@ TCMODULES += q_fifo.o
 TCMODULES += q_sfq.o
 TCMODULES += q_red.o
 TCMODULES += q_prio.o
+TCMODULES += q_rr.o
 TCMODULES += q_tbf.o
 TCMODULES += q_cbq.o
 TCMODULES += f_rsvp.o
tc/q_rr.c new file +113 -0

113 lines not on this page · raw message