Re: [PATCH net-next v8 1/1] Documentation: net: add flow control guide and document ethtool API
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
Date: 2025-11-28 20:39:04
Also in:
lkml
On Fri, Nov 28, 2025 at 09:16:24PM +0100, Andrew Lunn wrote:
quoted
Can you please tell me what is preventing us from deprecating pauseparam API *for autoneg* and using linkmodes which are completely unambiguous.Just to make sure i understand you here... You mean make use of ETHTOOL_LINK_MODE_Pause_BIT = 13, ETHTOOL_LINK_MODE_Asym_Pause_BIT = 14, So i would do a ksettings_set() with __ETHTOOL_LINK_MODE_LEGACY_MASK(Pause) | __ETHTOOL_LINK_MODE_LEGACY_MASK(Asym_Pause) to indicate both pause and asym pause should be advertised. The man page for ethtool does not indicate you can do this. It does have a list of link mode bits you can pass via the advertise option to ethtool -s, bit they are all actual link modes, not features like TP, AUI, BNC, Pause, Backplane, FEC none, FEC baser, etc.
I see the latest ethtool now supports -s ethX advertise MODE on|off, but it doesn't describe that in the parameter entry for "advertise" and doesn't suggest what MODE should be, nor how to specify multiple modes that one may wish to turn on/off. I'm guessing this is what you're referring to. The ports never get advertised, so I don't think they're relevant. However, the lack of the pause bits means that one is forced to use the hex number, and I don't deem that to be a user interface. That's a programmers interface, or rather a nightmare, because even if you're a programmer, you still end up looking at include/uapi/linux/ethtool.h and doing the maths to work out the hex number to pass, and then you mistype it with the wrong number of zeros, so you try again, and eventually you get the advertisement you wanted. So no, I don't accept Jakub's argument right now. Forcing people into the nightmare of working out a hex number isn't something for users. That's a debug tool at best. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!