Skip to content

ethtool: Add support for CMIS diagnostic information

Ido Schimmel netdev 1 version Applied

Status from this message: This series was applied to ethtool/ethtool.git (master)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 4 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/8sff-8636: Use an SFF-8636 specific define for maximum number of channelsqsfp.c sff-common.h+6 -50 replies
2/8sff-common: Move OFFSET_TO_U16_PTR() to common header fileqsfp.c sff-common.h+2 -31 reply
3/8cmis: Initialize Page 02h in memory mapcmis.c+10 -30 replies
4/8cmis: Initialize Banked Page 11h in memory mapcmis.c cmis.h+54 -20 replies
5/8cmis: Parse and print diagnostic informationcmis.c cmis.h+518 -270 replies
6/8cmis: Print Module State and Fault Causecmis.c cmis.h+86 -00 replies
7/8cmis: Print Module-Level Controlscmis.c cmis.h+20 -00 replies
8/8sff-8636: Print Power set and Power override bitsqsfp.c qsfp.h+7 -10 replies

Reviews trailers per patch

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

Read the v1 thread

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