]> git.hungrycats.org Git - linux/commit
RDMA/mlx5: Change check for cacheable mkeys
authorOr Har-Toov <ohartoov@nvidia.com>
Wed, 3 Apr 2024 10:36:00 +0000 (13:36 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 May 2024 07:49:42 +0000 (09:49 +0200)
commit8032963e7c4ee70be246d95fbbd7b21339d82db3
tree8b95acc164548e4843223fd13393edf1beddebf3
parent112773a487408ed5e6c525a8aab873f7da04353c
RDMA/mlx5: Change check for cacheable mkeys

[ Upstream commit 8c1185fef68cc603b954fece2a434c9f851d6a86 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/mlx5/mlx5_ib.h
drivers/infiniband/hw/mlx5/mr.c