tools: ynl-gen: correct enum policies
authorJakub Kicinski <kuba@kernel.org>
Mon, 12 Jun 2023 15:59:19 +0000 (08:59 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 13 Jun 2023 18:46:46 +0000 (11:46 -0700)
commit10c4d2a7b88d65471a5e56bb8946b5bb59ff5cf7
tree87d4d8ecbb75cf49fbaaa8859a64234ad2979099
parent6b5f9a87e12d044f513a4f4c0e31ac7b5e988b66
tools: ynl-gen: correct enum policies

Scalar range validation assumes enums start at 0.
Teach it to properly calculate the value range.

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/net/ynl/ynl-gen-c.py