From: Danielle Ratson <danieller@nvidia.com>
To: <netdev@vger.kernel.org>
Cc: <mkubecek@suse.cz>, <idosch@nvidia.com>, <petrm@nvidia.com>,
"Danielle Ratson" <danieller@nvidia.com>
Subject: [PATCH ethtool-next 0/5] ethtool: Add 'pages on|off' option for module EEROM hex dump
Date: Thu, 7 May 2026 14:47:16 +0300 [thread overview]
Message-ID: <20260507114721.3409128-1-danieller@nvidia.com> (raw)
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
next reply other threads:[~2026-05-07 11:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 11:47 Danielle Ratson [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260507114721.3409128-1-danieller@nvidia.com \
--to=danieller@nvidia.com \
--cc=idosch@nvidia.com \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
--cc=petrm@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox