RDMA/mlx5: Change check for cacheable mkeys
authorOr Har-Toov <ohartoov@nvidia.com>
Wed, 3 Apr 2024 10:36:00 +0000 (13:36 +0300)
committerLeon Romanovsky <leon@kernel.org>
Mon, 8 Apr 2024 10:34:51 +0000 (13:34 +0300)
commit8c1185fef68cc603b954fece2a434c9f851d6a86
tree0c0689156190ab0f8e0d20e5154c1d27edc9a4e3
parent0611a8e8b475fc5230b9a24d29c8397aaab20b63
RDMA/mlx5: Change check for cacheable mkeys

umem can be NULL for user application mkeys in some cases. Therefore
umem can't be used for checking if the mkey is cacheable and it is
changed for checking a flag that indicates it. Also make sure that
all mkeys which are not returned to the cache will be destroyed.

Fixes: dd1b913fb0d0 ("RDMA/mlx5: Cache all user cacheable mkeys on dereg MR flow")
Signed-off-by: Or Har-Toov <ohartoov@nvidia.com>
Link: https://lore.kernel.org/r/2690bc5c6896bcb937f89af16a1ff0343a7ab3d0.1712140377.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/mlx5/mlx5_ib.h
drivers/infiniband/hw/mlx5/mr.c