]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net/mlx5e: Add capability check for vnic counters
authorLama Kayal <lkayal@nvidia.com>
Sun, 11 Jun 2023 13:29:13 +0000 (16:29 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Mon, 7 Aug 2023 18:48:40 +0000 (11:48 -0700)
commit548ee049b19fb9a3d0a4335314d0d1217a521bc5
treeda2e6500c9fb86d39af30b0a83de314047ad8c5a
parentaab8e1a200b926147db51e3f82fd07bb9edf6a98
net/mlx5e: Add capability check for vnic counters

Add missing capability check for each of the vnic counters exposed by
devlink health reporter, and thus avoid unexpected behavior due to
invalid access to registers.

While at it, read only the exact number of bits for each counter whether
it was 32 bits or 64 bits.

Fixes: b0bc615df488 ("net/mlx5: Add vnic devlink health reporter to PFs/VFs")
Fixes: a33682e4e78e ("net/mlx5e: Expose catastrophic steering error counters")
Signed-off-by: Lama Kayal <lkayal@nvidia.com>
Reviewed-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Reviewed-by: Maher Sanalla <msanalla@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/diag/reporter_vnic.c