Merge branch 'review/cmis-diag' into master
Ido Schimmel:
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.