Skip to content

tools: ynl-gen: fill in the gaps in support of legacy families

Jakub Kicinski netdev 1 version Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 8 repliesApplied 8/8

Patches in v1 All 8 applied

#Subject and filesSizeRepliesApplied
1/8tools: ynl-gen: add missing request free helpers for dumpstools/net/ynl/ynl-gen-c.py+1 -01 replyApplied
2/8tools: ynl-gen: use enum user type for members and argstools/net/ynl/ynl-gen-c.py+2 -31 replyApplied
3/8tools: ynl-gen: support fixed headers in genetlinktools/net/ynl/lib/ynl.c tools/net/ynl/lib/ynl.h tools/net/ynl/ynl-gen-c.py+45 -81 replyApplied
4/8tools: ynl-gen: fill in implementations for TypeUnusedtools/net/ynl/ynl-gen-c.py+9 -01 replyApplied
5/8tools: ynl-gen: record information about recursive neststools/net/ynl/ynl-gen-c.py+17 -21 replyApplied
6/8tools: ynl-gen: re-sort ignoring recursive neststools/net/ynl/ynl-gen-c.py+31 -211 replyApplied
7/8tools: ynl-gen: store recursive nests by a pointertools/net/ynl/ynl-gen-c.py+14 -21 replyApplied
8/8tools: ynl-gen: print prototypes for recursive stufftools/net/ynl/ynl-gen-c.py+39 -51 replyApplied

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchDonald Hunter
1/8R-b
2/8R-b
3/8R-b
4/8R-b
5/8R-b
6/8R-b
7/8R-b
8/8R-b

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/8] tools: ynl-gen: fill in the gaps in support of legacy families

Fill in the gaps in YNL C code gen so that we can generate user space code for all genetlink families for which we have specs.

The two major changes we need are support for fixed headers and support for recursive nests.

For fixed header support - place the struct for the fixed header directly in the request struct (and don't bother generating access helpers). The member of a fixed header can't be too complex, and also are by definition not optional so the user has to fill them in. The YNL core needs a bit of a tweak to understand that the attrs may now start at a fixed offset, which is not necessarily equal to sizeof(struct genlmsghdr).

Dealing with nested sets is much harder. Previously we'd gen the nested structs as:

struct outer {
struct inner inner;
};

If structs are recursive (e.g. inner contains outer again) we must break this chain and allocate one of the structs dynamically (store a pointer rather than full struct).

Jakub Kicinski (8):
tools: ynl-gen: add missing request free helpers for dumps
tools: ynl-gen: use enum user type for members and args
tools: ynl-gen: support fixed headers in genetlink
tools: ynl-gen: fill in implementations for TypeUnused
tools: ynl-gen: record information about recursive nests
tools: ynl-gen: re-sort ignoring recursive nests
tools: ynl-gen: store recursive nests by a pointer
tools: ynl-gen: print prototypes for recursive stuff

 tools/net/ynl/lib/ynl.c    |   8 +-
 tools/net/ynl/lib/ynl.h    |   1 +
 tools/net/ynl/ynl-gen-c.py | 190 +++++++++++++++++++++++++++++--------
 3 files changed, 158 insertions(+), 41 deletions(-)
Signature · 1 line
2.43.0