From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Andrew Lunn <andrew@lunn.ch>, Jakub Kicinski <kuba@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Donald Hunter <donald.hunter@gmail.com>,
Jonathan Corbet <corbet@lwn.net>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
Kory Maincent <kory.maincent@bootlin.com>,
Maxime Chevallier <maxime.chevallier@bootlin.com>,
Nishanth Menon <nm@ti.com>
Cc: Oleksij Rempel <o.rempel@pengutronix.de>,
kernel@pengutronix.de, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, UNGLinuxDriver@microchip.com,
linux-doc@vger.kernel.org, Michal Kubecek <mkubecek@suse.cz>,
Roan van Dijk <roan@protonic.nl>
Subject: [PATCH net-next v3 0/5] ethtool: introduce PHY MSE diagnostics UAPI and drivers
Date: Tue, 19 Aug 2025 09:12:51 +0200 [thread overview]
Message-ID: <20250819071256.3392659-1-o.rempel@pengutronix.de> (raw)
changes v3:
- add missing ETHTOOL_A_LINKSTATE_MSE_* yaml changes
changes v2:
- rebase on latest net-next
This series introduces a generic kernel-userspace API for retrieving PHY
Mean Square Error (MSE) diagnostics, together with netlink integration,
a fast-path reporting hook in LINKSTATE_GET, and initial driver
implementations for the KSZ9477 and DP83TD510E PHYs.
MSE is defined by the OPEN Alliance "Advanced diagnostic features for
100BASE-T1 automotive Ethernet PHYs" specification [1] as a measure of
slicer error rate, typically used internally to derive the Signal
Quality Indicator (SQI). While SQI is useful as a normalized quality
index, it hides raw measurement data, varies in scaling and thresholds
between vendors, and may not indicate certain failure modes - for
example, cases where autonegotiation would fail even though SQI reports
a good link. In practice, such scenarios can only be investigated in
fixed-link mode; here, MSE can provide an empirically estimated value
indicating conditions under which autonegotiation would not succeed.
Example output with current implementation:
root@DistroKit:~ ethtool lan1
Settings for lan1:
...
Speed: 1000Mb/s
Duplex: Full
...
Link detected: yes
SQI: 5/7
MSE: 3/127 (channel: worst)
root@DistroKit:~ ethtool --show-mse lan1
MSE diagnostics for lan1:
MSE Configuration:
Max Average MSE: 127
Refresh Rate: 2000000 ps
Symbols per Sample: 250
Supported capabilities: average channel-a channel-b channel-c
channel-d worst
MSE Snapshot (Channel: a):
Average MSE: 4
MSE Snapshot (Channel: b):
Average MSE: 3
MSE Snapshot (Channel: c):
Average MSE: 2
MSE Snapshot (Channel: d):
Average MSE: 3
[1] https://opensig.org/wp-content/uploads/2024/01/Advanced_PHY_features_for_automotive_Ethernet_V1.0.pdf
Oleksij Rempel (5):
ethtool: introduce core UAPI and driver API for PHY MSE diagnostics
ethtool: netlink: add ETHTOOL_MSG_MSE_GET and wire up PHY MSE access
ethtool: netlink: add lightweight MSE reporting to LINKSTATE_GET
net: phy: micrel: add MSE interface support for KSZ9477 family
net: phy: dp83td510: add MSE interface support for 10BASE-T1L
Documentation/netlink/specs/ethtool.yaml | 175 +++++++++
Documentation/networking/ethtool-netlink.rst | 74 ++++
drivers/net/phy/dp83td510.c | 44 +++
drivers/net/phy/micrel.c | 76 ++++
include/linux/phy.h | 126 ++++++
.../uapi/linux/ethtool_netlink_generated.h | 94 +++++
net/ethtool/Makefile | 2 +-
net/ethtool/linkstate.c | 84 ++++
net/ethtool/mse.c | 362 ++++++++++++++++++
net/ethtool/netlink.c | 10 +
net/ethtool/netlink.h | 2 +
11 files changed, 1048 insertions(+), 1 deletion(-)
create mode 100644 net/ethtool/mse.c
--
2.39.5
next reply other threads:[~2025-08-19 7:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-19 7:12 Oleksij Rempel [this message]
2025-08-19 7:12 ` [PATCH net-next v3 1/5] ethtool: introduce core UAPI and driver API for PHY MSE diagnostics Oleksij Rempel
2025-08-19 7:12 ` [PATCH net-next v3 2/5] ethtool: netlink: add ETHTOOL_MSG_MSE_GET and wire up PHY MSE access Oleksij Rempel
2025-08-20 9:41 ` Kory Maincent
2025-08-19 7:12 ` [PATCH net-next v3 3/5] ethtool: netlink: add lightweight MSE reporting to LINKSTATE_GET Oleksij Rempel
2025-08-20 9:52 ` Kory Maincent
2025-08-19 7:12 ` [PATCH net-next v3 4/5] net: phy: micrel: add MSE interface support for KSZ9477 family Oleksij Rempel
2025-08-19 7:12 ` [PATCH net-next v3 5/5] net: phy: dp83td510: add MSE interface support for 10BASE-T1L Oleksij Rempel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250819071256.3392659-1-o.rempel@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=horms@kernel.org \
--cc=kernel@pengutronix.de \
--cc=kory.maincent@bootlin.com \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=maxime.chevallier@bootlin.com \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
--cc=nm@ti.com \
--cc=pabeni@redhat.com \
--cc=roan@protonic.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).