Commit Graph

550 Commits

Author SHA1 Message Date
Changpeng Liu
075f321be8 nvme/fio_plugin: exclude PRACT&&MD=8&&Extended LBA metadata size
If PRACT is enabled, and metadata size is 8 bytes, for extended
LBA format, the controller will insert/strip the metadata, so
we don't need to pass the metadata buffer, so we should exclude
this metadata buffer from host buffer.

So here add a function to calculate host buffer size.

Change-Id: I42d8d9cbfbf7ba2bc4bf64d65260c6cfe9bd4cb1
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6789
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-29 07:38:37 +00:00
Ziye Yang
6153b4aa8f nvme: Add a new parameter in spdk_nvme_poll_group_create
Purpose: To setup an accelerated function callback
for created spdk_nvme_poll_group. In this patch,
we just create the interface. The real usage of this
call back will be provided in the other patch.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I0d936aa4eba4dbfcc0137942156b9f2919eb5b78
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6758
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-18 14:42:35 +00:00
Niklas Cassel
38fa9d82c8 nvme/identify: print the command set identifier per namespace
For each active namespace, print the command set identifier.
This will work on namespaces that do not support or report a namespace
type, as spdk_nvme_ns_get_csi() will return SPDK_NVME_CSI_NVM for such
cases.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I05fa7fd6bb3d9ea32dac236c98baef90347094ca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6905
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-18 13:19:16 +00:00
Jim Harris
3d9e67b07d perf: use elapsed time when test run ended early
If the test run is aborted early (i.e. Ctrl-C), we
should use the elapsed time as the divisor instead
of the originally specified time.

Fixes issue #1800.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3312cc83f3422ec46ad584e3ee2b40f3ad9ec6f5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6474
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: <dongx.yi@intel.com>
2021-03-01 12:06:59 +00:00
Jaylyn Ren
c2a4702d7b perf: Add option to display perf cores usage
Run perf tool with parameter "-m" to display real-time overall cpu usage on used cores.

Signed-off-by: Jaylyn Ren <jaylyn.ren@arm.com>
Change-Id: I1f60315ac1e1ed1dfd238eb0a42a4b93c773e21e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6444
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
2021-02-22 10:04:53 +00:00
Jim Harris
345bb2e89d nvme/identify: submit only one GET_FEATURE at a time
This is a workaround for issue #1799 that would require
a fix from Google Cloud Platform.  GCP NVMe SSDs do
not support overlapped GET_FEATURE commands - the
cdw0 value on completions get mixed up.

On GCP the result is that identify app reports only
1 SQ/CQ supported when in fact it supports 16.

We can easily workaround this in the identify app by
submitting one GET_FEATURE and then polling for its
completion before submitting the next one.

We may consider reverting this in the future should GCP
provide a fix, but there is really no harm in keeping
this patch long term since this isn't an I/O path issue.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I536033677a8364c955d562226e3feba4dbad0e07

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6454
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
2021-02-19 11:33:21 +00:00
Jim Harris
06ace1efbf nvme/fio_plugin: add print_qid_mappings option
print_qid_mappings=1 will now add logging messages
showing the {filename,qid} tuples associated with
each job.

Note that for the nvme plugin, the filename is
essentially the transport ID.  We just print that
filename for simplicity rather than reconstructing
a transport ID string from the ctrlr object.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I9b714ac009fd16b96ed87c2c056be251009815b8

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6396
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-02-19 11:33:21 +00:00
Young Tack Jin
e3c82a0ae2 examples/nvme/identify: add occsd verbose mode for OCSSD chunk state map
print chunk state map of MAX_OCSSD_PU chunks in ocssd verbose mode

Signed-off-by: Young Tack Jin <youngtack.jin@gmail.com>
Change-Id: I5cfe5ece49086acd680f93228d4765215eee3d87
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6089
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2021-02-18 13:36:25 +00:00
Niklas Cassel
17ef8ec9ac examples/nvme_fio_plugin: add support for zone append
Now when we have support for spdk_nvme_zns_zone_append() and
spdk_nvme_zns_zone_appendv(), hook them up in the nvme fio plugin.

