lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 06 Aug 2019 13:16:54 -0700
From:   "Jonathan Lemon" <jonathan.lemon@...il.com>
To:     "Saeed Mahameed" <saeedm@...lanox.com>
Cc:     kernel-team@...com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] mlx5: use correct counter

On 6 Aug 2019, at 12:03, Saeed Mahameed wrote:

> 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..

Hmm, confusing, but okay.  I'll send mail on an issue we're having
separately.
-- 
Jonathan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