mbox series

[v3,0/5] add telemetry command for show module EEPROM

Message ID 20220420070017.119739-1-robinx.zhang@intel.com (mailing list archive)
Headers
Series add telemetry command for show module EEPROM |

Message

Robin Zhang April 20, 2022, 7 a.m. UTC
  Introduce a new telemetry command /ethdev/module_eeprom to show module
EEPROM for each port. The format of module EEPROM information follows
the SFF(Small Form Factor) Committee specifications.

Current the format support SFP(Small Formfactor Pluggable)/SFP+/
QSFP+(Quad Small Formfactor Pluggable)/QSFP28 with specs SFF-8079/
SFF-8472/SFF-8024/SFF-8636.

Afther run the /ethdev/module_eeprom command, both primary application
and telemetry client will show the module EEPROM information. For
primary application, we keep the same format with Linux utility ethtool,
refer to command 'ethtool -m' of ethtool v5.4. For telemetry client,
we record the key value pairs of each item, then show them in telemetry
client dictionary.

Robin Zhang (5):
  ethdev: add telemetry command for module EEPROM
  ethdev: common utilities for different SFF specs
  ethdev: format module EEPROM for SFF-8079
  ethdev: format module EEPROM for SFF-8472
  ethdev: format module EEPROM for SFF-8636

 lib/ethdev/ethdev_sff_telemetry.c |  135 ++++
 lib/ethdev/ethdev_sff_telemetry.h |   42 ++
 lib/ethdev/meson.build            |    5 +
 lib/ethdev/rte_ethdev.c           |    3 +
 lib/ethdev/sff_8079.c             |  672 +++++++++++++++++++
 lib/ethdev/sff_8472.c             |  301 +++++++++
 lib/ethdev/sff_8636.c             | 1004 +++++++++++++++++++++++++++++
 lib/ethdev/sff_8636.h             |  592 +++++++++++++++++
 lib/ethdev/sff_common.c           |  414 ++++++++++++
 lib/ethdev/sff_common.h           |  191 ++++++
 10 files changed, 3359 insertions(+)
 create mode 100644 lib/ethdev/ethdev_sff_telemetry.c
 create mode 100644 lib/ethdev/ethdev_sff_telemetry.h
 create mode 100644 lib/ethdev/sff_8079.c
 create mode 100644 lib/ethdev/sff_8472.c
 create mode 100644 lib/ethdev/sff_8636.c
 create mode 100644 lib/ethdev/sff_8636.h
 create mode 100644 lib/ethdev/sff_common.c
 create mode 100644 lib/ethdev/sff_common.h
  

Comments

Morten Brørup April 20, 2022, 8:49 a.m. UTC | #1
> From: Robin Zhang [mailto:robinx.zhang@intel.com]
> Sent: Wednesday, 20 April 2022 09.00
> 
> Introduce a new telemetry command /ethdev/module_eeprom to show module
> EEPROM for each port. The format of module EEPROM information follows
> the SFF(Small Form Factor) Committee specifications.
> 
> Current the format support SFP(Small Formfactor Pluggable)/SFP+/
> QSFP+(Quad Small Formfactor Pluggable)/QSFP28 with specs SFF-8079/
> SFF-8472/SFF-8024/SFF-8636.
> 
> Afther run the /ethdev/module_eeprom command, both primary application
> and telemetry client will show the module EEPROM information. For
> primary application, we keep the same format with Linux utility
> ethtool,
> refer to command 'ethtool -m' of ethtool v5.4. For telemetry client,
> we record the key value pairs of each item, then show them in telemetry
> client dictionary.

This patch uses printf() a lot. It should only collect the data and give the data to the telemetry library, not printf() anything.

It is up to the application (which asked the telemetry library for the data) to determine how the data should be presented to the end user. E.g. the application could present the data in an SNMP packet, as the response to an SNMP request received by the application's SNMP agent. The separation of data and presentation is a key point of the telemetry library.

-Morten