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