Commit f74d64f0 authored by Ziye Yang's avatar Ziye Yang Committed by Daniel Verkamp
Browse files

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: default avatarZiye Yang <ziye.yang@intel.com>
parent 52f3c2fa
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -218,16 +218,16 @@ 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->address = (uint64_t)rdma_req->bb;
		nvme_sgl->keyed.key = rdma_req->bb_sgl.lkey;
	}
}

static void
nvme_rdma_post_copy_mem(struct spdk_nvme_rdma_req *rdma_req)