iproute2/tc
Vinicius Costa Gomes 0dd1644935 tc: Add support for configuring the taprio scheduler
This traffic scheduler allows traffic classes states (transmission
allowed/not allowed, in the simplest case) to be scheduled, according
to a pre-generated time sequence. This is the basis of the IEEE
802.1Qbv specification.

Example configuration:

tc qdisc replace dev enp3s0 parent root handle 100 taprio \
          num_tc 3 \
	  map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \
	  queues 1@0 1@1 2@2 \
	  base-time 1528743495910289987 \
	  sched-entry S 01 300000 \
	  sched-entry S 02 300000 \
	  sched-entry S 04 300000 \
	  clockid CLOCK_TAI

The configuration format is similar to mqprio. The main difference is
the presence of a schedule, built by multiple "sched-entry"
definitions, each entry has the following format:

     sched-entry <CMD> <GATE MASK> <INTERVAL>

The only supported <CMD> is "S", which means "SetGateStates",
following the IEEE 802.1Qbv-2015 definition (Table 8-6). <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 <CMD>
and <GATE MASK> should be held before moving to the next entry.

This schedule is circular, that is, after the last entry is executed
it starts from the first one, indefinitely.

The other parameters can be defined as follows:

 - base-time: specifies the instant when the schedule starts, if
  'base-time' is a time in the past, the schedule will start at

 	      base-time + (N * cycle-time)

   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;

 - clockid: specifies the reference clock to be used;

