netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rick Jones <rick.jones2@hp.com>
To: Himanshu Madhani <himanshu.madhani@qlogic.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
	Dept_NX_Linux_NIC_Driver@qlogic.com
Subject: Re: [RFC] qlcnic: Enhance ethtool to display board temperature.
Date: Fri, 19 Jul 2013 08:06:55 -0700	[thread overview]
Message-ID: <51E9560F.7070902@hp.com> (raw)
In-Reply-To: <1374206237-27233-1-git-send-email-himanshu.madhani@qlogic.com>

On 07/18/2013 08:57 PM, Himanshu Madhani wrote:
> From: Himanshu Madhani <himanshu.madhani@qlogic.com>
>
> We need to provide a mechanism for a user space application to query
> adapter temperature. This RFC patch is to request input on which of the
> following approach would be appropriate way to export this information.
>
> Here are the two approaches that I am exploring. Please review and
> provide your recommendation.
>
> 1. Enhance ethtool to add capability for driver to advertise its
>     board temperature as part of "ethtool -i <ethX>"
>
>      For example, following would be output for an interface which
>      has board temperature field populated via ethtool
>
>      "#ethtool -i p10p1"
>      driver: qlcnic
>      version: 5.2.44
>      bus-info: 0000:08:00.0
>      supports-statistics: yes
>      supports-test: yes
>      supports-eeprom-access: yes
>      supports-register-dump: yes
>      supports-priv-flags: no
>      board-temperature: 34
>
>      There will be update required for ethtool.c in the repository
>      git://git.kernel.org/pub/scm/network/ethtool/ethtool.git
>      maintained by Ben Hutchings.
>
>      if we decide to go with ethtool modification approach, I will send
>      patch to update ethtool repository. Attached patch at the end of this
>      email is for driver implementation for this approach.
>
> 2. Add a sysfs hook "brd_temp" which will be used by the application
>     to query board temperature specific to the particular interface
>
>     for example, driver with "brd_temp" sysfs hook will show temperature
>
>     "#cat /sys/class/net/p10p1/device/brd_temp"
>     34

Is it at all likely that other I/O cards have similar temperature 
sensors?  If so, then perhaps a more generic I/O card location would be 
better?  Looking for "temp" under /sys on my 3.5 system I see:

/sys/bus/platform/devices/coretemp.0
/sys/bus/platform/drivers/coretemp
/sys/bus/platform/drivers/coretemp/coretemp.0
/sys/devices/pci0000:00/0000:00:03.0/0000:0f:00.0/hwmon/hwmon0/temp1_input
/sys/devices/platform/hp-wmi/hddtemp
/sys/devices/platform/coretemp.0
/sys/devices/platform/coretemp.0/temp3_input
/sys/devices/platform/coretemp.0/temp3_label
/sys/devices/platform/coretemp.0/temp2_crit_alarm
/sys/devices/platform/coretemp.0/temp2_crit
/sys/devices/platform/coretemp.0/temp3_crit
/sys/devices/platform/coretemp.0/temp4_crit
/sys/devices/platform/coretemp.0/temp5_crit
/sys/devices/platform/coretemp.0/temp4_input
/sys/devices/platform/coretemp.0/temp4_label
/sys/devices/platform/coretemp.0/temp3_crit_alarm
/sys/devices/platform/coretemp.0/temp4_crit_alarm
/sys/devices/platform/coretemp.0/temp5_input
/sys/devices/platform/coretemp.0/temp5_label
/sys/devices/platform/coretemp.0/temp5_crit_alarm
/sys/devices/platform/coretemp.0/temp2_max
/sys/devices/platform/coretemp.0/temp3_max
/sys/devices/platform/coretemp.0/temp4_max
/sys/devices/platform/coretemp.0/temp5_max
/sys/devices/platform/coretemp.0/temp2_input
/sys/devices/platform/coretemp.0/temp2_label
/sys/module/coretemp
/sys/module/coretemp/drivers/platform:coretemp


Anyhow, it seems that one of your peers presently puts that information 
in that which is reported by ethtool -S

      ...
      eth_red_drops: 0
      be_on_die_temperature: 52
      rxq0: rx_bytes: 67532255030
      ...

rick jones

  reply	other threads:[~2013-07-19 15:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-19  3:57 Himanshu Madhani
2013-07-19 15:06 ` Rick Jones [this message]
2013-07-19 17:59   ` Himanshu Madhani
2013-07-19 16:11 ` Stephen Hemminger
2013-07-19 18:00   ` Himanshu Madhani
2013-07-21 15:54 ` Ben Hutchings
2013-07-23 21:31   ` Himanshu Madhani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51E9560F.7070902@hp.com \
    --to=rick.jones2@hp.com \
    --cc=Dept_NX_Linux_NIC_Driver@qlogic.com \
    --cc=davem@davemloft.net \
    --cc=himanshu.madhani@qlogic.com \
    --cc=netdev@vger.kernel.org \
    --subject='Re: [RFC] qlcnic: Enhance ethtool to display board temperature.' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).