linux-stable/net/sched
Cong Wang 695176bfe5 net_sched: refactor TC action init API
TC action ->init() API has 10 parameters, it becomes harder
to read. Some of them are just boolean and can be replaced
by flags. Similarly for the internal API tcf_action_init()
and tcf_exts_validate().

This patch converts them to flags and fold them into
the upper 16 bits of "flags", whose lower 16 bits are still
reserved for user-space. More specifically, the following
kernel flags are introduced:

TCA_ACT_FLAGS_POLICE replace 'name' in a few contexts, to
distinguish whether it is compatible with policer.

TCA_ACT_FLAGS_BIND replaces 'bind', to indicate whether
this action is bound to a filter.

TCA_ACT_FLAGS_REPLACE  replaces 'ovr' in most contexts,
means we are replacing an existing action.

TCA_ACT_FLAGS_NO_RTNL replaces 'rtnl_held' but has the
opposite meaning, because we still hold RTNL in most
cases.

The only user-space flag TCA_ACT_FLAGS_NO_PERCPU_STATS is
untouched and still stored as before.

I have tested this patch with tdc and I do not see any
failure related to this patch.

Tested-by: Vlad Buslov <vladbu@nvidia.com>
Acked-by: Jamal Hadi Salim<jhs@mojatatu.com>
Cc: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Cong Wang <cong.wang@bytedance.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-02 10:24:38 +01:00
..
act_api.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
act_bpf.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
act_connmark.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
act_csum.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
act_ct.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
act_ctinfo.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
act_gact.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
act_gate.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
act_ife.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
act_ipt.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
act_meta_mark.c
act_meta_skbprio.c
act_meta_skbtcindex.c
act_mirred.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
act_mpls.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
act_nat.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
act_pedit.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
act_police.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
act_sample.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
act_simple.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
act_skbedit.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
act_skbmod.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
act_tunnel_key.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
act_vlan.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
cls_api.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
cls_basic.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
cls_bpf.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
cls_cgroup.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
cls_flow.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
cls_flower.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
cls_fw.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
cls_matchall.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
cls_route.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
cls_rsvp.c
cls_rsvp.h net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
cls_rsvp6.c
cls_tcindex.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
cls_u32.c net_sched: refactor TC action init API 2021-08-02 10:24:38 +01:00
em_canid.c net: sched: kerneldoc fixes 2020-07-13 17:20:40 -07:00
em_cmp.c net: sched: fix misspellings using misspell-fixer tool 2020-11-10 17:00:28 -08:00
em_ipset.c sched: consistently handle layer3 header accesses in the presence of VLANs 2020-07-03 14:34:53 -07:00
em_ipt.c sched: consistently handle layer3 header accesses in the presence of VLANs 2020-07-03 14:34:53 -07:00
em_meta.c sched: consistently handle layer3 header accesses in the presence of VLANs 2020-07-03 14:34:53 -07:00
em_nbyte.c net: sched: Return the correct errno code 2021-02-06 11:15:28 -08:00
em_text.c
em_u32.c
ematch.c net: sched: Fix spelling mistakes 2021-05-31 22:44:56 -07:00
Kconfig net: sched: incorrect Kconfig dependencies on Netfilter modules 2020-12-09 15:49:29 -08:00
Makefile net/sched: sch_frag: add generic packet fragment support. 2020-11-27 14:36:02 -08:00
sch_api.c net/sched: Remove unnecessary if statement 2021-07-16 10:46:35 -07:00
sch_atm.c net/sched: store the last executed chain also for clsact egress 2021-07-29 22:17:37 +01:00
sch_blackhole.c Revert "net: sched: Pass root lock to Qdisc_ops.enqueue" 2020-07-16 16:48:34 -07:00
sch_cake.c net/sched: store the last executed chain also for clsact egress 2021-07-29 22:17:37 +01:00
sch_cbq.c net/sched: store the last executed chain also for clsact egress 2021-07-29 22:17:37 +01:00
sch_cbs.c net: don't include ethtool.h from netdevice.h 2020-11-23 17:27:04 -08:00
sch_choke.c net: sched: validate stab values 2021-03-10 15:47:52 -08:00
sch_codel.c Revert "net: sched: Pass root lock to Qdisc_ops.enqueue" 2020-07-16 16:48:34 -07:00
sch_drr.c net/sched: store the last executed chain also for clsact egress 2021-07-29 22:17:37 +01:00
sch_dsmark.c net/sched: store the last executed chain also for clsact egress 2021-07-29 22:17:37 +01:00
sch_etf.c Revert "net: sched: Pass root lock to Qdisc_ops.enqueue" 2020-07-16 16:48:34 -07:00
sch_ets.c net/sched: store the last executed chain also for clsact egress 2021-07-29 22:17:37 +01:00
sch_fifo.c Revert "net: sched: Pass root lock to Qdisc_ops.enqueue" 2020-07-16 16:48:34 -07:00
sch_fq.c Revert "net: sched: Pass root lock to Qdisc_ops.enqueue" 2020-07-16 16:48:34 -07:00
sch_fq_codel.c net/sched: store the last executed chain also for clsact egress 2021-07-29 22:17:37 +01:00
sch_fq_pie.c net/sched: store the last executed chain also for clsact egress 2021-07-29 22:17:37 +01:00
sch_frag.c net/sched: sch_frag: fix stack OOB read while fragmenting IPv4 packets 2021-04-29 15:31:53 -07:00
sch_generic.c net: sched: remove qdisc->empty for lockless qdisc 2021-06-23 12:17:35 -07:00
sch_gred.c net: sched: Fix spelling mistakes 2021-05-31 22:44:56 -07:00
sch_hfsc.c net/sched: store the last executed chain also for clsact egress 2021-07-29 22:17:37 +01:00
sch_hhf.c Revert "net: sched: Pass root lock to Qdisc_ops.enqueue" 2020-07-16 16:48:34 -07:00
sch_htb.c net/sched: store the last executed chain also for clsact egress 2021-07-29 22:17:37 +01:00
sch_ingress.c net: sched: Pass ingress block to tcf_classify_ingress 2020-02-19 17:49:48 -08:00
sch_mq.c net: sched: fix dump qlen for sch_mq/sch_mqprio with NOLOCK subqueues 2019-12-03 11:53:55 -08:00
sch_mqprio.c mqprio: Fix out-of-bounds access in mqprio_dump 2019-12-06 11:58:45 -08:00
sch_multiq.c net/sched: store the last executed chain also for clsact egress 2021-07-29 22:17:37 +01:00
sch_netem.c netem: fix zero division in tabledist 2020-10-29 11:45:47 -07:00
sch_pie.c net: sched: fix misspellings using misspell-fixer tool 2020-11-10 17:00:28 -08:00
sch_plug.c Revert "net: sched: Pass root lock to Qdisc_ops.enqueue" 2020-07-16 16:48:34 -07:00
sch_prio.c net/sched: store the last executed chain also for clsact egress 2021-07-29 22:17:37 +01:00
sch_qfq.c net/sched: store the last executed chain also for clsact egress 2021-07-29 22:17:37 +01:00
sch_red.c net: sched: validate stab values 2021-03-10 15:47:52 -08:00
sch_sfb.c net/sched: store the last executed chain also for clsact egress 2021-07-29 22:17:37 +01:00
sch_sfq.c net/sched: store the last executed chain also for clsact egress 2021-07-29 22:17:37 +01:00
sch_skbprio.c Revert "net: sched: Pass root lock to Qdisc_ops.enqueue" 2020-07-16 16:48:34 -07:00
sch_taprio.c net/sched: sch_taprio: fix typo in comment 2021-07-02 11:55:28 -07:00
sch_tbf.c Revert "net: sched: Pass root lock to Qdisc_ops.enqueue" 2020-07-16 16:48:34 -07:00
sch_teql.c net: sched: sch_teql: fix null-pointer dereference 2021-04-08 14:14:42 -07:00