The parameters should be similar to what the IEEE 802.1Q family of
specification defines.

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
2018-10-07 10:32:08 -07:00
..
.gitignore Add ignore files to make using git easier 2006-08-08 12:04:38 -07:00
Makefile tc: Add support for configuring the taprio scheduler 2018-10-07 10:32:08 -07:00
e_bpf.c bpf: make tc's bpf loader generic and move into lib 2016-11-29 12:35:32 -08:00
em_canid.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
em_cmp.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
em_ipset.c Convert the obvious cases to strlcpy() 2017-09-01 12:10:54 -07:00
em_ipt.c tc: Fix compilation error with old iptables 2018-03-27 06:38:52 -07:00
em_meta.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
em_nbyte.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
em_u32.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
emp_ematch.l tc/lexer: let quotes actually start strings 2018-01-24 08:49:10 -08:00
emp_ematch.y tc: remove extra whitespace 2015-10-23 15:43:28 -07:00
f_basic.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
f_bpf.c f_bpf: communicate ifindex for eBPF offload 2017-11-26 11:57:57 -08:00
f_cgroup.c tc actions: Improved batching and time filtered dumping 2017-08-04 13:16:51 -07:00
f_flow.c treewide: Use addattr_nest()/addattr_nest_end() to handle nested attributes 2018-02-02 15:01:09 -08:00
f_flower.c tc: flower: expose hardware offload count 2018-10-07 10:14:09 -07:00
f_fw.c treewide: Use addattr_nest()/addattr_nest_end() to handle nested attributes 2018-02-02 15:01:09 -08:00
f_matchall.c tc: jsonify matchall filter 2017-11-26 12:20:51 -08:00
f_route.c treewide: Use addattr_nest()/addattr_nest_end() to handle nested attributes 2018-02-02 15:01:09 -08:00
f_rsvp.c treewide: Use addattr_nest()/addattr_nest_end() to handle nested attributes 2018-02-02 15:01:09 -08:00
f_tcindex.c treewide: Use addattr_nest()/addattr_nest_end() to handle nested attributes 2018-02-02 15:01:09 -08:00
f_u32.c ip: Use single variable to represent -pretty 2018-02-16 08:13:36 -08:00
m_action.c tc: Correct json output for actions 2018-04-04 16:41:36 -07:00
m_bpf.c Merge branch 'iproute2-master' into iproute2-next 2018-03-13 17:48:10 -07:00
m_connmark.c tc: jsonify connmark action 2018-04-08 10:52:32 -07:00
m_csum.c tc: add json support in csum action 2018-06-05 15:30:30 -07:00
m_ematch.c iproute: make clang happy 2018-08-30 07:58:09 -07:00
m_ematch.h iproute: make clang happy 2018-08-30 07:58:09 -07:00
m_estimator.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
m_gact.c Merge branch 'iproute2-master' into iproute2-next 2018-03-13 17:48:10 -07:00
m_ife.c tc: add missing space symbol in ife output 2018-05-18 09:10:48 -07:00
m_ipt.c treewide: Use addattr_nest()/addattr_nest_end() to handle nested attributes 2018-02-02 15:01:09 -08:00
m_mirred.c Merge branch 'iproute2-master' into iproute2-next 2018-03-13 17:48:10 -07:00
m_nat.c tc: jsonify nat action 2018-06-20 10:20:34 -07:00
m_pedit.c Merge branch 'iproute2-master' into iproute2-next 2018-04-02 10:47:34 -07:00
m_pedit.h tc: drop extern from function prototypes 2018-08-20 16:01:31 -07:00
m_police.c Merge branch 'iproute2-master' into iproute2-next 2018-03-13 17:48:10 -07:00
m_sample.c tc: jsonify sample action 2018-04-01 08:44:31 -07:00
m_simple.c treewide: Use addattr_nest()/addattr_nest_end() to handle nested attributes 2018-02-02 15:01:09 -08:00
m_skbedit.c net:sched: add action inheritdsfield to skbedit 2018-07-19 09:17:56 -07:00
m_skbmod.c Merge branch 'iproute2-master' into iproute2-next 2018-03-13 17:48:10 -07:00
m_tunnel_key.c tc/act_tunnel_key: Enable setup of tos and ttl 2018-07-20 08:58:31 -07:00
m_vlan.c Merge branch 'iproute2-master' into iproute2-next 2018-03-13 17:48:10 -07:00
m_xt.c treewide: Use addattr_nest()/addattr_nest_end() to handle nested attributes 2018-02-02 15:01:09 -08:00
m_xt_old.c treewide: Use addattr_nest()/addattr_nest_end() to handle nested attributes 2018-02-02 15:01:09 -08:00
p_eth.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
p_icmp.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
p_ip.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
p_ip6.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
p_tcp.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
p_udp.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
q_atm.c treewide: Use addattr_nest()/addattr_nest_end() to handle nested attributes 2018-02-02 15:01:09 -08:00
q_cake.c q_cake: Also print nonat, nowash and no-ack-filter keywords 2018-09-14 11:32:46 -07:00
q_cbq.c treewide: Use addattr_nest()/addattr_nest_end() to handle nested attributes 2018-02-02 15:01:09 -08:00
q_cbs.c treewide: Use addattr_nest()/addattr_nest_end() to handle nested attributes 2018-02-02 15:01:09 -08:00
q_choke.c treewide: Use addattr_nest()/addattr_nest_end() to handle nested attributes 2018-02-02 15:01:09 -08:00
q_clsact.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
q_codel.c treewide: Use addattr_nest()/addattr_nest_end() to handle nested attributes 2018-02-02 15:01:09 -08:00
q_drr.c treewide: Use addattr_nest()/addattr_nest_end() to handle nested attributes 2018-02-02 15:01:09 -08:00
q_dsmark.c treewide: Use addattr_nest()/addattr_nest_end() to handle nested attributes 2018-02-02 15:01:09 -08:00
q_etf.c tc: Add support for the ETF Qdisc 2018-07-11 17:50:10 -07:00
q_fifo.c tc/fifo: remove unnecessary prototype 2018-09-10 11:50:22 -07:00
q_fq.c treewide: Use addattr_nest()/addattr_nest_end() to handle nested attributes 2018-02-02 15:01:09 -08:00
q_fq_codel.c tc: Add JSON output of fq_codel stats 2018-03-13 18:05:40 -07:00
q_gred.c treewide: Use addattr_nest()/addattr_nest_end() to handle nested attributes 2018-02-02 15:01:09 -08:00
q_hfsc.c treewide: Use addattr_nest()/addattr_nest_end() to handle nested attributes 2018-02-02 15:01:09 -08:00
q_hhf.c treewide: Use addattr_nest()/addattr_nest_end() to handle nested attributes 2018-02-02 15:01:09 -08:00
q_htb.c tc/htb: remove unused variable 2018-08-30 08:00:45 -07:00
q_ingress.c ingress: Don't break JSON output 2018-04-25 11:08:39 -07:00
q_mqprio.c tc/mqprio: Print extra info on invalid args. 2018-09-10 12:14:00 -07:00
q_multiq.c tc: B.W limits can now be specified in %. 2017-11-24 11:22:13 -08:00
q_netem.c q_netem: slotting with non-uniform distribution 2018-08-30 11:08:19 -07:00
q_pie.c treewide: Use addattr_nest()/addattr_nest_end() to handle nested attributes 2018-02-02 15:01:09 -08:00
q_prio.c tc: prio: JSON-ify prio output 2018-01-26 13:00:18 -08:00
q_qfq.c treewide: Use addattr_nest()/addattr_nest_end() to handle nested attributes 2018-02-02 15:01:09 -08:00
q_red.c treewide: Use addattr_nest()/addattr_nest_end() to handle nested attributes 2018-02-02 15:01:09 -08:00
q_rr.c tc: B.W limits can now be specified in %. 2017-11-24 11:22:13 -08:00
q_sfb.c treewide: Use addattr_nest()/addattr_nest_end() to handle nested attributes 2018-02-02 15:01:09 -08:00
q_sfq.c tc: B.W limits can now be specified in %. 2017-11-24 11:22:13 -08:00
q_skbprio.c Add SKB Priority qdisc support in tc(8) 2018-08-14 07:06:43 -07:00
q_taprio.c tc: Add support for configuring the taprio scheduler 2018-10-07 10:32:08 -07:00
q_tbf.c treewide: Use addattr_nest()/addattr_nest_end() to handle nested attributes 2018-02-02 15:01:09 -08:00
static-syms.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
tc.c lib: introduce print_nl 2018-09-11 08:29:33 -07:00
tc_cbq.c tc: support conversions to or from 64 bit nanosecond-based time 2018-08-30 11:04:38 -07:00
tc_cbq.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
tc_class.c Merge branch 'iproute2-master' into iproute2-next 2018-04-02 10:47:34 -07:00
tc_common.h tc: drop extern from function prototypes 2018-08-20 16:01:31 -07:00
tc_core.c tc: support conversions to or from 64 bit nanosecond-based time 2018-08-30 11:04:38 -07:00
tc_core.h tc: support conversions to or from 64 bit nanosecond-based time 2018-08-30 11:04:38 -07:00
tc_estimator.c tc: support conversions to or from 64 bit nanosecond-based time 2018-08-30 11:04:38 -07:00
tc_exec.c tc: replace magic constant 16 with #define 2017-11-24 11:19:18 -08:00
tc_filter.c tc: introduce support for chain templates 2018-07-25 10:00:28 -07:00
tc_monitor.c tc: introduce support for chain templates 2018-07-25 10:00:28 -07:00
tc_qdisc.c utils: Introduce and use nodev() helper routine 2018-03-11 17:58:36 -07:00
tc_red.c tc: red: allow setting th_min and th_max to the same value 2018-01-19 12:35:23 -08:00
tc_red.h tc: drop extern from function prototypes 2018-08-20 16:01:31 -07:00
tc_stab.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
tc_util.c tc_util: Add support for showing TCA_STATS_BASIC_HW statistics 2018-10-02 14:45:33 -07:00
tc_util.h tc: support conversions to or from 64 bit nanosecond-based time 2018-08-30 11:04:38 -07:00