]> git.proxmox.com Git - mirror_iproute2.git/blame - man/man8/tc-mqprio.8
update kernel headers based on net-next 3.21
[mirror_iproute2.git] / man / man8 / tc-mqprio.8
CommitLineData
39935c93
JF
1.TH MQPRIO 8 "24 Sept 2013" "iproute2" "Linux"
2.SH NAME
3MQPRIO \- Multiqueue Priority Qdisc (Offloaded Hardware QOS)
4.SH SYNOPSIS
5.B tc qdisc ... dev
6dev
7.B ( parent
8classid
9.B | root) [ handle
10major:
11.B ] mqprio [ numtc
12tcs
13.B ] [ map
14P0 P1 P2...
15.B ] [ queues
16count1@offset1 count2@offset2 ...
17.B ] [ hw
181|0
19.B ]
20
21.SH DESCRIPTION
22The MQPRIO qdisc is a simple queuing discipline that allows mapping
23traffic flows to hardware queue ranges using priorities and a configurable
24priority to traffic class mapping. A traffic class in this context is
25a set of contiguous qdisc classes which map 1:1 to a set of hardware
26exposed queues.
27
28By default the qdisc allocates a pfifo qdisc (packet limited first in, first
29out queue) per TX queue exposed by the lower layer device. Other queuing
30disciplines may be added subsequently. Packets are enqueued using the
31.B map
32parameter and hashed across the indicated queues in the
33.B offset
34and
35.B count.
36By default these parameters are configured by the hardware
37driver to match the hardware QOS structures.
38
39Enabled hardware can provide hardware QOS with the ability to steer
40traffic flows to designated traffic classes provided by this qdisc.
41Configuring the hardware based QOS mechanism is outside the scope of
42this qdisc. Tools such as
43.B lldpad
44and
45.B ethtool
46exist to provide this functionality. Also further qdiscs may be added
47to the classes of MQPRIO to create more complex configurations.
48
49.SH ALGORITHM
50On creation with 'tc qdisc add', eight traffic classes are created mapping
51priorities 0..7 to traffic classes 0..7 and priorities greater than 7 to
52traffic class 0. This requires base driver support and the creation will
53fail on devices that do not support hardware QOS schemes.
54
55These defaults can be overridden using the qdisc parameters. Providing
56the 'hw 0' flag allows software to run without hardware coordination.
57
58If hardware coordination is being used and arguments are provided that
59the hardware can not support then an error is returned. For many users
60hardware defaults should work reasonably well.
61
62As one specific example numerous Ethernet cards support the 802.1Q
63link strict priority transmission selection algorithm (TSA). MQPRIO
64enabled hardware in conjunction with the classification methods below
65can provide hardware offloaded support for this TSA.
66
67.SH CLASSIFICATION
68Multiple methods are available to set the SKB priority which MQPRIO
69uses to select which traffic class to enqueue the packet.
70.TP
71From user space
72A process with sufficient privileges can encode the destination class
73directly with SO_PRIORITY, see
74.BR socket(7).
75.TP
76with iptables/nftables
77An iptables/nftables rule can be created to match traffic flows and
78set the priority.
79.BR iptables(8)
80.TP
81with net_prio cgroups
82The net_prio cgroup can be used to set the priority of all sockets
83belong to an application. See kernel and cgroup documentation for details.
84
85.SH QDISC PARAMETERS
86.TP
87num_tc
88Number of traffic classes to use upto 16 classes supported.
89
90.TP
91map
92The priority to traffic class map. Maps priorities 0..15 to a specified
93traffic class.
94
95.TP
96queues
97Provide count and offset of queue range for each traffic class. In the
98format,
99.B count@offset.
100Queue ranges for each traffic classes cannot overlap and must be a
101contiguous range of queues.
102
103.TP
104hw
105Set to
106.B 1
107to use hardware QOS defaults. Set to
108.B 0
109to override hardware defaults with user specified values.
110
111.SH AUTHORS
112John Fastabend, <john.r.fastabend@intel.com>