nvme/rdma: fix the nvme_rdma_pre_copy_mem

Before adding readv/writev support in nvme_rdma,
using this patch.

Change-Id: I25ff0df61d0346f22560d011158d7f80e72007ea
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
This commit is contained in:
Ziye Yang 2016-12-05 14:29:47 +08:00 committed by Daniel Verkamp
parent 52f3c2fa52
commit f74d64f07f

View File

@ -218,15 +218,15 @@ nvme_rdma_pre_copy_mem(struct spdk_nvme_rdma_req *rdma_req)
address = (void *)nvme_sgl->address;
if (address != NULL) {
rdma_req->cmd.dptr.sgl1.address = (uint64_t)rdma_req->bb;
if (rdma_req->xfer == SPDK_NVME_DATA_HOST_TO_CONTROLLER ||
rdma_req->xfer == SPDK_NVME_DATA_BIDIRECTIONAL) {
memcpy(rdma_req->bb, address, nvme_sgl->keyed.length);
}
}
nvme_sgl = &rdma_req->cmd.dptr.sgl1;
nvme_sgl->keyed.key = rdma_req->bb_sgl.lkey;
nvme_sgl = &rdma_req->cmd.dptr.sgl1;
nvme_sgl->address = (uint64_t)rdma_req->bb;
nvme_sgl->keyed.key = rdma_req->bb_sgl.lkey;
}
}
static void