[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241210022706.6665-1-laoar.shao@gmail.com>
Date: Tue, 10 Dec 2024 10:27:06 +0800
From: Yafang Shao <laoar.shao@...il.com>
To: saeedm@...dia.com,
tariqt@...dia.com,
leon@...nel.org,
gal@...dia.com,
kuba@...nel.org
Cc: netdev@...r.kernel.org,
linux-rdma@...r.kernel.org,
Yafang Shao <laoar.shao@...il.com>,
Tariq Toukan <ttoukan.linux@...il.com>
Subject: [PATCH v4 net-next] 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@...nel.org>
Signed-off-by: Yafang Shao <laoar.shao@...il.com>
Cc: Tariq Toukan <ttoukan.linux@...il.com>
Cc: Saeed Mahameed <saeedm@...dia.com>
Cc: Leon Romanovsky <leon@...nel.org>
Cc: Gal Pressman <gal@...dia.com>
Cc: Jakub Kicinski <kuba@...nel.org>
---
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index e601324a690a..3117fafdabcd 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -3916,6 +3916,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) +
--
2.43.5
Powered by blists - more mailing lists