RDMA/mlx5: Consolidate MR destruction to mlx5_ib_dereg_mr()
Now that the SRCU stuff has been removed the entire MR destroy logic can be made a lot simpler. Currently there are many different ways to destroy a MR and it makes it really hard to do this task correctly. Route all destruction through mlx5_ib_dereg_mr() and make it work for all situations. Since it turns out all the different MR types do basically the same thing this removes a lot of knowledge of MR internals from ODP and leaves ODP just exporting an operation to clean up children. This fixes a few weird corner cases bugs and firmly uses the correct ordering of the MR destruction: - Stop parallel access to the mkey via the ODP xarray - Stop DMA - Release the umem - Clean up ODP children - Free/Recycle the MR Link: https://lore.kernel.org/r/20210304120745.1090751-4-leon@kernel.org Signed-off-by:Leon Romanovsky <leonro@nvidia.com> Signed-off-by:
Jason Gunthorpe <jgg@nvidia.com>
Showing
- drivers/infiniband/core/umem_dmabuf.c 4 additions, 0 deletionsdrivers/infiniband/core/umem_dmabuf.c
- drivers/infiniband/hw/mlx5/mlx5_ib.h 1 addition, 4 deletionsdrivers/infiniband/hw/mlx5/mlx5_ib.h
- drivers/infiniband/hw/mlx5/mr.c 62 additions, 71 deletionsdrivers/infiniband/hw/mlx5/mr.c
- drivers/infiniband/hw/mlx5/odp.c 23 additions, 128 deletionsdrivers/infiniband/hw/mlx5/odp.c
Loading
Please register or sign in to comment