Skip to content

tools: ynl-gen: split presence metadata

Jakub Kicinski netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesIn review 1 of 3 applied

Patches in v1 1 of 3 applied

#Subject and filesSizeRepliesApplied
1/3tools: ynl-gen: rename basic presence from 'bit' to 'present'tools/net/ynl/pyynl/ynl_gen_c.py+6 -61 replyApplied
2/3tools: ynl-gen: split presence metadatatools/net/ynl/pyynl/ynl_gen_c.py tools/net/ynl/samples/devlink.c tools/net/ynl/samples/rt-addr.c +1 more+28 -282 replies
3/3tools: ynl-gen: move the count into a presence struct tootools/net/ynl/pyynl/ynl_gen_c.py tools/net/ynl/samples/devlink.c+16 -210 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchDavid Wei
1/3R-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net-next 0/3] tools: ynl-gen: split presence metadata

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(-)
Signature · 1 line
2.49.0