From nobody Sat Feb 7 17:04:33 2026 Received: from www5210.sakura.ne.jp (www5210.sakura.ne.jp [133.167.8.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C59301A5B9E for ; Tue, 6 Jan 2026 07:02:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=133.167.8.150 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767682965; cv=none; b=DlY8WdERqM+urbrdPy5VxsFBdvWKUb3TYNx4p4I4xO5yLH/if1D+Muwsua3z+VerSvfptHEiSc/+NJbTQRfOoTr243IesG3xXObS8DyXPhUxTxeQYLSLlz3p3rGuflbPiGmhmh9+EJOmNch8PtqkcFru3F1bmKUmMm+wDbFy6/g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767682965; c=relaxed/simple; bh=uXiBJtsX0svQmePqiCn8rWdMoN1ClmUNN3b8dWA4RKk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=htKyYF6+3FWdJ+4ah3rVXeMp7n5rO5GHku4NvuFoayFhBkvlrawI+79hsKhIvcZfQReUkJinH0GCg3KpmCMBkf5vn+DWov1NAXckh9LJ9t8c9Y5qko6bVl/7ry3ehAjnAZS63mwSNpjAM0ZRPC0SwRt7C3L5czb4EnO74ZLu//k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mgml.me; spf=pass smtp.mailfrom=mgml.me; dkim=pass (2048-bit key) header.d=mgml.me header.i=@mgml.me header.b=gO3zELgT; arc=none smtp.client-ip=133.167.8.150 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mgml.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mgml.me Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mgml.me header.i=@mgml.me header.b="gO3zELgT" Received: from fedora (p4548043-ipxg00s01tokaisakaetozai.aichi.ocn.ne.jp [153.219.109.43]) (authenticated bits=0) by www5210.sakura.ne.jp (8.16.1/8.16.1) with ESMTPSA id 60672QsI034247 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 6 Jan 2026 16:02:42 +0900 (JST) (envelope-from k@mgml.me) DKIM-Signature: a=rsa-sha256; bh=KGA45rKZ0slnQFj06I4+4i25YQo4RQUItYgH6ErbTlI=; c=relaxed/relaxed; d=mgml.me; h=From:To:Subject:Date:Message-ID; s=rs20250315; t=1767682962; v=1; b=gO3zELgTpDfmQSU9qjMLoJkjDW6G3IDjOYKOrD1GAcpxb6ZMIvHvax0efKrxwBGH 3pRjXO74U9YZSQ+EPjHLSL2DD4RVKNsFMG4GejnjgWIhWC28364H8GI+4U02VsPV z14ToaIm4niakJ5ySfmc73LPzjJWmi9sp3sHsX/FTEUfWeNx225I/27sWKkMOapx JH5x2cywrrcwsykbIPVRMP0q3gUaVvmVJex8i6dXk9Tj0u5MLime9sKjCa1MmrWo 3BAnWrm47Z2eZee6TlpbKZSnyxiL6DOE1VrNzG3PWtuEdayu1ulnihaihQ7IuJOB T0QchtwH/EoPQX3ADTGXzw== From: Kenta Akagi To: Saeed Mahameed , Tariq Toukan , Mark Bloch , Leon Romanovsky , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Kenta Akagi Subject: [PATCH] net/mlx5e: Expose physical received bits counters to ethtool Date: Tue, 6 Jan 2026 16:02:10 +0900 Message-ID: <20260106070210.24449-1-k@mgml.me> X-Mailer: git-send-email 2.50.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" rx_bits_phy is documented but not shown in ethtool --statistics. Make this value available via ethtool. According to existing documentation, rx_bits_phy is needed to calculate the error rate from rx_pcs_symbol_err_phy and rx_corrected_bits_phy. The existing rx_bytes_phy cannot be used for this calculation as it appears to be a counter above the PHY in the strict sense (i.e. traffic based). To avoid confusion, it might be better to use a different name (e.g., rx_bits_pcs), but for now, I will submit the patch as per the documentation. Signed-off-by: Kenta Akagi --- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c b/drivers/n= et/ethernet/mellanox/mlx5/core/en_stats.c index a2802cfc9b98..e167355daad5 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c @@ -1226,6 +1226,7 @@ static const struct counter_desc pport_phy_layer_cntr= s_stats_desc[] =3D { MLX5_BYTE_OFF(ppcnt_reg, \ counter_set.phys_layer_statistical_cntrs.c##_high) static const struct counter_desc pport_phy_statistical_stats_desc[] =3D { + { "rx_bits_phy", PPORT_PHY_STATISTICAL_OFF(phy_received_bits) }, { "rx_pcs_symbol_err_phy", PPORT_PHY_STATISTICAL_OFF(phy_symbol_errors) }, { "rx_corrected_bits_phy", PPORT_PHY_STATISTICAL_OFF(phy_corrected_bits) = }, }; --=20 2.50.1