Files
linux-stable-mirror/include/linux
Jakub Kicinski 9c1d09cdbc net: ethtool: plumb PHY stats to PHY drivers
[ Upstream commit b7a2c1fe6b ]

Introduce support for standardized PHY statistics reporting in ethtool
by extending the PHYLIB framework. Add the functions
phy_ethtool_get_phy_stats() and phy_ethtool_get_link_ext_stats() to
provide a consistent interface for retrieving PHY-level and
link-specific statistics. These functions are used within the ethtool
implementation to avoid direct access to the phy_device structure
outside of the PHYLIB framework.

A new structure, ethtool_phy_stats, is introduced to standardize PHY
statistics such as packet counts, byte counts, and error counters.
Drivers are updated to include callbacks for retrieving PHY and
link-specific statistics, ensuring values are explicitly set only for
supported fields, initialized with ETHTOOL_STAT_NOT_SET to avoid
ambiguity.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Stable-dep-of: 637399bf7e ("net: ethtool: netlink: Allow NULL nlattrs when getting a phy_device")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-03-13 13:02:07 +01:00
..
2025-01-09 13:33:32 +01:00
2025-03-07 18:25:35 +01:00
2024-12-14 20:03:35 +01:00
2024-10-01 17:01:40 +02:00
2025-02-01 18:39:37 +01:00
2025-02-08 09:57:11 +01:00
2025-01-17 13:40:50 +01:00
2025-02-08 09:57:23 +01:00
2025-03-13 13:02:01 +01:00
2025-02-27 04:30:15 -08:00
2025-02-08 09:58:16 +01:00
2025-01-23 17:22:53 +01:00
2025-02-01 18:39:35 +01:00
2025-02-27 04:30:19 -08:00