The module EEPROM decoder shows the identity and the digital
diagnostics of a module, but not the signal status, which is
usually the first thing to check when a link does not come up.

Patches 1-2 report the SFF-8636 per-lane loss of signal,
CDR loss of lock and Tx fault flags, as ethtool does since
commit 045d8db ("sff-8636: report LOL / LOS / Tx Fault").
The code is written for DPDK, not copied from ethtool.

Patches 3-4 report the SFF-8472 Rx_LOS and TX_FAULT state
from page A2h byte 110. ethtool does not show it, so it is
split out and can be dropped independently of patches 1-2.

The SFF-8636 flags are latched and cleared on read,
so they report the events since the previous read;
the SFF-8472 bits are the current state of the pins.

The series is based on next-net/for-main. It extends the same
release notes entry as the testpmd patch 170851 ("app/testpmd: add
command to decode module EEPROM"), so whichever is applied second
needs a trivial context fixup there.

Roman Khromenok (4):
  ethdev: report SFF-8636 lane status flags
  test: check SFF-8636 lane status flags
  ethdev: report SFF-8472 Rx LOS and Tx fault state
  test: check SFF-8472 Rx LOS and Tx fault state

 app/test/test_ethdev_module_eeprom.c   | 117 +++++++++++++++++++++++++
 doc/guides/rel_notes/release_26_11.rst |   3 +
 lib/ethdev/sff_8472.c                  |  16 ++++
 lib/ethdev/sff_8636.c                  |  35 ++++++++
 lib/ethdev/sff_8636.h                  |  12 +++
 lib/ethdev/sff_common.c                |  25 ++++++
 lib/ethdev/sff_common.h                |   2 +
 7 files changed, 210 insertions(+)

-- 
2.47.3

Reply via email to