ethtool: Add support for CMIS diagnostic information
Status from this message: This series was applied to ethtool/ethtool.git (master)
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | sff-8636: Use an SFF-8636 specific define for maximum number of channelsqsfp.c sff-common.h | +6 | 0 replies | |
| 2/8 | sff-common: Move OFFSET_TO_U16_PTR() to common header fileqsfp.c sff-common.h | +2 | 1 reply | |
| 3/8 | cmis: Initialize Page 02h in memory mapcmis.c | +10 | 0 replies | |
| 4/8 | cmis: Initialize Banked Page 11h in memory mapcmis.c cmis.h | +54 | 0 replies | |
| 5/8 | cmis: Parse and print diagnostic informationcmis.c cmis.h | +518 | 0 replies | |
| 6/8 | cmis: Print Module State and Fault Causecmis.c cmis.h | +86 | 0 replies | |
| 7/8 | cmis: Print Module-Level Controlscmis.c cmis.h | +20 | 0 replies | |
| 8/8 | sff-8636: Print Power set and Power override bitsqsfp.c qsfp.h | +7 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH ethtool-next 0/8] ethtool: Add support for CMIS diagnostic information
From: Ido Schimmel <[email protected]>
This patchset extends ethtool(8) to retrieve, parse and print CMIS diagnostic information. This information includes module-level monitors (e.g., temperature, voltage), channel-level monitors (e.g., Tx optical power) and related thresholds and flags.
ethtool(8) already supports SFF-8636 (e.g., QSFP) and SFF-8472 (e.g., SFP) diagnostic information, but until recently CMIS diagnostic information was unavailable to ethtool(8) as it resides in optional and banked pages.
Testing
=======
Build tested each patch with the following configuration options:
netlink | pretty-dump --------|------------ v | v x | x v | x x | v
Except fields that were added, no difference in output before and after the patchset. Tested with both PC and AOC QSFP-DD modules.
No reports from AddressSanitizer / valgrind.
Patchset overview
=================
Patches #1-#2 are small preparations.
Patches #3-#4 retrieve (over netlink) and initialize the optional and banked pages in the CMIS memory map. These pages contain the previously mentioned diagnostic information.
Patch #5 parses and prints the CMIS diagnostic information in a similar fashion to the way it is done for SFF-8636.
Patches #6-#7 print a few additional fields from the CMIS EEPROM dump. The examples contain an ethtool command that is supported by the kernel, but not yet by ethtool(8). It will be sent as a follow-up patchset.
Patch #8 prints the equivalent module-level fields for SFF-8636.
Ido Schimmel (8):
sff-8636: Use an SFF-8636 specific define for maximum number of
channels
sff-common: Move OFFSET_TO_U16_PTR() to common header file
cmis: Initialize Page 02h in memory map
cmis: Initialize Banked Page 11h in memory map
cmis: Parse and print diagnostic information
cmis: Print Module State and Fault Cause
cmis: Print Module-Level Controls
sff-8636: Print Power set and Power override bits
cmis.c | 611 ++++++++++++++++++++++++++++++++++++++++++++++++--- cmis.h | 107 +++++++++ qsfp.c | 16 +- qsfp.h | 2 +- sff-common.h | 6 +- 5 files changed, 702 insertions(+), 40 deletions(-)
Signature · 1 line
2.31.1