netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ethtool option to force interpretation of diagnostics?
@ 2020-01-10  0:25 Chris Preimesberger
  2020-01-10 13:13 ` Andrew Lunn
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Preimesberger @ 2020-01-10  0:25 UTC (permalink / raw)
  To: linville, netdev

Hello,


Problem:
I am testing some 10GbE RJ45 SFP+ modules and noticed that they
accurately report their operating temperature while installed in a
switch, but not while installed in a NIC that's being probed by
ethtool.  The ethtool install and NIC port in question are known to
properly report all diagnostics of installed fiber transceivers, so I
suspect that maybe my copper transceiver's diagnostics are being
ignored by ethtool because the diagnostic data from them is considered
incomplete, due to the transceiver not reporting any valid Laser
related diagnostics (because they have no laser); this is just a guess
as to why, and I don't know whether that's the case; I'd appreciate it
if anyone could confirm whether that's the case.

Question:
Is there currently a way to, or can an option be made to force ethtool
to read and interpret the transceiver's diagnostic data for cases like
mine, where diagnostic data exists, but is not displayed by default?


In case it helps, here is an example ethtool output from a transceiver
that accurately reports temp while installed in a switch, but not
while in a NIC and being probed by ethtool (some values masked with
xxxxxxxx for privacy):

tech1@E1:~$ ethtool --version
ethtool version 5.3
tech1@E1:~$
tech1@E1:~$ ethtool -i enp3s0f1
driver: ixgbe
version: 5.1.0-k
firmware-version: 0x0001546c
expansion-rom-version:
bus-info: 0000:03:00.1
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: yes
tech1@E1:~$
tech1@E1:~$ sudo ethtool -m enp3s0f1
        Identifier                                : 0x03 (SFP)
        Extended identifier                       : 0x04 (GBIC/SFP
defined by 2-wire interface ID)
        Connector                                 : 0x22 (RJ45)
        Transceiver codes                         : 0x10 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00
        Transceiver type                          : 10G Ethernet: 10G Base-SR
        Encoding                                  : 0x06 (64B/66B)
        BR, Nominal                               : 10300MBd
        Rate identifier                           : 0x00 (unspecified)
        Length (SMF,km)                           : 0km
        Length (SMF)                              : 0m
        Length (50um)                             : 0m
        Length (62.5um)                           : 0m
        Length (Copper)                           : 30m
        Length (OM3)                              : 0m
        Laser wavelength                          : 0nm
        Vendor name                               : xxxxxxxx
        Vendor OUI                                : xxxxxxxx
        Vendor PN                                 : xxxxxxxx
        Vendor rev                                : xxxxxxxx
        Option values                             : 0x00 0x1a
        Option                                    : RX_LOS implemented
        Option                                    : TX_FAULT implemented
        Option                                    : TX_DISABLE implemented
        BR margin, max                            : 0%
        BR margin, min                            : 0%
        Vendor SN                                 : xxxxxxxx
        Date code                                 : 191202
tech1@E1:~$


For reference, a more verbose output like this is what I'm hoping to
see, even if parts of the data displayed are invalid.  I'm willing to
figure out what data is or isn't valid:

tech1@E1:~$ sudo ethtool -m enp3s0f0
Identifier                                : 0x03 (SFP)
Extended identifier                       : 0x04 (GBIC/SFP defined by
2-wire interface ID)
Connector                                 : 0x07 (LC)
Transceiver codes                         : 0x20 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00
Transceiver type                          : 10G Ethernet: 10G Base-LR
Encoding                                  : 0x06 (64B/66B)
BR, Nominal                               : 10300MBd
Rate identifier                           : 0x00 (unspecified)
Length (SMF,km)                           : 10km
Length (SMF)                              : 10000m
Length (50um)                             : 0m
Length (62.5um)                           : 0m
Length (Copper)                           : 0m
Length (OM3)                              : 0m
Laser wavelength                          : 1310nm
Vendor name                               : Transition
Vendor OUI                                : 00:c0:f2
Vendor PN                                 : TN-SFP-10G-LR
Vendor rev                                : V1.0
Option values                             : 0x00 0x1a
Option                                    : RX_LOS implemented
Option                                    : TX_FAULT implemented
Option                                    : TX_DISABLE implemented
BR margin, max                            : 0%
BR margin, min                            : 0%
Vendor SN                                 : AX19080004387
Date code                                 : 190218
Optical diagnostics support               : Yes
Laser bias current                        : 32.066 mA
Laser output power                        : 0.5547 mW / -2.56 dBm
Receiver signal average optical power     : 0.0001 mW / -40.00 dBm
Module temperature                        : 41.05 degrees C / 105.90 degrees F
Module voltage                            : 3.2768 V
Alarm/warning flags implemented           : Yes
Laser bias current high alarm             : Off
Laser bias current low alarm              : Off
Laser bias current high warning           : Off
Laser bias current low warning            : Off
Laser output power high alarm             : Off
Laser output power low alarm              : Off
Laser output power high warning           : Off
Laser output power low warning            : Off
Module temperature high alarm             : Off
Module temperature low alarm              : Off
Module temperature high warning           : Off
Module temperature low warning            : Off
Module voltage high alarm                 : Off
Module voltage low alarm                  : Off
Module voltage high warning               : Off
Module voltage low warning                : Off
Laser rx power high alarm                 : Off
Laser rx power low alarm                  : On
Laser rx power high warning               : Off
Laser rx power low warning                : On
Laser bias current high alarm threshold   : 100.000 mA
Laser bias current low alarm threshold    : 6.000 mA
Laser bias current high warning threshold : 90.000 mA
Laser bias current low warning threshold  : 7.000 mA
Laser output power high alarm threshold   : 1.2589 mW / 1.00 dBm
Laser output power low alarm threshold    : 0.1349 mW / -8.70 dBm
Laser output power high warning threshold : 1.1220 mW / 0.50 dBm
Laser output power low warning threshold  : 0.1514 mW / -8.20 dBm
Module temperature high alarm threshold   : 75.00 degrees C / 167.00 degrees F
Module temperature low alarm threshold    : -5.00 degrees C / 23.00 degrees F
Module temperature high warning threshold : 70.00 degrees C / 158.00 degrees F
Module temperature low warning threshold  : 0.00 degrees C / 32.00 degrees F
Module voltage high alarm threshold       : 3.6300 V
Module voltage low alarm threshold        : 2.9700 V
Module voltage high warning threshold     : 3.4650 V
Module voltage low warning threshold      : 3.1350 V
Laser rx power high alarm threshold       : 1.2589 mW / 1.00 dBm
Laser rx power low alarm threshold        : 0.0490 mW / -13.10 dBm
Laser rx power high warning threshold     : 1.1220 mW / 0.50 dBm
Laser rx power low warning threshold      : 0.0550 mW / -12.60 dBm
tech1@E1:~$


Thanks and best regards,
Chris Preimesberger

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ethtool option to force interpretation of diagnostics?
  2020-01-10  0:25 ethtool option to force interpretation of diagnostics? Chris Preimesberger
@ 2020-01-10 13:13 ` Andrew Lunn
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2020-01-10 13:13 UTC (permalink / raw)
  To: Chris Preimesberger; +Cc: linville, netdev

