iproute2: tc add mqprio qdisc support
Subsystems (2)
PATCH v2 1/1 iproute2: tc add mqprio qdisc support
Add mqprio qdisc support. Output matches the following,
# ./tc/tc qdisc
qdisc mq 0: dev eth1 root
qdisc mq 0: dev eth2 root
qdisc mqprio 8001: dev eth3 root tc 8 map 0 1 2 3 4 5 6 7 1 1 1 1 1 1 1 1
queues:(0:7) (8:15) (16:23) (24:31) (32:39) (40:47) (48:55) (56:63)And usage is,
# ./tc/tc qdisc add dev eth3 root mqprio help
Usage: ... mqprio [num_tc NUMBER] [map P0 P1 ...]
[queues count1@offset1 count2@offset2 ...] [hw 1|0]Signed-off-by John Fastabend <[email protected]>
---
include/linux/pkt_sched.h | 12 ++++ tc/Makefile | 1 tc/q_mqprio.c | 134 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 147 insertions(+), 0 deletions(-) create mode 100644 tc/q_mqprio.c
include/linux/pkt_sched.h +12 -0
@@ -481,4 +481,16 @@ struct tc_drr_stats { __u32 deficit; }; +/* MQPRIO */ +#define TC_QOPT_BITMASK 15 +#define TC_QOPT_MAX_QUEUE 16 + +struct tc_mqprio_qopt { +__u8 num_tc; +__u8 prio_tc_map[TC_QOPT_BITMASK +1 ]; +__u8 hw; +__u16 count[TC_QOPT_MAX_QUEUE ]; +__u16 offset[TC_QOPT_MAX_QUEUE ]; +}; +#endif
tc/Makefile +1 -0
@@ -43,6 +43,7 @@ TCMODULES += em_nbyte.o TCMODULES += em_cmp.o TCMODULES += em_u32.o TCMODULES += em_meta.o +TCMODULES += q_mqprio.o TCSO := ifeq ($(TC_CONFIG_ATM),y)
tc/q_mqprio.c new file +134 -0
134 lines not on this page · raw message
Quoted 1 line · John Fastabend
Add mqprio qdisc support. Output matches the following,
[...]
Stephen already applied the previous version of this, so you'll need to provide an incremental patch to change the argument parsing.
Ben.
Signature · 3 lines
Ben Hutchings, Senior Software Engineer, Solarflare Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.
Quoted 9 lines · Ben Hutchings
Quoted 1 line · John Fastabend
Add mqprio qdisc support. Output matches the following,
[...]
Stephen already applied the previous version of this, so you'll need to provide an incremental patch to change the argument parsing.
Ben.
OK done. Thanks Ben.