213 lines
5.7 KiB
HTML
213 lines
5.7 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of MQPRIO</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>MQPRIO</H1>
|
|
Section: Linux (8)<BR>Updated: 24 Sept 2013<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
MQPRIO - Multiqueue Priority Qdisc (Offloaded Hardware QOS)
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>tc qdisc ... dev</B>
|
|
|
|
dev
|
|
<B>( parent</B>
|
|
|
|
classid
|
|
<B>| root) [ handle</B>
|
|
|
|
major:
|
|
<B>] mqprio [ num_tc</B>
|
|
|
|
tcs
|
|
<B>] [ map</B>
|
|
|
|
P0 P1 P2...
|
|
<B>] [ queues</B>
|
|
|
|
<A HREF="mailto:count1@offset1">count1@offset1</A> <A HREF="mailto:count2@offset2">count2@offset2</A> ...
|
|
<B>] [ hw</B>
|
|
|
|
1|0
|
|
<B>] [ mode</B>
|
|
|
|
dcb|channel]
|
|
<B>] [ shaper</B>
|
|
|
|
dcb|
|
|
<B>[ bw_rlimit</B>
|
|
|
|
<B>min_rate</B>
|
|
|
|
min_rate1 min_rate2 ...
|
|
<B>max_rate</B>
|
|
|
|
max_rate1 max_rate2 ...
|
|
<B>]]</B>
|
|
|
|
<P>
|
|
<P>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
The MQPRIO qdisc is a simple queuing discipline that allows mapping
|
|
traffic flows to hardware queue ranges using priorities and a configurable
|
|
priority to traffic class mapping. A traffic class in this context is
|
|
a set of contiguous qdisc classes which map 1:1 to a set of hardware
|
|
exposed queues.
|
|
<P>
|
|
By default the qdisc allocates a pfifo qdisc (packet limited first in, first
|
|
out queue) per TX queue exposed by the lower layer device. Other queuing
|
|
disciplines may be added subsequently. Packets are enqueued using the
|
|
<B>map</B>
|
|
|
|
parameter and hashed across the indicated queues in the
|
|
<B>offset</B>
|
|
|
|
and
|
|
<B>count.</B>
|
|
|
|
By default these parameters are configured by the hardware
|
|
driver to match the hardware QOS structures.
|
|
<P>
|
|
<B>Channel</B>
|
|
|
|
mode supports full offload of the mqprio options, the traffic classes, the queue
|
|
configurations and QOS attributes to the hardware. Enabled hardware can provide
|
|
hardware QOS with the ability to steer traffic flows to designated traffic
|
|
classes provided by this qdisc. Hardware based QOS is configured using the
|
|
<B>shaper</B>
|
|
|
|
parameter.
|
|
<B>bw_rlimit</B>
|
|
|
|
with minimum and maximum bandwidth rates can be used for setting
|
|
transmission rates on each traffic class. Also further qdiscs may be added
|
|
to the classes of MQPRIO to create more complex configurations.
|
|
<P>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>ALGORITHM</H2>
|
|
|
|
On creation with 'tc qdisc add', eight traffic classes are created mapping
|
|
priorities 0..7 to traffic classes 0..7 and priorities greater than 7 to
|
|
traffic class 0. This requires base driver support and the creation will
|
|
fail on devices that do not support hardware QOS schemes.
|
|
<P>
|
|
These defaults can be overridden using the qdisc parameters. Providing
|
|
the 'hw 0' flag allows software to run without hardware coordination.
|
|
<P>
|
|
If hardware coordination is being used and arguments are provided that
|
|
the hardware can not support then an error is returned. For many users
|
|
hardware defaults should work reasonably well.
|
|
<P>
|
|
As one specific example numerous Ethernet cards support the 802.1Q
|
|
link strict priority transmission selection algorithm (TSA). MQPRIO
|
|
enabled hardware in conjunction with the classification methods below
|
|
can provide hardware offloaded support for this TSA.
|
|
<P>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>CLASSIFICATION</H2>
|
|
|
|
Multiple methods are available to set the SKB priority which MQPRIO
|
|
uses to select which traffic class to enqueue the packet.
|
|
<DL COMPACT>
|
|
<DT id="1">From user space<DD>
|
|
A process with sufficient privileges can encode the destination class
|
|
directly with SO_PRIORITY, see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+socket">socket</A>(7).</B>
|
|
|
|
<DT id="2">with iptables/nftables<DD>
|
|
An iptables/nftables rule can be created to match traffic flows and
|
|
set the priority.
|
|
<B><A HREF="/cgi-bin/man/man2html?8+iptables">iptables</A>(8)</B>
|
|
|
|
<DT id="3">with net_prio cgroups<DD>
|
|
The net_prio cgroup can be used to set the priority of all sockets
|
|
belong to an application. See kernel and cgroup documentation for details.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>QDISC PARAMETERS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="4">num_tc<DD>
|
|
Number of traffic classes to use. Up to 16 classes supported.
|
|
<P>
|
|
<DT id="5">map<DD>
|
|
The priority to traffic class map. Maps priorities 0..15 to a specified
|
|
traffic class.
|
|
<P>
|
|
<DT id="6">queues<DD>
|
|
Provide count and offset of queue range for each traffic class. In the
|
|
format,
|
|
<B><A HREF="mailto:count@offset">count@offset</A>.</B>
|
|
|
|
Queue ranges for each traffic classes cannot overlap and must be a
|
|
contiguous range of queues.
|
|
<P>
|
|
<DT id="7">hw<DD>
|
|
Set to
|
|
<B>1</B>
|
|
|
|
to support hardware offload. Set to
|
|
<B>0</B>
|
|
|
|
to configure user specified values in software only.
|
|
<P>
|
|
<DT id="8">mode<DD>
|
|
Set to
|
|
<B>channel</B>
|
|
|
|
for full use of the mqprio options. Use
|
|
<B>dcb</B>
|
|
|
|
to offload only TC values and use hardware QOS defaults. Supported with 'hw'
|
|
set to 1 only.
|
|
<P>
|
|
<DT id="9">shaper<DD>
|
|
Use
|
|
<B>bw_rlimit</B>
|
|
|
|
to set bandwidth rate limits for a traffic class. Use
|
|
<B>dcb</B>
|
|
|
|
for hardware QOS defaults. Supported with 'hw' set to 1 only.
|
|
<P>
|
|
<DT id="10">min_rate<DD>
|
|
Minimum value of bandwidth rate limit for a traffic class.
|
|
<P>
|
|
<DT id="11">max_rate<DD>
|
|
Maximum value of bandwidth rate limit for a traffic class.
|
|
<P>
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAH"> </A>
|
|
<H2>AUTHORS</H2>
|
|
|
|
John Fastabend, <<A HREF="mailto:john.r.fastabend@intel.com">john.r.fastabend@intel.com</A>>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="12"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="13"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="14"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="15"><A HREF="#lbAE">ALGORITHM</A><DD>
|
|
<DT id="16"><A HREF="#lbAF">CLASSIFICATION</A><DD>
|
|
<DT id="17"><A HREF="#lbAG">QDISC PARAMETERS</A><DD>
|
|
<DT id="18"><A HREF="#lbAH">AUTHORS</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:17 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|