[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51205a15-762c-43b6-8df1-0cbfe2380108@gmail.com>
Date: Tue, 15 Oct 2024 20:42:29 -0400
From: Daniel Zahka <daniel.zahka@...il.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: mkubecek@...e.cz, netdev@...r.kernel.org, Jakub Kicinski
<kuba@...nel.org>, idosch@...dia.com, danieller@...dia.com
Subject: Re: [RFC ethtool] ethtool: mock JSON output for --module-info
On 10/15/24 7:16 PM, Andrew Lunn wrote:
>> Vendor PN : QDD-400G-XDR4
>> "vendor_name" : [65, 114, 105, 115, 116, 97, 32, 78, 101, 116, 119, 111,
>> 114, 107, 115, 32],
>> "vendor_pn" : [81, 68, 68, 45, 52, 48, 48, 71, 45, 88, 68, 82, 52],
>> "vendor_sn" : [88, 75, 84, 50, 52, 50, 50, 49, 49, 52, 56, 49],
> Why use byte arrays? String, maybe UTF-8, would be more natural.
>
> Andrew
Ah, I mistakenly thought that the "-" characters in the vendor pn were
put there by ethtool in place of non-printable characters, but I see now
that those are just regular ASCII hyphens. The CMIS spec says that the
four vendor_* fields all contain ASCII characters, but can possibly be
all null characters.
I agree. Strings would be better.
Powered by blists - more mailing lists