Note that fio itself does not have support for zone append,
since unlike SPDK, there is no user facing zone append API in
Linux. Therefore, this new option simply replaces writes with
zone appends in the SPDK fio backend.

This is however still useful for the following reasons:
-Provides a way to test zone append in SPDK.
-By using zone append, we can test with iodepth > 1.

With regular writes, the user can only specify iodepth=1.
This is because for zone namespaces, writes have to target
the write pointer. Having more than one write in flight, per
zone, will lead to I/O errors.

In Linux, it is possible to use fio with iodepth > 1
on zoned namespaces, simply because of the mq-deadline
scheduler, which throttles writes such that there is only
one write in flight, per zone, even if user space has
queued up more.

Since a user might not want to use zone append unconditionally,
even on a namespace that supports it, make this an option
rather than enabling it unconditionally.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I028b79f6445bc63b68c97d1370c6f8139779666d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6330
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-02-17 10:17:22 +00:00
Niklas Cassel
b1b4b8676f nvme: use spdk_nvme_zns_ns_get_zone_size_sectors() where appropriate
Use the new function spdk_nvme_zns_ns_get_zone_size_sectors() where
it is appropriate (in comparison to the existing
spdk_nvme_zns_ns_get_zone_size() variant).

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Ic929ffbc5a1f4a16ba6719a985c05ae625caed46
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6417
Tested-by: SPDK CI Jenkins <sys_sgci@intel.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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-02-17 10:17:22 +00:00
Simon A. F. Lund
a587d90dcb examples/nvme/identify: add a limit to the zns zone report dump option
Add an optional limit, -z N, to the zone report dump option -z.

The variable g_zone_report_limit replaces the MAX_ZONE_DESC_ENTRIES such
that the maximum-number of zone-descriptors is overwritable. It also
replaces g_zone_report_full as it is represented by the limit-value 0,
e.g. "no limit" dump the full report.

The print of the section-header now includes the total amount of zones
and the limit. With this information, the header's width varies. A
helper-function, print_uline(), for printing an "underline" using a
given marker, is also added.

Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
Change-Id: Ic8abead693ed83bb8612eef1f35605098ccade84
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6036
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2021-02-16 08:43:24 +00:00
Simon A. F. Lund
1b0134e0a9 examples/nvme/identify: assert optarg to satisfy analyser
Despite spdk_nvme_transport_id_parse() checking optarg for NULL, then
the Jenkins CI doing code-analysis fails with the error message:

"Null pointer passed as an argument to a 'nonnull' parameter"

This adds an assertion to satisfy the code-analysis.

Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
Change-Id: I35f7ee659624c1d5a2abda91bccac9fb58393063
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6068
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2021-02-16 08:43:24 +00:00
Krishna Kanth Reddy
48aed8a578 lib/nvme: Adding support for PMR Identification
Identify application prints the PMR details if it is supported

Signed-off-by: Krishna Kanth Reddy <krish.reddy@samsung.com>
Change-Id: Iaba4c15e18e1402035b11a34b2defe8078855751
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6209
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-02-11 08:40:48 +00:00
wanghailiangx
0b6f2e236d example/nvme/plugin: set bs 4160 for Extended Data LBA
The original value of bs is 4096, we can rewrite it in another script.
When spdk_nvme_ns_supports_extended_lba(ns) is 1, we need to
test with an integer multiple value of extended_sector_size, such as 4160.

Change-Id: I8257bee4f741f62597bb2bb645ee9c59cf57bf33
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6018
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-02-04 08:45:01 +00:00
Allen Zhu
306ad7ff17 nvme/perf: Add missing key (ns) of Transport ID in perf help
NVMe namespace ID (i.e., ns) is a key of Transport ID, which is
supported by perf, but it's missed in the help. In addtion, a
note is added to specify multiple '-r' parameters can be used
to test multiple disks/targets.

