]> git.ipfire.org Git - thirdparty/iproute2.git/commit
Add support for 'tc-bw' attribute in devlink-rate
authorCarolina Jubran <cjubran@nvidia.com>
Fri, 4 Jul 2025 12:27:53 +0000 (15:27 +0300)
committerDavid Ahern <dsahern@kernel.org>
Fri, 11 Jul 2025 16:41:34 +0000 (16:41 +0000)
commitc83d1477f8b2a26f666e9925469a50a1197183f3
treed6d29a2182e503e93c6a69f50871967e2b54d858
parent250ee9361803e3bfce816be73bb3e45018facf60
Add support for 'tc-bw' attribute in devlink-rate

Introduce a new attribute 'tc-bw' to devlink-rate, allowing users to
set the bandwidth allocation per traffic class. The new attribute
enables fine-grained QoS configurations by assigning relative bandwidth
shares to each traffic class, supporting more precise traffic shaping,
which helps in achieving more precise bandwidth management across
traffic streams.

Add support for configuring 'tc-bw' via the devlink userspace utility
and parse the 'tc-bw' arguments for accurate bandwidth assignment per
traffic class.

This feature supports 8 traffic classes as defined by the IEEE 802.1Qaz
standard.

Example commands:
- devlink port function rate add pci/0000:08:00.0/group \
  tx_share 10Gbit tx_max 50Gbit tc-bw 0:20 1:0 2:0 3:0 4:0 5:80 6:0 7:0

- devlink port function rate set pci/0000:08:00.0/group \
  tc-bw 0:20 1:0 2:0 3:0 4:0 5:80 6:0 7:0

Signed-off-by: Carolina Jubran <cjubran@nvidia.com>
Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
devlink/devlink.c
man/man8/devlink-rate.8