Thread (21 messages) 21 messages, 5 authors, 2025-12-01

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 01:48:02
Also in: lkml

On Fri, Nov 28, 2025 at 01:27:29AM +0000, Russell King (Oracle) wrote:
On Wed, Nov 26, 2025 at 09:36:42AM +0100, Oleksij Rempel wrote:
quoted
My current understanding is that get_pauseparam() is mainly a
configuration API. It seems to be designed symmetric to
set_pauseparam(): it reports the requested policy (autoneg flag and
rx/tx pause), not the resolved MAC state.

In autoneg mode this means the user sees what we intend to advertise
or force, but not necessarily what the MAC actually ended up with
after resolution.

The ethtool userspace tool tries to fill this gap by showing
"RX negotiated" and "TX negotiated" fields, for example:

  Pause parameters for lan1:
    Autonegotiate:  on
    RX:             off
    TX:             off
    RX negotiated:  on
    TX negotiated:  on

As far as I can see, these "negotiated" values are not read from hardware or
kernel. They are guessed in userspace from the local and link partner
advertisements
They are not "guessed". IEEE 802.3 defines how the negotiation resolves
to these, and ethtool implements that, just the same as how we resolve
it in phylib.

Whether the MAC takes any notice of that or not is a MAC driver problem.
quoted
, assuming that the kernel follows the same pause resolution
rules as ethtool does. If the kernel or hardware behaves differently, these
values can be wrong.
If it doesn't follow IEEE 802.3 resolution, then it's quite simply
broken. IEEE 802.3 requires certain resolution methods from the
negotiation in order for both link partners to inter-operate.

Don't make this more complex than it needs to be!
Also note that there is hardware out there which can't tell us "the
hardware enabled transmission of pause frames" and "the hardware will
respect received pause frames". One example is some of the Marvell
DSA switches which only have a single status bit. Whether that means
they only support symmetric pause, I'm not certain, the docs don't
say.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help