]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/mlx5: Fix calculation of total invalidated pages
authorChiara Meiohas <cmeiohas@nvidia.com>
Thu, 13 Mar 2025 14:29:54 +0000 (16:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:39:19 +0000 (14:39 +0200)
commit257f0bdd5a4be80f192e6febdb9072d4e9859977
tree4cf8d3afef650ed0a4c8413fe66846c5bf8c610f
parentdf45ae2a4f1cdfda00c032839e12092e1f32c05e
RDMA/mlx5: Fix calculation of total invalidated pages

[ Upstream commit 79195147644653ebffadece31a42181e4c48c07d ]

When invalidating an address range in mlx5, there is an optimization to
do UMR operations in chunks.
Previously, the invalidation counter was incorrectly updated for the
same indexes within a chunk. Now, the invalidation counter is updated
only when a chunk is complete and mlx5r_umr_update_xlt() is called.
This ensures that the counter accurately represents the number of pages
invalidated using UMR.

Fixes: a3de94e3d61e ("IB/mlx5: Introduce ODP diagnostic counters")
Signed-off-by: Chiara Meiohas <cmeiohas@nvidia.com>
Reviewed-by: Michael Guralnik <michaelgur@nvidia.com>
Link: https://patch.msgid.link/560deb2433318e5947282b070c915f3c81fef77f.1741875692.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/mlx5/odp.c