]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Fix capability check for updating vnic env counters
authorGal Pressman <gal@nvidia.com>
Mon, 27 Jun 2022 12:05:53 +0000 (15:05 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 6 Jul 2022 23:11:56 +0000 (16:11 -0700)
commite7a8e1226984ccc8dc356667df3138dee978af46
treee3f3be6fd4036e93f8a760ce15aab23c592c5b58
parent41d975851e44390a232e9d2646aa1fa49e3b5af9
net/mlx5e: Fix capability check for updating vnic env counters

The existing capability check for vnic env counters only checks for
receive steering discards, although we need the counters update for the
exposed internal queue oob counter as well. This could result in the
latter counter not being updated correctly when the receive steering
discards counter is not supported.
Fix that by checking whether any counter is supported instead of only
the steering counter capability.

Fixes: c4afd8d5a510 ("net/mlx5e: Add device out of buffer counter")
Signed-off-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c