]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: sched: uapi: add more sanely named duplicate defines
authorJakub Kicinski <kuba@kernel.org>
Tue, 13 May 2025 22:17:52 +0000 (15:17 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 15 May 2025 18:44:29 +0000 (11:44 -0700)
The TCA_FLOWER_KEY_CFM enum has a UNSPEC and MAX with _OPT
in the name, but the real attributes don't. Add a MAX that
more reasonably matches the attrs.

The PAD in TCA_TAPRIO is the only attr which doesn't have
_ATTR in it, perhaps signifying that it's not a real attr?
If so interesting idea in abstract but it makes codegen painful.

Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250513221752.843102-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/uapi/linux/pkt_cls.h
include/uapi/linux/pkt_sched.h

index 4908213641656cad1056f143db8fcf222355002b..28d94b11d1aa1688d78c7bfbe4559b3496d4cf40 100644 (file)
@@ -697,6 +697,7 @@ enum {
 };
 
 #define TCA_FLOWER_KEY_CFM_OPT_MAX (__TCA_FLOWER_KEY_CFM_OPT_MAX - 1)
+#define TCA_FLOWER_KEY_CFM_MAX    (__TCA_FLOWER_KEY_CFM_OPT_MAX - 1)
 
 #define TCA_FLOWER_MASK_FLAGS_RANGE    (1 << 0) /* Range-based match */
 
index 9ea87439571723fa744bc85dc0778c62cbbbe51a..3e41349f3fa2a6c7382c70f0d0a1aa77954fb086 100644 (file)
@@ -1182,6 +1182,7 @@ enum {
        TCA_TAPRIO_ATTR_SCHED_SINGLE_ENTRY, /* single entry */
        TCA_TAPRIO_ATTR_SCHED_CLOCKID, /* s32 */
        TCA_TAPRIO_PAD,
+       TCA_TAPRIO_ATTR_PAD = TCA_TAPRIO_PAD,
        TCA_TAPRIO_ATTR_ADMIN_SCHED, /* The admin sched, only used in dump */
        TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME, /* s64 */
        TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME_EXTENSION, /* s64 */