]> git.proxmox.com Git - mirror_iproute2.git/commit
tc/mqprio: Offload mode and shaper options in mqprio
authorAmritha Nambiar <amritha.nambiar@intel.com>
Wed, 1 Nov 2017 07:45:42 +0000 (00:45 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 1 Nov 2017 21:20:06 +0000 (22:20 +0100)
commite1ac5b06f26d141b82f54d0edc92cd844d41188e
tree8e9415ee529d5e3a1a1c4ae4a467d1cdc40ecb49
parent1ef5c95201d41ac8527a2eb2d977f63a79532f02
tc/mqprio: Offload mode and shaper options in mqprio

This patch was previously submitted as RFC. Submitting this as
non-RFC now that the tc/mqprio changes are accepted in net-next.

Adds new mqprio options for 'mode' and 'shaper'. The mode
option can take values for offload modes such as 'dcb' (default),
'channel' with the 'hw' option set to 1. The new 'channel' mode
supports offloading TCs and other queue configurations. The
'shaper' option is to support HW shapers ('dcb' default) and
takes the value 'bw_rlimit' for bandwidth rate limiting. The
parameters to the bw_rlimit shaper are minimum and maximum
bandwidth rates. New HW shapers in future can be supported
through the shaper attribute.

# tc qdisc add dev eth0 root mqprio num_tc 2  map 0 0 0 0 1 1 1 1\
  queues 4@0 4@4 hw 1 mode channel shaper bw_rlimit\
  min_rate 1Gbit 2Gbit max_rate 4Gbit 5Gbit

# tc qdisc show dev eth0

qdisc mqprio 804a: root  tc 2 map 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0
             queues:(0:3) (4:7)
             mode:channel
             shaper:bw_rlimit   min_rate:1Gbit 2Gbit   max_rate:4Gbit 5Gbit

v2: Avoid buffer overrun and minor cleanup.

Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com>
tc/q_mqprio.c