linux/net/sched
Alessandro Marcolini 0efc7e541f taprio: validate TCA_TAPRIO_ATTR_FLAGS through policy instead of open-coding
As of now, the field TCA_TAPRIO_ATTR_FLAGS is being validated by manually
checking its value, using the function taprio_flags_valid().

With this patch, the field will be validated through the netlink policy
NLA_POLICY_MASK, where the mask is defined by TAPRIO_SUPPORTED_FLAGS.
The mutual exclusivity of the two flags TCA_TAPRIO_ATTR_FLAG_FULL_OFFLOAD
and TCA_TAPRIO_ATTR_FLAG_TXTIME_ASSIST is still checked manually.

Changes since RFC:
- fixed reversed xmas tree
- use NL_SET_ERR_MSG_MOD() for both invalid configuration

Changes since v1:
- Changed NL_SET_ERR_MSG_MOD to NL_SET_ERR_MSG_ATTR when wrong flags
  issued
- Changed __u32 to u32

Changes since v2:
- Added the missing parameter for NL_SET_ERR_MSG_ATTR (sorry again for
  the noise)

Signed-off-by: Alessandro Marcolini <alessandromarcolini99@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2024-01-29 12:08:42 +00:00
..
act_api.c net/sched: simplify tc_action_load_ops parameters 2024-01-07 14:58:26 +00:00
act_bpf.c net/sched: introduce ACT_P_BOUND return code 2024-01-03 18:36:24 -08:00
act_connmark.c net/sched: introduce ACT_P_BOUND return code 2024-01-03 18:36:24 -08:00
act_csum.c net/sched: introduce ACT_P_BOUND return code 2024-01-03 18:36:24 -08:00
act_ct.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-01-09 16:23:26 +01:00
act_ctinfo.c net/sched: introduce ACT_P_BOUND return code 2024-01-03 18:36:24 -08:00
act_gact.c net/sched: introduce ACT_P_BOUND return code 2024-01-03 18:36:24 -08:00
act_gate.c net/sched: introduce ACT_P_BOUND return code 2024-01-03 18:36:24 -08:00
act_ife.c net/sched: introduce ACT_P_BOUND return code 2024-01-03 18:36:24 -08:00
act_meta_mark.c
act_meta_skbprio.c
act_meta_skbtcindex.c
act_mirred.c net/sched: introduce ACT_P_BOUND return code 2024-01-03 18:36:24 -08:00
act_mpls.c net/sched: introduce ACT_P_BOUND return code 2024-01-03 18:36:24 -08:00
act_nat.c net/sched: introduce ACT_P_BOUND return code 2024-01-03 18:36:24 -08:00
act_pedit.c net/sched: introduce ACT_P_BOUND return code 2024-01-03 18:36:24 -08:00
act_police.c net/sched: introduce ACT_P_BOUND return code 2024-01-03 18:36:24 -08:00
act_sample.c net/sched: introduce ACT_P_BOUND return code 2024-01-03 18:36:24 -08:00
act_simple.c net/sched: introduce ACT_P_BOUND return code 2024-01-03 18:36:24 -08:00
act_skbedit.c net/sched: introduce ACT_P_BOUND return code 2024-01-03 18:36:24 -08:00
act_skbmod.c net/sched: introduce ACT_P_BOUND return code 2024-01-03 18:36:24 -08:00
act_tunnel_key.c net/sched: introduce ACT_P_BOUND return code 2024-01-03 18:36:24 -08:00
act_vlan.c net/sched: introduce ACT_P_BOUND return code 2024-01-03 18:36:24 -08:00
cls_api.c net/sched: flower: Fix chain template offload 2024-01-24 01:33:59 +00:00
cls_basic.c net: sched: Fill in missing MODULE_DESCRIPTION for classifiers 2023-11-01 21:49:09 -07:00
cls_bpf.c net: sched: cls_bpf: Undo tcf_bind_filter in case of an error 2023-07-17 07:33:39 +01:00
cls_cgroup.c net: sched: Fill in missing MODULE_DESCRIPTION for classifiers 2023-11-01 21:49:09 -07:00
cls_flow.c treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
cls_flower.c net/sched: flower: Fix chain template offload 2024-01-24 01:33:59 +00:00
cls_fw.c net: sched: Fill in missing MODULE_DESCRIPTION for classifiers 2023-11-01 21:49:09 -07:00
cls_matchall.c net: sched: cls_matchall: Undo tcf_bind_filter in case of failure after mall_set_parms 2023-07-17 07:33:38 +01:00
cls_route.c net: sched: Fill in missing MODULE_DESCRIPTION for classifiers 2023-11-01 21:49:09 -07:00
cls_u32.c net/sched: cls_u32: replace int refcounts with proper refcounts 2023-11-18 19:38:23 -08: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 net: implement lockless SO_PRIORITY 2023-10-01 19:09:54 +01:00
em_nbyte.c net: sched: Return the correct errno code 2021-02-06 11:15:28 -08:00
em_text.c net: sched: em_text: fix possible memory leak in em_text_destroy() 2024-01-01 13:08:15 +00:00
em_u32.c
ematch.c net_sched: reject TCF_EM_SIMPLE case for complex ematch module 2022-12-19 09:43:18 +00:00
Kconfig bpf: Add fd-based tcx multi-prog infra with link support 2023-07-19 10:07:27 -07:00
Makefile net/sched: Retire ipt action 2024-01-02 12:41:16 +00:00
sch_api.c net: sched: move block device tracking into tcf_block_get/put_ext() 2024-01-05 11:19:08 +00: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: move gso declarations and functions to their own files 2023-06-10 00:11:41 -07:00
sch_cbs.c net/sched: cbs: Use units.h instead of the copy of a definition 2023-11-30 23:15:48 -08:00
sch_choke.c net: sched: Fill in missing MODULE_DESCRIPTION for qdiscs 2023-11-01 21:49:09 -07:00
sch_codel.c net: sched: remove redundant NULL check in change hook function 2022-09-01 08:06:45 +02:00
sch_drr.c net: sched: Fill in missing MODULE_DESCRIPTION for qdiscs 2023-11-01 21:49:09 -07:00
sch_etf.c net: sched: Fill in missing MODULE_DESCRIPTION for qdiscs 2023-11-01 21:49:09 -07:00
sch_ets.c net: sched: Fill in missing MODULE_DESCRIPTION for qdiscs 2023-11-01 21:49:09 -07:00
sch_fifo.c net: sched: Fill in missing MODULE_DESCRIPTION for qdiscs 2023-11-01 21:49:09 -07:00
sch_fq_codel.c Revert "net: sched: fq_codel: remove redundant resource cleanup in fq_codel_init()" 2022-10-19 13:47:09 +01:00
sch_fq_pie.c netlink: make range pointers in policies const 2023-10-26 16:24:09 -07:00
sch_fq.c net_sched: sch_fq: better validate TCA_FQ_WEIGHTS and TCA_FQ_PRIOMAP 2023-11-08 18:30:21 -08:00
sch_frag.c net: dst: remove unnecessary input parameter in dst_alloc and dst_init 2023-09-12 11:42:25 +02:00
sch_generic.c net: sched: move block device tracking into tcf_block_get/put_ext() 2024-01-05 11:19:08 +00:00
sch_gred.c net: sched: Fill in missing MODULE_DESCRIPTION for qdiscs 2023-11-01 21:49:09 -07:00
sch_hfsc.c net: sched: Fill in missing MODULE_DESCRIPTION for qdiscs 2023-11-01 21:49:09 -07:00
sch_hhf.c net: sched: remove redundant NULL check in change hook function 2022-09-01 08:06:45 +02:00
sch_htb.c net: sched: Fill in missing MODULE_DESCRIPTION for qdiscs 2023-11-01 21:49:09 -07:00
sch_ingress.c net: sched: Fill in missing MODULE_DESCRIPTION for qdiscs 2023-11-01 21:49:09 -07:00
sch_mq.c net: sched: add rcu annotations around qdisc->qdisc_sleeping 2023-06-07 10:25:39 +01:00
sch_mqprio_lib.c net: sched: Fill in missing MODULE_DESCRIPTION for qdiscs 2023-11-01 21:49:09 -07:00
sch_mqprio_lib.h net/sched: mqprio: allow per-TC user input of FP adminStatus 2023-04-13 22:22:10 -07:00
sch_mqprio.c net: sched: Fill in missing MODULE_DESCRIPTION for qdiscs 2023-11-01 21:49:09 -07:00
sch_multiq.c net: sched: Fill in missing MODULE_DESCRIPTION for qdiscs 2023-11-01 21:49:09 -07:00
sch_netem.c net: sched: Fill in missing MODULE_DESCRIPTION for qdiscs 2023-11-01 21:49:09 -07:00
sch_pie.c net: sched: add rcu annotations around qdisc->qdisc_sleeping 2023-06-07 10:25:39 +01:00
sch_plug.c net: sched: Fill in missing MODULE_DESCRIPTION for qdiscs 2023-11-01 21:49:09 -07:00
sch_prio.c net: sched: Fill in missing MODULE_DESCRIPTION for qdiscs 2023-11-01 21:49:09 -07:00
sch_qfq.c net: sched: Fill in missing MODULE_DESCRIPTION for qdiscs 2023-11-01 21:49:09 -07:00
sch_red.c net: sched: Fill in missing MODULE_DESCRIPTION for qdiscs 2023-11-01 21:49:09 -07:00
sch_sfb.c Networking fixes for 6.1-rc2, including fixes from netfilter 2022-10-20 17:24:59 -07:00
sch_sfq.c net: sched: Fill in missing MODULE_DESCRIPTION for qdiscs 2023-11-01 21:49:09 -07:00
sch_skbprio.c net: sched: Fill in missing MODULE_DESCRIPTION for qdiscs 2023-11-01 21:49:09 -07:00
sch_taprio.c taprio: validate TCA_TAPRIO_ATTR_FLAGS through policy instead of open-coding 2024-01-29 12:08:42 +00:00
sch_tbf.c net: sched: Fill in missing MODULE_DESCRIPTION for qdiscs 2023-11-01 21:49:09 -07:00
sch_teql.c net: sched: Fill in missing MODULE_DESCRIPTION for qdiscs 2023-11-01 21:49:09 -07:00