]> git.proxmox.com Git - mirror_iproute2.git/blob - man/man8/tc-mqprio.8
bridge: mdb: add support for source address
[mirror_iproute2.git] / man / man8 / tc-mqprio.8
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 [ num_tc
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 ] [ mode
20 dcb|channel]
21 .B ] [ shaper
22 dcb|
23 .B [ bw_rlimit
24 .B min_rate
25 min_rate1 min_rate2 ...
26 .B max_rate
27 max_rate1 max_rate2 ...
28 .B ]]
29
30
31 .SH DESCRIPTION
32 The MQPRIO qdisc is a simple queuing discipline that allows mapping
33 traffic flows to hardware queue ranges using priorities and a configurable
34 priority to traffic class mapping. A traffic class in this context is
35 a set of contiguous qdisc classes which map 1:1 to a set of hardware
36 exposed queues.
37
38 By default the qdisc allocates a pfifo qdisc (packet limited first in, first
39 out queue) per TX queue exposed by the lower layer device. Other queuing
40 disciplines may be added subsequently. Packets are enqueued using the
41 .B map
42 parameter and hashed across the indicated queues in the
43 .B offset
44 and
45 .B count.
46 By default these parameters are configured by the hardware
47 driver to match the hardware QOS structures.
48
49 .B Channel
50 mode supports full offload of the mqprio options, the traffic classes, the queue
51 configurations and QOS attributes to the hardware. Enabled hardware can provide
52 hardware QOS with the ability to steer traffic flows to designated traffic
53 classes provided by this qdisc. Hardware based QOS is configured using the
54 .B shaper
55 parameter.
56 .B bw_rlimit
57 with minimum and maximum bandwidth rates can be used for setting
58 transmission rates on each traffic class. Also further qdiscs may be added
59 to the classes of MQPRIO to create more complex configurations.
60
61 .SH ALGORITHM
62 On creation with 'tc qdisc add', eight traffic classes are created mapping
63 priorities 0..7 to traffic classes 0..7 and priorities greater than 7 to
64 traffic class 0. This requires base driver support and the creation will
65 fail on devices that do not support hardware QOS schemes.
66
67 These defaults can be overridden using the qdisc parameters. Providing
68 the 'hw 0' flag allows software to run without hardware coordination.
69
70 If hardware coordination is being used and arguments are provided that
71 the hardware can not support then an error is returned. For many users
72 hardware defaults should work reasonably well.
73
74 As one specific example numerous Ethernet cards support the 802.1Q
75 link strict priority transmission selection algorithm (TSA). MQPRIO
76 enabled hardware in conjunction with the classification methods below
77 can provide hardware offloaded support for this TSA.
78
79 .SH CLASSIFICATION
80 Multiple methods are available to set the SKB priority which MQPRIO
81 uses to select which traffic class to enqueue the packet.
82 .TP
83 From user space
84 A process with sufficient privileges can encode the destination class
85 directly with SO_PRIORITY, see
86 .BR socket(7).
87 .TP
88 with iptables/nftables
89 An iptables/nftables rule can be created to match traffic flows and
90 set the priority.
91 .BR iptables(8)
92 .TP
93 with net_prio cgroups
94 The net_prio cgroup can be used to set the priority of all sockets
95 belong to an application. See kernel and cgroup documentation for details.
96
97 .SH QDISC PARAMETERS
98 .TP
99 num_tc
100 Number of traffic classes to use. Up to 16 classes supported.
101
102 .TP
103 map
104 The priority to traffic class map. Maps priorities 0..15 to a specified
105 traffic class.
106
107 .TP
108 queues
109 Provide count and offset of queue range for each traffic class. In the
110 format,
111 .B count@offset.
112 Queue ranges for each traffic classes cannot overlap and must be a
113 contiguous range of queues.
114
115 .TP
116 hw
117 Set to
118 .B 1
119 to support hardware offload. Set to
120 .B 0
121 to configure user specified values in software only.
122
123 .TP
124 mode
125 Set to
126 .B channel
127 for full use of the mqprio options. Use
128 .B dcb
129 to offload only TC values and use hardware QOS defaults. Supported with 'hw'
130 set to 1 only.
131
132 .TP
133 shaper
134 Use
135 .B bw_rlimit
136 to set bandwidth rate limits for a traffic class. Use
137 .B dcb
138 for hardware QOS defaults. Supported with 'hw' set to 1 only.
139
140 .TP
141 min_rate
142 Minimum value of bandwidth rate limit for a traffic class.
143
144 .TP
145 max_rate
146 Maximum value of bandwidth rate limit for a traffic class.
147
148
149 .SH AUTHORS
150 John Fastabend, <john.r.fastabend@intel.com>