All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: 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,
	shuah@kernel.org, maxime.chevallier@bootlin.com,
	ecree.xilinx@gmail.com, gal@nvidia.com,
	linux-kselftest@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net-next 2/5] tools: ynl: decode enums in auto-ints
Date: Tue,  8 Jul 2025 15:06:37 -0700	[thread overview]
Message-ID: <20250708220640.2738464-3-kuba@kernel.org> (raw)
In-Reply-To: <20250708220640.2738464-1-kuba@kernel.org>

Use enum decoding on auto-ints. Looks like we only had enum
auto-ints for input values until now. Upcoming RSS work will
need this to declare an attribute with flags as a uint.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: donald.hunter@gmail.com
---
 tools/net/ynl/pyynl/lib/ynl.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/net/ynl/pyynl/lib/ynl.py b/tools/net/ynl/pyynl/lib/ynl.py
index 61deb5923067..7529bce174ff 100644
--- a/tools/net/ynl/pyynl/lib/ynl.py
+++ b/tools/net/ynl/pyynl/lib/ynl.py
@@ -762,6 +762,8 @@ genl_family_name_to_id = None
                     decoded = True
                 elif attr_spec.is_auto_scalar:
                     decoded = attr.as_auto_scalar(attr_spec['type'], attr_spec.byte_order)
+                    if 'enum' in attr_spec:
+                        decoded = self._decode_enum(decoded, attr_spec)
                 elif attr_spec["type"] in NlAttr.type_formats:
                     decoded = attr.as_scalar(attr_spec['type'], attr_spec.byte_order)
                     if 'enum' in attr_spec:
-- 
2.50.0


  parent reply	other threads:[~2025-07-08 22:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-08 22:06 [PATCH net-next 0/5] ethtool: rss: report which fields are configured for hashing Jakub Kicinski
2025-07-08 22:06 ` [PATCH net-next 1/5] ethtool: rss: make sure dump takes the rss lock Jakub Kicinski
2025-07-08 22:06 ` Jakub Kicinski [this message]
2025-07-09  9:05   ` [PATCH net-next 2/5] tools: ynl: decode enums in auto-ints Donald Hunter
2025-07-08 22:06 ` [PATCH net-next 3/5] ethtool: mark ETHER_FLOW as usable for Rx hash Jakub Kicinski
2025-07-08 22:06 ` [PATCH net-next 4/5] ethtool: rss: report which fields are configured for hashing Jakub Kicinski
2025-07-08 22:06 ` [PATCH net-next 5/5] selftests: drv-net: test RSS header field configuration Jakub Kicinski
2025-07-11  1:20 ` [PATCH net-next 0/5] ethtool: rss: report which fields are configured for hashing 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=20250708220640.2738464-3-kuba@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=ecree.xilinx@gmail.com \
    --cc=edumazet@google.com \
    --cc=gal@nvidia.com \
    --cc=horms@kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.