lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20221006152947.fjllbflj32g3pj2c@lion.mk-sys.cz>
Date:   Thu, 6 Oct 2022 17:29:47 +0200
From:   Michal Kubecek <mkubecek@...e.cz>
To:     Mathew McBride <matt@...verse.com.au>
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH ethtool 1/2] ethtool: add JSON output to --module-info

On Mon, Jul 04, 2022 at 05:41:13AM +0000, Mathew McBride wrote:
> This provides JSON output support for 'ethtool -m' / --module-info
> 
> To make presenting the module data as simple as possible,
> both the raw bytes/codes and formatted descriptions are provided
> where available.
> 
> A sample output (edited and formatted for brevity) is shown below:
> $ ethtool --json -m eth8
> [
> 	{
> 		"identifier": 3,
> 		"identifier_description": "SFP",
> 		"vendor_name": "UBNT",
> 		"vendor_oui": "00:00:00",
> 		"vendor_pn": "UF-MM-10G",
> 		"vendor_sn": "FT17072604079",
> 		"date_code": "170727__",
> 		"extended_identifier": 4,
> 		"extended_identifier_description": "GBIC/SFP defined by 2-wire interface ID",
> 		"connector": 7,
> 		"connector_description": "LC",
> 		"transceiver_codes": [
> 			16,
> 			0,
> 			0,
> 			0,
> 			64,
> 			64,
> 			12,
> 			85,
> 			0
> 		],
> 		"transceiver_types": [
> 			"10G Ethernet: 10G Base-SR"
> 		],
> 		"encoding": 6,
> 		"encoding_description": "64B/66B",
> 		"bitrate_nominal": 10300,
> 		"rate_identifier": 0,
> 		"rate_identifier_description": "unspecified",
> 		"laser_wavelength": 850,
> 		"vendor_rev": "",
> 		"option_byte1": 0,
> 		"option_byte2": 26,
> 		"option_descriptions": [
> 			"RX_LOS implemented",
> 			"TX_FAULT implemented",
> 			"TX_DISABLE implemented"
> 		],
> 		"br_margin_max": 0,
> 		"br_margin_min": 0,
> 		"optical_diagnostics_supported": true,
> 		"bias_current": 11.516,
> 		"tx_power": 0.4872,
> 		"module_temp": 47.1719,
> 		"module_voltage": 3.2784
> 	}
> ]
> 
> Signed-off-by: Mathew McBride <matt@...verse.com.au>

IIUC this patch implements the JSON output only for some modules, in
particular those handled by sff8079_show_all_nl(). Similar to my
comment on patch 2/2, I believe it's wrong to show JSON output for some
modules and silently fall back to plain text for others. Unless you can
provide JSON output for all modules, the command should fail when --json
is used but JSON output is unavailable.

Michal

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