250 lines
8.7 KiB
HTML
250 lines
8.7 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of TAPRIO</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>TAPRIO</H1>
|
|
Section: Linux (8)<BR>Updated: 25 Sept 2018<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
TAPRIO - Time Aware Priority Shaper
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>tc qdisc ... dev</B>
|
|
|
|
dev
|
|
<B>parent</B>
|
|
|
|
classid
|
|
<B>[ handle</B>
|
|
|
|
major:
|
|
<B>] taprio num_tc</B>
|
|
|
|
tcs
|
|
<BR>
|
|
|
|
<B>map</B>
|
|
|
|
P0 P1 P2 ...
|
|
<B>queues</B>
|
|
|
|
<A HREF="mailto:count1@offset1">count1@offset1</A> <A HREF="mailto:count2@offset2">count2@offset2</A> ...
|
|
<BR>
|
|
|
|
<B>base-time</B>
|
|
|
|
base-time
|
|
<B>clockid</B>
|
|
|
|
clockid
|
|
<BR>
|
|
|
|
<B>sched-entry</B>
|
|
|
|
<command 1> <gate mask 1> <interval 1>
|
|
<BR>
|
|
|
|
<B>sched-entry</B>
|
|
|
|
<command 2> <gate mask 2> <interval 2>
|
|
<BR>
|
|
|
|
<B>sched-entry</B>
|
|
|
|
<command 3> <gate mask 3> <interval 3>
|
|
<BR>
|
|
|
|
<B>sched-entry</B>
|
|
|
|
<command N> <gate mask N> <interval N>
|
|
<P>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
The TAPRIO qdisc implements a simplified version of the scheduling
|
|
state machine defined by IEEE 802.1Q-2018 Section 8.6.9, which allows
|
|
configuration of a sequence of gate states, where each gate state
|
|
allows outgoing traffic for a subset (potentially empty) of traffic
|
|
classes.
|
|
<P>
|
|
How traffic is mapped to different hardware queues is similar to
|
|
<B><A HREF="/cgi-bin/man/man2html?8+mqprio">mqprio</A>(8)</B>
|
|
|
|
and so the
|
|
<B>map</B>
|
|
|
|
and
|
|
<B>queues</B>
|
|
|
|
parameters have the same meaning.
|
|
<P>
|
|
The other parameters specify the schedule, and at what point in time
|
|
it should start (it can behave as the schedule started in the past).
|
|
<P>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>PARAMETERS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">num_tc<DD>
|
|
|
|
Number of traffic classes to use. Up to 16 classes supported.
|
|
<P>
|
|
<DT id="2">map<DD>
|
|
<BR>
|
|
|
|
The priority to traffic class map. Maps priorities 0..15 to a specified
|
|
traffic class. See
|
|
<B><A HREF="/cgi-bin/man/man2html?8+mqprio">mqprio</A>(8)</B>
|
|
|
|
for more details.
|
|
<P>
|
|
<DT id="3">queues<DD>
|
|
<BR>
|
|
|
|
Provide count and offset of queue range for each traffic class. In the
|
|
format,
|
|
<B><A HREF="mailto:count@offset">count@offset</A>.</B>
|
|
|
|
Queue ranges for each traffic classes cannot overlap and must be a
|
|
contiguous range of queues.
|
|
<P>
|
|
<DT id="4">base-time<DD>
|
|
<BR>
|
|
|
|
Specifies the instant in nanoseconds, using the reference of
|
|
<B>clockid,</B>
|
|
|
|
defining the time when the schedule starts. If 'base-time' is a time
|
|
in the past, the schedule will start at
|
|
<P>
|
|
base-time + (N * cycle-time)
|
|
<P>
|
|
where N is the smallest integer so the resulting time is greater than
|
|
"now", and "cycle-time" is the sum of all the intervals of the entries
|
|
in the schedule;
|
|
<P>
|
|
<DT id="5">clockid<DD>
|
|
<BR>
|
|
|
|
Specifies the clock to be used by qdisc's internal timer for measuring
|
|
time and scheduling events.
|
|
<P>
|
|
<DT id="6">sched-entry<DD>
|
|
<BR>
|
|
|
|
There may multiple
|
|
<B>sched-entry</B>
|
|
|
|
parameters in a single schedule. Each one has the
|
|
<P>
|
|
sched-entry <command> <gatemask> <interval>
|
|
<P>
|
|
format. The only supported <command> is "S", which
|
|
means "SetGateStates", following the IEEE 802.1Q-2018 definition
|
|
(Table 8-7). <gate mask> is a bitmask where each bit is a associated
|
|
with a traffic class, so bit 0 (the least significant bit) being "on"
|
|
means that traffic class 0 is "active" for that schedule entry.
|
|
<interval> is a time duration, in nanoseconds, that specifies for how
|
|
long that state defined by <command> and <gate mask> should be held
|
|
before moving to the next entry.
|
|
<P>
|
|
<DT id="7">flags<DD>
|
|
<BR>
|
|
|
|
Specifies different modes for taprio. Currently, only txtime-assist is
|
|
supported which can be enabled by setting it to 0x1. In this mode, taprio will
|
|
set the transmit timestamp depending on the interval in which the packet needs
|
|
to be transmitted. It will then utililize the
|
|
<B><A HREF="/cgi-bin/man/man2html?8+etf">etf</A>(8)</B>
|
|
|
|
qdisc to sort and transmit the packets at the right time. The second example
|
|
can be used as a reference to configure this mode.
|
|
<P>
|
|
<DT id="8">txtime-delay<DD>
|
|
<BR>
|
|
|
|
This parameter is specific to the txtime offload mode. It specifies the maximum
|
|
time a packet might take to reach the network card from the taprio qdisc. The
|
|
value should always be greater than the delta specified in the
|
|
<B><A HREF="/cgi-bin/man/man2html?8+etf">etf</A>(8)</B>
|
|
|
|
qdisc.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
<P>
|
|
The following example shows how an traffic schedule with three traffic
|
|
classes ("num_tc 3"), which are separated different traffic classes,
|
|
we are going to call these TC 0, TC 1 and TC 2. We could read the
|
|
"map" parameter below as: traffic with priority 3 is classified as TC
|
|
0, priority 2 is classified as TC 1 and the rest is classified as TC
|
|
2.
|
|
<P>
|
|
The schedule will start at instant 1528743495910289987 using the
|
|
reference CLOCK_TAI. The schedule is composed of three entries each of
|
|
300us duration.
|
|
<P>
|
|
|
|
# tc qdisc replace dev eth0 parent root handle 100 taprio \
|
|
<BR> num_tc 3 \
|
|
<BR> map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \
|
|
<BR> queues 1@0 1@1 2@2 \
|
|
<BR> base-time 1528743495910289987 \
|
|
<BR> sched-entry S 01 300000 \
|
|
<BR> sched-entry S 02 300000 \
|
|
<BR> sched-entry S 04 300000 \
|
|
<BR> clockid CLOCK_TAI
|
|
|
|
<P>
|
|
Following is an example to enable the txtime offload mode in taprio. See
|
|
<B><A HREF="/cgi-bin/man/man2html?8+etf">etf</A>(8)</B>
|
|
|
|
for more information about configuring the ETF qdisc.
|
|
<P>
|
|
|
|
# tc qdisc replace dev eth0 parent root handle 100 taprio \
|
|
<BR> num_tc 3 \
|
|
<BR> map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \
|
|
<BR> queues 1@0 1@0 1@0 \
|
|
<BR> base-time 1528743495910289987 \
|
|
<BR> sched-entry S 01 300000 \
|
|
<BR> sched-entry S 02 300000 \
|
|
<BR> sched-entry S 04 400000 \
|
|
<BR> flags 0x1 \
|
|
<BR> txtime-delay 200000 \
|
|
<BR> clockid CLOCK_TAI
|
|
<P>
|
|
# tc qdisc replace dev $IFACE parent 100:1 etf skip_skb_check \
|
|
<BR> offload delta 200000 clockid CLOCK_TAI
|
|
|
|
<P>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>AUTHORS</H2>
|
|
|
|
Vinicius Costa Gomes <<A HREF="mailto:vinicius.gomes@intel.com">vinicius.gomes@intel.com</A>>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="9"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="10"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="11"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="12"><A HREF="#lbAE">PARAMETERS</A><DD>
|
|
<DT id="13"><A HREF="#lbAF">EXAMPLES</A><DD>
|
|
<DT id="14"><A HREF="#lbAG">AUTHORS</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:17 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|