Signed-off-by: Allen Zhu <allenz@mellanox.com>
Change-Id: Icf55e6213a63d97396bdc7022e4c0d09c67aab9a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6141
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-02-04 08:39:51 +00:00
Jim Harris
d390808fd3 nvme_perf: stop sending I/O to hot removed namespaces
It may be an interesting test case to send I/O to hot
removed namespaces, but for a perf tool it seems better
to stop sending them once we get an INVALID_NAMESPACE
status code.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie458fa63b12114cf05d5a3f1702e37f91d8a00f6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6091
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-01-26 09:27:24 +00:00
Jim Harris
d1c17064e7 nvme_perf: rate limit I/O error messages
The nvme perf tool can be useful to generate I/O for
stress conditions.  But if we use it for situations
where we expect a high rate of failures, the excessive
spew can significantly clutter the log.

So add a new -Q option (meaning "quiet") which will
rate limit these error messages.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia8ab2e1ea1cfab9f43d87bcabe8f3f7589b77cda
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6077
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-01-26 09:27:24 +00:00
Jim Harris
9765e956b9 nvme_perf: separate read/write error messages
Next patch will add rate limiting on some of the
error messages.  Separating the read error message
from the write error message will allow us to
rate limit them independently.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id49b64aa1ee545874d7230399a5127c47f217836
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6076
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: sunshihao <sunshihao@huawei.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-01-26 09:27:24 +00:00
wanghailiangx
0fd4c1f97c example/nvme/plugin: Fix a notice error of bs
We konw bs should be extended_sector_size(ns) * num_blocks.
In other words, bs should be an integral multiple of extended_sector_size.
num_blocks cannot be got here, so we used integral multiple.

Change-Id: Ie521db194cdad6f2d2247fd2704cab92c36ddb82
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5881
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-01-21 16:11:16 +00:00
Changpeng
3ff9c13614 NVMe/vfio-user: add initial version vfio-user transport to NVMe driver
When NVMf target linked with vfio-user library, we can use
vfio-user client library to connect to the target.

Here is the three examples that can work with target:

identify -r 'trtype:VFIOUSER traddr:/var/run/muser/domain/muser0/8' -g
perf -r 'trtype:VFIOUSER traddr:/var/run/muser/domain/muser0/8' -g -q 1 -o 4096 -w read -t 10
reconnect -r 'trtype:VFIOUSER traddr:/var/run/muser/domain/muser0/8' -g -q 32 -o 4096 -w randrw \
-M 50 -t 10 -c 0xE

You can run the following test script test/nvmf/target/nvmf_vfio_user.sh to have a quick test,
currently enabled with NVMe Identify,Perf,Reconnect tools.

Change-Id: Ieb9842b2f372184fffbf7f23e4aad26feb47c350
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3839
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-21 05:00:18 +00:00
Jim Harris
9317f72d09 fio_plugin: clarify thread=1
There was some confusion from a user on whether thread=1
means only one thread is supported.  So add some extra
documentation around this section to clarify this a bit
more, since the option is a bit confusing.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ibcccd1759180e2e6c47e736d94ffbeafc405f7bb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5995
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: <dongx.yi@intel.com>
Community-CI: Mellanox Build Bot
2021-01-20 08:45:21 +00:00
Alexey Marchuk
59d50e1f1c perf: Add signal handlers
Perf tool doesn't have handlers for SIGINT and SIGTERM
signals, so when the tool is killed with e.g. ctrl-c
all SPDK and transport resources are destroyed
ungracefully. In the case of RDMA we may have
IO requests inflight and if the request is processed
by the driver when the corresponding MR is destroyed by
the kernel, it may cause an error on the target side.
Such errors are not harmful but it is better to
have a graceful shutdown procedure.

