Restore failure of destroy commands
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest10 patches 22 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | RDMA: Restore ability to fail on PD deallocatedrivers/ drivers/ drivers/ +26 more | +56 | 20 replies | |
| 2/10 | RDMA: Restore ability to fail on AH destroydrivers/ drivers/ drivers/ +19 more | +46 | 2 replies | |
| 3/10 | RDMA/mlx5: Issue FW command to destroy SRQ on reentrydrivers/ | +12 | 0 replies | |
| 4/10 | RDMA/mlx5: Fix potential race between destroy and CQE polldrivers/ | +3 | 0 replies | |
| 5/10 | RDMA: Restore ability to fail on SRQ destroydrivers/ drivers/ drivers/ +24 more | +62 | 0 replies | |
| 6/10 | RDMA/core: Delete function indirection for alloc/free kernel CQdrivers/ include/ | +20 | 0 replies | |
| 7/10 | RDMA: Allow fail of destroy CQdrivers/ drivers/ drivers/ +28 more | +70 | 0 replies | |
| 8/10 | RDMA: Change XRCD destroy return valuedrivers/ drivers/ drivers/ +2 more | +12 | 0 replies | |
| 9/10 | RDMA: Restore ability to return error for destroy WQdrivers/ drivers/ drivers/ +6 more | +27 | 0 replies | |
| 10/10 | RDMA: Make counters destroy symmetricaldrivers/ drivers/ include/ | +6 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH rdma-next 00/10] Restore failure of destroy commands
From: Leon Romanovsky <[email protected]>
Hi,
This series restores the ability to fail on destroy commands, due to the fact that mlx5_ib DEVX implementation interleaved ib_core objects with FW objects without sharing reference counters.
In a retrospective, every part of the mlx5_ib flow is correct.
It started from IBTA which was written by HW engineers with HW in mind and they allowed to fail in destruction. FW implemented it with symmetrical interface like any other command and propagated error back to the kernel, which forwarded it to the libibverbs and kernel ULPs.
Libibverbs was designed with IBTA spec in hand putting destroy errors in stone. Up till mlx5_ib DEVX, it worked well, because the IB verbs objects are counted by the kernel and ib_core ensures that FW destroy will success by managing various reference counters on such objects.
The extension of the mlx5 driver changed this flow when allowed DEVX objects that are not managed by ib_core to be interleaved with the ones under ib_core responsibility.
The drivers that want to implement DEVX flows, must ensure that FW/HW destroys are performed as early as possible before any other internal cleanup. After HW destroys, drivers are not allowed to fail.
This series includes two patches (WQ and "potential race") that will require extra work in mlx5_ib, they both theoretical. WQ is not in use in DEVX, but is needed to make interface symmetrical to other objects. "Potential race" is in ULP flow that ensures that SRQ is destoyed in proper order.
Thanks
Leon Romanovsky (10):
RDMA: Restore ability to fail on PD deallocate
RDMA: Restore ability to fail on AH destroy RDMA/mlx5: Issue FW command to destroy SRQ on reentry RDMA/mlx5: Fix potential race between destroy and CQE poll
RDMA: Restore ability to fail on SRQ destroy RDMA/core: Delete function indirection for alloc/free kernel CQ
RDMA: Allow fail of destroy CQ
RDMA: Change XRCD destroy return value
RDMA: Restore ability to return error for destroy WQ
RDMA: Make counters destroy symmetrical
drivers/infiniband/core/cq.c | 36 +++--- drivers/infiniband/core/uverbs_std_types.c | 3 +- .../core/uverbs_std_types_counters.c | 4 +- drivers/infiniband/core/uverbs_std_types_wq.c | 2 +- drivers/infiniband/core/verbs.c | 56 +++++++--- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 12 +- drivers/infiniband/hw/bnxt_re/ib_verbs.h | 8 +- drivers/infiniband/hw/cxgb4/cq.c | 3 +- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 4 +- drivers/infiniband/hw/cxgb4/provider.c | 3 +- drivers/infiniband/hw/cxgb4/qp.c | 3 +- drivers/infiniband/hw/efa/efa.h | 6 +- drivers/infiniband/hw/efa/efa_verbs.c | 11 +- drivers/infiniband/hw/hns/hns_roce_ah.c | 5 - drivers/infiniband/hw/hns/hns_roce_cq.c | 3 +- drivers/infiniband/hw/hns/hns_roce_device.h | 13 ++- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 3 +- drivers/infiniband/hw/hns/hns_roce_pd.c | 3 +- drivers/infiniband/hw/hns/hns_roce_srq.c | 3 +- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 6 +- drivers/infiniband/hw/mlx4/ah.c | 5 - drivers/infiniband/hw/mlx4/cq.c | 3 +- drivers/infiniband/hw/mlx4/main.c | 6 +- drivers/infiniband/hw/mlx4/mlx4_ib.h | 11 +- drivers/infiniband/hw/mlx4/qp.c | 3 +- drivers/infiniband/hw/mlx4/srq.c | 3 +- drivers/infiniband/hw/mlx5/ah.c | 5 - drivers/infiniband/hw/mlx5/cmd.c | 4 +- drivers/infiniband/hw/mlx5/cmd.h | 2 +- drivers/infiniband/hw/mlx5/counters.c | 3 +- drivers/infiniband/hw/mlx5/cq.c | 21 ++-- drivers/infiniband/hw/mlx5/main.c | 4 +- drivers/infiniband/hw/mlx5/mlx5_ib.h | 13 ++- drivers/infiniband/hw/mlx5/qp.c | 12 +- drivers/infiniband/hw/mlx5/qp.h | 4 +- drivers/infiniband/hw/mlx5/qpc.c | 5 +- drivers/infiniband/hw/mlx5/srq.c | 26 ++--- drivers/infiniband/hw/mlx5/srq.h | 2 +- drivers/infiniband/hw/mlx5/srq_cmd.c | 22 +++- drivers/infiniband/hw/mthca/mthca_provider.c | 12 +- drivers/infiniband/hw/ocrdma/ocrdma_ah.c | 3 +- drivers/infiniband/hw/ocrdma/ocrdma_ah.h | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 11 +- drivers/infiniband/hw/ocrdma/ocrdma_verbs.h | 6 +- drivers/infiniband/hw/qedr/verbs.c | 14 ++- drivers/infiniband/hw/qedr/verbs.h | 8 +- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 7 +- drivers/infiniband/hw/usnic/usnic_ib_verbs.h | 4 +- drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c | 3 +- drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c | 3 +- .../infiniband/hw/vmw_pvrdma/pvrdma_verbs.c | 8 +- .../infiniband/hw/vmw_pvrdma/pvrdma_verbs.h | 8 +- drivers/infiniband/sw/rdmavt/ah.c | 3 +- drivers/infiniband/sw/rdmavt/ah.h | 2 +- drivers/infiniband/sw/rdmavt/cq.c | 3 +- drivers/infiniband/sw/rdmavt/cq.h | 2 +- drivers/infiniband/sw/rdmavt/pd.c | 3 +- drivers/infiniband/sw/rdmavt/pd.h | 2 +- drivers/infiniband/sw/rdmavt/srq.c | 3 +- drivers/infiniband/sw/rdmavt/srq.h | 2 +- drivers/infiniband/sw/rxe/rxe_verbs.c | 12 +- drivers/infiniband/sw/siw/siw_verbs.c | 9 +- drivers/infiniband/sw/siw/siw_verbs.h | 6 +- drivers/infiniband/ulp/ipoib/ipoib_cm.c | 6 +- include/rdma/ib_verbs.h | 105 +++++------------- 65 files changed, 313 insertions(+), 275 deletions(-)
--
2.26.2