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