Re: [PATCH 4/4] tools: ynl: add start-index property for indexed arrays
From: Asbjørn Sloth Tønnesen
Date: Tue Oct 21 2025 - 18:54:16 EST
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?
I have a series, that I will try to get posted tomorrow, where I add a new
attribute `ignore-index` which can be used to mark indexed arrays where the
index is just an incremental value. This is a follow-up to an earlier
discussion[1].
In that series, in order to add the new attribute to the existing specs,
in the commit messages I walk through all the existing indexed arrays,
and also include things like if they start their indexes from 0 or 1.
[1] https://lore.kernel.org/netdev/7fff6b2f-f17e-4179-8507-397b76ea24bb@xxxxxxxxx/