[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180626193528.GB9800@lunn.ch>
Date: Tue, 26 Jun 2018 21:35:28 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Vadim Pasternak <vadimp@...lanox.com>
Cc: Guenter Roeck <linux@...ck-us.net>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"rui.zhang@...el.com" <rui.zhang@...el.com>,
"edubezval@...il.com" <edubezval@...il.com>,
"jiri@...nulli.us" <jiri@...nulli.us>
Subject: Re: [patch net-next RFC 03/12] mlxsw: core: Add core environment
module for port temperature reading
On Tue, Jun 26, 2018 at 07:01:32PM +0000, Vadim Pasternak wrote:
>
>
> > -----Original Message-----
> > From: Andrew Lunn [mailto:andrew@...n.ch]
> > Sent: Tuesday, June 26, 2018 9:18 PM
> > To: Vadim Pasternak <vadimp@...lanox.com>
> > Cc: Guenter Roeck <linux@...ck-us.net>; linux-pm@...r.kernel.org;
> > netdev@...r.kernel.org; rui.zhang@...el.com; edubezval@...il.com;
> > jiri@...nulli.us
> > Subject: Re: [patch net-next RFC 03/12] mlxsw: core: Add core environment
> > module for port temperature reading
> >
> > > However, I have some concerns on this matter.
> > > Our hardware provides bulk reading of the modules temperature, means I
> > > can get all inputs by one hardware request, which is important optimization.
> > > Reading each module individually will be resulted in huge overhead and
> > > will require maybe some cashing of temperature inputs.
> >
> > Well, you can cache the SFP calibration values, and the 4 limit values. To get an
> > actually temperature you need to read 2 bytes from the SFP module. I don't see
> > why that would be expensive. You talk to the firmware over PCIe right? So you
> > have lots of bandwidth.
>
> Yes, but FW in its turn will run I2C transaction to read temperature sensor.
So how does that add overhead? It needs to read the same two bytes
independent of if it is getting readings from one sensor, or all
sensors.
> And we also run hwmon and thermal parts of our driver on BMC (Based
> Management Controller) on system equipped with it.
> In such case host CPU performs networking stuff, while BMC system related
> stuff. And in such configuration BMC talks to FW over I2C.
So you have a 20MHz I2C bus between your BMC and the firmware. Lets
assume a relativity dumb protocol. 2 bytes for command to read an sfp
sensor, 3 bytes for a replay. 5 bytes, at 20Mbps allows you to read
500,000 sensors per second. And for environment monitoring, 64 sensors
one per second should be sufficient.
Andrew
Powered by blists - more mailing lists