netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] tools: ynl-gen: split presence metadata
@ 2025-05-05 16:52 Jakub Kicinski
  2025-05-05 16:52 ` [PATCH net-next 1/3] tools: ynl-gen: rename basic presence from 'bit' to 'present' Jakub Kicinski
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Jakub Kicinski @ 2025-05-05 16:52 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, andrew+netdev, horms, donald.hunter,
	jacob.e.keller, sdf, Jakub Kicinski

The presence metadata indicates whether given attribute was/should be
added to the Netlink message. We have 3 types of such metadata:
 - bit presence for simple values like integers,
 - len presence for variable size attrs, like binary and strings,
 - count for arrays.

Previously this information was spread around with first two types
living in a dedicated sub-struct called _present. The counts resided
directly in the main struct with an n_ prefix.

Reshuffle these an uniformly store them in dedicated sub-structs.
The immediate motivation is that current scheme causes name collisions
for TC.

Jakub Kicinski (3):
  tools: ynl-gen: rename basic presence from 'bit' to 'present'
  tools: ynl-gen: split presence metadata
  tools: ynl-gen: move the count into a presence struct too

 tools/net/ynl/samples/devlink.c  |  7 +--
 tools/net/ynl/samples/rt-addr.c  |  4 +-
 tools/net/ynl/samples/rt-route.c |  4 +-
 tools/net/ynl/pyynl/ynl_gen_c.py | 80 +++++++++++++++-----------------
 4 files changed, 45 insertions(+), 50 deletions(-)

-- 
2.49.0


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

end of thread, other threads:[~2025-05-08  1:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-05 16:52 [PATCH net-next 0/3] tools: ynl-gen: split presence metadata Jakub Kicinski
2025-05-05 16:52 ` [PATCH net-next 1/3] tools: ynl-gen: rename basic presence from 'bit' to 'present' Jakub Kicinski
2025-05-05 20:52   ` David Wei
2025-05-05 16:52 ` [PATCH net-next 2/3] tools: ynl-gen: split presence metadata Jakub Kicinski
2025-05-05 21:06   ` David Wei
2025-05-06  0:27     ` Jakub Kicinski
2025-05-05 16:52 ` [PATCH net-next 3/3] tools: ynl-gen: move the count into a presence struct too Jakub Kicinski
2025-05-08  1:40 ` [PATCH net-next 0/3] tools: ynl-gen: split presence metadata 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).