[PATCH net-next 0/6] tools: ynl-gen: generate flags better

From: Asbjørn Sloth Tønnesen

Date: Mon Oct 13 2025 - 12:51:46 EST


This series focusses on increasing the quality of
the C code generated by ynl-gen for flags.

NB: I included a note in patch 6, on usage of the private
NETDEV_XDP_ACT_MASK in user-space.

Asbjørn Sloth Tønnesen (6):
tools: ynl-gen: bitshift the flag values in the generated code
tools: ynl-gen: refactor render-max enum generation
tools: ynl-gen: use uapi mask definition in NLA_POLICY_MASK
tools: ynl-gen: add generic p_wrap() helper
tools: ynl-gen: construct bitflag masks in generated headers
tools: ynl-gen: allow custom naming of render-max definitions

Documentation/netlink/genetlink-c.yaml | 3 +
Documentation/netlink/genetlink-legacy.yaml | 3 +
.../userspace-api/netlink/c-code-gen.rst | 7 +-
include/uapi/linux/dpll.h | 6 +-
.../uapi/linux/ethtool_netlink_generated.h | 20 ++---
include/uapi/linux/netdev.h | 34 ++++----
net/psp/psp-nl-gen.h | 4 +-
tools/include/uapi/linux/netdev.h | 34 ++++----
tools/net/ynl/pyynl/lib/nlspec.py | 7 +-
tools/net/ynl/pyynl/ynl_gen_c.py | 79 +++++++++++--------
10 files changed, 117 insertions(+), 80 deletions(-)

--
2.51.0