Spdk/lib
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
..
accel so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
bdev lib/bdev: ensure mutex is initialized 2021-02-16 08:39:17 +00:00
blob so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
blobfs so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
conf so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
env_dpdk lib/env_dpdk: add rte_net dependency 2021-02-16 08:33:46 +00:00
env_ocf lib/thead: print error log when create mempool or ring failed 2020-11-05 09:41:06 +00:00
event reactor: Construct a function to do common code. 2021-02-09 11:24:36 +00:00
ftl so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
idxd lib/idxd: add a condition to sim workaround 2021-02-05 13:42:32 +00:00
ioat so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
iscsi so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
json so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
jsonrpc so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
log so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
lvol so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
nbd nbd: Continue to read the socket even if the NBD status is not running 2021-02-16 08:40:55 +00:00
net so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
notify so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
nvme nvme: add support for ZNS zone append vector variant 2021-02-17 10:17:22 +00:00
nvmf Fix incorrect implementation of HPDA/CPDA in NVMe/TCP target code. 2021-02-16 08:40:14 +00:00
rdma so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
reduce so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
rocksdb build: use DEPDIRS variables to build SPDK_LIB_LIST 2020-12-18 09:40:01 +00:00
rpc so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
scsi so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
sock lib/sock: Check conditions together. 2021-02-09 11:24:57 +00:00
thread so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
trace so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
ut_mock so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
util lib/util/math.c: improve portability 2021-02-10 08:44:01 +00:00
vfio_user so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
vhost lib:vhost Add version check when use RTE_VHOST_USER_ASYNC_COPY in 21.01 2021-02-11 08:40:31 +00:00
virtio so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
vmd so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
Makefile NVMe/vfio-user: add initial version vfio-user transport to NVMe driver 2021-01-21 05:00:18 +00:00