Skip to contentSkip to conversation

ethtool: remove XCVR_DUMMY entries

PATCH In review Heiner Kallweit 4 participants 5 messages Mar 22, 2020 – Mar 24, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ethtool: remove XCVR_DUMMY entries

The transceiver dummy entries are not used any longer, so remove them.

---
 include/uapi/linux/ethtool.h | 3 ---
 1 file changed, 3 deletions(-)
include/uapi/linux/ethtool.h +0 -3
index d586ee5e1..77721ea36 100644
@@ -1673,9 +1673,6 @@ static inline int ethtool_validate_duplex(__u8 duplex)
 /* Which transceiver to use. */
 #define XCVR_INTERNAL		0x00 /* PHY and MAC are in the same package */
 #define XCVR_EXTERNAL		0x01 /* PHY and MAC are in different packages */
-#define XCVR_DUMMY1		0x02
-#define XCVR_DUMMY2		0x03
-#define XCVR_DUMMY3		0x04
 
 /* Enable or disable autonegotiation. */
 #define AUTONEG_DISABLE		0x00
Signature · 1 line
2.25.2
maintainer
#1 lore raw
Quoted 12 lines · Heiner Kallweit

The transceiver dummy entries are not used any longer, so remove them.

---
 include/uapi/linux/ethtool.h | 3 ---
 1 file changed, 3 deletions(-)
include/uapi/linux/ethtool.h +0 -0
index d586ee5e1..77721ea36 100644

include/uapi/linux/ethtool.h static inline int ethtool_validate_duplex(__u8 duplex) · line 1678

Quoted 6 lines
include/uapi/linux/ethtool.h +0 -3
@@ -1673,9 +1673,6 @@ static inline int ethtool_validate_duplex(__u8 duplex)
 /* Which transceiver to use. */
 #define XCVR_INTERNAL		0x00 /* PHY and MAC are in the same package */
 #define XCVR_EXTERNAL		0x01 /* PHY and MAC are in different packages */
-#define XCVR_DUMMY1		0x02
-#define XCVR_DUMMY2		0x03
-#define XCVR_DUMMY3		0x04

Hi Heiner

We need to be careful here. This is a UAPI header. The kernel might not use them, but is there any user space code using them?

A quick search found:

http://www.infradead.org/~tgr/libnl/doc/api/ethtool_8c_source.html

Andrew

#2 lore raw
Quoted 8 lines · Andrew Lunn
Quoted 7 lines · Heiner Kallweit

The transceiver dummy entries are not used any longer, so remove them.

---
 include/uapi/linux/ethtool.h | 3 ---
 1 file changed, 3 deletions(-)
Quoted 14 lines

include/uapi/linux/ethtool.h static inline int ethtool_validate_duplex(__u8 duplex) · line 1678

Quoted 11 lines
include/uapi/linux/ethtool.h +0 -3
index d586ee5e1..77721ea36 100644
@@ -1673,9 +1673,6 @@ static inline int ethtool_validate_duplex(__u8 duplex)
 /* Which transceiver to use. */
 #define XCVR_INTERNAL		0x00 /* PHY and MAC are in the same package */
 #define XCVR_EXTERNAL		0x01 /* PHY and MAC are in different packages */
-#define XCVR_DUMMY1		0x02
-#define XCVR_DUMMY2		0x03
-#define XCVR_DUMMY3		0x04

Hi Heiner

Hi Andrew

Quoted 3 lines

We need to be careful here. This is a UAPI header. The kernel might not use them, but is there any user space code using them?

Right. I checked ethtool and it doesn't use the dummy values. Wherever I checked only the internal/external values are used.

In kernel last usage of the dummy values was removed 2yrs ago, see e.g. here: https://lore.kernel.org/patchwork/patch/767218/

Quoted 4 lines

A quick search found:

http://www.infradead.org/~tgr/libnl/doc/api/ethtool_8c_source.html

I checked here http://git.infradead.org/users/tgr/libnl.git and there hasn't been such an ethtool.c file for ages.

Quoted 2 lines

Andrew

Heiner

#3 lore raw
Quoted 7 lines · Heiner Kallweit
Quoted 4 lines · Andrew Lunn

A quick search found:

http://www.infradead.org/~tgr/libnl/doc/api/ethtool_8c_source.html

I checked here http://git.infradead.org/users/tgr/libnl.git and there hasn't been such an ethtool.c file for ages.

I doubt it was ever part of the official libnl tree - and it certainly never was in master branch of libnl git. It rather looks as part of an old attempt at a netlink interface for ethtool (2010 or 2011, according to the file banner).

Michal