Fixes issue #1549

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I7818a4705d2b5cf4a5f3ca4745c62392312d22d2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5869
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-18 13:00:41 +00:00
Jim Harris
a27756993c identify: fix set-but-not-used error
Fixes: 5ef79a17ec (add an option to dump the full zns zone report)

max_zones_per_buf was only used in an assert.  Per-patch
testing doesn't do a release build, so this wasn't found
until running nightly tests.

So rework the code a bit to print error message and exit
instead of this unexpected condition occurs.

While here, change another error message to use stderr
instead of stdout.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I2c2893089cc82f76d7dd6b569952dd4a9f907ebc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5949
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2021-01-15 22:44:31 +00:00
Niklas Cassel
5ef79a17ec examples/nvme/identify: add an option to dump the full zns zone report
Add a new option, -z, to dump the full zone report for
NVMe Zoned Namepaces.

Rather than allocating a buffer that can exactly hold the number
of zones we request, allocate a fixed size buffer of size MDTS.

That way, the controller will copy as many zones as it can,
while not exceeding the buffer. The nr_zones field in the
received report indicates the number of zones that were
successfully copied to the buffer.

The full zns zone report can be larger than MDTS, therefore
we now need to put the spdk_nvme_zns_report_zones() call
inside a loop.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: If3ff84876289a491d0482e74c58c5a11de7e19df
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5896
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-15 08:31:54 +00:00
Niklas Cassel
d3fe9591c2 examples/nvme/identify: exit after showing help text
Exit after showing the help text.

If the user specifies -H, it is confusing that
the regular execution of the program continues,
which might mislead the user to think that the
option they specified is not taking effect.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I52d8e0f6c720c7ce1d66bddb99181babb12cef1f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5895
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-15 08:31:54 +00:00
Allen Zhu
f8330a575e nvme/perf: generate multiple-SGL payloads in perf tool
A new option -O is added to indicate the IO unit size.
Multiple IOVs are created according to the IO unit size.
We are able to test multiple-SGL SGL requests in NVMEoF
RDMA with this patch.

Signed-off-by: Allen Zhu <allenz@mellanox.com>
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I7624966b585bf0a9d2bbbb6263fa06fbcdb65820
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4377
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: sunshihao <sunshihao@huawei.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-08 09:36:48 +00:00
Changpeng Liu
414b56600a examples/nvme_reconnect: add single memory segment parameter support
Add one optional parameter to enable single memory segment, which
can be tested with libvfio-user NVMeoF target.

Change-Id: I6d77b0c33f13500e24266ca190d2ee797708a65e
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5593
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-28 13:20:12 +00:00
Niklas Cassel
dffb272c1a examples/nvme_fio_plugin: error out on unsupported blocksize
According to the SPDK nvme fio plugin documentation:

"Blocksize should be set as the sum of data and metadata.
For example, if data blocksize is 512 Byte, host generated
PI metadata is 8 Byte, then blocksize in fio configure file
should be 520 Byte."

Error out if this requirement is not satisfied.
This requirement does not apply for the separate metadata case.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I730a83beb6a85695c8a4b80995340b4064375d5a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5557
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-28 13:16:21 +00:00
Jim Harris
d132ee3531 build: use DEPDIRS variables to build SPDK_LIB_LIST
All of our Makefiles duplicate huge lists of libraries
in SPDK_LIB_LIST.  We have a very precise and accurate
accounting of the library dependencies in
mk/spdk.lib_deps.mk which can be used to generate
the full list if the app specifies the modules and
subsystem libraries it wishes to link.

I did a first pass through all of the existing
Makefiles to take advantage of this new functionality.
There may be more optimizations we can make later but
don't want to hold up this patch for all of them.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Icdaf6f749a6908df2c2ce2db22631a4af4ff3a9e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5553
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-18 09:40:01 +00:00
Evgeniy Kochetov
2b9daef69e nvme/perf: Fix destroy of uninitialized barrier
Destroy of uninitialized barrier fails with SIGFPE signal.

