tools: ynl-gen: use names of constants in generated limits
authorJakub Kicinski <kuba@kernel.org>
Thu, 10 Oct 2024 15:12:48 +0000 (08:12 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 15 Oct 2024 11:06:49 +0000 (13:06 +0200)
commitbcbbfaa2612d7d0e9c3eafade5f6e93c3672f34f
treef19a80d144d788d995cd66c481f2269a18513919
parent97802ffca711cb3fd8adfd9db38e005970d59743
tools: ynl-gen: use names of constants in generated limits

YNL specs can use string expressions for limits, like s32-min
or u16-max. We convert all of those into their numeric values
when generating the code, which isn't always helpful. Try to
retain the string representations in the output. Any sort of
calculations still need the integers.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Joe Damato <jdamato@fastly.com>
Link: https://patch.msgid.link/20241010151248.2049755-1-kuba@kernel.org
[pabeni@redhat.com: regenerated netdev-genl-gen.c]
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/core/netdev-genl-gen.c
tools/net/ynl/ynl-gen-c.py