DPDK recently clarified some semantics on the rte_devargs 'data'
and 'args' fields. This actually breaks our use of the 'data'
field to store the 2 second timeout timestamp for delaying
attach to newly inserted devices. Investigating this further,
it does not seem our use of the 'data' field was valid - it just
happened to work until now.
We could use the 'args' field now. But knowing whether to use
'args' or 'data' would then be dependent on the DPDK version.
We cannot use RTE_VERSION_NUM to decide, because this is a
compile time decision, and it is possible in shared library
use cases that we could actually link and execute against a
different version of DPDK than we built against.
So instead we will create our own env_devargs structure that
will store these allowed_at timestamps. Currently it's just
a linked list (which is exactly how DPDK does it) - we could
make it more optimal with a hash table down the road, but this
code only executes when we are doing PCI enumeration so it is
not performance critical.
Fixes#1904.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7506 (master)
(cherry picked from commit 6c75f0a266)
Change-Id: I3ee5d65ba90635b5a96b97dd0f4ab72a093fe8f7
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7635
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
Indicate interruptable module libaries by spdk.modules.mk
through INTR_BLOCKDEV_MODULES_LIST.
Other applications can directly use INTR_BLOCKDEV_MODULES_LIST
to create themselves to be interruptable.
Change-Id: Id1894dd3753c7b404ebb9d77f3184be942f6d216
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5782
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
* change how tasks are allocated and freed (simplifcation)
* added helper for getting and freeting a single task
* minor drive-by in chaning function parms for _submit_tasks()
Note that the task pool is used to manage tasks and their data
buffers. It is fully allocated and populated before the first IO
is sent and tasks are never retired, they are re-used so they are
not removed from the list except for error or exit cleanup.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I5fea5ef8c989df6310f15b2c9bb4e8aef9bd3d3b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5487
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: Ziye Yang <ziye.yang@intel.com>
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>
One of the io types FIO can send down is DDIR_SYNC,
which matches spdk_bdev_flush.
This patch adds handling for this io type.
Related #1712
This was first observed in ./test/vhost/shared/shared.sh
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Icfa9b9833c6b0d9a18310222ef18d0865cf51b17
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5551
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
First in a series of patches to change how batching is implemented.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Iaee780cd948beee66a37528fdad6fc6841ea642b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5486
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>
This avoids duplicating it in several different
Makefiles.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I85f4886ec6744c23639d24867e2c68757dfeba32
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4484
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>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
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>
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>
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>
This patch is used to support ABI compatability issue for spdk_app_opts.
Fixes#1484
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I6fed777fa15b367f7c3706b8f218d86d56493906
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5330
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
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>
The interrupt_tgt depends on vhost lib, so it should not be
compiled when SPDK is not using it.
This resolves compilation errors with just:
./configure --without-vhost
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Iad2dff6bb73e1b3d389b98f0dfbf157e576797be
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5340
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
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>
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>
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>
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>
If interrupt mode is set, related poller functions will be
registered to interrupt handler instead of poller.
interrupt_tgt can work as vhost-blk target to support VM.
Change-Id: I3a15f9a63532f44fe0d2f0cb69b0efdd72431d10
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4277
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
rc has been assigned to -1 directly, so it's no used here.
Issue:
accel_perf.c:681:7: warning: Although the value
stored to 'rc' is used in the enclosing expression,
the value is never actually read from 'rc'
if ((rc = spdk_app_parse_args(argc, argv, &opts, "o:q:t:yw:P:f:", NULL, parse_args,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I1d0a4447c4655bde97fa18d50b694809fc9010ea
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4825
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>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Logical volume, blobstore and blobfs can directly run in
interrupt mode.
Some bdev modules don't have pollers, so they can be directly
runnning in interrupt mode.
interrupt_tgt can create lvol bdevs and some other type bdevs
Change-Id: I9ad068393c6ff31bb3aafb3e58a41b0e0aeec9af
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4276
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>
If interrupt mode is set, related poller functions will be
registered to interrupt_handler instead of poller.
interrupt_tgt can run IO with linux nbd.
Change-Id: I39ecf1efa10be76419fb0d25713ea457a5a53b37
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4274
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>
If interrupt is set, related poller functions will be
registered to thread interrupt instead of poller.
interrupt_tgt can create aio bdev now.
Change-Id: Id777a55c8b7dc7a220f94ab837f7039ecea4fcb4
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4273
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>