* ethtool module info only reports hex info
@ 2023-11-23 7:42 Ivar Simensen
2023-11-23 11:29 ` Ido Schimmel
2023-11-23 15:19 ` Michal Kubecek
0 siblings, 2 replies; 7+ messages in thread
From: Ivar Simensen @ 2023-11-23 7:42 UTC (permalink / raw)
To: mkubecek@suse.cz, netdev@vger.kernel.org
Hi
I'm not sure if this is a conscious decision or a bug, but I discovered a change of behavior between version 5.4 an 5.16 according to get module info from a SFP Fiber connector: "ethtool -m ens5".
After upgrading a target from Ubuntu 18.04 to 22.04, I discovered that the ethtool just report a hex dump when I tried to verify my fiber SFP connectors. In 18.04 I got a report with ethtool. I have tried to upgrade from version 5.16 to 6.1 and 6.5, but it did not fix the issue. I then downgraded to version 5.4 and now it works again.
The expected result with "ethtool -m ens5" was to get a human readable report, and with "ethtool -m ens5 hex on" a hexdump.
I have tried with the flag "hex on/off" on 5.16, but the result is always hex dump.
On version 5.4 this flag switches between hex dump and module info report as expected.
Best regards
Ivar Simensen
My target:
Ubuntu 22.04.3 LTS
Kernel 5.15.0-88-generic
Ethtool ver 1:5.16-1
Hex dump result with ethtool 5.16 (and the same with 6.1 and 6.5):
ledtkn2@ledtkn2-23420231:~$ sudo ethtool -m ens5
Offset Values
------ ------
0x0000: 02 04 07 04 14 40 02 12 00 01 05 01 1f 00 28 ff
0x0010: 00 00 00 00 43 4f 54 53 57 4f 52 4b 53 20 20 20
0x0020: 20 20 20 20 00 00 00 00 52 4a 33 47 45 58 44 44
0x0030: 50 4c 58 4c 43 52 41 55 30 30 30 30 05 1e 00 fe
0x0040: 10 14 00 00 42 30 35 34 41 41 48 52 20 20 20 20
0x0050: 20 20 20 20 32 33 30 37 32 35 20 20 68 70 08 6e
0x0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Expected result with ethtool 5.4:
ledtkn2@ledtkn2-23420231:~$ sudo ethtool -m ens5
Identifier : 0x02 (module soldered to motherboard)
Extended identifier : 0x04 (GBIC/SFP defined by 2-wire interface ID)
Connector : 0x07 (LC)
Transceiver codes : 0x04 0x14 0x40 0x02 0x12 0x00 0x01 0x05 0x00
Transceiver type : Infiniband: 1X LX
Transceiver type : SONET: SONET reach specifier bit 1
Transceiver type : SONET: OC-48, long reach
Transceiver type : SONET: OC-12, single mode, long reach
Transceiver type : Ethernet: 1000BASE-LX
Transceiver type : FC: long distance (L)
Transceiver type : FC: Longwave laser (LC)
Transceiver type : FC: Single Mode (SM)
Transceiver type : FC: 200 MBytes/sec
Transceiver type : FC: 100 MBytes/sec
Encoding : 0x01 (8B/10B)
BR, Nominal : 3100MBd
Rate identifier : 0x00 (unspecified)
Length (SMF,km) : 40km
Length (SMF) : 25500m
Length (50um) : 0m
Length (62.5um) : 0m
Length (Copper) : 0m
Length (OM3) : 0m
Laser wavelength : 1310nm
Vendor name : COTSWORKS
Vendor OUI : 00:00:00
Vendor PN : RJ3GEXDDPLXLCRAU
Vendor rev : 0000
Option values : 0x10 0x14
Option : RX_LOS implemented, inverted
Option : TX_DISABLE implemented
Option : Paging implemented
BR margin, max : 0%
BR margin, min : 0%
Vendor SN : B054AAHR
Date code : 230725
Optical diagnostics support : Yes
Laser bias current : 28.404 mA
Laser output power : 1.3464 mW / 1.29 dBm
Receiver signal average optical power : 0.0003 mW / -35.23 dBm
Module temperature : 53.79 degrees C / 128.82 degrees F
Module voltage : 3.2860 V
Alarm/warning flags implemented : No
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ethtool module info only reports hex info
2023-11-23 7:42 ethtool module info only reports hex info Ivar Simensen
@ 2023-11-23 11:29 ` Ido Schimmel
2023-11-24 9:33 ` Ivar Simensen
2023-11-23 15:19 ` Michal Kubecek
1 sibling, 1 reply; 7+ messages in thread
From: Ido Schimmel @ 2023-11-23 11:29 UTC (permalink / raw)
To: Ivar Simensen; +Cc: mkubecek@suse.cz, netdev@vger.kernel.org
On Thu, Nov 23, 2023 at 07:42:07AM +0000, Ivar Simensen wrote:
> Hi
> I'm not sure if this is a conscious decision or a bug, but I discovered a change of behavior between version 5.4 an 5.16 according to get module info from a SFP Fiber connector: "ethtool -m ens5".
>
> After upgrading a target from Ubuntu 18.04 to 22.04, I discovered that the ethtool just report a hex dump when I tried to verify my fiber SFP connectors. In 18.04 I got a report with ethtool. I have tried to upgrade from version 5.16 to 6.1 and 6.5, but it did not fix the issue. I then downgraded to version 5.4 and now it works again.
>
> The expected result with "ethtool -m ens5" was to get a human readable report, and with "ethtool -m ens5 hex on" a hexdump.
> I have tried with the flag "hex on/off" on 5.16, but the result is always hex dump.
> On version 5.4 this flag switches between hex dump and module info report as expected.
Can you try the following ethtool patch?
diff --git a/netlink/module-eeprom.c b/netlink/module-eeprom.c
index 49833a2a6a38..8b19f8e28c72 100644
--- a/netlink/module-eeprom.c
+++ b/netlink/module-eeprom.c
@@ -216,6 +216,8 @@ static int eeprom_parse(struct cmd_context *ctx)
switch (request.data[0]) {
#ifdef ETHTOOL_ENABLE_PRETTY_DUMP
+ case SFF8024_ID_GBIC:
+ case SFF8024_ID_SOLDERED_MODULE:
case SFF8024_ID_SFP:
return sff8079_show_all_nl(ctx);
case SFF8024_ID_QSFP:
We might be missing more identifiers there. I can look into it next week
(around Wednesday).
If it doesn't work, you can try compiling ethtool without the new
netlink support and instead use the legacy ioctl interface:
$ ./configure --disable-netlink
$ make
Thanks
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: ethtool module info only reports hex info
2023-11-23 7:42 ethtool module info only reports hex info Ivar Simensen
2023-11-23 11:29 ` Ido Schimmel
@ 2023-11-23 15:19 ` Michal Kubecek
2023-11-24 7:38 ` Ivar Simensen
1 sibling, 1 reply; 7+ messages in thread
From: Michal Kubecek @ 2023-11-23 15:19 UTC (permalink / raw)
To: Ivar Simensen; +Cc: netdev@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 708 bytes --]
On Thu, Nov 23, 2023 at 07:42:07AM +0000, Ivar Simensen wrote:
> Hi
> I'm not sure if this is a conscious decision or a bug, but I
> discovered a change of behavior between version 5.4 an 5.16 according
> to get module info from a SFP Fiber connector: "ethtool -m ens5".
>
> After upgrading a target from Ubuntu 18.04 to 22.04, I discovered that
> the ethtool just report a hex dump when I tried to verify my fiber SFP
> connectors. In 18.04 I got a report with ethtool. I have tried to
> upgrade from version 5.16 to 6.1 and 6.5, but it did not fix the
> issue. I then downgraded to version 5.4 and now it works again.
Are you sure your ethtool was built with pretty dumps enabled?
Michal
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: ethtool module info only reports hex info
2023-11-23 15:19 ` Michal Kubecek
@ 2023-11-24 7:38 ` Ivar Simensen
0 siblings, 0 replies; 7+ messages in thread
From: Ivar Simensen @ 2023-11-24 7:38 UTC (permalink / raw)
To: Michal Kubecek; +Cc: netdev@vger.kernel.org
Hi Michal
I'm not sure of this. I did not build the ethtool my selves, but used the version that comes with Jammy. When testing different versions of ethtool, I used the deb packages found at
http://archive.ubuntu.com/ubuntu/pool/main/e/ethtool/ and installed with dpkg.
I assumed however that pretty dump was enabled.
-----Original Message-----
From: Michal Kubecek <mkubecek@suse.cz>
Sent: torsdag 23. november 2023 16:20
To: Ivar Simensen <is@datarespons.no>
Cc: netdev@vger.kernel.org
Subject: Re: ethtool module info only reports hex info
On Thu, Nov 23, 2023 at 07:42:07AM +0000, Ivar Simensen wrote:
> Hi
> I'm not sure if this is a conscious decision or a bug, but I
> discovered a change of behavior between version 5.4 an 5.16 according
> to get module info from a SFP Fiber connector: "ethtool -m ens5".
>
> After upgrading a target from Ubuntu 18.04 to 22.04, I discovered that
> the ethtool just report a hex dump when I tried to verify my fiber SFP
> connectors. In 18.04 I got a report with ethtool. I have tried to
> upgrade from version 5.16 to 6.1 and 6.5, but it did not fix the
> issue. I then downgraded to version 5.4 and now it works again.
Are you sure your ethtool was built with pretty dumps enabled?
Michal
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ethtool module info only reports hex info
2023-11-23 11:29 ` Ido Schimmel
@ 2023-11-24 9:33 ` Ivar Simensen
0 siblings, 0 replies; 7+ messages in thread
From: Ivar Simensen @ 2023-11-24 9:33 UTC (permalink / raw)
To: Ido Schimmel; +Cc: mkubecek@suse.cz, netdev@vger.kernel.org
Hi Ido
Thanks for the quick response. I downloaded the latest source version today (6.6) and can confirm that the hex dump issue is still there.
I then tried to add the suggested ID's to neltlink/module-eeprom.c as suggested, and now it's working!
Actually, it was the SFF8024_ID_SOLDERED_MODULE that solved the case, the other ID didn't have any effect on my issue.
Thanks
From: Ido Schimmel <idosch@idosch.org>
Sent: Thursday, November 23, 2023 12:29 PM
To: Ivar Simensen <is@datarespons.no>
Cc: mkubecek@suse.cz <mkubecek@suse.cz>; netdev@vger.kernel.org <netdev@vger.kernel.org>
Subject: Re: ethtool module info only reports hex info
On Thu, Nov 23, 2023 at 07:42:07AM +0000, Ivar Simensen wrote:
> Hi
> I'm not sure if this is a conscious decision or a bug, but I discovered a change of behavior between version 5.4 an 5.16 according to get module info from a SFP Fiber connector: "ethtool -m ens5".
>
> After upgrading a target from Ubuntu 18.04 to 22.04, I discovered that the ethtool just report a hex dump when I tried to verify my fiber SFP connectors. In 18.04 I got a report with ethtool. I have tried to upgrade from version 5.16 to 6.1 and 6.5, but it did not fix the issue. I then downgraded to version 5.4 and now it works again.
>
> The expected result with "ethtool -m ens5" was to get a human readable report, and with "ethtool -m ens5 hex on" a hexdump.
> I have tried with the flag "hex on/off" on 5.16, but the result is always hex dump.
> On version 5.4 this flag switches between hex dump and module info report as expected.
Can you try the following ethtool patch?
diff --git a/netlink/module-eeprom.c b/netlink/module-eeprom.c
index 49833a2a6a38..8b19f8e28c72 100644
--- a/netlink/module-eeprom.c
+++ b/netlink/module-eeprom.c
@@ -216,6 +216,8 @@ static int eeprom_parse(struct cmd_context *ctx)
switch (request.data[0]) {
#ifdef ETHTOOL_ENABLE_PRETTY_DUMP
+ case SFF8024_ID_GBIC:
+ case SFF8024_ID_SOLDERED_MODULE:
case SFF8024_ID_SFP:
return sff8079_show_all_nl(ctx);
case SFF8024_ID_QSFP:
We might be missing more identifiers there. I can look into it next week
(around Wednesday).
If it doesn't work, you can try compiling ethtool without the new
netlink support and instead use the legacy ioctl interface:
$ ./configure --disable-netlink
$ make
Thanks
^ permalink raw reply related [flat|nested] 7+ messages in thread
* ethtool module info only reports hex info
@ 2024-05-16 7:23 Frederic TOULBOT
2024-05-16 12:14 ` Andrew Lunn
0 siblings, 1 reply; 7+ messages in thread
From: Frederic TOULBOT @ 2024-05-16 7:23 UTC (permalink / raw)
To: mkubecek, netdev
Hello, I have the impression that there is an unwanted change in the
output of the ethtool -m command with a certain QSFP type
I tested versions 6.5-1 / 5.16-1 / 5.4-1
The bug seems very close to this one
https://lists.openwall.net/netdev/2023/11/23/118
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.4 LTS
Release: 22.04
Codename: jammy
With ethtool 6.5-1 and 5.16-1
~# ethtool -m ens1f1
Offset Values
------ ------
0x0000: 11 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0010: 00 00 00 00 00 00 1d 0e 00 00 81 85 00 00 00 00
0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
And with version 5.4.1, we receive the expected result
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal
dpkg -l ethtool
ii ethtool 1:5.4-1 amd64 display or change
Ethernet device settings
~# ethtool -m ens1f0
Identifier : 0x11 (QSFP28)
Extended identifier : 0x10
Extended identifier description : 1.5W max. Power consumption
Extended identifier description : No CDR in TX, No CDR in RX
Extended identifier description : High Power Class (> 3.5 W)
not enabled
Connector : 0x23 (No separable connector)
Transceiver codes : 0x80 0x00 0x00 0x00 0x00
0x00 0x00 0x00
Transceiver type : 100G Ethernet: 100G
Base-CR4 or 25G Base-CR CA-L
Encoding : 0x05 (64B/66B)
BR, Nominal : 25500Mbps
Rate identifier : 0x00
Length (SMF,km) : 0km
Length (OM3 50um) : 0m
Length (OM2 50um) : 0m
Length (OM1 62.5um) : 0m
Length (Copper or Active cable) : 2m
Transmitter technology : 0xa0 (Copper cable unequalized)
Attenuation at 2.5GHz : 7db
Attenuation at 5.0GHz : 10db
Attenuation at 7.0GHz : 13db
Attenuation at 12.9GHz : 18db
Vendor name : CISCO-PUREOPTICS
Vendor OUI : 00:00:00
Vendor PN : QSFP-4SFP25G-CU2
Vendor rev : 6
Vendor SN : M9BE9185
Date code : 220412
Revision Compliance : SFF-8636 Rev 2.5/2.6/2.7
Module temperature : 29.05 degrees C / 84.30 degrees F
Module voltage : 3.3157 V
Alarm/warning flags implemented : Yes
Laser tx ...
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ethtool module info only reports hex info
2024-05-16 7:23 Frederic TOULBOT
@ 2024-05-16 12:14 ` Andrew Lunn
0 siblings, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2024-05-16 12:14 UTC (permalink / raw)
To: Frederic TOULBOT; +Cc: mkubecek, netdev
On Thu, May 16, 2024 at 09:23:05AM +0200, Frederic TOULBOT wrote:
> Hello, I have the impression that there is an unwanted change in the
> output of the ethtool -m command with a certain QSFP type
>
> I tested versions 6.5-1 / 5.16-1 / 5.4-1
>
> The bug seems very close to this one
> https://lists.openwall.net/netdev/2023/11/23/118
>
> lsb_release -a
> No LSB modules are available.
> Distributor ID: Ubuntu
> Description: Ubuntu 22.04.4 LTS
> Release: 22.04
> Codename: jammy
>
> With ethtool 6.5-1 and 5.16-1
> ~# ethtool -m ens1f1
> Offset Values
> ------ ------
> 0x0000: 11 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x0010: 00 00 00 00 00 00 1d 0e 00 00 81 85 00 00 00 00
> 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>
> And with version 5.4.1, we receive the expected result
Could you check it is being built with ETHTOOL_ENABLE_PRETTY_DUMP.
If you can build from source, maybe use gdb and check what is
happening in eeprom_parse()?
Andrew
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-05-16 12:14 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-23 7:42 ethtool module info only reports hex info Ivar Simensen
2023-11-23 11:29 ` Ido Schimmel
2023-11-24 9:33 ` Ivar Simensen
2023-11-23 15:19 ` Michal Kubecek
2023-11-24 7:38 ` Ivar Simensen
-- strict thread matches above, loose matches on Subject: below --
2024-05-16 7:23 Frederic TOULBOT
2024-05-16 12:14 ` Andrew Lunn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox