Thread (55 messages) 55 messages, 6 authors, 2025-09-11

Re: [PATCH net-next 02/11] tools: ynl-gen: generate nested array policies

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2025-09-08 13:22:53
Also in: lkml

On Mon, 2025-09-08 at 09:08 +0000, Asbjørn Sloth Tønnesen wrote:
Thank you for the consensus write up. Should we prohibit indexed-array with sub-type
nest for families with a genetlink protocol?

It is currently only used in families with a netlink-raw or genetlink-legacy protocol.
I have no strong opinion on that, but I guess maybe so? At least print
out a warning for anyone who's trying to add such a new thing perhaps,
so that new stuff that isn't just a port (to ynl) or annotation of
existing APIs doesn't add it.
quoted
I can't get rid of the nested array types in nl80211 though, of course.
Wireguard is already in the same boat. [...]
Oh, sorry. I didn't look at the linked patch and thought it was adding
such a new thing. Looking now, I see it just makes the policy validate
it instead of (only) doing it in the code. (FWIW, in the code you could
then also set the policy argument for nla_parse_nested() calls to NULL.)
Given that, as Jacob pointed out, there are more families with nested arrays in
their YNL spec, than those using NLA_NESTED_ARRAY, then it appears that there
are more families already in the boat.
Right.

johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help