[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m2plghh50t.fsf@gmail.com>
Date: Fri, 09 May 2025 22:02:10 +0100
From: Donald Hunter <donald.hunter@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org,
jacob.e.keller@...el.com
Subject: Re: [PATCH net-next v2 1/3] tools: ynl-gen: support sub-type for
binary attributes
Jakub Kicinski <kuba@...nel.org> writes:
> Sub-type annotation on binary attributes may indicate that the attribute
> carries an array of simple types (also referred to as "C array" in docs).
> Support rendering them as such in the C user code. For example for u32,
> instead of:
>
> struct {
> u32 arr;
> } _len;
>
> void *arr;
>
> render:
>
> struct {
> u32 arr;
> } _count;
>
> __u32 *arr;
>
> Note that count is the number of elements while len was the length in bytes.
>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
Reviewed-by: Donald Hunter <donald.hunter@...il.com>
Powered by blists - more mailing lists