]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Jul 2022 19:24:17 +0000 (21:24 +0200)
commita5f54ba821cbe5a4d25c9b2644f9d0c84788709b
treebc649837975d34156a89308c6afd4a5cce3f9c48
parent8d600cccfd0bae78e7ef1f55eec6c3eb4c06a03c
net/mlx5e: Fix capability check for updating vnic env counters

[ Upstream commit d1d0198b799c52ea5a9e752bdb8b2e376c91b6c2 ]

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: 67c2872e1db0 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c