RDMA/mlx5: Merge similar flows of allocating MR from the cache
authorAharon Landau <aharonl@nvidia.com>
Tue, 15 Feb 2022 17:55:31 +0000 (19:55 +0200)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 23 Feb 2022 18:59:13 +0000 (14:59 -0400)
commit56561ac6b27d489feb5d1e7e8b2a55a15063fcad
tree2339c32605555f558de47c0b3d6ed794f96272aa
parent2f0e60d5e9f96341a0c8a01be8878cdb3b29ff20
RDMA/mlx5: Merge similar flows of allocating MR from the cache

When allocating a MR from the cache, the driver calls to get_cache_mr(),
and in case of failure, retries with create_cache_mr(). This is the flow
of mlx5_mr_cache_alloc(), so use it instead.

Link: https://lore.kernel.org/r/53c85fcd4de6ec9de0b8e6cbb1bf5d5fe19900c3.1644947594.git.leonro@nvidia.com
Signed-off-by: Aharon Landau <aharonl@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/mlx5/mlx5_ib.h
drivers/infiniband/hw/mlx5/mr.c
drivers/infiniband/hw/mlx5/odp.c