netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH net-next 0/8] tools: ynl: C-based YNL linter
@ 2026-09-10 22:17 Asbjørn Sloth Tønnesen
  2026-09-10 22:17 ` [RFC PATCH net-next 1/8] netlink: specs: nftables: add uapi-header Asbjørn Sloth Tønnesen
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Asbjørn Sloth Tønnesen @ 2026-09-10 22:17 UTC (permalink / raw)
  To: netdev
  Cc: Asbjørn Sloth Tønnesen, Jakub Kicinski, Donald Hunter,
	Danielle Ratson, David S. Miller, Eric Dumazet, Greg Thelen,
	Ilya Maximets, Matthieu Baerts (Netdev Foundation),
	Maxime Chevallier (Netdev Foundation), Paolo Abeni,
	Remy D. Farley, Simon Horman, Stanislav Fomichev, Heng Guo,
	linux-kernel

This RFC series adds a C-based linter for checking YNL/C alignment,
and as an example fixes the reported issues in rt-link.

The series is organized as follows:
  Patch 1-2) Prepares the last families for C code gen.
  Patch   3) Introduces the new linter.
  Patch 4-8) Fixes the reported issues in the rt-link family.

When run on net-next the linter reports the following:

$ make -C tools/net/ynl/generated lint 2>&1 > /dev/null |
	grep 'Linter summary'
conntrack: Linter summary: 48 errors, 0 warnings
devlink: Linter summary: 5 errors, 2 warnings
ethtool: Linter summary: 10 errors, 2 warnings
mptcp_pm: Linter summary: 0 errors, 4 warnings
nftables: Linter summary: 183 errors, 0 warnings
nl80211: Linter summary: 193 errors, 0 warnings
nlctrl: Linter summary: 23 errors, 0 warnings
ovs_flow: Linter summary: 2 errors, 3 warnings
rt-link: Linter summary: 173 errors, 8 warnings
rt-neigh: Linter summary: 31 errors, 0 warnings
rt-rule: Linter summary: 9 errors, 0 warnings
tc: Linter summary: 11 errors, 1 warnings

After this series rt-link has 2 false-positive warnings:

$ make -C tools/net/ynl/generated/ rt-link-lint 2>&1 > /dev/null
rt-link: WARN: vlan-protocols: Possible missing member before
ETH_P_8021AD (33024 -> 34984)
rt-link: WARN: netkit-policy: Possible missing member before
NETKIT_DROP (0 -> 2)
rt-link: Linter summary: 0 errors, 2 warnings

WDYT?

Asbjørn Sloth Tønnesen (8):
  netlink: specs: nftables: add uapi-header
  netlink: specs: conntrack: add uapi-header
  tools: ynl: add C-based YNL linter
  netlink: specs: rt-link: add C naming info
  netlink: specs: rt-link: re-align IPv4 devconf
  netlink: specs: rt-link: re-align ifla-inet6-stats
  netlink: specs: rt-link: fix ifinfo-flags names
  netlink: specs: rt-link: fix netkit-policy names

 Documentation/netlink/specs/conntrack.yaml |   1 +
 Documentation/netlink/specs/nftables.yaml  |   1 +
 Documentation/netlink/specs/rt-link.yaml   |  60 +++++---
 include/uapi/linux/snmp.h                  |   6 +-
 tools/net/ynl/Makefile.deps                |  11 +-
 tools/net/ynl/generated/.gitignore         |   3 +
 tools/net/ynl/generated/Makefile           |  27 +++-
 tools/net/ynl/linter/gen-h.sh              |  23 ++++
 tools/net/ynl/linter/linter.h              | 152 +++++++++++++++++++++
 tools/net/ynl/pyynl/ynl_gen_c.py           |  72 ++++++++--
 10 files changed, 316 insertions(+), 40 deletions(-)
 create mode 100755 tools/net/ynl/linter/gen-h.sh
 create mode 100644 tools/net/ynl/linter/linter.h


base-commit: 0abe8777490ebc008635ecb20297761d1b317697
-- 
2.55.0


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

end of thread, other threads:[~2026-09-11 22:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-10 22:17 [RFC PATCH net-next 0/8] tools: ynl: C-based YNL linter Asbjørn Sloth Tønnesen
2026-09-10 22:17 ` [RFC PATCH net-next 1/8] netlink: specs: nftables: add uapi-header Asbjørn Sloth Tønnesen
2026-09-10 22:17 ` [RFC PATCH net-next 2/8] netlink: specs: conntrack: " Asbjørn Sloth Tønnesen
2026-09-11  2:35   ` Jakub Kicinski
2026-09-10 22:17 ` [RFC PATCH net-next 3/8] tools: ynl: add C-based YNL linter Asbjørn Sloth Tønnesen
2026-09-11  2:33   ` Jakub Kicinski
2026-09-11 22:27     ` Asbjørn Sloth Tønnesen
2026-09-10 22:17 ` [RFC PATCH net-next 4/8] netlink: specs: rt-link: add C naming info Asbjørn Sloth Tønnesen
2026-09-10 22:17 ` [RFC PATCH net-next 5/8] netlink: specs: rt-link: re-align IPv4 devconf Asbjørn Sloth Tønnesen
2026-09-10 22:17 ` [RFC PATCH net-next 6/8] netlink: specs: rt-link: re-align ifla-inet6-stats Asbjørn Sloth Tønnesen
2026-09-10 22:17 ` [RFC PATCH net-next 7/8] netlink: specs: rt-link: fix ifinfo-flags names Asbjørn Sloth Tønnesen
2026-09-10 22:17 ` [RFC PATCH net-next 8/8] netlink: specs: rt-link: fix netkit-policy names Asbjørn Sloth Tønnesen

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).