linux/net/sched
Vinicius Costa Gomes a3d43c0d56 taprio: Add support adding an admin schedule
The IEEE 802.1Q-2018 defines two "types" of schedules, the "Oper" (from
operational?) and "Admin" ones. Up until now, 'taprio' only had
support for the "Oper" one, added when the qdisc is created. This adds
support for the "Admin" one, which allows the .change() operation to
be supported.

Just for clarification, some quick (and dirty) definitions, the "Oper"
schedule is the currently (as in this instant) running one, and it's
read-only. The "Admin" one is the one that the system configurator has
installed, it can be changed, and it will be "promoted" to "Oper" when
it's 'base-time' is reached.

The idea behing this patch is that calling something like the below,
(after taprio is already configured with an initial schedule):

$ tc qdisc change taprio dev IFACE parent root 	     \
     	   base-time X 	     	   	       	     \
     	   sched-entry <CMD> <GATES> <INTERVAL>	     \
	   ...

Will cause a new admin schedule to be created and programmed to be
"promoted" to "Oper" at instant X. If an "Admin" schedule already
exists, it will be overwritten with the new parameters.

Up until now, there was some code that was added to ease the support
of changing a single entry of a schedule, but was ultimately unused.
Now, that we have support for "change" with more well thought
semantics, updating a single entry seems to be less useful.

So we remove what is in practice dead code, and return a "not
supported" error if the user tries to use it. If changing a single
entry would make the user's life easier we may ressurrect this idea,
but at this point, removing it simplifies the code.

For now, only the schedule specific bits are allowed to be added for a
new schedule, that means that 'clockid', 'num_tc', 'map' and 'queues'
cannot be modified.

Example:

$ tc qdisc change dev IFACE parent root handle 100 taprio \
      base-time $BASE_TIME \
      sched-entry S 00 500000 \
      sched-entry S 0f 500000 \
      clockid CLOCK_TAI

The only change in the netlink API introduced by this change is the
introduction of an "admin" type in the response to a dump request,
that type allows userspace to separate the "oper" schedule from the
"admin" schedule. If userspace doesn't support the "admin" type, it
will only display the "oper" schedule.

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-01 11:58:51 -04:00
..
act_api.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
act_bpf.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
act_connmark.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
act_csum.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
act_gact.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
act_ife.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
act_ipt.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
act_meta_mark.c net: remove duplicate includes 2017-12-13 13:18:46 -05:00
act_meta_skbprio.c net sched actions: change IFE modules alias names 2017-10-12 22:13:20 -07:00
act_meta_skbtcindex.c net: remove duplicate includes 2017-12-13 13:18:46 -05:00
act_mirred.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
act_nat.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
act_pedit.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
act_police.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
act_sample.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
act_simple.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
act_skbedit.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
act_skbmod.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
act_tunnel_key.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
act_vlan.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
cls_api.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
cls_basic.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
cls_bpf.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
cls_cgroup.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
cls_flow.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
cls_flower.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
cls_fw.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
cls_matchall.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
cls_route.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
cls_rsvp6.c
cls_rsvp.c
cls_rsvp.h netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
cls_tcindex.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
cls_u32.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
em_canid.c
em_cmp.c
em_ipset.c netfilter: x_tables: move hook state into xt_action_param structure 2016-11-03 10:56:21 +01:00
em_ipt.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
em_meta.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
em_nbyte.c net: sched: em_nbyte: don't add the data offset twice 2018-01-24 14:52:40 -05:00
em_text.c
em_u32.c
ematch.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
Kconfig net: sched: Kconfig: update reference link for PIE 2019-03-26 11:17:09 -07:00
Makefile tc: Add support for configuring the taprio scheduler 2018-10-04 13:52:23 -07:00
sch_api.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
sch_atm.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
sch_blackhole.c net_sched: blackhole: tell upper qdisc about dropped packets 2018-06-17 08:42:33 +09:00
sch_cake.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
sch_cbq.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
sch_cbs.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
sch_choke.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
sch_codel.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
sch_drr.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
sch_dsmark.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
sch_etf.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
sch_fifo.c net: sched: rename qdisc_destroy() to qdisc_put() 2018-09-25 20:17:35 -07:00
sch_fq_codel.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
sch_fq.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
sch_generic.c Revert: "net: sched: put back q.qlen into a single location" 2019-04-10 12:20:46 -07:00
sch_gred.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
sch_hfsc.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
sch_hhf.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
sch_htb.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
sch_ingress.c netlink: make nla_nest_start() add NLA_F_NESTED flag 2019-04-27 17:03:44 -04:00
sch_mq.c net: sched: introduce and use qstats read helpers 2019-04-01 14:50:13 -07:00
sch_mqprio.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
sch_multiq.c net: sched: introduce and use qdisc tree flush/purge helpers 2019-04-01 14:50:13 -07:00
sch_netem.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
sch_pie.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
sch_plug.c net: sched: sch: add extack for change qdisc ops 2017-12-21 12:32:50 -05:00
sch_prio.c net: sched: introduce and use qdisc tree flush/purge helpers 2019-04-01 14:50:13 -07:00
sch_qfq.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
sch_red.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
sch_sfb.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
sch_sfq.c net: sch: api: add extack support in tcf_block_get 2017-12-21 12:32:51 -05:00
sch_skbprio.c net/sched: add skbprio scheduler 2018-07-24 14:44:00 -07:00
sch_taprio.c taprio: Add support adding an admin schedule 2019-05-01 11:58:51 -04:00
sch_tbf.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
sch_teql.c net: sched: sch: add extack for init callback 2017-12-21 12:32:50 -05:00