nvme/rdma: send an rdma_disconnect during disconnect.
The rdma_disconnect call triggers an RDMA_CM_EVENT_DISCONNECTED message on the target side. The hope is that the target side will reply with the same message in a reasonable amount of time. If the target doesn't have that mechanism implemented, print an error message and continue with the process. Signed-off-by: Seth Howell <seth.howell@intel.com> Change-Id: I164a3538714fa3adfc306ea0c88220ea710e7c39 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1879 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
d76965f0fa
commit
c3eac3435a
@ -1657,6 +1657,14 @@ nvme_rdma_ctrlr_disconnect_qpair(struct spdk_nvme_ctrlr *ctrlr, struct spdk_nvme
|
||||
}
|
||||
|
||||
if (rqpair->cm_id) {
|
||||
rdma_disconnect(rqpair->cm_id);
|
||||
if (qpair->ctrlr != NULL) {
|
||||
|
||||
if (nvme_rdma_process_event(rqpair, rctrlr->cm_channel, RDMA_CM_EVENT_DISCONNECTED)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Target did not respond to qpair disconnect.\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (rqpair->cm_id->qp) {
|
||||
rdma_destroy_qp(rqpair->cm_id);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user