From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Ratheesh Kannoth <rkannoth@marvell.com>
Cc: "netfilter-devel@vger.kernel.org" <netfilter-devel@vger.kernel.org>
Subject: Re: : Re: [PATCH] libmnl: add MNL_TYPE_UARR for devlink u64 array attributes
Date: Tue, 23 Jun 2026 13:01:33 +0200 [thread overview]
Message-ID: <ajpnjXPm4ccxQOmc@chamomile> (raw)
In-Reply-To: <MN0PR18MB58472CDD42C11ADA73EB5AA6D3EE2@MN0PR18MB5847.namprd18.prod.outlook.com>
On Tue, Jun 23, 2026 at 10:33:50AM +0000, Ratheesh Kannoth wrote:
> From: Pablo Neira Ayuso <pablo@netfilter.org>
> Subject: [EXTERNAL] Re: [PATCH] libmnl: add MNL_TYPE_UARR for devlink u64 array attributes
> > include/libmnl/libmnl.h | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/include/libmnl/libmnl.h b/include/libmnl/libmnl.h
> > index 0331da7..078d517 100644
> > --- a/include/libmnl/libmnl.h
> > +++ b/include/libmnl/libmnl.h
> > @@ -133,6 +133,7 @@ enum mnl_attr_data_type {
> > MNL_TYPE_NESTED_COMPAT,
> > MNL_TYPE_NUL_STRING,
> > MNL_TYPE_BINARY,
> > + MNL_TYPE_UARR = 129,
>
> Why 129?
>
> > MNL_TYPE_MAX,
> > };
>
> I would like to merge https://patchwork.kernel.org/project/netdevbpf/patch/20260615041042.549715-1-rkannoth@marvell.com/
> But this has a hard coded value 129. I believe, I need to use a macro here instead of 129.
>
>
> The value 129 is based on __DEVLINK_VAR_ATTR_TYPE_CUSTOM_BASE = 0x80 (i.e., 128) defined in the kernel, with custom types starting at that offset. The relevant kernel-side definition is:
> @@ -406,6 +406,7 @@ enum devlink_var_attr_type {
> DEVLINK_VAR_ATTR_TYPE_BINARY,
> _DEVLINK_VAR_ATTR_TYPE_CUSTOM_BASE = 0x80,
> /* Any possible custom types, unrelated to NLA* values go below */
> DEVLINK_VAR_ATTR_TYPE_U64_ARRAY,
> };
> So DEVLINK_VAR_ATTR_TYPE_U64_ARRAY resolves to 0x81 = 129.
> Please see the kernel patch for full context:
> https://lore.kernel.org/all/20260609040453.711932-5-rkannoth@marvell.com/
>
> Once this libmnl patch is merged, I will update the hardcoded 129 to use
> MNL_TYPE_UARR in:
> https://patchwork.kernel.org/project/netdevbpf/patch/20260615041042.549715-1-rkannoth@marvell.com/
This value is only internal for __mnl_attr_validate(), this validates
the attribute type.
I think this is not what you're searching for...
next prev parent reply other threads:[~2026-06-23 11:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-23 4:37 [PATCH] libmnl: add MNL_TYPE_UARR for devlink u64 array attributes Ratheesh Kannoth
2026-06-23 9:48 ` Pablo Neira Ayuso
2026-06-23 10:33 ` RE:: " Ratheesh Kannoth
2026-06-23 11:01 ` Pablo Neira Ayuso [this message]
2026-06-23 11:08 ` [EXTERNAL] Re: : " Ratheesh Kannoth
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=ajpnjXPm4ccxQOmc@chamomile \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=rkannoth@marvell.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