[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e9cd34d4-2970-462a-9c80-bf6d55ccb6ff@fiberby.net>
Date: Wed, 22 Oct 2025 19:37:10 +0000
From: Asbjørn Sloth Tønnesen <ast@...erby.net>
To: Zahari Doychev <zahari.doychev@...ux.com>,
Jakub Kicinski <kuba@...nel.org>
Cc: donald.hunter@...il.com, davem@...emloft.net, edumazet@...gle.com,
pabeni@...hat.com, horms@...nel.org, jacob.e.keller@...el.com,
matttbe@...nel.org, netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
jhs@...atatu.com, xiyou.wangcong@...il.com, jiri@...nulli.us,
johannes@...solutions.net
Subject: Re: [PATCH 4/4] tools: ynl: add start-index property for indexed
arrays
On 10/21/25 5:50 PM, Zahari Doychev wrote:
> On Mon, Oct 20, 2025 at 04:32:21PM -0700, Jakub Kicinski wrote:
>> We need to be selective about what API stupidity we try to
>> cover up in YNL. Otherwise the specs will be unmanageably complex.
>> IMO this one should be a comment in the spec explaining that action
>> 0 is ignore and that's it.
>>
>
> I am not sure if this applies for all cases of indexed arrays. For sure
> it applies for the tc_act_attrs case but I need to check the rest again.
>
> Do you think it would be fine to start from 1 for all indexed arrays?
Yes, AFAICT it would. Most of indexed-array attributes that are parsed by
the kernel uses nla_for_each_nested(), and don't use the index. The TC
actions are the only ones I found, that are parsed into a nlattr array.
Disclaimer: I have only mapped out the indexed-arrays that are declared in
the current specs.
See patch 4-7 in this series for the full analysis:
https://lore.kernel.org/netdev/20251022182701.250897-1-ast@fiberby.net/
Powered by blists - more mailing lists