nvmf: Post recv_desc immediately when they are allocated.
This avoids two loops back to back. Change-Id: I42cb774defedf484869b0322eac84125b6b62330 Signed-off-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
9620917a86
commit
aceb76d2b5
@ -450,6 +450,11 @@ alloc_rdma_reqs(struct spdk_nvmf_conn *conn)
|
||||
rdma_req, &rdma_req->req,
|
||||
rdma_req->req.rsp);
|
||||
|
||||
if (nvmf_post_rdma_recv(conn, rdma_req)) {
|
||||
SPDK_ERRLOG("Unable to post connection rx desc\n");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
STAILQ_INSERT_TAIL(&conn->rdma.rdma_reqs, rdma_req, link);
|
||||
}
|
||||
|
||||
@ -476,7 +481,6 @@ nvmf_rdma_connect(struct rdma_cm_event *event)
|
||||
struct spdk_nvmf_fabric_intf *fabric_intf;
|
||||
struct rdma_cm_id *conn_id;
|
||||
struct spdk_nvmf_conn *conn;
|
||||
struct spdk_nvmf_rdma_request *rdma_req;
|
||||
struct ibv_device_attr ibdev_attr;
|
||||
struct sockaddr_in *addr;
|
||||
struct rdma_conn_param *host_event_data = NULL;
|
||||
@ -582,15 +586,6 @@ nvmf_rdma_connect(struct rdma_cm_event *event)
|
||||
}
|
||||
SPDK_TRACELOG(SPDK_TRACE_DEBUG, "RDMA requests allocated\n");
|
||||
|
||||
/* Post all the RX descriptors */
|
||||
STAILQ_FOREACH(rdma_req, &conn->rdma.rdma_reqs, link) {
|
||||
if (nvmf_post_rdma_recv(conn, rdma_req)) {
|
||||
SPDK_ERRLOG("Unable to post connection rx desc\n");
|
||||
goto err1;
|
||||
}
|
||||
}
|
||||
SPDK_TRACELOG(SPDK_TRACE_DEBUG, "RX buffers posted\n");
|
||||
|
||||
rc = spdk_nvmf_startup_conn(conn);
|
||||
if (rc) {
|
||||
SPDK_ERRLOG("Error on startup connection\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user