[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231215180603.576748b1@kernel.org>
Date: Fri, 15 Dec 2023 18:06:03 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Hangbin Liu <liuhangbin@...il.com>
Cc: netdev@...r.kernel.org, Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net-next 1/3] tools: ynl-gen: use correct len for string
and binary
On Fri, 15 Dec 2023 11:50:07 +0800 Hangbin Liu wrote:
> As the description of 'struct nla_policy', the len means the maximum length
> of string, binary. Or minimum length of attribute payload for others.
> But most time we only use it for string and binary.
The meaning of 'len' in nla_policy is confusing to people writing new
families. IIRC I used max-len / min-len / extact-len and not len on
purpose in the YAML, so that there's no confusion what means what for
which type...
Obviously it is slightly confusing for people like you who convert
the existing families to YAML specs, but the risk of bugs seems lower
there. So I'd prefer to stick to the existing set of options.
Is the existing code gen incorrect or just hard to wrap one's head
around?
Powered by blists - more mailing lists