tools: ynl-gen: regeneration comment + function prefix
Subsystems (14)
cover tools: ynl-gen: regeneration comment + function prefix
It looks like these two patches are the last ones needed for YNL, before the WireGuard patches can go in.
These patches was both requested by Jason, during review of the WireGuard YNL conversion patchset[1].
[1] https://lore.kernel.org/r/[email protected]/T/#u
Asbjørn Sloth Tønnesen (2):
tools: ynl-gen: add function prefix argument
tools: ynl-gen: add regeneration comment
drivers/android/binder_netlink.c | 1 + drivers/android/binder_netlink.h | 1 + drivers/dpll/dpll_nl.c | 1 + drivers/dpll/dpll_nl.h | 1 + drivers/net/ovpn/netlink-gen.c | 1 + drivers/net/ovpn/netlink-gen.h | 1 + drivers/net/team/team_nl.c | 1 + drivers/net/team/team_nl.h | 1 + fs/lockd/netlink.c | 1 + fs/lockd/netlink.h | 1 + fs/nfsd/netlink.c | 1 + fs/nfsd/netlink.h | 1 + include/uapi/linux/android/binder_netlink.h | 1 + include/uapi/linux/dpll.h | 1 + .../uapi/linux/ethtool_netlink_generated.h | 1 + include/uapi/linux/fou.h | 1 + include/uapi/linux/handshake.h | 1 + include/uapi/linux/if_team.h | 1 + include/uapi/linux/lockd_netlink.h | 1 + include/uapi/linux/mptcp_pm.h | 1 + include/uapi/linux/net_shaper.h | 1 + include/uapi/linux/netdev.h | 1 + include/uapi/linux/nfsd_netlink.h | 1 + include/uapi/linux/ovpn.h | 1 + include/uapi/linux/psp.h | 1 + net/core/netdev-genl-gen.c | 1 + net/core/netdev-genl-gen.h | 1 + net/devlink/netlink_gen.c | 1 + net/devlink/netlink_gen.h | 1 + net/handshake/genl.c | 1 + net/handshake/genl.h | 1 + net/ipv4/fou_nl.c | 1 + net/ipv4/fou_nl.h | 1 + net/mptcp/mptcp_pm_gen.c | 1 + net/mptcp/mptcp_pm_gen.h | 1 + net/psp/psp-nl-gen.c | 1 + net/psp/psp-nl-gen.h | 1 + net/shaper/shaper_nl_gen.c | 1 + net/shaper/shaper_nl_gen.h | 1 + tools/include/uapi/linux/netdev.h | 1 + tools/net/ynl/pyynl/ynl_gen_c.py | 26 ++++++++++++------- 41 files changed, 57 insertions(+), 9 deletions(-)
Signature · 1 line
2.51.0
PATCH 1/2 tools: ynl-gen: add function prefix argument
This patch adds a new CLI argument for overriding the default function prefix, as used for naming the doit/dumpit functions in the generated kernel code.
When not specified the default "$(FAMILY)-nl" is used.
This can also be specified persistently in generated files:
/* YNL-ARG --function-prefix wg */
In the above example it causes the following changes:
wireguard_nl_get_device_dumpit() -> wg_get_device_dumpit()
wireguard_nl_get_device_doit() -> wg_get_device_doit()
The variable name fn_prefix, was chosen as it relates to op_prefix which is used to prefix the UAPI commands enum entries.
--- tools/net/ynl/pyynl/ynl_gen_c.py | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-)
tools/net/ynl/pyynl/ynl_gen_c.py +16 -9
@@ -1205,7 +1205,7 @@ class SubMessage(SpecSubMessage): class Family(SpecFamily): - def __init__(self, file_name, exclude_ops): + def __init__(self, file_name, exclude_ops, fn_prefix): # Added by resolve: self.c_name = None delattr(self, "c_name")
@@ -1237,6 +1237,8 @@ class Family(SpecFamily): else: self.uapi_header_name = self.ident_name + self.fn_prefix = fn_prefix if fn_prefix else f'{self.ident_name}-nl' + def resolve(self): self.resolve_up(super())
@@ -2911,12 +2913,12 @@ def print_kernel_op_table_fwd(family, cw, terminate): continue if 'do' in op: - name = c_lower(f"{family.ident_name}-nl-{op_name}-doit") + name = c_lower(f"{family.fn_prefix}-{op_name}-doit") cw.write_func_prot('int', name, ['struct sk_buff *skb', 'struct genl_info *info'], suffix=';') if 'dump' in op: - name = c_lower(f"{family.ident_name}-nl-{op_name}-dumpit") + name = c_lower(f"{family.fn_prefix}-{op_name}-dumpit") cw.write_func_prot('int', name, ['struct sk_buff *skb', 'struct netlink_callback *cb'], suffix=';') cw.nl()
@@ -2942,7 +2944,7 @@ def print_kernel_op_table(family, cw): for x in op['dont-validate']])), ) for op_mode in ['do', 'dump']: if op_mode in op: - name = c_lower(f"{family.ident_name}-nl-{op_name}-{op_mode}it") + name = c_lower(f"{family.fn_prefix}-{op_name}-{op_mode}it") members.append((op_mode + 'it', name)) if family.kernel_policy == 'per-op': struct = Struct(family, op['attribute-set'],
@@ -2980,7 +2982,7 @@ def print_kernel_op_table(family, cw): members.append(('validate', ' | '.join([c_upper('genl-dont-validate-' + x) for x in dont_validate])), ) - name = c_lower(f"{family.ident_name}-nl-{op_name}-{op_mode}it") + name = c_lower(f"{family.fn_prefix}-{op_name}-{op_mode}it") if 'pre' in op[op_mode]: members.append((cb_names[op_mode]['pre'], c_lower(op[op_mode]['pre']))) members.append((op_mode + 'it', name))
@@ -3402,6 +3404,7 @@ def main(): help='Do not overwrite the output file if the new output is identical to the old') parser.add_argument('--exclude-op', action='append', default=[]) parser.add_argument('-o', dest='out_file', type=str, default=None) + parser.add_argument('--function-prefix', dest='fn_prefix', type=str) args = parser.parse_args() if args.header is None:
@@ -3410,7 +3413,7 @@ def main(): exclude_ops = [re.compile(expr) for expr in args.exclude_op] try: - parsed = Family(args.spec, exclude_ops) + parsed = Family(args.spec, exclude_ops, args.fn_prefix) if parsed.license != '((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)': print('Spec license:', parsed.license) print('License must be: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)')
@@ -3430,10 +3433,14 @@ def main(): cw.p("/* Do not edit directly, auto-generated from: */") cw.p(f"/*\t{spec_kernel} */") cw.p(f"/* YNL-GEN {args.mode} {'header' if args.header else 'source'} */") - if args.exclude_op or args.user_header: + if args.exclude_op or args.user_header or args.fn_prefix: line = '' - line += ' --user-header '.join([''] + args.user_header) - line += ' --exclude-op '.join([''] + args.exclude_op) + if args.user_header: + line += ' --user-header '.join([''] + args.user_header) + if args.exclude_op: + line += ' --exclude-op '.join([''] + args.exclude_op) + if args.fn_prefix: + line += f' --function-prefix {args.fn_prefix}' cw.p(f'/* YNL-ARG{line} */') cw.nl()
Signature · 1 line
2.51.0
PATCH 2/2 tools: ynl-gen: add regeneration comment
In reply to Asbjørn Sloth TønnesenAdd a comment on regeneration to the generated files.
The comment is placed after the YNL-GEN line[1], as to not interfere with ynl-regen.sh's detection logic.
[1] and after the optional YNL-ARG line.
--- drivers/android/binder_netlink.c | 1 + drivers/android/binder_netlink.h | 1 + drivers/dpll/dpll_nl.c | 1 + drivers/dpll/dpll_nl.h | 1 + drivers/net/ovpn/netlink-gen.c | 1 + drivers/net/ovpn/netlink-gen.h | 1 + drivers/net/team/team_nl.c | 1 + drivers/net/team/team_nl.h | 1 + fs/lockd/netlink.c | 1 + fs/lockd/netlink.h | 1 + fs/nfsd/netlink.c | 1 + fs/nfsd/netlink.h | 1 + include/uapi/linux/android/binder_netlink.h | 1 + include/uapi/linux/dpll.h | 1 + include/uapi/linux/ethtool_netlink_generated.h | 1 + include/uapi/linux/fou.h | 1 + include/uapi/linux/handshake.h | 1 + include/uapi/linux/if_team.h | 1 + include/uapi/linux/lockd_netlink.h | 1 + include/uapi/linux/mptcp_pm.h | 1 + include/uapi/linux/net_shaper.h | 1 + include/uapi/linux/netdev.h | 1 + include/uapi/linux/nfsd_netlink.h | 1 + include/uapi/linux/ovpn.h | 1 + include/uapi/linux/psp.h | 1 + net/core/netdev-genl-gen.c | 1 + net/core/netdev-genl-gen.h | 1 + net/devlink/netlink_gen.c | 1 + net/devlink/netlink_gen.h | 1 + net/handshake/genl.c | 1 + net/handshake/genl.h | 1 + net/ipv4/fou_nl.c | 1 + net/ipv4/fou_nl.h | 1 + net/mptcp/mptcp_pm_gen.c | 1 + net/mptcp/mptcp_pm_gen.h | 1 + net/psp/psp-nl-gen.c | 1 + net/psp/psp-nl-gen.h | 1 + net/shaper/shaper_nl_gen.c | 1 + net/shaper/shaper_nl_gen.h | 1 + tools/include/uapi/linux/netdev.h | 1 + tools/net/ynl/pyynl/ynl_gen_c.py | 1 + 41 files changed, 41 insertions(+)
drivers/android/binder_netlink.c +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/binder.yaml */ /* YNL-GEN kernel source */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #include <net/netlink.h> #include <net/genetlink.h>
drivers/android/binder_netlink.h +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/binder.yaml */ /* YNL-GEN kernel header */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #ifndef _LINUX_BINDER_GEN_H#define _LINUX_BINDER_GEN_H
drivers/dpll/dpll_nl.c +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/dpll.yaml */ /* YNL-GEN kernel source */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #include <net/netlink.h> #include <net/genetlink.h>
drivers/dpll/dpll_nl.h +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/dpll.yaml */ /* YNL-GEN kernel header */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #ifndef _LINUX_DPLL_GEN_H#define _LINUX_DPLL_GEN_H
drivers/net/ovpn/netlink-gen.c +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/ovpn.yaml */ /* YNL-GEN kernel source */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #include <net/netlink.h> #include <net/genetlink.h>
drivers/net/ovpn/netlink-gen.h +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/ovpn.yaml */ /* YNL-GEN kernel header */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #ifndef _LINUX_OVPN_GEN_H#define _LINUX_OVPN_GEN_H
drivers/net/team/team_nl.c +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/team.yaml */ /* YNL-GEN kernel source */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #include <net/netlink.h> #include <net/genetlink.h>
drivers/net/team/team_nl.h +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/team.yaml */ /* YNL-GEN kernel header */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #ifndef _LINUX_TEAM_GEN_H#define _LINUX_TEAM_GEN_H
fs/lockd/netlink.c +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/lockd.yaml */ /* YNL-GEN kernel source */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #include <net/netlink.h> #include <net/genetlink.h>
fs/lockd/netlink.h +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/lockd.yaml */ /* YNL-GEN kernel header */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #ifndef _LINUX_LOCKD_GEN_H#define _LINUX_LOCKD_GEN_H
fs/nfsd/netlink.c +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/nfsd.yaml */ /* YNL-GEN kernel source */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #include <net/netlink.h> #include <net/genetlink.h>
fs/nfsd/netlink.h +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/nfsd.yaml */ /* YNL-GEN kernel header */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #ifndef _LINUX_NFSD_GEN_H#define _LINUX_NFSD_GEN_H
include/uapi/linux/android/binder_netlink.h +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/binder.yaml */ /* YNL-GEN uapi header */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #ifndef _UAPI_LINUX_ANDROID_BINDER_NETLINK_H#define _UAPI_LINUX_ANDROID_BINDER_NETLINK_H
include/uapi/linux/dpll.h +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/dpll.yaml */ /* YNL-GEN uapi header */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #ifndef _UAPI_LINUX_DPLL_H#define _UAPI_LINUX_DPLL_H
include/uapi/linux/ethtool_netlink_generated.h +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/ethtool.yaml */ /* YNL-GEN uapi header */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #ifndef _UAPI_LINUX_ETHTOOL_NETLINK_GENERATED_H#define _UAPI_LINUX_ETHTOOL_NETLINK_GENERATED_H
include/uapi/linux/fou.h +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/fou.yaml */ /* YNL-GEN uapi header */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #ifndef _UAPI_LINUX_FOU_H#define _UAPI_LINUX_FOU_H
include/uapi/linux/handshake.h +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/handshake.yaml */ /* YNL-GEN uapi header */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #ifndef _UAPI_LINUX_HANDSHAKE_H#define _UAPI_LINUX_HANDSHAKE_H
include/uapi/linux/if_team.h +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/team.yaml */ /* YNL-GEN uapi header */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #ifndef _UAPI_LINUX_IF_TEAM_H#define _UAPI_LINUX_IF_TEAM_H
include/uapi/linux/lockd_netlink.h +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/lockd.yaml */ /* YNL-GEN uapi header */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #ifndef _UAPI_LINUX_LOCKD_NETLINK_H#define _UAPI_LINUX_LOCKD_NETLINK_H
include/uapi/linux/mptcp_pm.h +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/mptcp_pm.yaml */ /* YNL-GEN uapi header */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #ifndef _UAPI_LINUX_MPTCP_PM_H#define _UAPI_LINUX_MPTCP_PM_H
include/uapi/linux/net_shaper.h +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/net_shaper.yaml */ /* YNL-GEN uapi header */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #ifndef _UAPI_LINUX_NET_SHAPER_H#define _UAPI_LINUX_NET_SHAPER_H
include/uapi/linux/netdev.h +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/netdev.yaml */ /* YNL-GEN uapi header */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #ifndef _UAPI_LINUX_NETDEV_H#define _UAPI_LINUX_NETDEV_H
include/uapi/linux/nfsd_netlink.h +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/nfsd.yaml */ /* YNL-GEN uapi header */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #ifndef _UAPI_LINUX_NFSD_NETLINK_H#define _UAPI_LINUX_NFSD_NETLINK_H
include/uapi/linux/ovpn.h +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/ovpn.yaml */ /* YNL-GEN uapi header */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #ifndef _UAPI_LINUX_OVPN_H#define _UAPI_LINUX_OVPN_H
include/uapi/linux/psp.h +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/psp.yaml */ /* YNL-GEN uapi header */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #ifndef _UAPI_LINUX_PSP_H#define _UAPI_LINUX_PSP_H
net/core/netdev-genl-gen.c +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/netdev.yaml */ /* YNL-GEN kernel source */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #include <net/netlink.h> #include <net/genetlink.h>
net/core/netdev-genl-gen.h +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/netdev.yaml */ /* YNL-GEN kernel header */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #ifndef _LINUX_NETDEV_GEN_H#define _LINUX_NETDEV_GEN_H
net/devlink/netlink_gen.c +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/devlink.yaml */ /* YNL-GEN kernel source */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #include <net/netlink.h> #include <net/genetlink.h>
net/devlink/netlink_gen.h +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/devlink.yaml */ /* YNL-GEN kernel header */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #ifndef _LINUX_DEVLINK_GEN_H#define _LINUX_DEVLINK_GEN_H
net/handshake/genl.c +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/handshake.yaml */ /* YNL-GEN kernel source */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #include <net/netlink.h> #include <net/genetlink.h>
net/handshake/genl.h +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/handshake.yaml */ /* YNL-GEN kernel header */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #ifndef _LINUX_HANDSHAKE_GEN_H#define _LINUX_HANDSHAKE_GEN_H
net/ipv4/fou_nl.c +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/fou.yaml */ /* YNL-GEN kernel source */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #include <net/netlink.h> #include <net/genetlink.h>
net/ipv4/fou_nl.h +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/fou.yaml */ /* YNL-GEN kernel header */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #ifndef _LINUX_FOU_GEN_H#define _LINUX_FOU_GEN_H
net/mptcp/mptcp_pm_gen.c +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/mptcp_pm.yaml */ /* YNL-GEN kernel source */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #include <net/netlink.h> #include <net/genetlink.h>
net/mptcp/mptcp_pm_gen.h +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/mptcp_pm.yaml */ /* YNL-GEN kernel header */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #ifndef _LINUX_MPTCP_PM_GEN_H#define _LINUX_MPTCP_PM_GEN_H
net/psp/psp-nl-gen.c +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/psp.yaml */ /* YNL-GEN kernel source */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #include <net/netlink.h> #include <net/genetlink.h>
net/psp/psp-nl-gen.h +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/psp.yaml */ /* YNL-GEN kernel header */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #ifndef _LINUX_PSP_GEN_H#define _LINUX_PSP_GEN_H
net/shaper/shaper_nl_gen.c +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/net_shaper.yaml */ /* YNL-GEN kernel source */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #include <net/netlink.h> #include <net/genetlink.h>
net/shaper/shaper_nl_gen.h +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/net_shaper.yaml */ /* YNL-GEN kernel header */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #ifndef _LINUX_NET_SHAPER_GEN_H#define _LINUX_NET_SHAPER_GEN_H
tools/include/uapi/linux/netdev.h +1 -0
@@ -2,6 +2,7 @@/* Do not edit directly, auto-generated from: */ /* Documentation/netlink/specs/netdev.yaml */ /* YNL-GEN uapi header */ +/* To regenerate run: tools/net/ynl/ynl-regen.sh */ #ifndef _UAPI_LINUX_NETDEV_H#define _UAPI_LINUX_NETDEV_H
tools/net/ynl/pyynl/ynl_gen_c.py +1 -0
@@ -3442,6 +3442,7 @@ def main(): if args.fn_prefix: line += f' --function-prefix {args.fn_prefix}' cw.p(f'/* YNL-ARG{line} */') + cw.p('/* To regenerate run: tools/net/ynl/ynl-regen.sh */') cw.nl() if args.mode == 'uapi':
Signature · 1 line
2.51.0
Re: [PATCH net-next 2/2] tools: ynl-gen: add regeneration comment
Hi Asbjørn,
Quoted 4 lines · Asbjørn Sloth Tønnesen
Add a comment on regeneration to the generated files.
The comment is placed after the YNL-GEN line[1], as to not interfere with ynl-regen.sh's detection logic.
Good idea, I always need to search for command :)
Cheers,
Matt
Signature · 1 line
Sponsored by the NGI0 Core fund.
Jakub Kicinski
maintainerRe: [PATCH net-next 2/2] tools: ynl-gen: add regeneration comment
In reply to Asbjørn Sloth TønnesenQuoted 6 lines · On Thu, 20 Nov 2025 17:44:27 +0000 Asbjørn Sloth Tønnesen wrote:
Add a comment on regeneration to the generated files.
The comment is placed after the YNL-GEN line[1], as to not interfere with ynl-regen.sh's detection logic.
[1] and after the optional YNL-ARG line.
Let's make this comment also optional? Detect whether it's there in the bash script and pass appropriate flag to C gen?
Signature · 1 line
pw-bot: cr
Jakub Kicinski
maintainerRe: [PATCH net-next 2/2] tools: ynl-gen: add regeneration comment
Quoted 10 lines · On Thu, 20 Nov 2025 10:02:40 -0800 Jakub Kicinski wrote:
Quoted 6 lines · On Thu, 20 Nov 2025 17:44:27 +0000 Asbjørn Sloth Tønnesen wrote:
Add a comment on regeneration to the generated files.
The comment is placed after the YNL-GEN line[1], as to not interfere with ynl-regen.sh's detection logic.
[1] and after the optional YNL-ARG line.
Let's make this comment also optional? Detect whether it's there in the bash script and pass appropriate flag to C gen?
Raced responding with Matthieu. Sounds like a strong signal that this is useful, so let's keep the patch as is. I'll revive it in pw.
Hi Asbjørn,
Thank you for your modifications, that's great!
Our CI did some validations and here is its report:
- KVM Validation: normal (except selftest_mptcp_join): Success! ✅
- KVM Validation: normal (only selftest_mptcp_join): Success! ✅
- KVM Validation: debug (except selftest_mptcp_join): Success! ✅
- KVM Validation: debug (only selftest_mptcp_join): Success! ✅
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/19546818189
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/f040cba4ef2e
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=1025958
If there are some issues, you can reproduce them using the same environment as the one used by the CI thanks to a docker image, e.g.:
$ cd [kernel source code]
$ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
--pull always mptcp/mptcp-upstream-virtme-docker:latest \
auto-normalFor more details:
https://github.com/multipath-tcp/mptcp-upstream-virtme-docker
Please note that despite all the efforts that have been already done to have a stable tests suite when executed on a public CI like here, it is possible some reported issues are not due to your modifications. Still, do not hesitate to help us improve that ;-)
Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Thu, 20 Nov 2025 17:44:25 +0000 you wrote:
It looks like these two patches are the last ones needed for YNL, before the WireGuard patches can go in.
These patches was both requested by Jason, during review of the WireGuard YNL conversion patchset[1].
[1] https://lore.kernel.org/r/[email protected]/T/#u
[...]
Here is the summary with links:
- [net-next,1/2] tools: ynl-gen: add function prefix argument
https://git.kernel.org/netdev/net-next/c/17fa6ee35bd4 - [net-next,2/2] tools: ynl-gen: add regeneration comment https://git.kernel.org/netdev/net-next/c/68e83f347266
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html