Commit 71cbc229 authored by Konrad Sztyber's avatar Konrad Sztyber Committed by Jim Harris
Browse files

nvmf: execute zcopy requests through process_io_cmd



The zcopy_start requests are now executed through
nvmf_ctrlr_process_io_cmd.  It makes the zero-copy share checks with the
regular IO path.

Note, that zcopy_end doesn't utilize this path and is directly submitted
to the bdev layer, as it doesn't need to perform these checks (they were
already verified in the accompanying zcopy_start).

Signed-off-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ic9ffecb15e7c351a9d60e731cc711d6500b845db
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10785


Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 27223168
Loading
Loading
Loading
Loading
+26 −21
Original line number Diff line number Diff line
@@ -3873,6 +3873,10 @@ nvmf_ctrlr_process_io_cmd(struct spdk_nvmf_request *req)
		req->qpair->first_fused_req = NULL;
	}

	if (spdk_nvmf_request_using_zcopy(req)) {
		assert(req->zcopy_phase == NVMF_ZCOPY_PHASE_INIT);
		return nvmf_bdev_ctrlr_start_zcopy(bdev, desc, ch, req);
	} else {
		switch (cmd->opc) {
		case SPDK_NVME_OPC_READ:
			return nvmf_bdev_ctrlr_read_cmd(bdev, desc, ch, req);
@@ -3896,6 +3900,7 @@ nvmf_ctrlr_process_io_cmd(struct spdk_nvmf_request *req)
			return nvmf_bdev_ctrlr_nvme_passthru_io(bdev, desc, ch, req);
		}
	}
}

static void
nvmf_qpair_request_cleanup(struct spdk_nvmf_qpair *qpair)