[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220704054114.22582-1-matt@traverse.com.au>
Date: Mon, 4 Jul 2022 05:41:12 +0000
From: Mathew McBride <matt@...verse.com.au>
To: Michal Kubecek <mkubecek@...e.cz>
Cc: netdev@...r.kernel.org, Mathew McBride <matt@...verse.com.au>
Subject: [PATCH ethtool 0/2] Add JSON support for SFP EEPROM dump
This patch adds JSON output support to ethtool's -m option,
useful for presenting transceiver module option in a web interface.
An example frontend can be found here, for OpenWrt's LuCI:
https://gitlab.com/traversetech/muvirt-feed/-/tree/master/sfp-diagnostics-luci
You can find samples of the output, plus a screenshot here:
10GBASE-LR SFP:
https://gitlab.com/-/snippets/2364354
1/10GBASE-LR dual mode SFP
https://gist.github.com/mcbridematt/7921c795c4835afa807d8f83cc132401
I have tried to make the JSON format easy to consume by including both
the original field values and full text descriptions, so any consumer
of the JSON output doesn't need to replicate ethtool's rendering logic.
I'm open to any suggestions on how the structure of the JSON output
could be improved.
Mathew McBride (2):
ethtool: add JSON output to --module-info
ethtool: remove restriction on ioctl commands having JSON output
ethtool.c | 8 +-
sff-common.c | 213 +++++++++++++++--------
sff-common.h | 17 +-
sfpdiag.c | 64 ++++++-
sfpid.c | 478 +++++++++++++++++++++++++++++++--------------------
5 files changed, 522 insertions(+), 258 deletions(-)
--
2.30.1
Powered by blists - more mailing lists