linux/drivers/infiniband/hw
Jason Gunthorpe ef3642c4f5 RDMA/mlx5: Fix error unwinds for rereg_mr
This is all a giant train wreck of error handling, in many cases the MR is
left in some corrupted state where continuing on is going to lead to
chaos, or various unwinds/order is missed.

rereg had three possible completely different actions, depending on flags
and various details about the MR. Split the three actions into three
functions, and call the right action from the start.

For each action carefully design the error handling to fit the action:

- UMR access/PD update is a simple UMR, if it fails the MR isn't changed,
  so do nothing

- PAS update over UMR is multiple UMR operations. To keep everything sane
  revoke access to the MKey while it is being changed and restore it once
  the MR is correct.

- Recreating the mkey should completely build a parallel MR with a fully
  loaded PAS then swap and destroy the old one. If it fails the original
  should be left untouched. This is handled in the core code. Directly
  call the normal MR creation functions, possibly re-using the existing
  umem.

Add support for working with ODP MRs. The READ/WRITE access flags can be
changed by UMR and we can trivially convert to/from ODP MRs using the
logic to build a completely new MR.

This new logic also fixes various problems with MRs continuing to work
while their PAS lists are no longer valid, eg during a page size change.

Link: https://lore.kernel.org/r/20201130075839.278575-6-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
..
bnxt_re RDMA/bnxt_re: Fix entry size during SRQ create 2020-10-27 14:12:26 -03:00
cxgb4 RDMA/cxgb4: Validate the number of CQEs 2020-11-23 16:19:46 -04:00
efa RDMA/efa: Use dma_set_mask_and_coherent() to simplify code 2020-12-01 21:03:23 -04:00
hfi1 Linux 5.10-rc6 2020-12-01 20:40:50 -04:00
hns RDMA/uverbs: Allow drivers to create a new HW object during rereg_mr 2020-12-07 14:06:23 -04:00
i40iw RDMA/i40iw: Remove push code from i40iw 2020-12-01 20:50:01 -04:00
mlx4 RDMA/uverbs: Allow drivers to create a new HW object during rereg_mr 2020-12-07 14:06:23 -04:00
mlx5 RDMA/mlx5: Fix error unwinds for rereg_mr 2020-12-07 14:06:23 -04:00
mthca Linux 5.10-rc6 2020-12-01 20:40:50 -04:00
ocrdma RDMA: Convert sysfs device * show functions to use sysfs_emit() 2020-10-26 19:53:21 -03:00
qedr IB/qedr: Fix fall-through warnings for Clang 2020-11-23 15:54:11 -04:00
qib IB/qib: Use dma_set_mask_and_coherent to simplify code 2020-11-23 16:37:20 -04:00
usnic RDMA: Convert various random sprintf sysfs _show uses to sysfs_emit 2020-10-30 21:03:52 -03:00
vmw_pvrdma Merge branch 'for-rc' into rdma.git 2020-11-17 15:20:26 -04:00
Makefile RDMA/iw_cxgb3: Remove the iw_cxgb3 module from kernel 2019-10-04 15:08:59 -03:00