> "Yannis Aribaud" <bu...@d6bell.net> writes:
>
> [...]
>
> To me it looks like you are just reading arbitrary numbers from the
> SFP+. Try replacing it and see if the results are more reliable.
I will try, but I am seeing the same behavior and similar values on 2 servers running the same hardware and the same software. The SFP+ modules model is commonly used on our equipements (servers, routers, switchs) and we never had such issues.
Values are clearly unreliable but not random at all. Values doesn't change between several runs of the command output redirected or not.
I mean values obviously change between redirected output and non redirected output runs, but not much between several runs redirected and neither between several runs non redirected.
Thus even if the values provided by the tranceivers are crazy, I see no reason seeing differences like those in values due to output redirect... I could not find any clue in the source code of ethtool, but I am no good developper at all.
Regards,
--
Yannis Aribaud
> Control: tag -1 moreinfo
>
> [...]
>
>> I am using Debian GNU/Linux 10 (buster), kernel 4.19.0-9-amd64 #1 SMP
>> Debian 4.19.118-2 (2020-04-29) x86_64 GNU/Linux and libc6 2.28-10
>
> And which network driver are you using?
root@localhost:~# ethtool -i enp10s0
driver: mlx4_en
version: 4.0-0
firmware-version: 2.42.5000
expansion-rom-version:
bus-info: 0000:0a:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: yes
root@localhost:~# modinfo mlx4_en
filename: /lib/modules/4.19.0-9-amd64/kernel/drivers/net/ethernet/mellanox/mlx4/mlx4_en.ko
version: 4.0-0
license: Dual BSD/GPL
description: Mellanox ConnectX HCA Ethernet driver
author: Liran Liss, Yevgeny Petrilin
srcversion: 5E7CBA2E401F495296DC544
depends: mlx4_core,devlink
retpoline: Y
intree: Y
name: mlx4_en
vermagic: 4.19.0-9-amd64 SMP mod_unload modversions
sig_id: PKCS#7
signer: Debian Secure Boot CA
sig_key: A7:46:8D:EF
sig_hashalgo: sha256
signature: 27:8D:17:13:F5:5B:EA:8E:DC:88:30:FD:2C:89:50:64:E8:2A:C6:7A:
25:F5:67:A9:DB:82:CD:5E:46:0E:F6:2A:2F:3F:EF:6B:BE:EF:49:AA:
27:1D:4D:95:28:AA:6C:88:5A:B1:C7:75:5F:C2:78:71:7F:1B:FC:CC:
E0:F4:33:DE:9E:51:99:C2:FE:D1:2A:9B:EF:17:63:5C:1E:29:9A:4F:
00:56:6F:3E:ED:C5:4A:72:63:8A:4C:EE:33:FD:FE:7C:73:2B:D0:0D:
80:80:A0:91:36:0D:7E:B0:C2:AC:2D:5C:A3:55:BF:03:94:52:64:30:
DF:14:BC:FB:AF:3B:60:D3:4C:02:78:4D:51:61:D8:F2:E4:02:9C:D5:
A4:05:81:D9:47:92:5A:C2:0D:D5:00:71:37:85:9B:F4:E5:54:3F:22:
CD:4C:67:12:63:15:C2:1D:87:C8:03:3C:4E:23:6C:A5:F3:C6:12:99:
0E:D1:40:AA:47:45:64:0F:AB:C2:E0:71:64:03:AD:4B:F2:0C:02:F3:
D3:D5:E4:4C:26:63:14:93:46:5F:31:3B:4C:9B:4B:5D:CD:30:C0:DF:
28:8A:4D:9A:0E:A8:5A:87:F4:7F:DD:F6:0E:A3:3A:B2:99:C0:75:F9:
00:13:B0:44:06:D1:1C:FE:34:A1:77:36:2A:15:29:F7
parm: udp_rss:Enable RSS for incoming UDP traffic or disabled (0) (uint)
parm: pfctx:Priority based Flow Control policy on TX[7:0]. Per priority bit mask (uint)
parm: pfcrx:Priority based Flow Control policy on RX[7:0]. Per priority bit mask (uint)
parm: inline_thold:Threshold for using inline data (range: 17-104, default: 104) (uint)
Latest firmware available on Mellanox website for this NIC and default kernel driver.
Regards,
--
Yannis Aribaud
> [...]
Just in case that could be usefull. We change the transceiver for an other model also known to work correctly.
root@localhost:~# ethtool -m enp10s0
Identifier : 0x03 (SFP)
Extended identifier : 0x04 (GBIC/SFP defined by 2-wire interface ID)
Connector : 0x07 (LC)
Transceiver codes : 0x10 0x00 0x00 0x00 0x40 0x00 0x0c 0x00 0x00
Transceiver type : 10G Ethernet: 10G Base-SR
Transceiver type : FC: short distance (S)
Transceiver type : FC: Multimode, 62.5um (M6)
Transceiver type : FC: Multimode, 50um (M5)
Encoding : 0x06 (64B/66B)
BR, Nominal : 10300MBd
Rate identifier : 0x00 (unspecified)
Length (SMF,km) : 0km
Length (SMF) : 0m
Length (50um) : 300m
Length (62.5um) : 150m
Length (Copper) : 0m
Length (OM3) : 0m
Laser wavelength : 850nm
Vendor name : FiberStore
Vendor OUI : 00:90:65
Vendor PN : SFP-10GSR-85
Vendor rev : A
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 : N3612030002
Date code : 161203
If I understood correctly, the driver is unable to read the DOM values correctly and return uninitialized values, which is a security issue (leaking kernel memory).
The fact that reading the DOM fails is an other issue (maybe Mellanox NIC firmware related ?).
But why are the values changing when output is redirected ? Does it change the variables memory addresses or pointers values ? What mechanism is involved there ?
Best Regards,
--
Yannis Aribaud