Commit 48dee973 authored by Alexey Marchuk's avatar Alexey Marchuk Committed by Tomasz Zawadzki
Browse files

nvmf/rdma: Do not log an error for recv WC with error status



When we don't use SRQ and close a qpair, we will receive completions
with error status for all posted ibv_recv_wrs. This is expected and
we don't want to log an error, use debug severity in this case.

Fixes #1387

Change-Id: Ia8efb8f24628880454fab1d7f6188e7b31cffb67
Signed-off-by: default avatarAlexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2451


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent e230d49a
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -3854,8 +3854,16 @@ nvmf_rdma_poller_poll(struct spdk_nvmf_rdma_transport *rtransport,

		/* Handle error conditions */
		if (wc[i].status) {
			if ((rdma_wr->type == RDMA_WR_TYPE_RECV && !rpoller->srq)) {
				/* When we don't use SRQ and close a qpair, we will receive completions with error
				 * status for all posted ibv_recv_wrs. This is expected and we don't want to log
				 * an error in that case. */
				SPDK_DEBUGLOG(SPDK_LOG_RDMA, "Error on CQ %p, request 0x%lu, type %d, status: (%d): %s\n",
					      rpoller->cq, wc[i].wr_id, rdma_wr->type, wc[i].status, ibv_wc_status_str(wc[i].status));
			} else {
				SPDK_ERRLOG("Error on CQ %p, request 0x%lu, type %d, status: (%d): %s\n",
					    rpoller->cq, wc[i].wr_id, rdma_wr->type, wc[i].status, ibv_wc_status_str(wc[i].status));
			}

			error = true;