|
|
Log in / Subscribe / Register

Introduce unified and structured PHY

From:  Oleksij Rempel <o.rempel-AT-pengutronix.de>
To:  "David S. Miller" <davem-AT-davemloft.net>, Eric Dumazet <edumazet-AT-google.com>, Jakub Kicinski <kuba-AT-kernel.org>, Paolo Abeni <pabeni-AT-redhat.com>, Andrew Lunn <andrew+netdev-AT-lunn.ch>, Heiner Kallweit <hkallweit1-AT-gmail.com>, Jonathan Corbet <corbet-AT-lwn.net>
Subject:  [PATCH net-next v1 0/7] Introduce unified and structured PHY
Date:  Tue, 03 Dec 2024 08:56:14 +0100
Message-ID:  <20241203075622.2452169-1-o.rempel@pengutronix.de>
Cc:  Oleksij Rempel <o.rempel-AT-pengutronix.de>, kernel-AT-pengutronix.de, linux-kernel-AT-vger.kernel.org, netdev-AT-vger.kernel.org, Simon Horman <horms-AT-kernel.org>, Russell King <linux-AT-armlinux.org.uk>, Maxime Chevallier <maxime.chevallier-AT-bootlin.com>, linux-doc-AT-vger.kernel.org
Archive-link:  Article

This patch set introduces a unified and well-structured interface for
reporting PHY statistics. Instead of relying on arbitrary strings in PHY
drivers, this interface provides a consistent and structured way to
expose PHY statistics to userspace via ethtool.

The initial groundwork for this effort was laid by Jakub Kicinski, who
contributed patches to plumb PHY statistics to drivers and added support
for structured statistics in ethtool. Building on Jakub's work, I tested
the implementation with several PHYs, addressed a few issues, and added
support for statistics in two specific PHY drivers.

Jakub Kicinski (2):
  net: ethtool: plumb PHY stats to PHY drivers
  net: ethtool: add support for structured PHY statistics

Oleksij Rempel (5):
  phy: replace bitwise flag definitions with BIT() macro
  phy: introduce optional polling interface for PHY statistics
  ethtool: add helper to prevent invalid statistics exposure to
    userspace
  phy: dp83td510: add statistics support
  phy: dp83tg720: add statistics support

 Documentation/networking/ethtool-netlink.rst |   1 +
 drivers/net/phy/dp83td510.c                  |  98 ++++++++++++-
 drivers/net/phy/dp83tg720.c                  | 147 ++++++++++++++++++-
 drivers/net/phy/phy.c                        |  15 ++
 include/linux/ethtool.h                      |  39 +++++
 include/linux/phy.h                          |  27 +++-
 include/uapi/linux/ethtool.h                 |   2 +
 include/uapi/linux/ethtool_netlink.h         |  15 ++
 net/ethtool/linkstate.c                      |  25 +++-
 net/ethtool/netlink.h                        |   1 +
 net/ethtool/stats.c                          |  58 ++++++++
 net/ethtool/strset.c                         |   5 +
 12 files changed, 423 insertions(+), 10 deletions(-)

--
2.39.5




Copyright © 2024, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds