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] [thread-next>] [day] [month] [year] [list]
Message-ID: <87a5b9pp1z.fsf@nvidia.com>
Date: Wed, 29 Jan 2025 17:21:30 +0100
From: Petr Machata <petrm@...dia.com>
To: Gal Pressman <gal@...dia.com>
CC: Jakub Kicinski <kuba@...nel.org>, Danielle Ratson <danieller@...dia.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>, "mkubecek@...e.cz"
	<mkubecek@...e.cz>, "matt@...verse.com.au" <matt@...verse.com.au>,
	"daniel.zahka@...il.com" <daniel.zahka@...il.com>, Amit Cohen
	<amcohen@...dia.com>, NBU-mlxsw <NBU-mlxsw@...hange.nvidia.com>
Subject: Re: [PATCH ethtool-next 09/14] qsfp: Add JSON output handling to
 --module-info in SFF8636 modules


Gal Pressman <gal@...dia.com> writes:

> On 29/01/2025 0:13, Jakub Kicinski wrote:
>> On Tue, 28 Jan 2025 13:23:42 +0000 Danielle Ratson wrote:
>>>> On Sun, 26 Jan 2025 13:56:30 +0200 Danielle Ratson wrote:  
>>>>> +		open_json_object("extended_identifier");
>>>>> +		print_int(PRINT_JSON, "value", "0x%02x",
>>>>> +			  map->page_00h[SFF8636_EXT_ID_OFFSET]);  
>>>>
>>>> Hm, why hex here?
>>>> Priority for JSON output is to make it easy to handle in code, rather than easy
>>>> to read. Hex strings need extra manual decoding, no?  
>>>
>>> I kept the same convention as in the regular output.
>>> And as agreed in Daniel's design those hex fields remain hex fields
>>> and are followed by a description field.
>>>
>>> Do you think otherwise?  
>> 
>> I have a weak preference to never use hex strings.
>> I have regretted using hex strings in JSON multiple times but haven't
>> regretted using plain integers, yet.
>> 
>
> +1, jq won't be able to parse such json.

Curious that tonumber doesn't have a way to make it work though :-/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