Fixes: 1721

Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: Ic3a18a13059c1b9d706f24c390f070dc7663f6f4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5567
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-12-14 16:26:05 +00:00
Evgeniy Kochetov
eb753b2515 examples/nvme: Add hostnqn parameter to perf and identify
Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: I5f8435d9c270fa87295d1fc9126bb0c91aaf055c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5467
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-12-11 11:10:28 +00:00
Evgeniy Kochetov
b482eda06e nvme/perf: Basic synchronization of workers
Currently, NVMe perf worker starts IO and measurements as soon as all
its QPs were connected. But other workers may still be connecting and
not started their measurements yet. With large number of QPs when
connections take a long time this can cause inaccurate performance
reporting.

This patch adds synchronization point for workers after all QPs were
connected and before start of IO and measurements.

Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: If0c9be8dd41c8e851aae6b3e71afa3efe5314330
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5126
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-12-11 10:59:09 +00:00
Jim Harris
87b21afd65 examples: use "main" instead of "master"
While here, replace use of "slave workers" in some
comments with "secondary workers".

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I2169c108da18d449a66a29daa77a3f9c3145d4b2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5352
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-03 09:41:07 +00:00
Jim Harris
fe137c8970 env: replace master_core with main_core
This helps us remove master/slave terminology from
SPDK and is aligned with similar changes made recently
in DPDK.

While updating nvme/identify to use the new member
name, also replace g_master_core there with g_main_core.
Other nvme utility usage of "master_core" will be updated
in a later patch.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I0ec4e3e9b644bec21b3729809bf5c4d35b10837f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5351
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-03 09:41:07 +00:00
Jim Harris
4a6a282411 env: add pci_allowed/pci_blocked to spdk_env_opts
The old pci_whitelist/pci_blacklist are now deprecated.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I9fddec0c90691dd385eb21d13be849247f144889
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5279
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-03 09:41:07 +00:00
Nick Connolly
bb19c18f6a examples: Use PRId64 for portability
POSIX defines PRId64/PRIu64/PRIx64 for printing 64-bit values in a
portable way. Replace a few references to %ld to remove the assumption
about the size of a long.

Where the value being printed is an unsigned 64-bit value, use PRIu64
instead of %ld.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Ifa558522437f4922b922abf17712173cb5ca1184
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5134
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-11-20 11:01:11 +00:00
Ziye Yang
4192b16aa8 nvme/perf: Add the feature to test the allowed pci_list feature.
This patch is used to test the allowed pci list feature.
The reason we add in perf because NVMe Device is the typical
pci device. And we also want to make sure it works.

Change-Id: Ic98ddcfecb162ffb74c9bdf3bc9e702633ddd3e2
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3246
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-11-02 11:18:54 +00:00
Niklas Cassel
96c14b3838 examples/nvme_fio_plugin: remove duplicated max transfer function
There is no need for an additional function to calculate the max transfer
size based on mdts.

nvme_ctrlr_identify_done() already initializes ctrlr->max_xfer_size
based on mdts, and spdk_nvme_ns_get_max_io_xfer_size() simply returns
ns->ctrlr->max_xfer_size.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I747ff8ac9767eababffc3c7e0b6846029a98b826
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4985
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Simon A. F. Lund <simon.lund@samsung.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-11-02 11:18:07 +00:00
Alexey Marchuk
9b19abae3c sock/posix: Disable zcopy send by default
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I4825c681d742946dfcf5bdc209356194766a15cd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4978
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-30 14:51:34 +00:00
Simon A. F. Lund
f875da4019 examples/nvme_fio_plugin: update ZNS section of README
Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
Change-Id: I99c82490811314201b53dde59e586538835e0840
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4950
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-29 22:15:40 +00:00
Simon A. F. Lund
aae84b1f0e examples/nvme_fio_plugin: add plugin-option 'initial_zone_reset'
Added plugin-option 'initial_zone_reset', providing the option to reset
all zones on all namespaces with the Zoned Command Set enabled upon
initialization.
The default is not to reset. The option is exposed even when the ZBD
plumbing is not available. However, it will then inform the user that
ZBD/ZNS is not supported instead of resetting.

