From: Yafang Shao Date: Tue, 10 Dec 2024 02:27:06 +0000 (+0800) Subject: net/mlx5e: Report rx_discards_phy via rx_dropped X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c9cfced17365b1df8c6ae6cd5db56aebd7ed9b57;p=users%2Fjedix%2Flinux-maple.git 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 Signed-off-by: Yafang Shao Cc: Saeed Mahameed Cc: Leon Romanovsky Cc: Gal Pressman Reviewed-by: Simon Horman Reviewed-by: Tariq Toukan Link: https://patch.msgid.link/20241210022706.6665-1-laoar.shao@gmail.com Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index dd16d73000c3..15e765a41d72 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -3946,6 +3946,7 @@ mlx5e_get_stats(struct net_device *dev, struct rtnl_link_stats64 *stats) } stats->rx_missed_errors = priv->stats.qcnt.rx_out_of_buffer; + stats->rx_dropped = PPORT_2863_GET(pstats, if_in_discards); stats->rx_length_errors = PPORT_802_3_GET(pstats, a_in_range_length_errors) +