summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/pkt_cls.h
diff options
context:
space:
mode:
authorAsbjørn Sloth Tønnesen <ast@fiberby.net>2024-07-13 02:18:58 +0000
committerJakub Kicinski <kuba@kernel.org>2024-07-15 09:14:37 -0700
commit6e5c85c003e47fd49b72ca052b9181644e04a520 (patch)
tree7a47815169664587119858a21bebc023b8e62d6f /include/uapi/linux/pkt_cls.h
parentba7a0f4436ac73850a4110acf04d65f6e8a67d82 (diff)
downloadlinux-6e5c85c003e47fd49b72ca052b9181644e04a520.tar.gz
linux-6e5c85c003e47fd49b72ca052b9181644e04a520.tar.bz2
linux-6e5c85c003e47fd49b72ca052b9181644e04a520.zip
net/sched: flower: refactor control flag definitions
Redefine the flower control flags as an enum, so they are included in BTF info. Make the kernel-side enum a more explicit superset of TCA_FLOWER_KEY_FLAGS_*, new flags still need to be added to both enums, but at least the bit position only has to be defined once. FLOW_DIS_ENCAPSULATION is never set for mask, so it can't be exposed to userspace in an unsupported flags mask error message, so it will be placed one bit position above the last uAPI flag. Suggested-by: Alexander Lobakin <aleksander.lobakin@intel.com> Suggested-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net> Reviewed-by: Davide Caratti <dcaratti@redhat.com> Link: https://patch.msgid.link/20240713021911.1631517-2-ast@fiberby.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/uapi/linux/pkt_cls.h')
-rw-r--r--include/uapi/linux/pkt_cls.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/uapi/linux/pkt_cls.h b/include/uapi/linux/pkt_cls.h
index b6d38f5fd7c0..12db276f0c11 100644
--- a/include/uapi/linux/pkt_cls.h
+++ b/include/uapi/linux/pkt_cls.h
@@ -677,8 +677,11 @@ enum {
enum {
TCA_FLOWER_KEY_FLAGS_IS_FRAGMENT = (1 << 0),
TCA_FLOWER_KEY_FLAGS_FRAG_IS_FIRST = (1 << 1),
+ __TCA_FLOWER_KEY_FLAGS_MAX,
};
+#define TCA_FLOWER_KEY_FLAGS_MAX (__TCA_FLOWER_KEY_FLAGS_MAX - 1)
+
enum {
TCA_FLOWER_KEY_CFM_OPT_UNSPEC,
TCA_FLOWER_KEY_CFM_MD_LEVEL,