Netdev List
 help / color / mirror / Atom feed
From: Ratheesh Kannoth <rkannoth@marvell.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<sgoutham@marvell.com>, <davem@davemloft.net>,
	<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
	<horms@kernel.org>, <donald.hunter@gmail.com>,
	<chuck.lever@oracle.com>, <matttbe@kernel.org>,
	<cjubran@nvidia.com>, <shshitrit@nvidia.com>,
	Saeed Mahameed <saeedm@nvidia.com>
Subject: Re: [PATCH v4 net-next 2/5] devlink: Implement devlink param multi attribute nested data values
Date: Wed, 18 Mar 2026 08:01:12 +0530	[thread overview]
Message-ID: <aboOcPaBsu0NWxF-@rkannoth-OptiPlex-7090> (raw)
In-Reply-To: <f3l4lzzumqlkluikqv2a3fopzotgjnoadnbzqoc3wllgew62zy@jj2jaseglkop>

On 2026-03-17 at 18:52:32, Jiri Pirko (jiri@resnulli.us) wrote:
> >+	case DEVLINK_PARAM_TYPE_U32_ARRAY:
> >+		cnt = 0;
> >+		nla_for_each_attr_type(param_data,
> >+				       DEVLINK_ATTR_PARAM_VALUE_DATA,
> >+				       genlmsg_data(info->genlhdr),
> >+				       genlmsg_len(info->genlhdr), rem) {
> >+			if (cnt >= __DEVLINK_PARAM_MAX_ARRAY_SIZE)
> >+				return -EMSGSIZE;
> >+
> >+			if (nla_len(param_data) != sizeof(u32))
> >+				return -EINVAL;
> >+
> >+			value->u32arr.val[cnt] = nla_get_u32(param_data);
>
> Now that we have UINT to be used everywhere for new netlink attributes,
> wouldn't it make sense to have rather UINT array?
We have U8, U16, U32, U64 param types in devlink. So declared as u32 array.
Let me know if you feel strongly about your opinion, will respin

enum devlink_param_type {
        DEVLINK_PARAM_TYPE_U8 = DEVLINK_VAR_ATTR_TYPE_U8,
        DEVLINK_PARAM_TYPE_U16 = DEVLINK_VAR_ATTR_TYPE_U16,
        DEVLINK_PARAM_TYPE_U32 = DEVLINK_VAR_ATTR_TYPE_U32,
        DEVLINK_PARAM_TYPE_U64 = DEVLINK_VAR_ATTR_TYPE_U64,
        DEVLINK_PARAM_TYPE_STRING = DEVLINK_VAR_ATTR_TYPE_STRING,
        DEVLINK_PARAM_TYPE_BOOL = DEVLINK_VAR_ATTR_TYPE_FLAG,
        DEVLINK_PARAM_TYPE_U32_ARRAY = DEVLINK_VAR_ATTR_TYPE_U32_ARRAY,
};

  reply	other threads:[~2026-03-18  2:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-12  2:27 [PATCH v4 net-next 0/5] octeontx2-af: npc: Enhancements Ratheesh Kannoth
2026-03-12  2:27 ` [PATCH v4 net-next 1/5] octeontx2-af: npc: cn20k: debugfs enhancements Ratheesh Kannoth
2026-03-12  2:27 ` [PATCH v4 net-next 2/5] devlink: Implement devlink param multi attribute nested data values Ratheesh Kannoth
2026-03-17  3:36   ` Jakub Kicinski
2026-03-17 13:22   ` Jiri Pirko
2026-03-18  2:31     ` Ratheesh Kannoth [this message]
2026-03-12  2:27 ` [PATCH v4 net-next 3/5] octeontx2-af: npc: cn20k: add subbank search order control Ratheesh Kannoth
2026-03-17  3:32   ` [v4,net-next,3/5] " Jakub Kicinski
2026-03-12  2:27 ` [PATCH v4 net-next 4/5] octeontx2-af: npc: cn20k: dynamically allocate and free default MCAM entries Ratheesh Kannoth
2026-03-12  2:27 ` [PATCH v4 net-next 5/5] octeontx2-af: npc: Support for custom KPU profile from filesystem Ratheesh Kannoth
2026-03-17  3:32   ` [v4,net-next,5/5] " Jakub Kicinski

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=aboOcPaBsu0NWxF-@rkannoth-OptiPlex-7090 \
    --to=rkannoth@marvell.com \
    --cc=chuck.lever@oracle.com \
    --cc=cjubran@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=matttbe@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeedm@nvidia.com \
    --cc=sgoutham@marvell.com \
    --cc=shshitrit@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