Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net/mlx5e: Report rx_discards_phy via rx_dropped

We noticed a high number of rx_discards_phy events on certain servers while
running `ethtool -S`. However, this critical counter is not currently
included in the standard /proc/net/dev statistics file, making it difficult
to monitor effectively—especially given the diversity of vendors across a
large fleet of servers.

Let's report it via the standard rx_dropped metric.

Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Cc: Saeed Mahameed <saeedm@nvidia.com>
Cc: Leon Romanovsky <leon@kernel.org>
Cc: Gal Pressman <gal@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20241210022706.6665-1-laoar.shao@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Yafang Shao and committed by
Jakub Kicinski
c9cfced1 4b252f2d

+1
+1
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
··· 3946 3946 } 3947 3947 3948 3948 stats->rx_missed_errors = priv->stats.qcnt.rx_out_of_buffer; 3949 + stats->rx_dropped = PPORT_2863_GET(pstats, if_in_discards); 3949 3950 3950 3951 stats->rx_length_errors = 3951 3952 PPORT_802_3_GET(pstats, a_in_range_length_errors) +