[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3hlrcm2mvwhtpeuq67vrqupjabuws7o64lh5xoks3cuyyrfpsj@vcuuwazenoys>
Date: Wed, 22 Oct 2025 23:03:23 +0300
From: Zahari Doychev <zahari.doychev@...ux.com>
To: Asbjørn Sloth Tønnesen <ast@...erby.net>
Cc: Jakub Kicinski <kuba@...nel.org>, 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 Wed, Oct 22, 2025 at 07:37:10PM +0000, Asbjørn Sloth Tønnesen wrote:
> 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/
>
thanks, will try it out.
Powered by blists - more mailing lists