Spdk/lib/nvme
Niklas Cassel 014baeb8ef nvme: add support for ZNS zone append vector variant
We already have support for spdk_nvme_zns_zone_append(),
add support for spdk_nvme_zns_zone_appendv() (zone append with
NVME_PAYLOAD_TYPE_SGL).

_nvme_ns_cmd_rw() currently performs verification of the SGL,
if the parameter check_sgl is set. This parameter is set for all
calls with payload of type NVME_PAYLOAD_TYPE_SGL.

In order to be able to perform the same check_sgl verfication on
zone append vectors, we need to refactor _nvme_ns_cmd_rw() a bit.

Setting check_sgl ensures that _nvme_ns_cmd_split_request_sgl() or
_nvme_ns_cmd_split_request_prp() gets called.

These functions will split an oversized I/O into several different
requests. However, they also iterate the SGE entries, verifies that
the total payload size, total SGE entries is not too many, and that
buffers are properly aligned. A proper request will not get split.

For zone append, splitting a request into several is not allowed,
however, we still want the verification part to be done, such that
(e.g.) a non first/last SGE which is not page aligned, will cause
the whole request to be rejected.
(In the case of spdk_nvme_ns_cmd_write(), a non first/last SGE which
is not page aligned will instead cause the request to be split.)

An alternative would be to try to rip out the verification part from
_nvme_ns_cmd_split_request_sgl() and _nvme_ns_cmd_split_request_prp().
However, that is non-trivial, and would most likely end up with a lot
of duplicated code, which would easily get out of sync.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I2728acdcadeb70b1f0ed628704df19e75d14dcca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6248
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-02-17 10:17:22 +00:00
..
Makefile nvme: Add the interface to get the optimal polling group 2021-02-04 08:30:54 +00:00
nvme_ctrlr_cmd.c lib/nvme: add two async API for Directive Send and Directive Receive. 2021-01-20 16:27:34 +00:00
nvme_ctrlr_ocssd_cmd.c ocssd: hold lock when calling nvme_ctrlr_submit_admin_request 2019-02-15 21:27:58 +00:00
nvme_ctrlr.c lib/nvme: Adding support for PMR Identification 2021-02-11 08:40:48 +00:00
nvme_cuse.c lib/env_dpdk: Change the location of lock files from /tmp to /var/tmp 2020-11-17 08:25:31 +00:00
nvme_cuse.h lib/nvme: add RPC for interacting with CUSE devices 2019-10-24 23:43:59 +00:00
nvme_fabric.c log: simplify SPDK_LOG_REGISTER_COMPONENT 2020-10-14 08:00:35 +00:00
nvme_internal.h nvme: add support for ZNS zone append vector variant 2021-02-17 10:17:22 +00:00
nvme_io_msg.c lib/nvme: update io msg producers on ns manage 2020-06-05 09:01:44 +00:00
nvme_io_msg.h lib/nvme: update io msg producers on ns manage 2020-06-05 09:01:44 +00:00
nvme_ns_cmd.c nvme: add support for ZNS zone append vector variant 2021-02-17 10:17:22 +00:00
nvme_ns_ocssd_cmd.c nvme: save separate metadata size to nvme request 2020-04-02 07:02:38 +00:00
nvme_ns.c nvme: account for PRACT when calculating max sectors per transfer 2021-02-10 08:44:54 +00:00
nvme_opal_internal.h nvme/opal: deprecate spdk_opal_supported() 2020-05-20 14:16:44 +00:00
nvme_opal.c log: remove internal log.h header 2020-10-15 08:23:39 +00:00
nvme_pcie_common.c nvme/pcie: move the common IO path APIs to nvme_pcie_common.c 2021-01-26 16:30:10 +00:00
nvme_pcie_internal.h nvme/pcie: move the common IO path APIs to nvme_pcie_common.c 2021-01-26 16:30:10 +00:00
nvme_pcie.c nvme: add set_nvme_pcie_set_hotplug_filter 2021-02-09 11:27:19 +00:00
nvme_poll_group.c nvme: Add the interface to get the optimal polling group 2021-02-04 08:30:54 +00:00
nvme_qpair.c nvme: add directive definitions to nvme_spec.h 2021-01-20 16:27:34 +00:00
nvme_quirks.c nvme: add NO_SGL_FOR_DSM quirk for Intel P55XX SSDs 2021-01-22 08:16:53 +00:00
nvme_rdma.c nvme/rdma: Fix rdma ctrlr creating qpair memory leak 2021-02-04 08:41:33 +00:00
nvme_tcp.c nvme/tcp: Add the implementation to get the optimal polling group 2021-02-04 08:30:54 +00:00
nvme_transport.c nvme: Add the interface to get the optimal polling group 2021-02-04 08:30:54 +00:00
nvme_uevent.c lib/nvme: Add error handler for parse_event 2020-11-17 08:25:31 +00:00
nvme_uevent.h nvme: read all uevents 2020-08-24 07:38:33 +00:00
nvme_vfio_user.c nvme/pcie: move the common IO path APIs to nvme_pcie_common.c 2021-01-26 16:30:10 +00:00
nvme_zns.c nvme: add support for ZNS zone append vector variant 2021-02-17 10:17:22 +00:00
nvme.c nvme: add a new custom transport SPDK_NVME_TRANSPORT_VFIOUSER 2021-01-21 05:00:18 +00:00
spdk_nvme.map nvme: add support for ZNS zone append vector variant 2021-02-17 10:17:22 +00:00