From: "Asbjørn Sloth Tønnesen" <ast@fiberby.net>
To: netdev@vger.kernel.org
Cc: "Asbjørn Sloth Tønnesen" <ast@fiberby.net>,
"Jakub Kicinski" <kuba@kernel.org>,
"Donald Hunter" <donald.hunter@gmail.com>,
"Danielle Ratson" <danieller@nvidia.com>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Paolo Abeni" <pabeni@redhat.com>,
"Simon Horman" <horms@kernel.org>,
linux-kernel@vger.kernel.org, "Jiri Pirko" <jiri@resnulli.us>,
"Tariq Toukan" <tariqt@nvidia.com>,
"Moshe Shemesh" <moshe@nvidia.com>
Subject: [PATCH net-next v2 4/9] netlink: specs: devlink: fix resource-scope type
Date: Fri, 25 Sep 2026 21:39:07 +0000 [thread overview]
Message-ID: <20260925213918.204767-5-ast@fiberby.net> (raw)
In-Reply-To: <20260925213918.204767-1-ast@fiberby.net>
The correct type for resource-scope is flags, not enum:
- DEVLINK_RESOURCE_SCOPE_DEV is _BITUL(0) aka. 1, not 0.
- DEVLINK_RESOURCE_SCOPE_PORT is _BITUL(1) aka. 2, not 1.
This patch also removes "enum-as-flags", as it is now redundant,
these changes does not change the generated policy.
Before this patch, this generated devlink-user.c function call:
devlink_resource_scope_str(DEVLINK_RESOURCE_SCOPE_DEV) returned "port",
not "dev", as it didn't use ffs() to convert the value.
CC: Jiri Pirko <jiri@resnulli.us>
CC: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>
---
Note for Sashiko/Clashiko: Targeting net-next, so no "Fixes" tag.
Documentation/netlink/specs/devlink.yaml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Documentation/netlink/specs/devlink.yaml b/Documentation/netlink/specs/devlink.yaml
index 1de0daa0f921..4706de628392 100644
--- a/Documentation/netlink/specs/devlink.yaml
+++ b/Documentation/netlink/specs/devlink.yaml
@@ -158,7 +158,7 @@ definitions:
-
name: entry
-
- type: enum
+ type: flags
name: resource-scope
entries:
-
@@ -903,7 +903,6 @@ attribute-sets:
name: resource-scope-mask
type: u32
enum: resource-scope
- enum-as-flags: true
doc: |
Bitmask selecting which resource classes to include in a
resource-dump response. Bit 0 (dev) selects device-level
--
2.55.0
next prev parent reply other threads:[~2026-09-25 21:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 21:39 [PATCH net-next v2 0/9] netlink: specs: enum alignment fixes Asbjørn Sloth Tønnesen
2026-09-25 21:39 ` [PATCH net-next v2 1/9] netlink: specs: rt-link: re-align IPv4 devconf Asbjørn Sloth Tønnesen
2026-09-25 21:39 ` [PATCH net-next v2 2/9] netlink: specs: rt-link: re-align ifla-inet6-stats Asbjørn Sloth Tønnesen
2026-09-25 21:39 ` [PATCH net-next v2 3/9] netlink: specs: rt-link: fix ifinfo-flags names Asbjørn Sloth Tønnesen
2026-09-25 21:39 ` Asbjørn Sloth Tønnesen [this message]
2026-09-25 21:39 ` [PATCH net-next v2 5/9] netlink: specs: ethtool: re-align c33-pse-ext-state Asbjørn Sloth Tønnesen
2026-09-25 21:39 ` [PATCH net-next v2 6/9] netlink: specs: ethtool: re-align module-fw-flash-status Asbjørn Sloth Tønnesen
2026-09-25 21:39 ` [PATCH net-next v2 7/9] netlink: specs: nl80211: fix naming of enum members Asbjørn Sloth Tønnesen
2026-09-25 21:39 ` [PATCH net-next v2 8/9] netlink: specs: tc: fix typo in cls-flags Asbjørn Sloth Tønnesen
2026-09-25 21:39 ` [PATCH net-next v2 9/9] netlink: specs: fix incorrect name-prefixes Asbjørn Sloth Tønnesen
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=20260925213918.204767-5-ast@fiberby.net \
--to=ast@fiberby.net \
--cc=danieller@nvidia.com \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=moshe@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tariqt@nvidia.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
all inboxes | Powered by JetHome®