All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH ethtool-next v3 00/16] Add JSON output to --module-info
@ 2025-02-04 13:39 Danielle Ratson
  2025-02-04 13:39 ` [PATCH ethtool-next v3 01/16] module_common: Add a new file to all the common code for all module types Danielle Ratson
                   ` (15 more replies)
  0 siblings, 16 replies; 26+ messages in thread
From: Danielle Ratson @ 2025-02-04 13:39 UTC (permalink / raw)
  To: netdev; +Cc: mkubecek, matt, daniel.zahka, amcohen, nbu-mlxsw, Danielle Ratson

Add JSON output for 'ethtool -m' / --module-info, following the
guideline below:

1. Fields with description, will have a separate description field.
2. Units will be documented in a separate module-info.json file.
3. ASCII fields will be presented as strings.
4. On/Off is rendered as true/false.
5. Yes/no is rendered as true/false.
6. Per-channel fields will be presented as array, when each element
   represents a channel.
7. Fields that hold version, will be split to major and minor sub
   fields.

This patchset suppose to extend [1] to cover all types of modules.

Patchset overview:
Patches #1-#7: Preparations.
Patches #8-#9: Add JSON output support for CMIS compliant modules.
Patches #10-#11: Add JSON output support for SFF8636 modules.
Patches #12-#14: Add JSON output support for SFF8079 and SFF8472 modules.
Patch #15: Add a new schema JSON file for units documentation.
Patches #16: Add '-j' support to ethtool

[1] https://lore.kernel.org/all/20220704054114.22582-2-matt@traverse.com.au/

v3:
	* Remove unit fields from JSON output.
	* Reword commit messages.
	* Add patch #2 and #15.
	* Enable properly JSON output support for SFF8079.
	* Remove printings from fields that might be empty strings.
	* Fix JSON output in sff8636_show_dom_mod_lvl_flags().

v2:
	* In rx_power JSON field, add a type field to let the user know
	  what type is printed in "value".
	* Use uint instead of hexa fields in JSON context.
	* Simplify sff8636_show_dom().
	* Use "false" in module_show_lane_status() instead of "None" in
	  JSON context.

Danielle Ratson (16):
  module_common: Add a new file to all the common code for all module
    types
  ethtool: Standardize Link Length field names across module types
  sff_common: Move sff_show_revision_compliance() to qsfp.c
  cmis: Change loop order in cmis_show_dom_chan_lvl_flags()
  qsfp: Reorder the channel-level flags list for SFF8636 module type
  qsfp: Refactor sff8636_show_dom() by moving code into separate
    functions
  module_common: Add helpers to support JSON printing for common value
    types
  cmis: Add JSON output handling to --module-info in CMIS modules
  cmis: Enable JSON output support in CMIS modules
  qsfp: Add JSON output handling to --module-info in SFF8636 modules
  qsfp: Enable JSON output support for SFF8636 modules
  sfpid: Add JSON output handling to --module-info in SFF8079 modules
  sfpdiag: Add JSON output handling to --module-info in SFF8472 modules
  ethtool: Enable JSON output support for SFF8079 and SFF8472 modules
  module_info: Add a new JSON file for units documentation
  ethtool: Add '-j' support to ethtool

 Makefile.am             |   7 +-
 cmis.c                  | 493 +++++++++++-----------
 cmis.h                  |  62 ---
 ethtool.c               |  10 +-
 module-common.c         | 662 +++++++++++++++++++++++++++++
 module-common.h         | 287 +++++++++++++
 module_info.json        | 191 +++++++++
 netlink/module-eeprom.c |  26 +-
 qsfp.c                  | 892 +++++++++++++++++++++-------------------
 qsfp.h                  | 108 -----
 sff-common.c            | 348 ++++------------
 sff-common.h            | 119 ++----
 sfpdiag.c               |  52 ++-
 sfpid.c                 | 446 +++++++++++---------
 14 files changed, 2248 insertions(+), 1455 deletions(-)
 create mode 100644 module-common.c
 create mode 100644 module-common.h
 create mode 100644 module_info.json

-- 
2.47.0


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2025-02-05 12:25 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-04 13:39 [PATCH ethtool-next v3 00/16] Add JSON output to --module-info Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 01/16] module_common: Add a new file to all the common code for all module types Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 02/16] ethtool: Standardize Link Length field names across " Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 03/16] sff_common: Move sff_show_revision_compliance() to qsfp.c Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 04/16] cmis: Change loop order in cmis_show_dom_chan_lvl_flags() Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 05/16] qsfp: Reorder the channel-level flags list for SFF8636 module type Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 06/16] qsfp: Refactor sff8636_show_dom() by moving code into separate functions Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 07/16] module_common: Add helpers to support JSON printing for common value types Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 08/16] cmis: Add JSON output handling to --module-info in CMIS modules Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 09/16] cmis: Enable JSON output support " Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 10/16] qsfp: Add JSON output handling to --module-info in SFF8636 modules Danielle Ratson
2025-02-05  2:34   ` Jakub Kicinski
2025-02-05  7:45     ` Danielle Ratson
2025-02-05 10:48     ` Vadim Fedorenko
2025-02-05 12:13       ` Danielle Ratson
2025-02-05 12:20         ` Vadim Fedorenko
2025-02-05 12:25           ` Danielle Ratson
2025-02-05  2:37   ` Jakub Kicinski
2025-02-05 11:32     ` Petr Machata
2025-02-05 11:41       ` Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 11/16] qsfp: Enable JSON output support for " Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 12/16] sfpid: Add JSON output handling to --module-info in SFF8079 modules Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 13/16] sfpdiag: Add JSON output handling to --module-info in SFF8472 modules Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 14/16] ethtool: Enable JSON output support for SFF8079 and " Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 15/16] module_info: Add a new JSON file for units documentation Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 16/16] ethtool: Add '-j' support to ethtool Danielle Ratson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.