]> www.infradead.org Git - users/jedix/linux-maple.git/commit
tools: ynl-gen: support passing selector to a nest
authorJakub Kicinski <kuba@kernel.org>
Tue, 20 May 2025 16:19:10 +0000 (09:19 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 21 May 2025 19:38:22 +0000 (12:38 -0700)
commitcb39645d9a6a8b84f2e820db7c2b49ebd4b18b2c
tree19f8b362a9bb2ebfb4a0c0d0cf1da1f9ce5a0dc5
parentba5a199b2401de3d5df1fba4d5dcd92908461a07
tools: ynl-gen: support passing selector to a nest

In rtnetlink all submessages had the selector at the same level
of nesting as the submessage. We could refer to the relevant
attribute from the current struct. In TC, stats are one level
of nesting deeper than "kind". Teach the code-gen about structs
which need to be passed a selector by the caller for parsing.

Because structs are "topologically sorted" one pass of propagating
the selectors down is enough.

For generating netlink message we depend on the presence bits
so no selector passing needed there.

Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Link: https://patch.msgid.link/20250520161916.413298-7-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/net/ynl/pyynl/ynl_gen_c.py