[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <128f1f62141faee7620fbe56202f35ec8f6b42b6.camel@mellanox.com>
Date: Tue, 6 Aug 2019 19:03:57 +0000
From: Saeed Mahameed <saeedm@...lanox.com>
To: "jonathan.lemon@...il.com" <jonathan.lemon@...il.com>
CC: "kernel-team@...com" <kernel-team@...com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] mlx5: use correct counter
On Tue, 2019-08-06 at 11:28 -0700, Jonathan Lemon wrote:
> mlx5e_grp_q_update_stats seems to be using the wrong counter
> for if_down_packets.
>
> Signed-off-by: Jonathan Lemon <jonathan.lemon@...il.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
> b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
> index 6eee3c7d4b06..1d16e03a987d 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
> @@ -363,7 +363,7 @@ static void mlx5e_grp_q_update_stats(struct
> mlx5e_priv *priv)
> !mlx5_core_query_q_counter(priv->mdev, priv-
> >drop_rq_q_counter, 0,
> out, sizeof(out)))
> qcnt->rx_if_down_packets =
> MLX5_GET(query_q_counter_out, out,
> - out_of_buffer);
> + rx_if_down_packets)
> ;
Hi Jonathan,
This patch in not applicable (won't compile and there is no issue with
current code).
Although it is confusing but the code is correct as is.
1) your patch won't compile since there is no rx_if_down_packets field
in query_q_counter_out hw definition struct: please check
include/linux/mlx5/mlx5_ifc.h
mlx5_ifc_query_q_counter_out_bits
2) the code works as is since when interface is down and port is up,
technically from hw perspective there is "no buffer available" so the
out_of_buffer counter of the drop_rq_q_counter will count packets
dropped due to interface down..
Thanks,
Saeed.
Powered by blists - more mailing lists