Skip to content

Commit

Permalink
nvme_rdma: Continue even if we receive a normal WC when qpair is disc…
Browse files Browse the repository at this point in the history
…onnected

We recently improved qpair disconnect process and added assert
if we get a completion without any error when a qpair is disconnected.

However unexpectedly we saw this case very often when we ran the test
test/nvmf/host/multipath.sh for the real hardware in the test pool.

So we remove the assert and change the ERRLOG to INFOLOG.

Fixes one of the issues in spdk#2300

Signed-off-by: Shuhei Matsumoto <[email protected]>
Change-Id: Iedbf7e0afa5025da6a810043ba95348ba5b856b3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10901
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <[email protected]>
Tested-by: SPDK CI Jenkins <[email protected]>
Reviewed-by: Changpeng Liu <[email protected]>
Reviewed-by: Ben Walker <[email protected]>
  • Loading branch information
shuhei-matsumoto authored and Changpeng Liu committed Dec 29, 2021
1 parent 44f69b6 commit b9518a5
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions lib/nvme/nvme_rdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -2193,13 +2193,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
nvme_rdma_cq_process_completions(struct ibv_cq *cq, uint32_t batch_size,
struct nvme_rdma_poll_group *group,
Expand Down Expand Up @@ -2290,15 +2283,11 @@ nvme_rdma_cq_process_completions(struct ibv_cq *cq, uint32_t batch_size,
struct ibv_device_attr dev_attr;
int query_status;

/* 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) */
/* We may receive a completion without error status when qpair is disconnected/destroyed. */
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);
}
SPDK_INFOLOG(nvme, "Received malformed completion: request 0x%"PRIx64" type %d\n",
wc->wr_id, rdma_wr->type);
} else {
SPDK_ERRLOG("Failed to query ib device\n");
assert(0);
Expand Down

0 comments on commit b9518a5

Please sign in to comment.