1ETF(8) Linux ETF(8)
2
3
4
6 ETF - Earliest TxTime First (ETF) Qdisc
7
9 tc qdisc ... dev dev parent classid [ handle major: ] etf clockid
10 clockid [ delta delta_nsecs ] [ deadline_mode ] [ offload ]
11
12
14 The ETF (Earliest TxTime First) qdisc allows applications to control
15 the instant when a packet should be dequeued from the traffic control
16 layer into the netdevice. If offload is configured and supported by the
17 network interface card, the it will also control when packets leave the
18 network controller.
19
20 ETF achieves that by buffering packets until a configurable time before
21 their transmission time (i.e. txtime, or deadline), which can be con‐
22 figured through the delta option.
23
24 The qdisc uses a rb-tree internally so packets are always 'ordered' by
25 their txtime and will be dequeued following the (next) earliest txtime
26 first.
27
28 It relies on the SO_TXTIME socket option and the SCM_TXTIME CMSG in
29 each packet field to configure the behavior of time dependent sockets:
30 the clockid to be used as a reference, if the expected mode of txtime
31 for that socket is deadline or strict mode, and if packet drops should
32 be reported on the socket's error queue. See socket(7) for more infor‐
33 mation.
34
35 The etf qdisc will drop any packets with a txtime in the past, or if a
36 packet expires while waiting for being dequeued.
37
38 This queueing discipline is intended to be used by TSN (Time Sensitive
39 Networking) applications, and it exposes a traffic shaping functional‐
40 ity that is commonly documented as "Launch Time" or "Time-Based Sched‐
41 uling" by vendors and the documentation of network interface con‐
42 trollers.
43
44 ETF is meant to be installed under another qdisc that maps packet flows
45 to traffic classes, one example is mqprio(8).
46
47
49 clockid
50 Specifies the clock to be used by qdisc's internal timer for
51 measuring time and scheduling events. The qdisc expects that
52 packets passing through it to be using this same clockid as the
53 reference of their txtime timestamps. It will drop packets com‐
54 ing from sockets that do not comply with that.
55
56 For more information about time and clocks on Linux, please
57 refer to time(7) and clock_gettime(3).
58
59
60 delta
61 After enqueueing or dequeueing a packet, the qdisc will schedule
62 its next wake-up time for the next txtime minus this delta
63 value. This means delta can be used as a fudge factor for the
64 scheduler latency of a system. This value must be specified in
65 nanoseconds. The default value is 0 nanoseconds.
66
67
68 deadline_mode
69 When deadline_mode is set, the qdisc will handle txtime with a
70 different semantics, changed from a 'strict' transmission time
71 to a deadline. In practice, this means during the dequeue flow
72 etf(8) will set the txtime of the packet being dequeued to
73 'now'. The default is for this option to be disabled.
74
75
76 offload
77 When offload is set, etf(8) will try to configure the network
78 interface so time-based transmission arbitration is enabled in
79 the controller. This feature is commonly referred to as "Launch
80 Time" or "Time-Based Scheduling" by the documentation of network
81 interface controllers. The default is for this option to be
82 disabled.
83
84
85 skip_sock_check
86 etf(8) currently drops any packet which does not have a socket
87 associated with it or if the socket does not have SO_TXTIME
88 socket option set. But, this will not work if the launchtime is
89 set by another entity inside the kernel (e.g. some other Qdisc).
90 Setting the skip_sock_check will skip checking for a socket
91 associated with the packet.
92
93
95 ETF is used to enforce a Quality of Service. It controls when each
96 packets should be dequeued and transmitted, and can be used for limit‐
97 ing the data rate of a traffic class. To separate packets into traffic
98 classes the user may choose mqprio(8), and configure it like this:
99
100 # tc qdisc add dev eth0 handle 100: parent root mqprio num_tc 3 \
101 map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \
102 queues 1@0 1@1 2@2 \
103 hw 0
104
105 To replace the current queueing discipline by ETF in traffic class num‐
106 ber 0, issue:
107
108 # tc qdisc replace dev eth0 parent 100:1 etf \
109 clockid CLOCK_TAI delta 300000 offload
110
111 With the options above, etf will be configured to use CLOCK_TAI as its
112 clockid_t, will schedule packets for 300 us before their txtime, and
113 will enable the functionality on that in the network interface card.
114 Deadline mode will not be configured for this mode.
115
116
118 Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
119 Vinicius Costa Gomes <vinicius.gomes@intel.com>
120
121
122
123iproute2 05 Jul 2018 ETF(8)