On Thu, Jan 09, 2020 at 06:25:07PM -0600, Chris Preimesberger wrote:
> Hello,
> 
> 
> Problem:
> I am testing some 10GbE RJ45 SFP+ modules and noticed that they
> accurately report their operating temperature while installed in a
> switch, but not while installed in a NIC that's being probed by
> ethtool.  The ethtool install and NIC port in question are known to
> properly report all diagnostics of installed fiber transceivers, so I
> suspect that maybe my copper transceiver's diagnostics are being
> ignored by ethtool because the diagnostic data from them is considered
> incomplete, due to the transceiver not reporting any valid Laser
> related diagnostics (because they have no laser); this is just a guess
> as to why, and I don't know whether that's the case; I'd appreciate it
> if anyone could confirm whether that's the case.
> 
> Question:
> Is there currently a way to, or can an option be made to force ethtool
> to read and interpret the transceiver's diagnostic data for cases like
> mine, where diagnostic data exists, but is not displayed by default?
> 
> 
> In case it helps, here is an example ethtool output from a transceiver
> that accurately reports temp while installed in a switch, but not
> while in a NIC and being probed by ethtool (some values masked with
> xxxxxxxx for privacy):

Hi Chris

Have you single stepped through ethtool to see why it does not display
temperatures?

What i notice is that

Optical diagnostics support               : Yes

is not present in the output. That suggests the EEPROM contents says
there is no diagnostics available, and hence ethtool is skipping all
the diagnostic information in the EEPROM contents.

A few suggestions:

Check SFP SMA. Is there a bit somewhere which indicates temperature is
supported, even if optical diagnostics are not? We can then add
support for this to ethtool.

Check if the SFP manufacture has a data sheet indicating its
behaviour. Does it clearly document that diagnostics are not
available, but nether the less, temperature values are valid? If so,
we could consider adding a quirk to ethtool to look for this SFP and
dump temperature information.

     Andrew

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-10 13:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-10  0:25 ethtool option to force interpretation of diagnostics? Chris Preimesberger
2020-01-10 13:13 ` Andrew Lunn

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).