nvmf: remove zcopy check in spdk_nvmf_request_exec

It will make it possible to submit zero-copy requests through
spdk_nvmf_request_exec().

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ibc14fe77cd477b11ed55d1350a7486caaad81add
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10783
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Konrad Sztyber 2021-12-02 14:17:15 +01:00 committed by Jim Harris
parent 7d23ac8657
commit f65099d378
2 changed files with 4 additions and 16 deletions

View File

@ -4170,10 +4170,8 @@ spdk_nvmf_request_exec(struct spdk_nvmf_request *req)
struct spdk_nvmf_transport *transport = qpair->transport;
enum spdk_nvmf_request_exec_status status;
if (!spdk_nvmf_request_using_zcopy(req)) {
if (!nvmf_check_subsystem_active(req)) {
return;
}
if (!nvmf_check_subsystem_active(req)) {
return;
}
if (SPDK_DEBUGLOG_FLAG_ENABLED("nvmf")) {

View File

@ -2579,13 +2579,7 @@ test_zcopy_read(void)
CU_ASSERT(req.zcopy_bdev_io == zcopy_start_bdev_io_read);
CU_ASSERT(qpair.outstanding.tqh_first == &req);
CU_ASSERT(ns_info.io_outstanding == 1);
/* Execute the request */
spdk_nvmf_request_exec(&req);
CU_ASSERT(nvme_status_success(&rsp.nvme_cpl.status));
CU_ASSERT(req.zcopy_bdev_io == zcopy_start_bdev_io_read);
CU_ASSERT(qpair.outstanding.tqh_first == &req);
CU_ASSERT(ns_info.io_outstanding == 1);
/* Perform the zcopy end */
spdk_nvmf_request_zcopy_end(&req, false);
@ -2593,6 +2587,7 @@ test_zcopy_read(void)
CU_ASSERT(req.zcopy_phase == NVMF_ZCOPY_PHASE_COMPLETE);
CU_ASSERT(qpair.outstanding.tqh_first == NULL);
CU_ASSERT(ns_info.io_outstanding == 0);
CU_ASSERT(nvme_status_success(&rsp.nvme_cpl.status));
}
static void
@ -2670,13 +2665,7 @@ test_zcopy_write(void)
CU_ASSERT(req.zcopy_bdev_io == zcopy_start_bdev_io_write);
CU_ASSERT(qpair.outstanding.tqh_first == &req);
CU_ASSERT(ns_info.io_outstanding == 1);
/* Execute the request */
spdk_nvmf_request_exec(&req);
CU_ASSERT(nvme_status_success(&rsp.nvme_cpl.status));
CU_ASSERT(req.zcopy_bdev_io == zcopy_start_bdev_io_write);
CU_ASSERT(qpair.outstanding.tqh_first == &req);
CU_ASSERT(ns_info.io_outstanding == 1);
/* Perform the zcopy end */
spdk_nvmf_request_zcopy_end(&req, true);
@ -2684,6 +2673,7 @@ test_zcopy_write(void)
CU_ASSERT(req.zcopy_phase == NVMF_ZCOPY_PHASE_COMPLETE);
CU_ASSERT(qpair.outstanding.tqh_first == NULL);
CU_ASSERT(ns_info.io_outstanding == 0);
CU_ASSERT(nvme_status_success(&rsp.nvme_cpl.status));
}
static void