Skip to content

Commit dcc68b4

Browse files
pmachatadavem330
authored andcommitted
net: sch_ets: Add a new Qdisc
Introduces a new Qdisc, which is based on 802.1Q-2014 wording. It is PRIO-like in how it is configured, meaning one needs to specify how many bands there are, how many are strict and how many are dwrr, quanta for the latter, and priomap. The new Qdisc operates like the PRIO / DRR combo would when configured as per the standard. The strict classes, if any, are tried for traffic first. When there's no traffic in any of the strict queues, the ETS ones (if any) are treated in the same way as in DRR. Signed-off-by: Petr Machata <[email protected]> Acked-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9cf9b92 commit dcc68b4

File tree

4 files changed

+768
-0
lines changed

4 files changed

+768
-0
lines changed

include/uapi/linux/pkt_sched.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,4 +1187,21 @@ enum {
11871187

11881188
#define TCA_TAPRIO_ATTR_MAX (__TCA_TAPRIO_ATTR_MAX - 1)
11891189

1190+
/* ETS */
1191+
1192+
#define TCQ_ETS_MAX_BANDS 16
1193+
1194+
enum {
1195+
TCA_ETS_UNSPEC,
1196+
TCA_ETS_NBANDS, /* u8 */
1197+
TCA_ETS_NSTRICT, /* u8 */
1198+
TCA_ETS_QUANTA, /* nested TCA_ETS_QUANTA_BAND */
1199+
TCA_ETS_QUANTA_BAND, /* u32 */
1200+
TCA_ETS_PRIOMAP, /* nested TCA_ETS_PRIOMAP_BAND */
1201+
TCA_ETS_PRIOMAP_BAND, /* u8 */
1202+
__TCA_ETS_MAX,
1203+
};
1204+
1205+
#define TCA_ETS_MAX (__TCA_ETS_MAX - 1)
1206+
11901207
#endif

net/sched/Kconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,23 @@ config NET_SCH_PLUG
409409
To compile this code as a module, choose M here: the
410410
module will be called sch_plug.
411411

412+
config NET_SCH_ETS
413+
tristate "Enhanced transmission selection scheduler (ETS)"
414+
help
415+
The Enhanced Transmission Selection scheduler is a classful
416+
queuing discipline that merges functionality of PRIO and DRR
417+
qdiscs in one scheduler. ETS makes it easy to configure a set of
418+
strict and bandwidth-sharing bands to implement the transmission
419+
selection described in 802.1Qaz.
420+
421+
Say Y here if you want to use the ETS packet scheduling
422+
algorithm.
423+
424+
To compile this driver as a module, choose M here: the module
425+
will be called sch_ets.
426+
427+
If unsure, say N.
428+
412429
menuconfig NET_SCH_DEFAULT
413430
bool "Allow override default queue discipline"
414431
---help---

net/sched/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ obj-$(CONFIG_NET_SCH_ATM) += sch_atm.o
4848
obj-$(CONFIG_NET_SCH_NETEM) += sch_netem.o
4949
obj-$(CONFIG_NET_SCH_DRR) += sch_drr.o
5050
obj-$(CONFIG_NET_SCH_PLUG) += sch_plug.o
51+
obj-$(CONFIG_NET_SCH_ETS) += sch_ets.o
5152
obj-$(CONFIG_NET_SCH_MQPRIO) += sch_mqprio.o
5253
obj-$(CONFIG_NET_SCH_SKBPRIO) += sch_skbprio.o
5354
obj-$(CONFIG_NET_SCH_CHOKE) += sch_choke.o

0 commit comments

Comments
 (0)