Commit cd258ce0 authored by Changpeng Liu's avatar Changpeng Liu Committed by Daniel Verkamp
Browse files

nvmf: ack the disconect event before call rdma_destroy_id



If we connected a subsystem twice from the initiator, the second
connection will be rejected by the NVMf target, however, the previous
connection will also be impacted because we destroy the connection id
before ack the disconnect event.

Change-Id: Ib597cc68a7823524460693053898f4d6e5499eb4
Signed-off-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent 080bdfb1
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -724,6 +724,8 @@ nvmf_rdma_disconnect(struct rdma_cm_event *evt)
		SPDK_ERRLOG("disconnect request: no active connection\n");
		return -1;
	}
	/* ack the disconnect event before rdma_destroy_id */
	rdma_ack_cm_event(evt);

	rdma_conn = get_rdma_conn(conn);

@@ -908,7 +910,7 @@ nvmf_rdma_accept(struct rte_timer *timer, void *arg)
					SPDK_ERRLOG("Unable to process disconnect event. rc: %d\n", rc);
					break;
				}
				break;
				continue;
			default:
				SPDK_ERRLOG("Unexpected Acceptor Event [%d]\n", event->event);
				break;