rdma: Don't log rdma_disconnect error for iWARP in verbs provider

rdma_disconnect may return an error and set errno to EINVAL in case
of iWARP. This behaviour is expected since iWARP handles disconnect
event other than IB and qpair is already in error state when we
call rdma_disconnect.

Fixes #1704

Change-Id: I38710198d9b6b70b8940947f8e7c553cd4fbbd51
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5314
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Alexey Marchuk 2020-11-27 16:29:36 +03:00 committed by Tomasz Zawadzki
parent 296a6d9838
commit 92e541b58b

View File

@ -116,6 +116,12 @@ spdk_rdma_qp_disconnect(struct spdk_rdma_qp *spdk_rdma_qp)
if (spdk_rdma_qp->cm_id) {
rc = rdma_disconnect(spdk_rdma_qp->cm_id);
if (rc) {
if (errno == EINVAL && spdk_rdma_qp->qp->context->device->transport_type == IBV_TRANSPORT_IWARP) {
/* rdma_disconnect may return an error and set errno to EINVAL in case of iWARP.
* This behaviour is expected since iWARP handles disconnect event other than IB and
* qpair is already in error state when we call rdma_disconnect */
return 0;
}
SPDK_ERRLOG("rdma_disconnect failed, errno %s (%d)\n", spdk_strerror(errno), errno);
}
}