tools: ynl-gen: support empty attribute lists
authorJakub Kicinski <kuba@kernel.org>
Thu, 24 Aug 2023 00:30:55 +0000 (17:30 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 25 Aug 2023 02:04:20 +0000 (19:04 -0700)
commit4c8c24e801e60a2b4a6f78401c9b7cb6cbf47cbf
tree58c2549a651883dda772703c4e42c4e1812bf168
parentdc2ef94d892634fba912e4fdeb01cd1c19346c9a
tools: ynl-gen: support empty attribute lists

Differentiate between empty list and None for member lists.
New families may want to create request responses with no attribute.
If we treat those the same as None we end up rendering
a full parsing policy in user space, instead of an empty one.

Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Link: https://lore.kernel.org/r/20230824003056.1436637-5-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/net/ynl/ynl-gen-c.py