Netdev List
 help / color / mirror / Atom feed
* [PATCH ethtool-next 0/5] ethtool: Add 'pages on|off' option for module EEROM hex dump
@ 2026-05-07 11:47 Danielle Ratson
  2026-05-07 11:47 ` [PATCH ethtool-next 1/5] module-common: Add module_dump_eeprom_page_hex() helper Danielle Ratson
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Danielle Ratson @ 2026-05-07 11:47 UTC (permalink / raw)
  To: netdev; +Cc: mkubecek, idosch, petrm, Danielle Ratson

The existing 'ethtool -m' command can dump module EEPROM data either as
a parsed pretty-print or as a raw/hex dump. The pretty-printer reads
multiple pages per module type, but decodes only specific fields from them.

In practice, both outputs are often needed together for offline debugging:
the pretty-print to identify the module type and decoded fields, and the
hex dump for fields the pretty-printer does not decode. However, there is
no single command that provides the raw hex dump of all relevant pages,
organized by page boundary. This is especially problematic for CMIS
transceivers where the existing hex dump does not provide Upper Pages
beyond Page 02h, let alone banked pages.

This series adds 'pages on|off' sub-option to 'hex on|off' for
'ethtool -m':
$ ethtool -m hex on pages on

That produces a hex dump organized by page, matching exactly the pages read
by the pretty-printer for each module type.

Each page is preceded by a header identifying the page number and, for
banked modules, the bank number. For SFP, where the two memory regions
are separate I2C addresses rather than pages, the header shows the I2C
address instead.

Output example (values zeroed to omit vendor-specific identifiers):

$ ethtool -m swp61 hex on pages on
Page: 0x0

Offset          Values
------          ------
0x0000:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0010:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0020:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0030:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0040:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0050:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0060:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0070:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Page: 0x0

Offset          Values
------          ------
0x0080:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0090:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00a0:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00b0:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00c0:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00d0:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00e0:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00f0:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Danielle Ratson (5):
  module-common: Add module_dump_eeprom_page_hex() helper
  sfpid: Refactor sff8079_show_all_nl() to separate page retrieval from
    display
  module: Add per-type EEPROM page hex dump functions
  netlink: module-eeprom: Add 'hex on pages on' option for
    page-organized hex dump
  ethtool: Add man page and bash completion for 'pages on|off'

 cmis.c                        | 49 +++++++++++++++++++++++----
 cmis.h                        |  2 +-
 ethtool.8.in                  | 14 ++++++++
 ethtool.c                     |  1 +
 internal.h                    |  4 +--
 module-common.c               | 16 +++++++++
 module-common.h               |  3 ++
 netlink/module-eeprom.c       | 43 ++++++++++++++++++++----
 qsfp.c                        | 48 +++++++++++++++++++++++----
 sfpid.c                       | 62 +++++++++++++++++++++++++----------
 shell-completion/bash/ethtool |  2 ++
 11 files changed, 202 insertions(+), 42 deletions(-)

-- 
2.51.0


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

end of thread, other threads:[~2026-05-07 17:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-07 11:47 [PATCH ethtool-next 0/5] ethtool: Add 'pages on|off' option for module EEROM hex dump Danielle Ratson
2026-05-07 11:47 ` [PATCH ethtool-next 1/5] module-common: Add module_dump_eeprom_page_hex() helper Danielle Ratson
2026-05-07 11:47 ` [PATCH ethtool-next 2/5] sfpid: Refactor sff8079_show_all_nl() to separate page retrieval from display Danielle Ratson
2026-05-07 11:47 ` [PATCH ethtool-next 3/5] module: Add per-type EEPROM page hex dump functions Danielle Ratson
2026-05-07 11:47 ` [PATCH ethtool-next 4/5] netlink: module-eeprom: Add 'hex on pages on' option for page-organized hex dump Danielle Ratson
2026-05-07 11:47 ` [PATCH ethtool-next 5/5] ethtool: Add man page and bash completion for 'pages on|off' Danielle Ratson
2026-05-07 12:07 ` [PATCH ethtool-next 0/5] ethtool: Add 'pages on|off' option for module EEROM hex dump Michal Kubecek
2026-05-07 12:37   ` Danielle Ratson
2026-05-07 14:32     ` Michal Kubecek
2026-05-07 12:23 ` Andrew Lunn
2026-05-07 17:19   ` Danielle Ratson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox