* [PATCH net-next] tools: ynl-gen: support uint in multi-attr
@ 2025-09-16 17:04 Jakub Kicinski
2025-09-16 19:05 ` Vadim Fedorenko
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jakub Kicinski @ 2025-09-16 17:04 UTC (permalink / raw)
To: davem
Cc: netdev, edumazet, pabeni, andrew+netdev, horms, Jakub Kicinski,
donald.hunter, jacob.e.keller
The ethtool FEC histogram series run into a build issue with
type: uint + multi-attr: True. Auto scalars use 64b types,
we need to convert them explicitly when rendering the types.
No current spec needs this, and the ethtool FEC histogram
doesn't need this either any more, so not posting as a fix.
Link: https://lore.kernel.org/8f52c5b8-bd8a-44b8-812c-4f30d50f63ff@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: donald.hunter@gmail.com
CC: jacob.e.keller@intel.com
---
tools/net/ynl/pyynl/ynl_gen_c.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/net/ynl/pyynl/ynl_gen_c.py b/tools/net/ynl/pyynl/ynl_gen_c.py
index 56c63022d702..58086b101057 100755
--- a/tools/net/ynl/pyynl/ynl_gen_c.py
+++ b/tools/net/ynl/pyynl/ynl_gen_c.py
@@ -720,7 +720,11 @@ from lib import SpecSubMessage
return 'struct ynl_string *'
elif self.attr['type'] in scalars:
scalar_pfx = '__' if ri.ku_space == 'user' else ''
- return scalar_pfx + self.attr['type']
+ if self.is_auto_scalar:
+ name = self.type[0] + '64'
+ else:
+ name = self.attr['type']
+ return scalar_pfx + name
else:
raise Exception(f"Sub-type {self.attr['type']} not supported yet")
--
2.51.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net-next] tools: ynl-gen: support uint in multi-attr
2025-09-16 17:04 [PATCH net-next] tools: ynl-gen: support uint in multi-attr Jakub Kicinski
@ 2025-09-16 19:05 ` Vadim Fedorenko
2025-09-17 9:05 ` Donald Hunter
2025-09-17 22:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Vadim Fedorenko @ 2025-09-16 19:05 UTC (permalink / raw)
To: Jakub Kicinski, davem
Cc: netdev, edumazet, pabeni, andrew+netdev, horms, donald.hunter,
jacob.e.keller
On 16/09/2025 18:04, Jakub Kicinski wrote:
> The ethtool FEC histogram series run into a build issue with
> type: uint + multi-attr: True. Auto scalars use 64b types,
> we need to convert them explicitly when rendering the types.
>
> No current spec needs this, and the ethtool FEC histogram
> doesn't need this either any more, so not posting as a fix.
>
> Link: https://lore.kernel.org/8f52c5b8-bd8a-44b8-812c-4f30d50f63ff@redhat.com
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> CC: donald.hunter@gmail.com
> CC: jacob.e.keller@intel.com
> ---
> tools/net/ynl/pyynl/ynl_gen_c.py | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/tools/net/ynl/pyynl/ynl_gen_c.py b/tools/net/ynl/pyynl/ynl_gen_c.py
> index 56c63022d702..58086b101057 100755
> --- a/tools/net/ynl/pyynl/ynl_gen_c.py
> +++ b/tools/net/ynl/pyynl/ynl_gen_c.py
> @@ -720,7 +720,11 @@ from lib import SpecSubMessage
> return 'struct ynl_string *'
> elif self.attr['type'] in scalars:
> scalar_pfx = '__' if ri.ku_space == 'user' else ''
> - return scalar_pfx + self.attr['type']
> + if self.is_auto_scalar:
> + name = self.type[0] + '64'
> + else:
> + name = self.attr['type']
> + return scalar_pfx + name
> else:
> raise Exception(f"Sub-type {self.attr['type']} not supported yet")
>
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net-next] tools: ynl-gen: support uint in multi-attr
2025-09-16 17:04 [PATCH net-next] tools: ynl-gen: support uint in multi-attr Jakub Kicinski
2025-09-16 19:05 ` Vadim Fedorenko
@ 2025-09-17 9:05 ` Donald Hunter
2025-09-17 22:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Donald Hunter @ 2025-09-17 9:05 UTC (permalink / raw)
To: Jakub Kicinski
Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms,
jacob.e.keller
Jakub Kicinski <kuba@kernel.org> writes:
> The ethtool FEC histogram series run into a build issue with
> type: uint + multi-attr: True. Auto scalars use 64b types,
> we need to convert them explicitly when rendering the types.
>
> No current spec needs this, and the ethtool FEC histogram
> doesn't need this either any more, so not posting as a fix.
>
> Link: https://lore.kernel.org/8f52c5b8-bd8a-44b8-812c-4f30d50f63ff@redhat.com
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> CC: donald.hunter@gmail.com
> CC: jacob.e.keller@intel.com
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] tools: ynl-gen: support uint in multi-attr
2025-09-16 17:04 [PATCH net-next] tools: ynl-gen: support uint in multi-attr Jakub Kicinski
2025-09-16 19:05 ` Vadim Fedorenko
2025-09-17 9:05 ` Donald Hunter
@ 2025-09-17 22:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-09-17 22:20 UTC (permalink / raw)
To: Jakub Kicinski
Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms,
donald.hunter, jacob.e.keller
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 16 Sep 2025 10:04:31 -0700 you wrote:
> The ethtool FEC histogram series run into a build issue with
> type: uint + multi-attr: True. Auto scalars use 64b types,
> we need to convert them explicitly when rendering the types.
>
> No current spec needs this, and the ethtool FEC histogram
> doesn't need this either any more, so not posting as a fix.
>
> [...]
Here is the summary with links:
- [net-next] tools: ynl-gen: support uint in multi-attr
https://git.kernel.org/netdev/net-next/c/4436b2b324ce
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] 4+ messages in thread
end of thread, other threads:[~2025-09-17 22:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-16 17:04 [PATCH net-next] tools: ynl-gen: support uint in multi-attr Jakub Kicinski
2025-09-16 19:05 ` Vadim Fedorenko
2025-09-17 9:05 ` Donald Hunter
2025-09-17 22:20 ` 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).