nvme/rdma: Don't allocate requests/responses until after connected.
No need to allocate all of the requests and responses until we know a connection can be established. Change-Id: I072a10aadfd7ced773634448f7d7e788622d0a4c Signed-off-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
ee80b31cb7
commit
3e5c1d0a2b
@ -672,6 +672,13 @@ nvme_rdma_qpair_connect(struct nvme_rdma_qpair *rqpair)
|
||||
SPDK_ERRLOG("nvme_rdma_qpair_init() failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
rc = nvme_rdma_connect(rqpair);
|
||||
if (rc != 0) {
|
||||
SPDK_ERRLOG("Unable to connect the rqpair\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
rc = nvme_rdma_alloc_reqs(rqpair);
|
||||
SPDK_TRACELOG(SPDK_TRACE_DEBUG, "rc =%d\n", rc);
|
||||
if (rc) {
|
||||
@ -688,12 +695,6 @@ nvme_rdma_qpair_connect(struct nvme_rdma_qpair *rqpair)
|
||||
}
|
||||
SPDK_TRACELOG(SPDK_TRACE_DEBUG, "RDMA responses allocated\n");
|
||||
|
||||
rc = nvme_rdma_connect(rqpair);
|
||||
if (rc != 0) {
|
||||
SPDK_ERRLOG("Unable to connect the rqpair\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user