netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/3] tools: ynl-gen: support sub-types for binary attributes
@ 2025-05-09 15:42 Jakub Kicinski
  2025-05-09 15:42 ` [PATCH net-next v2 1/3] tools: ynl-gen: support sub-type " Jakub Kicinski
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Jakub Kicinski @ 2025-05-09 15:42 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, andrew+netdev, horms, donald.hunter,
	jacob.e.keller, Jakub Kicinski

Binary attributes have sub-type annotations which either indicate
that the binary object should be interpreted as a raw / C array of
a simple type (e.g. u32), or that it's a struct.

Use this information in the C codegen instead of outputting void *
for all binary attrs. It doesn't make a huge difference in the genl
families, but in classic Netlink there is a lot more structs.

v2:
 - use sub-classes
v1: https://lore.kernel.org/20250508022839.1256059-1-kuba@kernel.org

Jakub Kicinski (3):
  tools: ynl-gen: support sub-type for binary attributes
  tools: ynl-gen: auto-indent else
  tools: ynl-gen: support struct for binary attributes

 tools/net/ynl/pyynl/ynl_gen_c.py | 63 ++++++++++++++++++++++++++++++--
 1 file changed, 60 insertions(+), 3 deletions(-)

-- 
2.49.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-05-13 11:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-09 15:42 [PATCH net-next v2 0/3] tools: ynl-gen: support sub-types for binary attributes Jakub Kicinski
2025-05-09 15:42 ` [PATCH net-next v2 1/3] tools: ynl-gen: support sub-type " Jakub Kicinski
2025-05-09 21:02   ` Donald Hunter
2025-05-09 15:42 ` [PATCH net-next v2 2/3] tools: ynl-gen: auto-indent else Jakub Kicinski
2025-05-09 15:42 ` [PATCH net-next v2 3/3] tools: ynl-gen: support struct for binary attributes Jakub Kicinski
2025-05-09 21:03   ` Donald Hunter
2025-05-13 11:30 ` [PATCH net-next v2 0/3] tools: ynl-gen: support sub-types " patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).