lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0106019bb70737d5-06bcc3e0-d534-4e42-b8a3-71dc3b53f318-000000@ap-northeast-1.amazonses.com>
Date: Tue, 13 Jan 2026 11:04:22 +0000
From: Kenta Akagi <k@...l.me>
To: ttoukan.linux@...il.com, saeedm@...dia.com, tariqt@...dia.com, 
	mbloch@...dia.com, leon@...nel.org, andrew+netdev@...n.ch, 
	davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org, 
	pabeni@...hat.com
Cc: k@...l.me, netdev@...r.kernel.org, linux-rdma@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC mlx5-next 0/1] net/mlx5e: Expose physical received
 bits counters to ethtool

On 2026/01/13 15:43, Tariq Toukan wrote:
> 
> 
> On 13/01/2026 8:31, Tariq Toukan wrote:
>>
>>
>> On 12/01/2026 9:03, Kenta Akagi wrote:
>>> Hi,
>>>
>>> I would like to measure the cable BER on ConnectX.
>>>
>>> According to the documentation[1][2], there are counters that can be used
>>> for this purpose: rx_corrected_bits_phy, rx_pcs_symbol_err_phy and
>>> rx_bits_phy. However, rx_bits_phy does not show up in ethtool
>>> statistics.
>>>
>>> This patch exposes the PPCNT phy_received_bits as rx_bits_phy.
>>>
>>>
>>> On a ConnectX-5 with 25Gbase connection, it works as expected.
>>>
>>> On the other hand, although I have not verified it, in an 800Gbps
>>> environment rx_bits_phy would likely overflow after about 124 days.
>>> Since I cannot judge whether this is acceptable, I am posting this as an
>>> RFC first.
>>>
>>
>> Hi,
>>
>> This is a 64-bits counter so no overflow is expected.
>>
> 
> Sorry, ignore my comment, your numbers make sense.
> Maybe it's ~248 days, but same idea.
> 

Hi, thank you for checking.

Ah, it seems I didn't realize it was unsigned, and I also forgot to
include the expression. Sorry about that.
Yes - at 800 Gbps, 0xFFFFFFFFFFFFFFFF / (800 * (2^30) * 86400) = 248.55 days,
so it will overflow.

In practice, is it possible to expose this as a statistic via ethtool?
Or is there some other value that could be exposed for BER calculation - e.g.,
a register that indicates the elapsed seconds since link-up?

Thanks.

>>>
>>> [1] commit 8ce3b586faa4 ("net/mlx5: Add counter information to mlx5
>>>      driver documentation")
>>> [2] https://docs.kernel.org/networking/device_drivers/ethernet/ mellanox/mlx5/counters.html
>>>
>>> Kenta Akagi (1):
>>>    net/mlx5e: Expose physical received bits counters to ethtool
>>>
>>>   drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>
> 
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