Re: [PATCH net-next v5 1/3] net/mlx4: Track RX allocation failures in a stat

From: Tariq Toukan
Date: Tue May 14 2024 - 15:08:54 EST




On 13/05/2024 20:29, Joe Damato wrote:
mlx4_en_alloc_frags currently returns -ENOMEM when mlx4_alloc_page
fails but does not increment a stat field when this occurs.

A new field called alloc_fail has been added to struct mlx4_en_rx_ring
which is now incremented in mlx4_en_rx_ring when -ENOMEM occurs.

Signed-off-by: Joe Damato <jdamato@xxxxxxxxxx>
Tested-by: Martin Karsten <mkarsten@xxxxxxxxxxxx>
---
drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 1 +
drivers/net/ethernet/mellanox/mlx4/en_rx.c | 4 +++-
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 1 +
3 files changed, 5 insertions(+), 1 deletion(-)


Reviewed-by: Tariq Toukan <tariqt@xxxxxxxxxx>