[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aSj_OxBzq_gJOb4q@shell.armlinux.org.uk>
Date: Fri, 28 Nov 2025 01:47:39 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Oleksij Rempel <o.rempel@...gutronix.de>
Cc: Jakub Kicinski <kuba@...nel.org>, Andrew Lunn <andrew@...n.ch>,
Vladimir Oltean <vladimir.oltean@....com>,
Alexei Starovoitov <ast@...nel.org>,
Eric Dumazet <edumazet@...gle.com>, Rob Herring <robh@...nel.org>,
Florian Fainelli <f.fainelli@...il.com>,
Donald Hunter <donald.hunter@...il.com>,
Daniel Borkmann <daniel@...earbox.net>,
Jonathan Corbet <corbet@....net>,
John Fastabend <john.fastabend@...il.com>,
Lukasz Majewski <lukma@...x.de>,
Maxime Chevallier <maxime.chevallier@...tlin.com>,
Stanislav Fomichev <sdf@...ichev.me>,
Paolo Abeni <pabeni@...hat.com>, Jiri Pirko <jiri@...nulli.us>,
Jesper Dangaard Brouer <hawk@...nel.org>,
Divya.Koppera@...rochip.com,
Kory Maincent <kory.maincent@...tlin.com>,
Vadim Fedorenko <vadim.fedorenko@...ux.dev>, netdev@...r.kernel.org,
Sabrina Dubroca <sd@...asysnail.net>, linux-kernel@...r.kernel.org,
kernel@...gutronix.de, Krzysztof Kozlowski <krzk+dt@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Heiner Kallweit <hkallweit1@...il.com>
Subject: Re: [PATCH net-next v8 1/1] Documentation: net: add flow control
guide and document ethtool API
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:
> > 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.
>
> > , 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!
Powered by blists - more mailing lists