The plugin-option provides a short-term solution to an observed issue
with consecutive invocations of fio exhausting maximum-active-resources.
A longer-term solution would be to add a 'max_active_zones' limit in fio
and ensure that fio does not exceed that limit.

Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
Change-Id: I65341c028a97657370b315fb298bf97651b9bffd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4949
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
2020-10-29 22:15:40 +00:00
Simon A. F. Lund
528ad3b3cf examples/nvme_fio_plugin: move completion-helpers
Preparation patch for the addition of the 'initial_zone_reset' plugin-option.

Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
Change-Id: I768fc207b74cfa2a516009e10fc2a4646d06ba72
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4948
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-29 22:15:40 +00:00
Niklas Cassel
1e83b640aa examples/nvme_fio_plugin: fix zone reporting
All zone management receive helper functions (including
spdk_nvme_zns_report_zones()) are implemented to match the parameters of
the zone management receive function in the ZNS specification.

The documentation for spdk_nvme_zns_report_zones() states:
"param partial_report If true, nr_zones field in the zone report indicates
the number of zone descriptors that were successfully written to the zone
report. If false, nr_zones field in the zone report indicates the number
of zone descriptors that match the report_opts criteria."
This matches the description of the "Partial Report" bit in the ZNS spec.

Since the FIO function parse_zone_info() calls the io_ops->report_zones()
function multiple times, until all zones have been reported, it expects
the return from this function to represent the number of zones that were
successfully reported.

By setting the partial_report bit to false, the controller will return
the total number of zones, and since spdk_fio_report_zones() loops until
idx < report->nr_zones, and writes to zbdz[idx], the current code will
overwrite heap memory, since idx will take on index values that are out
of bounds for the memory allocated by the FIO function parse_zone_info().

Therefore, spdk_fio_report_zones() has to set the partial_report bit to
true when calling the NVMe level function spdk_nvme_zns_report_zones().

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I8846711bfed4faadac0315b450158293cefa36f4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4871
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Simon A. F. Lund <simon.lund@samsung.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-10-28 15:07:37 +00:00
Niklas Cassel
00d197dba2 examples/nvme/identify: print ZNS data structures if supported
Print the Zoned Namespace Command Set Specific data structures,
if the namespace/controller supports them.

spdk_nvme_zns_ctrlr_get_data() returns NULL for a controller
that does not support the ZNS specific controller data struct.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I0acd2695976fc598b61591989f612db35ac821db
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4839
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-10-28 15:07:10 +00:00
Simon A. F. Lund
414500c9eb examples/nvme_fio_plugin: fix log-msgs. in report_zones() and reset_wp()
In spdk_fio_report_zones(), log_err did not prefix messages with
"spdk/nvme", making it hard to determine who dumped the error-message.
In spdk_fio_reset_wp() log_err described the wrong function.

This change fixes the above.

Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
Change-Id: I41df6d451e88942806c8b5a3cf9a0902d98cb186
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4916
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
2020-10-28 15:06:44 +00:00
Simon A. F. Lund
12a44d4745 examples/nvme_fio_plugin: fix reset_wp()
When _reset_wp() received a range to reset, then the loop kept resetting
the first zone in the range.
Also, the processing of command-completion were re-using the same
'completion' state, thus a previous completion would short-circuit
command-completion such that it would never be processed.

This change fixes that.

Also, the reset-loop assumes that the given offset is a valid zone-start
LBA, a check is added to verify that and return -EINVAL if it is not.

Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
Change-Id: I1a1e4be2e1f67c2d8fecb5fc36a211b2dbb5a921
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4915
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
2020-10-28 15:06:44 +00:00
Simon A. F. Lund
906c2adb86 examples/nvme_fio_plugin: help the user with max_open_zones constraints
When a device has resource-limitations such as the
maximum-open-resources (mor) and this threshold is exceeded, then IO
will fail upon completion. Such behavior is not the most user-friendly
way to tell the user that they should provide a value for the
fio-parameter 'max_open_zones'.

