]>
Commit | Line | Data |
---|---|---|
579acb4b VCG |
1 | .TH TAPRIO 8 "25 Sept 2018" "iproute2" "Linux" |
2 | .SH NAME | |
3 | TAPRIO \- Time Aware Priority Shaper | |
4 | .SH SYNOPSIS | |
5 | .B tc qdisc ... dev | |
6 | dev | |
7 | .B parent | |
8 | classid | |
9 | .B [ handle | |
10 | major: | |
11 | .B ] taprio num_tc | |
12 | tcs | |
13 | .ti +8 | |
14 | .B map | |
15 | P0 P1 P2 ... | |
16 | .B queues | |
17 | count1@offset1 count2@offset2 ... | |
18 | .ti +8 | |
19 | .B base-time | |
20 | base-time | |
21 | .B clockid | |
22 | clockid | |
23 | .ti +8 | |
24 | .B sched-entry | |
25 | <command 1> <gate mask 1> <interval 1> | |
26 | .ti +8 | |
27 | .B sched-entry | |
28 | <command 2> <gate mask 2> <interval 2> | |
29 | .ti +8 | |
30 | .B sched-entry | |
31 | <command 3> <gate mask 3> <interval 3> | |
32 | .ti +8 | |
33 | .B sched-entry | |
34 | <command N> <gate mask N> <interval N> | |
35 | ||
36 | .SH DESCRIPTION | |
37 | The TAPRIO qdisc implements a simplified version of the scheduling | |
38 | state machine defined by IEEE 802.1Q-2018 Section 8.6.9, which allows | |
39 | configuration of a sequence of gate states, where each gate state | |
40 | allows outgoing traffic for a subset (potentially empty) of traffic | |
41 | classes. | |
42 | ||
43 | How traffic is mapped to different hardware queues is similar to | |
44 | .BR mqprio(8) | |
45 | and so the | |
46 | .B map | |
47 | and | |
8242808c | 48 | .B queues |
579acb4b VCG |
49 | parameters have the same meaning. |
50 | ||
51 | The other parameters specify the schedule, and at what point in time | |
52 | it should start (it can behave as the schedule started in the past). | |
53 | ||
54 | .SH PARAMETERS | |
55 | .TP | |
56 | num_tc | |
57 | .BR | |
58 | Number of traffic classes to use. Up to 16 classes supported. | |
59 | ||
60 | .TP | |
61 | map | |
62 | .br | |
63 | The priority to traffic class map. Maps priorities 0..15 to a specified | |
64 | traffic class. See | |
65 | .BR mqprio(8) | |
66 | for more details. | |
67 | ||
68 | .TP | |
69 | queues | |
70 | .br | |
71 | Provide count and offset of queue range for each traffic class. In the | |
72 | format, | |
73 | .B count@offset. | |
74 | Queue ranges for each traffic classes cannot overlap and must be a | |
75 | contiguous range of queues. | |
76 | ||
77 | .TP | |
78 | base-time | |
79 | .br | |
80 | Specifies the instant in nanoseconds, using the reference of | |
81 | .B clockid, | |
82 | defining the time when the schedule starts. If 'base-time' is a time | |
83 | in the past, the schedule will start at | |
84 | ||
85 | base-time + (N * cycle-time) | |
86 | ||
87 | where N is the smallest integer so the resulting time is greater than | |
88 | "now", and "cycle-time" is the sum of all the intervals of the entries | |
89 | in the schedule; | |
90 | ||
91 | .TP | |
92 | clockid | |
93 | .br | |
94 | Specifies the clock to be used by qdisc's internal timer for measuring | |
95 | time and scheduling events. | |
96 | ||
97 | .TP | |
98 | sched-entry | |
99 | .br | |
100 | There may multiple | |
101 | .B sched-entry | |
102 | parameters in a single schedule. Each one has the | |
103 | ||
104 | sched-entry <command> <gatemask> <interval> | |
105 | ||
106 | format. The only supported <command> is "S", which | |
107 | means "SetGateStates", following the IEEE 802.1Q-2018 definition | |
108 | (Table 8-7). <gate mask> is a bitmask where each bit is a associated | |
109 | with a traffic class, so bit 0 (the least significant bit) being "on" | |
110 | means that traffic class 0 is "active" for that schedule entry. | |
111 | <interval> is a time duration, in nanoseconds, that specifies for how | |
112 | long that state defined by <command> and <gate mask> should be held | |
113 | before moving to the next entry. | |
114 | ||
a794d052 VP |
115 | .TP |
116 | flags | |
117 | .br | |
118 | Specifies different modes for taprio. Currently, only txtime-assist is | |
119 | supported which can be enabled by setting it to 0x1. In this mode, taprio will | |
120 | set the transmit timestamp depending on the interval in which the packet needs | |
121 | to be transmitted. It will then utililize the | |
122 | .BR etf(8) | |
123 | qdisc to sort and transmit the packets at the right time. The second example | |
124 | can be used as a reference to configure this mode. | |
125 | ||
126 | .TP | |
127 | txtime-delay | |
128 | .br | |
129 | This parameter is specific to the txtime offload mode. It specifies the maximum | |
130 | time a packet might take to reach the network card from the taprio qdisc. The | |
131 | value should always be greater than the delta specified in the | |
132 | .BR etf(8) | |
133 | qdisc. | |
134 | ||
579acb4b VCG |
135 | .SH EXAMPLES |
136 | ||
137 | The following example shows how an traffic schedule with three traffic | |
138 | classes ("num_tc 3"), which are separated different traffic classes, | |
139 | we are going to call these TC 0, TC 1 and TC 2. We could read the | |
140 | "map" parameter below as: traffic with priority 3 is classified as TC | |
141 | 0, priority 2 is classified as TC 1 and the rest is classified as TC | |
142 | 2. | |
143 | ||
144 | The schedule will start at instant 1528743495910289987 using the | |
145 | reference CLOCK_TAI. The schedule is composed of three entries each of | |
146 | 300us duration. | |
147 | ||
148 | .EX | |
149 | # tc qdisc replace dev eth0 parent root handle 100 taprio \\ | |
150 | num_tc 3 \\ | |
151 | map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \\ | |
152 | queues 1@0 1@1 2@2 \\ | |
153 | base-time 1528743495910289987 \\ | |
154 | sched-entry S 01 300000 \\ | |
155 | sched-entry S 02 300000 \\ | |
156 | sched-entry S 04 300000 \\ | |
157 | clockid CLOCK_TAI | |
158 | .EE | |
159 | ||
a794d052 VP |
160 | Following is an example to enable the txtime offload mode in taprio. See |
161 | .BR etf(8) | |
162 | for more information about configuring the ETF qdisc. | |
163 | ||
164 | .EX | |
165 | # tc qdisc replace dev eth0 parent root handle 100 taprio \\ | |
166 | num_tc 3 \\ | |
167 | map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \\ | |
168 | queues 1@0 1@0 1@0 \\ | |
169 | base-time 1528743495910289987 \\ | |
170 | sched-entry S 01 300000 \\ | |
171 | sched-entry S 02 300000 \\ | |
172 | sched-entry S 04 400000 \\ | |
173 | flags 0x1 \\ | |
174 | txtime-delay 200000 \\ | |
175 | clockid CLOCK_TAI | |
176 | ||
177 | # tc qdisc replace dev $IFACE parent 100:1 etf skip_skb_check \\ | |
178 | offload delta 200000 clockid CLOCK_TAI | |
179 | .EE | |
579acb4b VCG |
180 | |
181 | .SH AUTHORS | |
182 | Vinicius Costa Gomes <vinicius.gomes@intel.com> |