From: Ratheesh Kannoth <rkannoth@marvell.com>
To: <stephen@networkplumber.org>, <dsahern@kernel.org>,
<kuba@kernel.org>, <linux-kernel@vger.kernel.org>,
<netdev@vger.kernel.org>
Cc: <rkannoth@marvell.com>, <andrew+netdev@lunn.ch>,
<edumazet@google.com>, <pabeni@redhat.com>, <jiri@resnulli.us>
Subject: [PATCH iproute2-next v2 0/2] devlink: support u64-array devlink parameters
Date: Tue, 30 Jun 2026 07:20:10 +0530 [thread overview]
Message-ID: <20260630015012.3728870-1-rkannoth@marvell.com> (raw)
The kernel gained support for devlink parameters of type
DEVLINK_VAR_ATTR_TYPE_U64_ARRAY. These parameters carry a variable-length
list of u64 values encoded as multiple DEVLINK_ATTR_PARAM_VALUE_DATA
attributes. This is used by drivers that need to expose ordered lists of
configuration values, such as the Marvell CN20K npc_srch_order parameter.
This series updates the devlink tool to handle the new UAPI and adds
show/set support for u64-array parameters on both device and port params.
Patch 1 switches devlink param show/set to use DEVLINK_VAR_ATTR_TYPE_*
constants instead of generic MNL_TYPE_* values when interpreting
DEVLINK_ATTR_PARAM_TYPE. The kernel now reports param types using
devlink_var_attr_type, so userspace must use the matching symbols.
Patch 2 adds parsing, display, and configuration support for
DEVLINK_VAR_ATTR_TYPE_U64_ARRAY. Values are shown as a space-separated
list of u64 elements. Setting accepts a space- or comma-separated list
and emits one DEVLINK_ATTR_PARAM_VALUE_DATA attribute per element.
Tested on CN20K hardware with npc_srch_order:
# show search order
devlink dev param show pci/0002:01:00.0 name npc_srch_order
pci/0002:01:00.0:
name npc_srch_order type driver-specific
values:
cmode runtime value value 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
# set search order
devlink dev param set pci/0002:01:00.0 name npc_srch_order \
value 31,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30 \
cmode runtime
Depends on the corresponding kernel UAPI addition of
DEVLINK_VAR_ATTR_TYPE_U64_ARRAY.
Ratheesh Kannoth (2):
devlink: use DEVLINK_VAR_ATTR_TYPE_* in param show/set
devlink: support u64-array values in devlink param show/set
devlink/devlink.c | 178 ++++++++++++++++++++++++++++++++---
include/uapi/linux/devlink.h | 1 +
2 files changed, 164 insertions(+), 15 deletions(-)
--
v1 -> v2: Addressed David comments
https://lore.kernel.org/netdev/20260615041042.549715-1-rkannoth@marvell.com/
2.43.0
next reply other threads:[~2026-06-30 1:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 1:50 Ratheesh Kannoth [this message]
2026-06-30 1:50 ` [PATCH iproute2-next v2 1/2] devlink: use DEVLINK_VAR_ATTR_TYPE_* in param show/set Ratheesh Kannoth
2026-06-30 1:50 ` [PATCH iproute2-next v2 2/2] devlink: support u64-array values in devlink " Ratheesh Kannoth
2026-06-30 14:36 ` David Ahern
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=20260630015012.3728870-1-rkannoth@marvell.com \
--to=rkannoth@marvell.com \
--cc=andrew+netdev@lunn.ch \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stephen@networkplumber.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox