nvme_rdma: Inline post_recv()
Inline nvme_rdma_post_recv() into the callers. We do not have any similar helper function for posting send WR. This will make the following patches simpler and will be reasonable. Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: Ia95a4b350942d20bdb65e84f7575c2dcf67c149b Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14421 Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot
This commit is contained in:
parent
ecd9234d4d
commit
6275f8445f
@ -843,14 +843,6 @@ nvme_rdma_qpair_queue_recv_wr(struct nvme_rdma_qpair *rqpair, struct ibv_recv_wr
|
|||||||
(void *)(sg_list)->addr, (sg_list)->length, (sg_list)->lkey); \
|
(void *)(sg_list)->addr, (sg_list)->length, (sg_list)->lkey); \
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
|
||||||
nvme_rdma_post_recv(struct nvme_rdma_qpair *rqpair, struct ibv_recv_wr *wr)
|
|
||||||
{
|
|
||||||
wr->next = NULL;
|
|
||||||
nvme_rdma_trace_ibv_sge(wr->sg_list);
|
|
||||||
nvme_rdma_qpair_queue_recv_wr(rqpair, wr);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nvme_rdma_free_rsps(struct nvme_rdma_qpair *rqpair)
|
nvme_rdma_free_rsps(struct nvme_rdma_qpair *rqpair)
|
||||||
{
|
{
|
||||||
@ -923,7 +915,8 @@ nvme_rdma_register_rsps(struct nvme_rdma_qpair *rqpair)
|
|||||||
recv_wr->sg_list = rsp_sgl;
|
recv_wr->sg_list = rsp_sgl;
|
||||||
recv_wr->num_sge = 1;
|
recv_wr->num_sge = 1;
|
||||||
|
|
||||||
nvme_rdma_post_recv(rqpair, recv_wr);
|
nvme_rdma_trace_ibv_sge(recv_wr->sg_list);
|
||||||
|
nvme_rdma_qpair_queue_recv_wr(rqpair, recv_wr);
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = nvme_rdma_qpair_submit_recvs(rqpair);
|
rc = nvme_rdma_qpair_submit_recvs(rqpair);
|
||||||
@ -2365,9 +2358,13 @@ static inline void
|
|||||||
nvme_rdma_request_ready(struct nvme_rdma_qpair *rqpair, struct spdk_nvme_rdma_req *rdma_req)
|
nvme_rdma_request_ready(struct nvme_rdma_qpair *rqpair, struct spdk_nvme_rdma_req *rdma_req)
|
||||||
{
|
{
|
||||||
struct spdk_nvme_rdma_rsp *rdma_rsp = rdma_req->rdma_rsp;
|
struct spdk_nvme_rdma_rsp *rdma_rsp = rdma_req->rdma_rsp;
|
||||||
|
struct ibv_recv_wr *recv_wr = rdma_rsp->recv_wr;
|
||||||
|
|
||||||
nvme_rdma_req_complete(rdma_req, &rdma_rsp->cpl, true);
|
nvme_rdma_req_complete(rdma_req, &rdma_rsp->cpl, true);
|
||||||
nvme_rdma_post_recv(rqpair, rdma_rsp->recv_wr);
|
|
||||||
|
recv_wr->next = NULL;
|
||||||
|
nvme_rdma_trace_ibv_sge(recv_wr->sg_list);
|
||||||
|
nvme_rdma_qpair_queue_recv_wr(rqpair, recv_wr);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MAX_COMPLETIONS_PER_POLL 128
|
#define MAX_COMPLETIONS_PER_POLL 128
|
||||||
|
Loading…
Reference in New Issue
Block a user