[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD4GDZykNOn1JnbbsnN6Lm=r=4Vwg6E8CAKg+VCPoCwhgoC3TA@mail.gmail.com>
Date: Fri, 21 Jun 2024 16:14:33 +0100
From: Donald Hunter <donald.hunter@...il.com>
To: Kory Maincent <kory.maincent@...tlin.com>
Cc: Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org
Subject: Re: Netlink specs, help dealing with nested array
On Fri, 21 Jun 2024 at 15:15, Kory Maincent <kory.maincent@...tlin.com> wrote:
>
> Hello Jakub, Donald or other ynl experts,
>
> I have an issue dealing with a nested array.
>
> Here is my current netlink spec and ethtool patches:
> https://termbin.com/gbyx
The yaml spec looks okay to me.
> https://termbin.com/b325
Have a look at ctrl_fill_info in net/netlink/genetlink.c for an
example nested array.
https://elixir.bootlin.com/linux/latest/source/net/netlink/genetlink.c#L1247
I think what you need is to move this outside the loop:
nla_nest_start(skb, ETHTOOL_A_C33_PSE_PW_LIMIT_RANGES);
and add nla_nest_start(skb, index) inside the loop.
> Here is the error I got:
> https://termbin.com/c7b1
>
> I am trying to investigate what goes wrong with ynl but I still don't know.
> If someone have an idea of what is going wrong with ynl or my specs it would be
> lovely!
>
> Regards,
> --
> Köry Maincent, Bootlin
> Embedded Linux and kernel engineering
> https://bootlin.com
Powered by blists - more mailing lists