nvme_rdma: Move submit_recvs() from register_rsps() to connect_established()
Response objects will be in poll group when SRQ is enabled. But we want to share the code to allocate and register response objects between SRQ is enabled or disabled. To do it cleanly, move nvme_rdma_qpair_submit_recvs() from nvme_rdma_register_rsps() to nvme_rdma_connect_established(). A few clean up of error handling are done in this patch. Unregistration will be done when qpair is disconnected. Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Signed-off-by: Denis Nagorny <denisn@nvidia.com> Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com> Change-Id: I38dc5a6cb84a6bf56c01d5fb7f2cf3d3b63918e0 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14168 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
This commit is contained in:
parent
cd640f6275
commit
6602291766
@ -897,11 +897,6 @@ nvme_rdma_register_rsps(struct nvme_rdma_qpair *rqpair)
|
||||
|
||||
rqpair->current_num_recvs = rqpair->num_entries;
|
||||
|
||||
rc = nvme_rdma_qpair_submit_recvs(rqpair);
|
||||
if (rc) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1109,6 +1104,14 @@ nvme_rdma_connect_established(struct nvme_rdma_qpair *rqpair, int ret)
|
||||
}
|
||||
SPDK_DEBUGLOG(nvme, "RDMA responses registered\n");
|
||||
|
||||
ret = nvme_rdma_qpair_submit_recvs(rqpair);
|
||||
SPDK_DEBUGLOG(nvme, "rc =%d\n", ret);
|
||||
if (ret) {
|
||||
SPDK_ERRLOG("Unable to submit rqpair RDMA responses\n");
|
||||
return -1;
|
||||
}
|
||||
SPDK_DEBUGLOG(nvme, "RDMA responses submitted\n");
|
||||
|
||||
rqpair->state = NVME_RDMA_QPAIR_STATE_FABRIC_CONNECT_SEND;
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user