From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
To: Jakub Kicinski <kuba@kernel.org>, davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
andrew+netdev@lunn.ch, horms@kernel.org, donald.hunter@gmail.com,
jacob.e.keller@intel.com
Subject: Re: [PATCH net-next] tools: ynl-gen: support uint in multi-attr
Date: Tue, 16 Sep 2025 20:05:55 +0100 [thread overview]
Message-ID: <49682000-cb30-42a5-b3ef-16d5cc1174c7@linux.dev> (raw)
In-Reply-To: <20250916170431.1526726-1-kuba@kernel.org>
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>
next prev parent reply other threads:[~2025-09-16 19:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2025-09-17 9:05 ` Donald Hunter
2025-09-17 22:20 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49682000-cb30-42a5-b3ef-16d5cc1174c7@linux.dev \
--to=vadim.fedorenko@linux.dev \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).