net: ethtool: remove duplicate defines for family info
authorJakub Kicinski <kuba@kernel.org>
Tue, 17 Jun 2025 20:22:40 +0000 (13:22 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 18 Jun 2025 21:10:39 +0000 (14:10 -0700)
Commit under fixes switched to uAPI generation from the YAML
spec. A number of custom defines were left behind, mostly
for commands very hard to express in YAML spec.

Among what was left behind was the name and version of
the generic netlink family. Problem is that the codegen
always outputs those values so we ended up with a duplicated,
differently named set of defines.

Provide naming info in YAML and remove the incorrect defines.

Fixes: 8d0580c6ebdd ("ethtool: regenerate uapi header from the spec")
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Link: https://patch.msgid.link/20250617202240.811179-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/netlink/specs/ethtool.yaml
include/uapi/linux/ethtool_netlink.h
include/uapi/linux/ethtool_netlink_generated.h

index 9f98715a65123cde3b0a6eae4e145d1d0c7da33f..72a076b0e1b5cedfa871c92cd07b553513d0c3a1 100644 (file)
@@ -7,6 +7,9 @@ protocol: genetlink-legacy
 doc: Partial family for Ethtool Netlink.
 uapi-header: linux/ethtool_netlink_generated.h
 
+c-family-name: ethtool-genl-name
+c-version-name: ethtool-genl-version
+
 definitions:
   -
     name: udp-tunnel-type
index 9ff72cfb2e98d9983a82c3eebeccf64c1c6dd33a..09a75bdb6560611d30bc21c975ecb0f6069d4269 100644 (file)
@@ -208,10 +208,6 @@ enum {
        ETHTOOL_A_STATS_PHY_MAX = (__ETHTOOL_A_STATS_PHY_CNT - 1)
 };
 
-/* generic netlink info */
-#define ETHTOOL_GENL_NAME "ethtool"
-#define ETHTOOL_GENL_VERSION 1
-
 #define ETHTOOL_MCGRP_MONITOR_NAME "monitor"
 
 #endif /* _UAPI_LINUX_ETHTOOL_NETLINK_H_ */
index 9a02f579de2255898709df2f1327967150a0f61d..aa8ab5227c1e3470a2c0b8494f8795e28b2550e6 100644 (file)
@@ -6,8 +6,8 @@
 #ifndef _UAPI_LINUX_ETHTOOL_NETLINK_GENERATED_H
 #define _UAPI_LINUX_ETHTOOL_NETLINK_GENERATED_H
 
-#define ETHTOOL_FAMILY_NAME    "ethtool"
-#define ETHTOOL_FAMILY_VERSION 1
+#define ETHTOOL_GENL_NAME      "ethtool"
+#define ETHTOOL_GENL_VERSION   1
 
 enum {
        ETHTOOL_UDP_TUNNEL_TYPE_VXLAN,