Blame man/man8/tc-mqprio.8

Packit d3f73b
.TH MQPRIO 8 "24 Sept 2013" "iproute2" "Linux"
Packit d3f73b
.SH NAME
Packit d3f73b
MQPRIO \- Multiqueue Priority Qdisc (Offloaded Hardware QOS)
Packit d3f73b
.SH SYNOPSIS
Packit d3f73b
.B tc qdisc ... dev
Packit d3f73b
dev
Packit d3f73b
.B  ( parent
Packit d3f73b
classid
Packit d3f73b
.B | root) [ handle
Packit d3f73b
major:
Packit d3f73b
.B ] mqprio [ num_tc
Packit d3f73b
tcs
Packit d3f73b
.B ] [ map
Packit d3f73b
P0 P1 P2...
Packit d3f73b
.B ] [ queues
Packit d3f73b
count1@offset1 count2@offset2 ...
Packit d3f73b
.B ] [ hw
Packit d3f73b
1|0
Packit d3f73b
.B ] [ mode
Packit d3f73b
dcb|channel]
Packit d3f73b
.B ] [ shaper
Packit d3f73b
dcb|
Packit d3f73b
.B [ bw_rlimit
Packit d3f73b
.B min_rate
Packit d3f73b
min_rate1 min_rate2 ...
Packit d3f73b
.B max_rate
Packit d3f73b
max_rate1 max_rate2 ...
Packit d3f73b
.B ]]
Packit d3f73b
Packit d3f73b
Packit d3f73b
.SH DESCRIPTION
Packit d3f73b
The MQPRIO qdisc is a simple queuing discipline that allows mapping
Packit d3f73b
traffic flows to hardware queue ranges using priorities and a configurable
Packit d3f73b
priority to traffic class mapping. A traffic class in this context is
Packit d3f73b
a set of contiguous qdisc classes which map 1:1 to a set of hardware
Packit d3f73b
exposed queues.
Packit d3f73b
Packit d3f73b
By default the qdisc allocates a pfifo qdisc (packet limited first in, first
Packit d3f73b
out queue) per TX queue exposed by the lower layer device. Other queuing
Packit d3f73b
disciplines may be added subsequently. Packets are enqueued using the
Packit d3f73b
.B map
Packit d3f73b
parameter and hashed across the indicated queues in the
Packit d3f73b
.B offset
Packit d3f73b
and
Packit d3f73b
.B count.
Packit d3f73b
By default these parameters are configured by the hardware
Packit d3f73b
driver to match the hardware QOS structures.
Packit d3f73b
Packit d3f73b
.B Channel
Packit d3f73b
mode supports full offload of the mqprio options, the traffic classes, the queue
Packit d3f73b
configurations and QOS attributes to the hardware. Enabled hardware can provide
Packit d3f73b
hardware QOS with the ability to steer traffic flows to designated traffic
Packit d3f73b
classes provided by this qdisc. Hardware based QOS is configured using the
Packit d3f73b
.B shaper
Packit d3f73b
parameter.
Packit d3f73b
.B bw_rlimit
Packit d3f73b
with minimum and maximum bandwidth rates can be used for setting
Packit d3f73b
transmission rates on each traffic class. Also further qdiscs may be added
Packit d3f73b
to the classes of MQPRIO to create more complex configurations.
Packit d3f73b
Packit d3f73b
.SH ALGORITHM
Packit d3f73b
On creation with 'tc qdisc add', eight traffic classes are created mapping
Packit d3f73b
priorities 0..7 to traffic classes 0..7 and priorities greater than 7 to
Packit d3f73b
traffic class 0. This requires base driver support and the creation will
Packit d3f73b
fail on devices that do not support hardware QOS schemes.
Packit d3f73b
Packit d3f73b
These defaults can be overridden using the qdisc parameters. Providing
Packit d3f73b
the 'hw 0' flag allows software to run without hardware coordination.
Packit d3f73b
Packit d3f73b
If hardware coordination is being used and arguments are provided that
Packit d3f73b
the hardware can not support then an error is returned. For many users
Packit d3f73b
hardware defaults should work reasonably well.
Packit d3f73b
Packit d3f73b
As one specific example numerous Ethernet cards support the 802.1Q
Packit d3f73b
link strict priority transmission selection algorithm (TSA). MQPRIO
Packit d3f73b
enabled hardware in conjunction with the classification methods below
Packit d3f73b
can provide hardware offloaded support for this TSA.
Packit d3f73b
Packit d3f73b
.SH CLASSIFICATION
Packit d3f73b
Multiple methods are available to set the SKB priority which MQPRIO
Packit d3f73b
uses to select which traffic class to enqueue the packet.
Packit d3f73b
.TP
Packit d3f73b
From user space
Packit d3f73b
A process with sufficient privileges can encode the destination class
Packit d3f73b
directly with SO_PRIORITY, see
Packit d3f73b
.BR socket(7).
Packit d3f73b
.TP
Packit d3f73b
with iptables/nftables
Packit d3f73b
An iptables/nftables rule can be created to match traffic flows and
Packit d3f73b
set the priority.
Packit d3f73b
.BR iptables(8)
Packit d3f73b
.TP
Packit d3f73b
with net_prio cgroups
Packit d3f73b
The net_prio cgroup can be used to set the priority of all sockets
Packit d3f73b
belong to an application. See kernel and cgroup documentation for details.
Packit d3f73b
Packit d3f73b
.SH QDISC PARAMETERS
Packit d3f73b
.TP
Packit d3f73b
num_tc
Packit d3f73b
Number of traffic classes to use. Up to 16 classes supported.
Packit d3f73b
Packit d3f73b
.TP
Packit d3f73b
map
Packit d3f73b
The priority to traffic class map. Maps priorities 0..15 to a specified
Packit d3f73b
traffic class.
Packit d3f73b
Packit d3f73b
.TP
Packit d3f73b
queues
Packit d3f73b
Provide count and offset of queue range for each traffic class. In the
Packit d3f73b
format,
Packit d3f73b
.B count@offset.
Packit d3f73b
Queue ranges for each traffic classes cannot overlap and must be a
Packit d3f73b
contiguous range of queues.
Packit d3f73b
Packit d3f73b
.TP
Packit d3f73b
hw
Packit d3f73b
Set to
Packit d3f73b
.B 1
Packit d3f73b
to support hardware offload. Set to
Packit d3f73b
.B 0
Packit d3f73b
to configure user specified values in software only.
Packit d3f73b
Packit d3f73b
.TP
Packit d3f73b
mode
Packit d3f73b
Set to
Packit d3f73b
.B channel
Packit d3f73b
for full use of the mqprio options. Use
Packit d3f73b
.B dcb
Packit d3f73b
to offload only TC values and use hardware QOS defaults. Supported with 'hw'
Packit d3f73b
set to 1 only.
Packit d3f73b
Packit d3f73b
.TP
Packit d3f73b
shaper
Packit d3f73b
Use
Packit d3f73b
.B bw_rlimit
Packit d3f73b
to set bandwidth rate limits for a traffic class. Use
Packit d3f73b
.B dcb
Packit d3f73b
for hardware QOS defaults. Supported with 'hw' set to 1 only.
Packit d3f73b
Packit d3f73b
.TP
Packit d3f73b
min_rate
Packit d3f73b
Minimum value of bandwidth rate limit for a traffic class.
Packit d3f73b
Packit d3f73b
.TP
Packit d3f73b
max_rate
Packit d3f73b
Maximum value of bandwidth rate limit for a traffic class.
Packit d3f73b
Packit d3f73b
Packit d3f73b
.SH AUTHORS
Packit d3f73b
John Fastabend, <john.r.fastabend@intel.com>