Blame man/man8/tc-taprio.8

Packit d3f73b
.TH TAPRIO 8 "25 Sept 2018" "iproute2" "Linux"
Packit d3f73b
.SH NAME
Packit d3f73b
TAPRIO \- Time Aware Priority Shaper
Packit d3f73b
.SH SYNOPSIS
Packit d3f73b
.B tc qdisc ... dev
Packit d3f73b
dev
Packit d3f73b
.B parent
Packit d3f73b
classid
Packit d3f73b
.B [ handle
Packit d3f73b
major:
Packit d3f73b
.B ] taprio num_tc
Packit d3f73b
tcs
Packit d3f73b
.ti +8
Packit d3f73b
.B map
Packit d3f73b
P0 P1 P2 ...
Packit d3f73b
.B queues
Packit d3f73b
count1@offset1 count2@offset2 ...
Packit d3f73b
.ti +8
Packit d3f73b
.B base-time
Packit d3f73b
base-time
Packit d3f73b
.B clockid
Packit d3f73b
clockid
Packit d3f73b
.ti +8
Packit d3f73b
.B sched-entry
Packit d3f73b
<command 1> <gate mask 1> <interval 1>
Packit d3f73b
.ti +8
Packit d3f73b
.B sched-entry
Packit d3f73b
<command 2> <gate mask 2> <interval 2>
Packit d3f73b
.ti +8
Packit d3f73b
.B sched-entry
Packit d3f73b
<command 3> <gate mask 3> <interval 3>
Packit d3f73b
.ti +8
Packit d3f73b
.B sched-entry
Packit d3f73b
<command N> <gate mask N> <interval N>
Packit d3f73b
Packit d3f73b
.SH DESCRIPTION
Packit d3f73b
The TAPRIO qdisc implements a simplified version of the scheduling
Packit d3f73b
state machine defined by IEEE 802.1Q-2018 Section 8.6.9, which allows
Packit d3f73b
configuration of a sequence of gate states, where each gate state
Packit d3f73b
allows outgoing traffic for a subset (potentially empty) of traffic
Packit d3f73b
classes.
Packit d3f73b
Packit d3f73b
How traffic is mapped to different hardware queues is similar to
Packit d3f73b
.BR mqprio(8)
Packit d3f73b
and so the
Packit d3f73b
.B map
Packit d3f73b
and
Packit d3f73b
.B queues
Packit d3f73b
parameters have the same meaning.
Packit d3f73b
Packit d3f73b
The other parameters specify the schedule, and at what point in time
Packit d3f73b
it should start (it can behave as the schedule started in the past).
Packit d3f73b
Packit d3f73b
.SH PARAMETERS
Packit d3f73b
.TP
Packit d3f73b
num_tc
Packit d3f73b
.BR
Packit d3f73b
Number of traffic classes to use. Up to 16 classes supported.
Packit d3f73b
Packit d3f73b
.TP
Packit d3f73b
map
Packit d3f73b
.br
Packit d3f73b
The priority to traffic class map. Maps priorities 0..15 to a specified
Packit d3f73b
traffic class. See
Packit d3f73b
.BR mqprio(8)
Packit d3f73b
for more details.
Packit d3f73b
Packit d3f73b
.TP
Packit d3f73b
queues
Packit d3f73b
.br
Packit d3f73b
Provide count and offset of queue range for each traffic class. In the
Packit d3f73b
format,
Packit d3f73b
.B count@offset.
Packit d3f73b
Queue ranges for each traffic classes cannot overlap and must be a
Packit d3f73b
contiguous range of queues.
Packit d3f73b
Packit d3f73b
.TP
Packit d3f73b
base-time
Packit d3f73b
.br
Packit d3f73b
Specifies the instant in nanoseconds, using the reference of
Packit d3f73b
.B clockid,
Packit d3f73b
defining the time when the schedule starts. If 'base-time' is a time
Packit d3f73b
in the past, the schedule will start at
Packit d3f73b
Packit d3f73b
base-time + (N * cycle-time)
Packit d3f73b
Packit d3f73b
where N is the smallest integer so the resulting time is greater than
Packit d3f73b
"now", and "cycle-time" is the sum of all the intervals of the entries
Packit d3f73b
in the schedule;
Packit d3f73b
Packit d3f73b
.TP
Packit d3f73b
clockid
Packit d3f73b
.br
Packit d3f73b
Specifies the clock to be used by qdisc's internal timer for measuring
Packit d3f73b
time and scheduling events.
Packit d3f73b
Packit d3f73b
.TP
Packit d3f73b
sched-entry
Packit d3f73b
.br
Packit d3f73b
There may multiple
Packit d3f73b
.B sched-entry
Packit d3f73b
parameters in a single schedule. Each one has the
Packit d3f73b
Packit d3f73b
sched-entry <command> <gatemask> <interval>
Packit d3f73b
Packit d3f73b
format. The only supported <command> is "S", which
Packit d3f73b
means "SetGateStates", following the IEEE 802.1Q-2018 definition
Packit d3f73b
(Table 8-7). <gate mask> is a bitmask where each bit is a associated
Packit d3f73b
with a traffic class, so bit 0 (the least significant bit) being "on"
Packit d3f73b
means that traffic class 0 is "active" for that schedule entry.
Packit d3f73b
<interval> is a time duration, in nanoseconds, that specifies for how
Packit d3f73b
long that state defined by <command> and <gate mask> should be held
Packit d3f73b
before moving to the next entry.
Packit d3f73b
Packit d3f73b
.SH EXAMPLES
Packit d3f73b
Packit d3f73b
The following example shows how an traffic schedule with three traffic
Packit d3f73b
classes ("num_tc 3"), which are separated different traffic classes,
Packit d3f73b
we are going to call these TC 0, TC 1 and TC 2. We could read the
Packit d3f73b
"map" parameter below as: traffic with priority 3 is classified as TC
Packit d3f73b
0, priority 2 is classified as TC 1 and the rest is classified as TC
Packit d3f73b
2.
Packit d3f73b
Packit d3f73b
The schedule will start at instant 1528743495910289987 using the
Packit d3f73b
reference CLOCK_TAI. The schedule is composed of three entries each of
Packit d3f73b
300us duration.
Packit d3f73b
Packit d3f73b
.EX
Packit d3f73b
# tc qdisc replace dev eth0 parent root handle 100 taprio \\
Packit d3f73b
              num_tc 3 \\
Packit d3f73b
              map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \\
Packit d3f73b
              queues 1@0 1@1 2@2 \\
Packit d3f73b
              base-time 1528743495910289987 \\
Packit d3f73b
              sched-entry S 01 300000 \\
Packit d3f73b
              sched-entry S 02 300000 \\
Packit d3f73b
              sched-entry S 04 300000 \\
Packit d3f73b
              clockid CLOCK_TAI
Packit d3f73b
.EE
Packit d3f73b
Packit d3f73b
Packit d3f73b
.SH AUTHORS
Packit d3f73b
Vinicius Costa Gomes <vinicius.gomes@intel.com>