tools: ynl-gen: inherit struct use info
authorJakub Kicinski <kuba@kernel.org>
Wed, 7 Jun 2023 20:23:58 +0000 (13:23 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 8 Jun 2023 21:01:10 +0000 (14:01 -0700)
commit37487f93b12551f82547e04b32d8d285818ea7a0
tree10cdf9e73e40d1513af8a1b2de377c6efdfb7ca6
parent6afaa0ef9b0e446fde14a1424f2c2858484a3601
tools: ynl-gen: inherit struct use info

We only render parse and netlink generation helpers as needed,
to avoid generating dead code. Propagate the information from
first- and second-layer attribute sets onto all children.
Otherwise devlink won't work, it has a lot more levels of nesting.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/net/ynl/ynl-gen-c.py