update headers with CBS API [RFC]
Subsystems (2)
RFC 1/2 update headers with CBS API [RFC]
Signed-off-by Vinicius Costa Gomes <[email protected]>
--- include/linux/pkt_sched.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
include/linux/pkt_sched.h +29 -0
@@ -871,4 +871,33 @@ struct tc_pie_xstats {__u32 maxq;/* maximum queue size */ __u32 ecn_mark; /* packets marked with ecn*/ }; + +/* CBS */ +/* FIXME: this is only for usage with ndo_setup_tc(), this should be +* in another header someplace else. Is pkt_cls.h the right place? +*/ +struct tc_cbs_qopt_offload { +__u8 enable; +__s32 queue; +__s32 hicredit; +__s32 locredit; +__s32 idleslope; +__s32 sendslope; +}; + +struct tc_cbs_qopt { +__s32 hicredit; +__s32 locredit; +__s32 idleslope; +__s32 sendslope; +}; + +enum { +TCA_CBS_UNSPEC , +TCA_CBS_PARMS , + __TCA_CBS_MAX, +}; + +#define TCA_CBS_MAX (__TCA_CBS_MAX - 1) +#endif
Signature · 1 line
2.14.1
RFC 2/2 tc: Add support for the CBS qdisc
The Credit Based Shaper (CBS) queueing discipline allows bandwidth reservation with sub-milisecond precision. It is defined by the 802.1Q-2014 specification (section 8.6.8.2 and Annex L).
The syntax is:
tc qdisc add dev DEV parent NODE cbs locredit <LOCREDIT> hicredit <HICREDIT> sendslope <SENDSLOPE> idleslope <IDLESLOPE>
Signed-off-by Vinicius Costa Gomes <[email protected]>
--- tc/Makefile | 1 + tc/q_cbs.c | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 135 insertions(+) create mode 100644 tc/q_cbs.c
tc/Makefile +1 -0
@@ -73,6 +73,7 @@ TCMODULES += q_hhf.o TCMODULES += q_clsact.o TCMODULES += e_bpf.o TCMODULES += f_matchall.o +TCMODULES += q_cbs.o TCSO := ifeq ($(TC_CONFIG_ATM),y)
tc/q_cbs.c new file +134 -0
134 lines not on this page · raw message
Signature · 1 line
2.14.1