From: Jakub Kicinski Date: Fri, 16 May 2025 23:32:08 +0000 (-0700) Subject: Merge branch 'tools-ynl-gen-support-sub-messages-and-rt-link' X-Git-Tag: v6.16-rc1~132^2~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e1f7a3119cd4c5678f226033a9b9fb98917700b;p=thirdparty%2Fkernel%2Flinux.git Merge branch 'tools-ynl-gen-support-sub-messages-and-rt-link' Jakub Kicinski says: ==================== tools: ynl-gen: support sub-messages and rt-link Sub-messages are how we express "polymorphism" in YNL. Donald added the support to specs and Python a while back, support them in C, too. Sub-message is a nest, but the interpretation of the attribute types within that nest depends on a value of another attribute. For example in rt-link the "kind" attribute contains the link type (veth, bonding, etc.) and based on that the right enum has to be applied to interpret link-specific attributes. The last message is probably the most interesting to look at, as it adds a fairly advanced sample. This patch only contains enough support for rtnetlink, we will need a little more complexity to support TC, where sub-messages may contain fixed headers, and where the selector may be in a different nest than the submessage. ==================== Link: https://patch.msgid.link/20250515231650.1325372-1-kuba@kernel.org Signed-off-by: Jakub Kicinski --- 9e1f7a3119cd4c5678f226033a9b9fb98917700b