]> git.ipfire.org Git - thirdparty/linux.git/commit
net/mlx5e: Ensure each counter group uses its PCAM bit
authorYael Chemla <ychemla@nvidia.com>
Sun, 16 Mar 2025 08:14:33 +0000 (10:14 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Fri, 21 Mar 2025 20:23:47 +0000 (21:23 +0100)
commit8e6f6e92d3fe7032371417d2036b1c6897d2c2e5
tree67f9b3ac727063db76e5eba6682bd8b193bdfd84
parente2f4ac7bab2205d3c4dd9464e6ffd82502177c51
net/mlx5e: Ensure each counter group uses its PCAM bit

The code was incorrectly relying on PCAM bit of ppcnt_statistical_group
for accessing per_lane_error_counters.
If ppcnt_statistical_group PCAM bit was not set, we would not read
per_lane_error_counters, even when its PCAM bit is set.
Given the existing device capabilities, it seems to cause no harm, so
this change primarily serves as cleanup.

Signed-off-by: Yael Chemla <ychemla@nvidia.com>
Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Link: https://patch.msgid.link/1742112876-2890-2-git-send-email-tariqt@nvidia.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c