This change provides an arguably more user-friendly approach by checking
whether the device is limited and in case it is:

* Provide a default value for 'max_open_zones', inform the user, and
continue
* Verify 'max_open_zones' and in case of error inform the user and
return error

Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
Change-Id: I76cb045d560b9ec5701d97b82a62947af11960b6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4914
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-28 15:06:44 +00:00
Niklas Cassel
6e231f59af examples/nvme/identify: remove exit_and_free_qpair()
Currently, error handling code in examples/nvme/identify frees the qpair
before calling exit().
However, since every SPDK process starts off by triggering a reset
(in state NVME_CTRLR_STATE_INIT), which causes all the qpairs to be
deleted, there is not really a reason to do a nice cleanup on error.

Additionally, other examples, e.g. examples/nvme/hello_world does not
do a nice cleanup on error, so it is inconsistent if identify does so.

Proper freeing of the qpairs is still done in the normal case where
we don't get any errors (in this example, and in other examples).

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I0db612934464e6e84eaf466c12eb35eaa396e511
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4838
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>
2020-10-23 13:47:09 +00:00
Niklas Cassel
6915ad7c34 examples/nvme/hello_world: call exit() on read error
The printout in read_complete() says "Read I/O failed, aborting run",
however, execution still continues, and prints and prints the buffer
where the result was supposed to be stored.
Since we got a read error, we will not have gotten any data stored
in the buffer, so it is simply confusing to print it.

Calling exit() in the read_complete() error handling code code also
makes it consistent with the error handling code in write_complete()
and reset_zone_complete().

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I6e542758c57efc376f921857c2cdb24e252d49c6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4837
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-23 13:47:09 +00:00
Simon A. F. Lund
8a1d6f446d examples/nvme_fio_plugin: add initial support for ZNS
This adds initial support for ZNS by aligning the NVMe spec. defined ZNS
structures and commands with the fio Zone representation and
implementation of the following io-engine functions:

get_zoned_model() / spdk_fio_get_zoned_model(), when namespace is ZNS
and the Zoned-Command-Set is enabled, then this function informs fio
that the device is ZBD_HOST_MANAGED.

report_zones() / spdk_fio_report_zones(), submits a single
zone-mgmt-recv and waits for its completion, converts the spec-defined
zone-descriptors to the fio ZBD_ZONE representation and returns the
number of zones in the converted report.

reset_wp() / spdk_fio_reset_wp(), submits multiple zone-mgmt-send,
covering the range [offset, offset+length] and waits for their
completion.

Four helper-functions are added to assist in the above implementations.

get_fio_qpair(), this helper is added to retrieve the namespace matching
the given fio-file, ensuring that management commands reach the correct
namespace.

spdk_fio_qpair_mdts_nbytes(), this helper is added to assist
report_zones() retrieve the zone-report within the bounds of the
maximum-data-transfer of the device.

The functions pcu() and pcu_cb() provide a means to submit
management-commands and waiting for their completions. They are needed
since, although mgmt-send/recv are IO-commands in the context of NVMe,
then for fio they are not part of the regular queue/event/getevents but
utilized in a synchronous/blocking manner.

Note, in the fio-zone-representation, then the start/len/capacity/wp
fields are in units of bytes, whereas the corresponding values in NVMe
are in lbas/sectors. It is worth noting as the offset <-> lba
conversions do not take NVMe configurations with extended-lba format
into account. Thus, the implementation is initial support for ZNS as
more work is needed to support pi/extended-lba configurations.

Note, a guard FIO_HAS_ZBD checks for the required io-engine ops version
and indirectly testing for available of fio Zone representation by
testing for a macro introduced in the same fio-release as the required
fio Zone representation.

Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
Change-Id: Id3d1d61a52db2e55019032c724197df4d559271a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4836
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-10-23 13:47:01 +00:00