Skip to content

RFC ethtool: add interface caps and PHY tests

Shubham Das netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ethtool: add interface capabilities query (intf-caps-get)Documentation/netlink/specs/ethtool.yaml include/linux/ethtool.h include/linux/phy.h +6 more+351 -12 replies
1/2ethtool: Add interface capability get supportMakefile.am ethtool.c netlink/extapi.h +2 more+311 -00 replies
2/2ethtool: add PHY test frameworkDocumentation/netlink/specs/ethtool.yaml include/linux/ethtool.h include/linux/phy.h +6 more+432 -10 replies
2/2ethtool: Add PHY test and BERT supportMakefile.am ethtool.c netlink/desc-ethtool.c +3 more+424 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC net-next 0/2] ethtool: add interface caps and PHY tests

This series adds two new ethtool netlink commands:

1. intf-caps-get: Discovers the functional block layout of a network interface. Each block represents a hardware point (MAC/PHY/MODULE) at a specific 802.3 sublayer (RS/PCS/FEC/PMA/PMD) with its supported capabilities (loopback, test patterns, BERT, error injection).

2. Add ETHTOOL_MSG_PHY_TEST_GET and ETHTOOL_MSG_PHY_TEST_SET for per-block, per-lane PHY testing using test patterns, BERT (Bit Error Ratio Test), and error injection. The block_id from intf-caps-get identifies which hardware point to test.

The block model uses:
- component: identifies the hardware entity (MAC, PHY, or module).
- sublayer: identifies the 802.3 sublayer (RS, PCS, FEC, PMA, or PMD).
- instance: identifies multiple instances of the same component, such as internal and external PHYs.
- depth: identifies the host-side or line-side block within the same sublayer.

Prior discussion on this proposal:
https://lore.kernel.org/netdev/SN7PR11MB810923BBDEC398E860099150FF1B2

Shubham Das (2):
ethtool: add interface capabilities query (intf-caps-get)
ethtool: add PHY test framework (phy-test-get, phy-test-set)

 Documentation/netlink/specs/ethtool.yaml      | 211 ++++++++++++++++++
 include/linux/ethtool.h                       |  94 ++++++++
 include/linux/phy.h                           |  16 ++
 include/linux/phylink.h                       |   7 +
 .../uapi/linux/ethtool_netlink_generated.h    | 106 +++++++++
 net/ethtool/Makefile                          |   2 +-
 net/ethtool/intf_caps.c                       | 130 +++++++++++
 net/ethtool/netlink.c                         |  24 ++
 net/ethtool/netlink.h                         |  10 +
 net/ethtool/phytest.c                         | 183 +++++++++++++++
 10 files changed, 782 insertions(+), 1 deletion(-)
 create mode 100644 net/ethtool/intf_caps.c
 create mode 100644 net/ethtool/phytest.c

base-commit: 001b5d347d8ba39b2dccaefcc57967b18caec8fe

Signature · 1 line
2.25.1