1 .TH TAPRIO 8 "25 Sept 2018" "iproute2" "Linux"
3 TAPRIO \- Time Aware Priority Shaper
17 count1@offset1 count2@offset2 ...
25 <command 1> <gate mask 1> <interval 1>
28 <command 2> <gate mask 2> <interval 2>
31 <command 3> <gate mask 3> <interval 3>
34 <command N> <gate mask N> <interval N>
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
43 How traffic is mapped to different hardware queues is similar to
49 parameters have the same meaning.
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).
58 Number of traffic classes to use. Up to 16 classes supported.
63 The priority to traffic class map. Maps priorities 0..15 to a specified
71 Provide count and offset of queue range for each traffic class. In the
74 Queue ranges for each traffic classes cannot overlap and must be a
75 contiguous range of queues.
80 Specifies the instant in nanoseconds, using the reference of
82 defining the time when the schedule starts. If 'base-time' is a time
83 in the past, the schedule will start at
85 base-time + (N * cycle-time)
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
94 Specifies the clock to be used by qdisc's internal timer for measuring
95 time and scheduling events.
102 parameters in a single schedule. Each one has the
104 sched-entry <command> <gatemask> <interval>
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.
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
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.
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
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
144 The schedule will start at instant 1528743495910289987 using the
145 reference CLOCK_TAI. The schedule is composed of three entries each of
149 # tc qdisc replace dev eth0 parent root handle 100 taprio \\
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 \\
160 Following is an example to enable the txtime offload mode in taprio. See
162 for more information about configuring the ETF qdisc.
165 # tc qdisc replace dev eth0 parent root handle 100 taprio \\
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 \\
174 txtime-delay 200000 \\
177 # tc qdisc replace dev $IFACE parent 100:1 etf skip_skb_check \\
178 offload delta 200000 clockid CLOCK_TAI
182 Vinicius Costa Gomes <vinicius.gomes@intel.com>