Revert "nvme_rdma: Continue even if we receive a normal WC when qpair is disconnected"
This reverts commit b9518a5540
.
Reason for revert: Fix a degradation for adminq
Change-Id: I0e2c5e48a5ca34171fa98fa68216da4354b5d262
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11227
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
8f4c7cc33a
commit
248fabb4a2
@ -2191,6 +2191,13 @@ 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
|
||||
nvme_rdma_cq_process_completions(struct ibv_cq *cq, uint32_t batch_size,
|
||||
struct nvme_rdma_poll_group *group,
|
||||
@ -2281,11 +2288,15 @@ nvme_rdma_cq_process_completions(struct ibv_cq *cq, uint32_t batch_size,
|
||||
struct ibv_device_attr dev_attr;
|
||||
int query_status;
|
||||
|
||||
/* We may receive a completion without error status when qpair is disconnected/destroyed. */
|
||||
/* 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) {
|
||||
SPDK_INFOLOG(nvme, "Received malformed completion: request 0x%"PRIx64" type %d\n",
|
||||
wc->wr_id, rdma_wr->type);
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user