diff mbox series

[v4,net-next] net/mlx5e: Report rx_discards_phy via rx_dropped

Message ID 20241210022706.6665-1-laoar.shao@gmail.com (mailing list archive)
State Accepted
Commit c9cfced17365b1df8c6ae6cd5db56aebd7ed9b57
Delegated to: Netdev Maintainers
Headers show
Series [v4,net-next] net/mlx5e: Report rx_discards_phy via rx_dropped | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 3 maintainers not CCed: pabeni@redhat.com edumazet@google.com andrew+netdev@lunn.ch
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1 this patch: 1
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-12-19--00-00 (tests: 880)

Commit Message

Yafang Shao Dec. 10, 2024, 2:27 a.m. UTC
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: Tariq Toukan <ttoukan.linux@gmail.com>
Cc: Saeed Mahameed <saeedm@nvidia.com>
Cc: Leon Romanovsky <leon@kernel.org>
Cc: Gal Pressman <gal@nvidia.com>
Cc: Jakub Kicinski <kuba@kernel.org>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Simon Horman Dec. 10, 2024, 7:49 p.m. UTC | #1
On Tue, Dec 10, 2024 at 10:27:06AM +0800, Yafang Shao wrote:
> 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>

Reviewed-by: Simon Horman <horms@kernel.org>
Jakub Kicinski Dec. 17, 2024, 6:45 p.m. UTC | #2
On Tue, 10 Dec 2024 10:27:06 +0800 Yafang Shao wrote:
> 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.

nVidia folks, could you review? Or you're just taking it via your tree
and it will reappear on the list soon? I want to make sure there is no
off-list discussion with the author that leads to the patch being
"lost"...
Tariq Toukan Dec. 18, 2024, 6:20 a.m. UTC | #3
On 17/12/2024 20:45, Jakub Kicinski wrote:
> On Tue, 10 Dec 2024 10:27:06 +0800 Yafang Shao wrote:
>> 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.
> 

Reviewed-by: Tariq Toukan <tariqt@nvidia.com>

> nVidia folks, could you review? Or you're just taking it via your tree
> and it will reappear on the list soon?

Please take it.

We do not work anymore with our own netdev tree.
We still work with the mlx5-next tree for patches that should be 
"shared" with non-netdev trees, mainly IFC changes.

> I want to make sure there is no
> off-list discussion with the author that leads to the patch being
> "lost"...
patchwork-bot+netdevbpf@kernel.org Dec. 19, 2024, 1 a.m. UTC | #4
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 10 Dec 2024 10:27:06 +0800 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [v4,net-next] net/mlx5e: Report rx_discards_phy via rx_dropped
    https://git.kernel.org/netdev/net-next/c/c9cfced17365

You are awesome, thank you!
diff mbox series

Patch

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) +