From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [patch net-next RFC 03/12] mlxsw: core: Add core environment module for port temperature reading Date: Tue, 26 Jun 2018 20:18:21 +0200 Message-ID: <20180626181821.GA9800@lunn.ch> References: <1530015037-67361-1-git-send-email-vadimp@mellanox.com> <1530015037-67361-4-git-send-email-vadimp@mellanox.com> <20180626142238.GB5064@lunn.ch> <20180626170012.GA28370@roeck-us.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Guenter Roeck , "linux-pm@vger.kernel.org" , "netdev@vger.kernel.org" , "rui.zhang@intel.com" , "edubezval@gmail.com" , "jiri@resnulli.us" To: Vadim Pasternak Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:43636 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751524AbeFZSSb (ORCPT ); Tue, 26 Jun 2018 14:18:31 -0400 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: > 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. Andrew