net/mlx5e: Fix IPSEC stats
authorMaxim Mikityanskiy <maximmi@mellanox.com>
Wed, 25 Nov 2020 11:52:36 +0000 (13:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Feb 2021 22:28:42 +0000 (23:28 +0100)
commit99bb37ab284caf3c70139b059546b31b5be731b1
treea786c35109f6e46a7b1f6e39aa60ca17866a7805
parent37ef64511f31323f591310fce734979ae11e6a38
net/mlx5e: Fix IPSEC stats

commit 45c9a30835d84009dfe711f5c8836720767c286e upstream.

When IPSEC offload isn't active, the number of stats is not zero, but
the strings are not filled, leading to exposing stats with empty names.
Fix this by using the same condition for NUM_STATS and FILL_STRS.

Fixes: 0aab3e1b04ae ("net/mlx5e: IPSec, Expose IPsec HW stat only for supporting HW")
Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
Reviewed-by: Raed Salem <raeds@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_stats.c