netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: sched: uapi: add more sanely named duplicate defines
@ 2025-05-13 22:17 Jakub Kicinski
  2025-05-15 18:24 ` Simon Horman
  2025-05-15 19:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Jakub Kicinski @ 2025-05-13 22:17 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, andrew+netdev, horms, Jakub Kicinski,
	jhs, xiyou.wangcong, jiri

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.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: jhs@mojatatu.com
CC: xiyou.wangcong@gmail.com
CC: jiri@resnulli.us
---
 include/uapi/linux/pkt_cls.h   | 1 +
 include/uapi/linux/pkt_sched.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/include/uapi/linux/pkt_cls.h b/include/uapi/linux/pkt_cls.h
index 490821364165..28d94b11d1aa 100644
--- a/include/uapi/linux/pkt_cls.h
+++ b/include/uapi/linux/pkt_cls.h
@@ -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 */
 
diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h
index 9ea874395717..3e41349f3fa2 100644
--- a/include/uapi/linux/pkt_sched.h
+++ b/include/uapi/linux/pkt_sched.h
@@ -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 */
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: sched: uapi: add more sanely named duplicate defines
  2025-05-13 22:17 [PATCH net-next] net: sched: uapi: add more sanely named duplicate defines Jakub Kicinski
@ 2025-05-15 18:24 ` Simon Horman
  2025-05-15 19:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2025-05-15 18:24 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, netdev, edumazet, pabeni, andrew+netdev, jhs,
	xiyou.wangcong, jiri

On Tue, May 13, 2025 at 03:17:52PM -0700, Jakub Kicinski wrote:
> 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.
> 
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Reviewed-by: Simon Horman <horms@kernel.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: sched: uapi: add more sanely named duplicate defines
  2025-05-13 22:17 [PATCH net-next] net: sched: uapi: add more sanely named duplicate defines Jakub Kicinski
  2025-05-15 18:24 ` Simon Horman
@ 2025-05-15 19:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-05-15 19:40 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms, jhs,
	xiyou.wangcong, jiri

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 13 May 2025 15:17:52 -0700 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [net-next] net: sched: uapi: add more sanely named duplicate defines
    https://git.kernel.org/netdev/net-next/c/1119e5519dcd

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-05-15 19:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-13 22:17 [PATCH net-next] net: sched: uapi: add more sanely named duplicate defines Jakub Kicinski
2025-05-15 18:24 ` Simon Horman
2025-05-15 19:40 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).