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: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
Changpeng Liu 2016-07-19 16:20:39 +08:00 committed by Daniel Verkamp
parent 080bdfb1da
commit cd258ce089

View File

@ -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;