nvmf: extract keyed SGL fields in rdma.c
Drop the RDMA-specific fields from spdk_nvmf_request and get them directly from the command SGL in the transport-specific read function. Change-Id: Icd06a9018a8c341213fbc8d26d3d7cbf2fb32d30 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
8b419899b4
commit
226b4b7a93
@ -237,8 +237,12 @@ nvmf_ibv_send_wr_init(struct ibv_send_wr *wr,
|
||||
wr->num_sge = 1;
|
||||
|
||||
if (req != NULL) {
|
||||
wr->wr.rdma.rkey = req->rkey;
|
||||
wr->wr.rdma.remote_addr = req->remote_addr;
|
||||
struct spdk_nvme_sgl_descriptor *sgl = &req->cmd->nvme_cmd.dptr.sgl1;
|
||||
|
||||
RTE_VERIFY(sgl->generic.type == SPDK_NVME_SGL_TYPE_KEYED_DATA_BLOCK);
|
||||
|
||||
wr->wr.rdma.rkey = sgl->keyed.key;
|
||||
wr->wr.rdma.remote_addr = sgl->address;
|
||||
|
||||
SPDK_TRACELOG(SPDK_TRACE_RDMA, "rkey %x\n", wr->wr.rdma.rkey);
|
||||
SPDK_TRACELOG(SPDK_TRACE_RDMA, "remote addr %p\n",
|
||||
|
@ -558,8 +558,6 @@ spdk_nvmf_request_prep_data(struct spdk_nvmf_request *req,
|
||||
}
|
||||
|
||||
req->data = bb;
|
||||
req->remote_addr = sgl->address;
|
||||
req->rkey = sgl->keyed.key;
|
||||
req->length = sgl->keyed.length;
|
||||
} else if (sgl->generic.type == SPDK_NVME_SGL_TYPE_DATA_BLOCK &&
|
||||
sgl->unkeyed.subtype == SPDK_NVME_SGL_SUBTYPE_OFFSET) {
|
||||
|
@ -59,8 +59,6 @@ SPDK_STATIC_ASSERT(sizeof(union nvmf_c2h_msg) == 16, "Incorrect size");
|
||||
|
||||
struct spdk_nvmf_request {
|
||||
struct spdk_nvmf_conn *conn;
|
||||
uint64_t remote_addr;
|
||||
uint32_t rkey;
|
||||
uint32_t length;
|
||||
enum spdk_nvme_data_transfer xfer;
|
||||
void *data;
|
||||
|
Loading…
Reference in New Issue
Block a user