[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<DM6PR12MB451613256BB4FB8227F3D971D8E92@DM6PR12MB4516.namprd12.prod.outlook.com>
Date: Thu, 30 Jan 2025 12:38:56 +0000
From: Danielle Ratson <danieller@...dia.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: "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
> From: Jakub Kicinski <kuba@...nel.org>
> Sent: Thursday, 30 January 2025 3:17
> To: Danielle Ratson <danieller@...dia.com>
> Cc: netdev@...r.kernel.org; mkubecek@...e.cz; matt@...verse.com.au;
> 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 Wed, 29 Jan 2025 07:06:09 +0000 Danielle Ratson wrote:
> > > Is the consumer of the JSON output supposed to be parsing the units
> > > and making sure to scale the values every time it reads (e.g. divide
> > > by 1000 if it wants W but unit is mW)?
> > >
> > > Or the unit is fully implied by the key, and can't change? IOW the
> > > unit is only listed so that the human writing the consumer can
> > > figure out the unit and then hardcode it?
> >
> > 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?
Powered by blists - more mailing lists