Skip to contentSkip to conversation

net: ethtool: remove duplicate defines for family info

PATCH Applied Jakub Kicinski 3 participants 3 messages Jun 17, 2025 – Jun 18, 2025

Subsystems (4)
lore
Share & tools
lore

Jakub Kicinski

author maintainer
#0 lore raw

PATCH 1/1 net: ethtool: remove duplicate defines for family info

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

---
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]

---
 Documentation/netlink/specs/ethtool.yaml       | 3 +++
 include/uapi/linux/ethtool_netlink.h           | 4 ----
 include/uapi/linux/ethtool_netlink_generated.h | 4 ++--
 3 files changed, 5 insertions(+), 6 deletions(-)
Documentation/netlink/specs/ethtool.yaml +3 -0
index 9f98715a6512..72a076b0e1b5 100644
@@ -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
include/uapi/linux/ethtool_netlink.h +0 -4
index 9ff72cfb2e98..09a75bdb6560 100644
@@ -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_ */
include/uapi/linux/ethtool_netlink_generated.h +2 -2
index 9a02f579de22..aa8ab5227c1e 100644
@@ -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,
Signature · 1 line
2.49.0
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Jakub Kicinski

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.

Quoted 4 lines

Provide naming info in YAML and remove the incorrect defines.

Fixes 8d0580c6ebdd ("ethtool: regenerate uapi header from the spec")
#2 lore raw
In reply to Jakub Kicinski
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:

Quoted 10 lines · On Tue, 17 Jun 2025 13:22:40 -0700 you wrote:

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.

[...]

Here is the summary with links:
- [net] net: ethtool: remove duplicate defines for family info

    https://git.kernel.org/netdev/net/c/c6d732c38f93

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html