nvme: remaning changes related to nvme hooks
Change-Id: I07f3f403bef26a7c3e41b3c9f74e7ba4e378b2cc Signed-off-by: zkhatami88 <z.khatami88@gmail.com> Reviewed-on: https://review.gerrithub.io/c/443650 Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
b6b0a0ba59
commit
655d54f3f1
@ -922,6 +922,8 @@ nvme_rdma_build_contig_inline_request(struct nvme_rdma_qpair *rqpair,
|
||||
assert(nvme_payload_type(&req->payload) == NVME_PAYLOAD_TYPE_CONTIG);
|
||||
|
||||
requested_size = req->payload_size;
|
||||
|
||||
if (!g_nvme_hooks.get_rkey) {
|
||||
mr = (struct ibv_mr *)spdk_mem_map_translate(rqpair->mr_map->map,
|
||||
(uint64_t)payload, &requested_size);
|
||||
|
||||
@ -931,6 +933,13 @@ nvme_rdma_build_contig_inline_request(struct nvme_rdma_qpair *rqpair,
|
||||
}
|
||||
return -EINVAL;
|
||||
}
|
||||
rdma_req->send_sgl[1].lkey = mr->lkey;
|
||||
} else {
|
||||
rdma_req->send_sgl[1].lkey = spdk_mem_map_translate(rqpair->mr_map->map,
|
||||
(uint64_t)payload,
|
||||
&requested_size);
|
||||
|
||||
}
|
||||
|
||||
/* The first element of this SGL is pointing at an
|
||||
* spdk_nvmf_cmd object. For this particular command,
|
||||
@ -940,7 +949,6 @@ nvme_rdma_build_contig_inline_request(struct nvme_rdma_qpair *rqpair,
|
||||
|
||||
rdma_req->send_sgl[1].addr = (uint64_t)payload;
|
||||
rdma_req->send_sgl[1].length = (uint32_t)req->payload_size;
|
||||
rdma_req->send_sgl[1].lkey = mr->lkey;
|
||||
|
||||
/* The RDMA SGL contains two elements. The first describes
|
||||
* the NVMe command and the second describes the data
|
||||
|
Loading…
Reference in New Issue
Block a user