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