nvmf/rdma: Ignore LAST_WQE_REACHED for iWARP

iWARP doesn't support this ibv async event.
Probably some clean up of SRQ needs to be done, e.g.
post dummy drain WR to SRQ and wait for its completion
when qpair is being destroyed.

Change-Id: Ic1035dbd8192e665eedbaf89e5cf4e00cb0506c6
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5474
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Alexey Marchuk 2020-12-08 12:47:14 +03:00 committed by Tomasz Zawadzki
parent a56d97b3fc
commit 4ede905352

View File

@ -2833,6 +2833,14 @@ nvmf_rdma_qpair_process_pending(struct spdk_nvmf_rdma_transport *rtransport,
}
}
static inline bool
nvmf_rdma_can_ignore_last_wqe_reached(struct spdk_nvmf_rdma_device *device)
{
/* iWARP transport and SoftRoCE driver don't support LAST_WQE_REACHED ibv async event */
return nvmf_rdma_is_rxe_device(device) ||
device->context->device->transport_type == IBV_TRANSPORT_IWARP;
}
static void
nvmf_rdma_destroy_drained_qpair(struct spdk_nvmf_rdma_qpair *rqpair)
{
@ -2855,11 +2863,8 @@ nvmf_rdma_destroy_drained_qpair(struct spdk_nvmf_rdma_qpair *rqpair)
return;
}
/* Judge whether the device is emulated by Software RoCE.
* And it will not send last_wqe event
*/
if (rqpair->srq != NULL && rqpair->last_wqe_reached == false &&
!nvmf_rdma_is_rxe_device(rqpair->device)) {
!nvmf_rdma_can_ignore_last_wqe_reached(rqpair->device)) {
return;
}