[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <05a6045b-b4d6-4739-8352-dabd1ad386c6@lunn.ch>
Date: Thu, 30 Jan 2025 18:20:37 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Jakub Kicinski <kuba@...nel.org>
Cc: 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 08/14] cmis: Enable JSON output support in
CMIS modules
On Thu, Jan 30, 2025 at 08:24:35AM -0800, Jakub Kicinski wrote:
> On Thu, 30 Jan 2025 12:38:56 +0000 Danielle Ratson wrote:
> > > > Yes, the unit is implied by the key is hardcoded. Same as for the
> > > > regular output, it should give the costumer idea about the scale.
> > > > There are also temperature fields that could be either F or C degrees.
> > > > So overall , the units fields should align all the fields that implies
> > > > some sort of scale.
> > >
> > > Some sort of a schema would be a better place to document the unit of the
> > > fields, IMO.
> >
> > So should the units fields be removed entirely? And only be
> > documented in the json schema file?
>
> Yes, more than happy to hear from others but a schema file would
> be my first choice. Short of that as long as the unit is the same
> as in the plain text output there should also not be any ambiguity.
Sorry, not been monitoring this patchset.
If units are an issue, you could just use the standard units hwmon
uses. milli centigrade, milli amps, milli volts, micro watts, micro
joule, etc. I don't think hwmon has needed to handle distances, but
milli meter seems like the obvious choice given this pattern, although
160km in millimeters is a rather big number.
Andrew
Powered by blists - more mailing lists