linux/drivers/infiniband/hw/mlx4
Jason Gunthorpe 6e0954b11c RDMA/uverbs: Allow drivers to create a new HW object during rereg_mr
mlx5 has an ugly flow where it tries to allocate a new MR and replace the
existing MR in the same memory during rereg. This is very complicated and
buggy. Instead of trying to replace in-place inside the driver, provide
support from uverbs to change the entire HW object assigned to a handle
during rereg_mr.

Since destroying a MR is allowed to fail (ie if a MW is pointing at it)
and can't be detected in advance, the algorithm creates a completely new
uobject to hold the new MR and swaps the IDR entries of the two objects.

The old MR in the temporary IDR entry is destroyed, and if it fails
rereg_mr succeeds and destruction is deferred to FD release. This
complexity is why this cannot live in a driver safely.

Link: https://lore.kernel.org/r/20201130075839.278575-4-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2020-12-07 14:06:23 -04:00
..
ah.c RDMA: Restore ability to fail on AH destroy 2020-09-09 13:57:22 -03:00
alias_GUID.c timekeeping: Use proper clock specifier names in functions 2019-06-22 12:11:27 +02:00
cm.c IB/mlx4: Convert rej_tmout radix-tree to XArray 2020-10-09 12:34:49 -03:00
cq.c RDMA/mlx4: Use ib_umem_num_dma_blocks() 2020-09-11 10:24:54 -03:00
doorbell.c IB: Allow calls to ib_umem_get from kernel ULPs 2020-01-16 16:14:28 +02:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
mad.c IB/mlx4: Fix fall-through warnings for Clang 2020-11-23 15:54:10 -04:00
main.c RDMA: Manual changes for sysfs_emit and neatening 2020-10-30 21:03:52 -03:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mcg.c RDMA: Manual changes for sysfs_emit and neatening 2020-10-30 21:03:52 -03:00
mlx4_ib.h RDMA/uverbs: Allow drivers to create a new HW object during rereg_mr 2020-12-07 14:06:23 -04:00
mr.c RDMA/uverbs: Allow drivers to create a new HW object during rereg_mr 2020-12-07 14:06:23 -04:00
qp.c RDMA/core: Allow drivers to disable restrack DB 2020-11-27 11:38:46 -04:00
srq.c RDMA: Check srq_type during create_srq 2020-10-26 19:27:58 -03:00
sysfs.c RDMA: Convert various random sprintf sysfs _show uses to sysfs_emit 2020-10-30 21:03:52 -03:00