Skip to content

Add support for the ETS Qdisc

Petr Machata netdev 1 version Applied

Status from this message: applied to iproute2-next. Thanks for putting a lot of examples in the

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2libnetlink: parse_rtattr_nested should allow NLA_F_NESTED flaginclude/libnetlink.h+2 -10 replies
2/2tc: Add support for ETS Qdiscman/man8/tc-ets.8 man/man8/tc.8 tc/Makefile +1 more+542 -00 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchJiri Pirko
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH iproute2-next 0/2] Add support for the ETS Qdisc

A new Qdisc, "ETS", has been accepted into Linux at kernel commit 6bff00170277 ("Merge branch 'ETS-qdisc'"). Add iproute2 support for this Qdisc.

Patch #1, changes libnetlink to admit NLA_F_NESTED in nested attributes. Patch #2 then adds ETS support as such.

Examples (taken from the kernel patchset):

- Add a Qdisc with 6 bands, 3 strict and 3 ETS with 45%-30%-25% weights:

    # tc qdisc add dev swp1 root handle 1: \
	ets strict 3 quanta 4500 3000 2500 priomap 0 1 1 1 2 3 4 5
    # tc qdisc sh dev swp1
    qdisc ets 1: root refcnt 2 bands 6 strict 3 quanta 4500 3000 2500 priomap 0 1 1 1 2 3 4 5 5 5 5 5 5 5 5 5 

- Tweak quantum of one of the classes of the previous Qdisc:

    # tc class ch dev swp1 classid 1:4 ets quantum 1000
    # tc qdisc sh dev swp1
    qdisc ets 1: root refcnt 2 bands 6 strict 3 quanta 1000 3000 2500 priomap 0 1 1 1 2 3 4 5 5 5 5 5 5 5 5 5 
    # tc class ch dev swp1 classid 1:3 ets quantum 1000
    Error: Strict bands do not have a configurable quantum.

- Purely strict Qdisc with 1:1 mapping between priorities and TCs:

    # tc qdisc add dev swp1 root handle 1: \
	ets strict 8 priomap 7 6 5 4 3 2 1 0
    # tc qdisc sh dev swp1
    qdisc ets 1: root refcnt 2 bands 8 strict 8 priomap 7 6 5 4 3 2 1 0 7 7 7 7 7 7 7 7 

- Use "bands" to specify number of bands explicitly. Underspecified bands are implicitly ETS and their quantum is taken from MTU. The following thus gives each band the same weight:

    # tc qdisc add dev swp1 root handle 1: \
	ets bands 8 priomap 7 6 5 4 3 2 1 0
    # tc qdisc sh dev swp1
    qdisc ets 1: root refcnt 2 bands 8 quanta 1514 1514 1514 1514 1514 1514 1514 1514 priomap 7 6 5 4 3 2 1 0 7 7 7 7 7 7 7 7 

Petr Machata (2):
libnetlink: parse_rtattr_nested should allow NLA_F_NESTED flag
tc: Add support for ETS Qdisc

 include/libnetlink.h |   3 +-
 man/man8/tc-ets.8    | 192 ++++++++++++++++++++++++
 man/man8/tc.8        |   7 +
 tc/Makefile          |   1 +
 tc/q_ets.c           | 342 +++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 544 insertions(+), 1 deletion(-)
 create mode 100644 man/man8/tc-ets.8
 create mode 100644 tc/q_ets.c
Signature · 1 line
2.20.1