netlink: specs: ethtool: Remove UAPI duplication of phy-upstream enum
authorKory Maincent <kory.maincent@bootlin.com>
Fri, 25 Apr 2025 17:14:18 +0000 (19:14 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 28 Apr 2025 22:49:47 +0000 (15:49 -0700)
The phy-upstream enum is already defined in the ethtool.h UAPI header
and used by the ethtool userspace tool. However, the ethtool spec does
not reference it, causing YNL to auto-generate a duplicate and redundant
enum.

Fix this by updating the spec to reference the existing UAPI enum
in ethtool.h.

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Link: https://patch.msgid.link/20250425171419.947352-1-kory.maincent@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/netlink/specs/ethtool.yaml
include/uapi/linux/ethtool_netlink_generated.h

index 655d8d10fe248d91a6a247f05648b94b1cb4656c..c650cd3dcb80bc93c5039dc8ba2c5c18793ff987 100644 (file)
@@ -89,8 +89,10 @@ definitions:
           doc: Group of short_detected states
   -
     name: phy-upstream-type
-    enum-name:
+    enum-name: phy-upstream
+    header: linux/ethtool.h
     type: enum
+    name-prefix: phy-upstream
     entries: [ mac, phy ]
   -
     name: tcp-data-split
index fe24c3459ac0f2afb317629b9ab594cb3b3dbe5b..30c8dad6214e9a882f1707e4835e9efc73c3f92e 100644 (file)
@@ -31,11 +31,6 @@ enum ethtool_header_flags {
        ETHTOOL_FLAG_STATS = 4,
 };
 
-enum {
-       ETHTOOL_PHY_UPSTREAM_TYPE_MAC,
-       ETHTOOL_PHY_UPSTREAM_TYPE_PHY,
-};
-
 enum ethtool_tcp_data_split {
        ETHTOOL_TCP_DATA_SPLIT_UNKNOWN,
        ETHTOOL_TCP_DATA_SPLIT_DISABLED,