Add SKB Priority qdisc support in tc(8)
Subsystems (3)
PATCH 1/1 Add SKB Priority qdisc support in tc(8)
sch_skbprio is a qdisc that prioritizes packets according to their skb->priority field. Under congestion, it drops already-enqueued lower priority packets to make space available for higher priority packets. Skbprio was conceived as a solution for denial-of-service defenses that need to route packets with different priorities as a means to overcome DoS attacks.
--- include/uapi/linux/pkt_sched.h | 7 ++++ man/man8/tc-skbprio.8 | 70 ++++++++++++++++++++++++++++++++++++ tc/Makefile | 1 + tc/q_skbprio.c | 81 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 159 insertions(+) create mode 100644 man/man8/tc-skbprio.8 create mode 100644 tc/q_skbprio.c
include/uapi/linux/pkt_sched.h +7 -0
@@ -124,6 +124,12 @@ struct tc_fifo_qopt {__u32 limit;/* Queue length: bytes for bfifo, packets for pfifo */ }; +/* SKBPRIO section */ + +struct tc_skbprio_qopt { +__u32 limit;/* Queue length in packets. */ +}; +/* PRIO section */ #define TCQ_PRIO_BANDS 16
@@ -256,6 +262,7 @@ struct tc_red_qopt {#define TC_RED_ECN 1#define TC_RED_HARDDROP 2#define TC_RED_ADAPTATIVE 4 +#define TC_RED_OFFLOADED 8 };struct tc_red_xstats {
man/man8/tc-skbprio.8 new file +70 -0
70 lines not on this page · raw message
tc/Makefile +1 -0
@@ -71,6 +71,7 @@ TCMODULES += q_clsact.o TCMODULES += e_bpf.o TCMODULES += f_matchall.o TCMODULES += q_cbs.o +TCMODULES += q_skbprio.o TCSO := ifeq ($(TC_CONFIG_ATM),y)
tc/q_skbprio.c new file +81 -0
81 lines not on this page · raw message
Signature · 1 line
1.9.1
Quoted 8 lines · Nishanth Devarajan
sch_skbpriois a qdisc that prioritizes packets according to theirskb->priorityfield. Under congestion, it drops already-enqueued lower priority packets to make space available for higher priority packets. Skbprio was conceived as a solution for denial-of-service defenses that need to route packets with different priorities as a means to overcome DoS attacks.Signed-off-by Nishanth Devarajan <[email protected]>Reviewed-by Michel Machado <[email protected]>
Quoted 9 lines
--- include/uapi/linux/pkt_sched.h | 7 ++++ man/man8/tc-skbprio.8 | 70 ++++++++++++++++++++++++++++++++++++ tc/Makefile | 1 + tc/q_skbprio.c | 81 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 159 insertions(+) create mode 100644 man/man8/tc-skbprio.8 create mode 100644 tc/q_skbprio.c
Does not apply cleanly to iproute2-next. Also, you have a couple of lines > 80 columns that can be easily corrected.