nvme_rdma: Remove workaround for Soft RoCE's bug from cq_process_completions()
We do not support Soft RoCE anymore. Remove a workaround for Soft RoCE's bug that we amy receive a completion without error status after qpair is disconnected/destroyed. Then add a assert to check if rdma_req->req is not NULL. This will simplify the code and the following patches. Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: I80c349053adc0f79679eaf8a5d7265d555d3c2b0 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14909 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
1439f9c773
commit
ab839831f1
@ -2435,13 +2435,6 @@ nvme_rdma_log_wc_status(struct nvme_rdma_qpair *rqpair, struct ibv_wc *wc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool
|
|
||||||
nvme_rdma_is_rxe_device(struct ibv_device_attr *dev_attr)
|
|
||||||
{
|
|
||||||
return dev_attr->vendor_id == SPDK_RDMA_RXE_VENDOR_ID_OLD ||
|
|
||||||
dev_attr->vendor_id == SPDK_RDMA_RXE_VENDOR_ID_NEW;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
nvme_rdma_cq_process_completions(struct ibv_cq *cq, uint32_t batch_size,
|
nvme_rdma_cq_process_completions(struct ibv_cq *cq, uint32_t batch_size,
|
||||||
struct nvme_rdma_poller *poller,
|
struct nvme_rdma_poller *poller,
|
||||||
@ -2531,25 +2524,10 @@ nvme_rdma_cq_process_completions(struct ibv_cq *cq, uint32_t batch_size,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (spdk_unlikely(rdma_req->req == NULL)) {
|
/* We do not support Soft Roce anymore. Other than Soft Roce's bug, we should not
|
||||||
struct ibv_device_attr dev_attr;
|
* receive a completion without error status after qpair is disconnected/destroyed.
|
||||||
int query_status;
|
*/
|
||||||
|
assert(rdma_req->req != NULL);
|
||||||
/* Bug in Soft Roce - we may receive a completion without error status when qpair is disconnected/destroyed.
|
|
||||||
* As sanity check - log an error if we use a real HW (it should never happen) */
|
|
||||||
query_status = ibv_query_device(cq->context, &dev_attr);
|
|
||||||
if (query_status == 0) {
|
|
||||||
if (!nvme_rdma_is_rxe_device(&dev_attr)) {
|
|
||||||
SPDK_ERRLOG("Received malformed completion: request 0x%"PRIx64" type %d\n", wc->wr_id,
|
|
||||||
rdma_wr->type);
|
|
||||||
assert(0);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
SPDK_ERRLOG("Failed to query ib device\n");
|
|
||||||
assert(0);
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
rqpair = nvme_rdma_qpair(rdma_req->req->qpair);
|
rqpair = nvme_rdma_qpair(rdma_req->req->qpair);
|
||||||
rdma_req->completion_flags |= NVME_RDMA_SEND_COMPLETED;
|
rdma_req->completion_flags |= NVME_RDMA_SEND_COMPLETED;
|
||||||
|
Loading…
Reference in New Issue
Block a user