Commit 75a1b39f authored by Jim Harris's avatar Jim Harris
Browse files

nvme/rdma: allow for sge length > payload_size



Requests may need to be split in which case a child
request may have a size smaller than the SGE that
contains the child request's payload.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: I6c7ab76104d56fa9dde168cfdddb6320c7157f98

Reviewed-on: https://review.gerrithub.io/372347


Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 5f05513b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -850,7 +850,7 @@ nvme_rdma_build_sgl_request(struct nvme_rdma_qpair *rqpair, struct nvme_request
		return -1;
	}

	if (length != req->payload_size) {
	if (length < req->payload_size) {
		SPDK_ERRLOG("multi-element SGL currently not supported for RDMA\n");
		return -1;
	}
@@ -863,7 +863,7 @@ nvme_rdma_build_sgl_request(struct nvme_rdma_qpair *rqpair, struct nvme_request
	req->cmd.psdt = SPDK_NVME_PSDT_SGL_MPTR_CONTIG;
	req->cmd.dptr.sgl1.keyed.type = SPDK_NVME_SGL_TYPE_KEYED_DATA_BLOCK;
	req->cmd.dptr.sgl1.keyed.subtype = SPDK_NVME_SGL_SUBTYPE_ADDRESS;
	req->cmd.dptr.sgl1.keyed.length = length;
	req->cmd.dptr.sgl1.keyed.length = req->payload_size;
	req->cmd.dptr.sgl1.keyed.key = mr->rkey;
	req->cmd.dptr.sgl1.address = (uint64_t)virt_addr;