Commit Graph

494 Commits

Author SHA1 Message Date
Shuhei Matsumoto
4a15c5fd5d test/nvmf: Rename the current script as failover
To accommodate the future functional test on NVMe-OF
multipath with ANA support.

Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: I705b439d0fbf48e9cc166dce32f552779d30ac09
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10136
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-01-17 14:25:15 +00:00
Konrad Sztyber
d9f1d4e1dd test/nvmf: run bdevperf in the foreground
There's no point in running bdevperf in the background only to send a
framework_wait_init.  Moreover, since bdevperf is executed with a 1s
timeout, there's a risk that it'll finish before that RPC is sent
causing a false positive failure.

Fixes #2046

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Icb5a8535d39954b7dfd3b4386cd008214d180bf3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11014
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
2022-01-12 08:20:53 +00:00
Jim Harris
932ee64b8f bdev/nvme: add bdev_nvme_stop_discovery RPC
This RPC will stop the specified discovery service,
including detaching from any controllers that were
attached as part of that discovery service.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I9222876457fc45e1acde680a7bd1925917c22308
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10832
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 <smatsumoto@nvidia.com>
2022-01-12 08:20:23 +00:00
Jim Harris
61a640b2a6 test: add nvmf/host/discovery.sh
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7c279594f5298f9a0d7476a639866e75aea4043a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10811
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-01-12 08:20:23 +00:00
Konrad Sztyber
b542979620 test/nvmf: zero-copy abort test
Extended the zcopy test with a step checking aborts.  It's similar to
`test/nvmf/target/abort.sh`, with the difference being that here the
aborted requests are executed using zero-copy.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ia25936b7097a94d278c467ce07c009091ea3a55a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10799
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-01-12 08:20:11 +00:00
Konrad Sztyber
da2fb51627 test/nvmf: zero-copy test
The test has two phases: first it runs a bdevperf with rw=verify to
check data consistency and then runs bdevperf in the background while
sending RPC requests causing the subsystem to be constanty
paused/resumed.

In-capsule data is set to 0 to make sure all IO requests are using
zero-copy.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I1c1d7eb04714c8506307cb95b6cbc5988c8946a3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10797
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-01-12 08:20:11 +00:00
Jim Harris
9035986e35 test: add iptables entry to forward packets across veth bridge
It seems like some distros or kernels do not automatically
forward packets across the bridge we set up in nvmf_veth_init.
So add an iptables entry to explicitly add a forwarding rule.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I50bc203afcfee888c27c0e1d77609e554dedc61e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10810
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2022-01-10 15:23:39 +00:00
wanghailiangx
da7c73016e test/nvmf: distinguish between two nvmf_fio cases
When we find the corresponding nvmf_fio cases in the log,
we won't be confused.

Change-Id: If37372d287b0ac70142234a4e29208a38d027fbd
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10680
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-01-05 09:23:24 +00:00
Mao Jiang
dc1386e686 nvme/overhead: add vfio_user transport support
Change-Id: Ib696c7787151e4898b63f57749bd134333e94a23
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10413
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2022-01-04 07:53:00 +00:00
Konrad Sztyber
b6fba11db7 test/nvmf: set max adminq size in abort test
Set the maximum admin queue size to 256 to make sure it can hold the
number of admin requests required by the abort application.

This patch fixes the following error and actually allows the test to
start:

ctrlr.c: 720:_nvmf_ctrlr_connect: *ERROR*: Invalid SQSIZE for admin queue 135 (min 1, max 127)

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I4042481ffb2792381ef2e4ad295be067a610bd7e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10771
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
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>
2021-12-23 08:41:41 +00:00
Michal Berger
b9cac1d4e7 test/nvmf: Group all non-uring-dependent tests together
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I3ba8bfc650103ed19090d6be969d38ed01ef2e9d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10175
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2021-12-20 08:46:13 +00:00
Jim Harris
050565e5ab test/nvmf: fuzz nvmf target using LLVM's libFuzzer
LLVM provides libFuzzer which does coverage-guided
fuzzing of a library or application under test.  For
SPDK, we can use this as a new and better way to
generate random commands to the SPDK nvmf target.

By default, libFuzzer provides the main() and your
source file just provides the function called by
LLVM for each iteration of random data.  But this
doesn't really work for SPDK since we need to start
the app framework and the nvmf target.  So we
specify -fsanitizer=fuzzer-no-link, explicitly
specify the location of the fuzzer_no_main library
and then call LLVMFuzzerRunDriver to start the
fuzzing process once we are ready.

Since this is all coverage-guided, we invoke the
fuzzer inside the nvmf target application.  So this
patch creates a new target application called
'llvm_nvme_fuzz'. One core is needed to run the
nvmf target, then we spawn a pthread to run the
fuzzer against it.

Currently there are two fuzzers defined.  Fuzzer 0
does random testing of admin commands.  Fuzzer 1
is focused solely on GET_LOG_PAGE and fuzzes a
smaller subset of the bytes in the spdk_nvme_cmd.

Additional fuzzers can be added in the future for
other commands, testing I/O queues, data payloads,
etc.

You do need to specify CC and CXX when running
configure, as well as specify the location of the
special clang_rt.fuzz_no_main library. The path of
that library is dependent on your clang version and
architecture. If using clang-12 on x86_64 platform,
it will look like:

CC=clang-12 CXX=clang++-12 ./configure --with-fuzzer= \
  /usr/lib/llvm-12/lib/clang/12.0.0/lib/linux/libclang_rt.fuzzer_no_main-x86_64.a

Then just do the following to demonstrate the fuzzer
tool.

make
test/nvmf/target/llvm_nvme_fuzz.sh --time=60 --fuzzer=0

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iee0997501893ac284a3947a1db7a155c5ceb7849
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10038
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-12-15 04:32:05 +00:00
Krzysztof Karas
bace05499a logs: create a log level flag in abort and hotplug applications
Bloated log files appear during some tests
(nvmf_phy_autotest, during nvmf_abort test fot example),
what makes parsing them inconvenient. This change aims
to disable logs that cause this issue by adding a new flag
for SPDK target and disabling notice level logging completely
(using --silence-noticelog proved insufficient).

Fixes: #2149

Change-Id: Ibbad92d87d90fe73c23d6027e0ff8ec49b0393c2
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10311
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-12-14 09:12:01 +00:00
Mao Jiang
6fbaa11534 nvme/deallocated_value: add vfio-user transport support
Change-Id: I1a87d9245ba8a4f4e01d510cae4a318fa3323ca2
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10257
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-12-14 09:09:18 +00:00
Karol Latecki
17cd6c3488 test/nvmf: increase malloc size in filesystem test
btrfs.tools v5.15.1 in Fedora 35 complains about target
device being too small to create a filesystem.
Let's increase the bdev size to this test.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Iedf59328b91516693c88af8c5d47dde849394337
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10614
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-12-10 09:18:26 +00:00
Mao Jiang
1f085e8e23 example/nvme/hello_world: add support for vfio-user transport
Change-Id: I280fc2cd84f577a71dda00dbc0f72f01fead6fba
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10182
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-12-07 08:22:13 +00:00
Josh Soref
c9c7c281f8 spelling: test
Part of #2256

* achieve
* additionally
* against
* aliases
* already
* another
* arguments
* between
* capabilities
* comparison
* compatibility
* configuration
* continuing
* controlq
* cpumask
* default
* depends
* dereferenced
* discussed
* dissect
* driver
* environment
* everything
* excluded
* existing
* expectation
* failed
* fails
* following
* functions
* hugepages
* identifiers
* implicitly
* in_capsule
* increment
* initialization
* initiator
* integrity
* iteration
* latencies
* libraries
* management
* namespace
* negotiated
* negotiation
* nonexistent
* number
* occur
* occurred
* occurring
* offsetting
* operations
* outstanding
* overwhelmed
* parameter
* parameters
* partition
* preempts
* provisioned
* responded
* segment
* skipped
* struct
* subsystem
* success
* successfully
* sufficiently
* this
* threshold
* transfer
* transferred
* unchanged
* unexpected
* unregistered
* useless
* utility
* value
* variable
* workload

Change-Id: I21ca7dab4ef575b5767e50aaeabc34314ab13396
Signed-off-by: Josh Soref <jsoref@gmail.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10409
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-12-03 08:13:22 +00:00
Changpeng Liu
4518e4c34e examples/arbitration: fix wrong usage of arbitration for vfio-user transport
This fixes commit 74dcf4aa "example/nvme/arbitration: add vfio-user transport support".
For vfio-user transport, we should use static DPDK memory model for
sharing memory between client and target.  Also enable log option here.

Change-Id: Iea1b28cbf234f5fc935c54899023bdbf1733a671
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10510
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-12-03 00:46:52 +00:00
Mao Jiang
74dcf4aa58 example/nvme/arbitration: add vfio-user transport support
Change-Id: I4aff5ec209de46e4e5e279cd84ce4968df568a60
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10464
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
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-12-01 09:19:28 +00:00
Shuhei Matsumoto
4d9b0e3c13 test/nvmf_abort: Reduce run time of nvmf_abort from 3s to 1s to reduce noisy logs
Running the nvmf_abort test outputs so much error logs and it is very
noisy. Running nvmf_abort for 1 sec will be enough.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2700828c228e1cc03e73675c5f3f683dbf3a57d6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10299
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-11-23 08:50:49 +00:00
Mao Jiang
1fa4d590d8 test/vfio_user: add vfio-user fuzzing test
Change-Id: Ia1431a9aad103ebc80e9071b984ee152c7a27a53
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9891
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
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>
2021-11-22 08:36:27 +00:00
Alexey Marchuk
933d56426a test/dma: Update the test to run IO for some time
This test application can now be run on several cores,
queue depth, io size, mode and time can be specified.

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I6aa6b9c0319fc22ed68aafa076ab6ee81e301474
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9809
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
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>
2021-11-18 08:21:43 +00:00
Michal Berger
1b5d4b5265 test/nvmf: Limit number of tests executed under uring job
The nvmf-tcp-uring-vg job is currently fully packed with tests what
causes random timeouts across the CI. Since most of these tests are
run as part of the nvmf-tcp-vg job and are not uring dependent we
can simply skip them to save some time (~ 5 minutes).

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I5bc85afee094697b74efbef4777cb4eb1be04583
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9937
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
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>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2021-11-15 12:00:30 +00:00
Shuhei Matsumoto
5466d5d4dc test/nvmf: Extend ANA state change timeout to 20 seconds
If a connection is lost, Linux NVMe host tries reconnecting after
10 seconds delay by default. To cover this case, extend the timeout
to 20 seconds. Usually Linux NVMe host recognizes the new ANA state
within 2 seconds.

This patch is for the github issue #2081

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I61fba2febcea81951c8b29f940d93863bc31b332
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9393
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-21 09:17:46 +00:00
Michal Berger
0403d3736a test/nvmf: Nuke all SPDK net namespaces before starting tests
This is to make sure we won't lose any net interfaces needed for the
phy tests in case they got stuck behind lingering namespace.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ic83bc5cca8b536bb3e72fbceb31d2560d840d05e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9795
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: wanghailiang <hailiangx.e.wang@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-10-13 07:40:18 +00:00
Ben Walker
e3c398aa1c bdev/nvme: Don't allow a second identical path for failover
The new path must differ in some way.

Change-Id: I98fd2b2cb3220b482efe0a19bfce94ec4e72bec2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9418
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-10-12 08:52:01 +00:00
Ben Walker
a24d549038 bdev/nvme: bdev_nvme_attach_controller now has a multipath parameter
This parameter may have the values "disable" or "failover". The default
is failover to match existing behavior. In the future we expect to
change the default behavior to disable.

Further, we expect to add an "enable" option soon to do full multipath.

Change-Id: Iebbdc9b95f23101f18d64e085933463498e627be
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9343
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-12 08:52:01 +00:00
Changpeng Liu
2dc55b19e8 test/vfio-user: enable NVMe compliance tests with vfio-user
Also add "-g" parameter to use single segment file.

Change-Id: If12c75ccdf1e6074951819fb94cc85a982f9d843
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9677
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
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>
2021-10-11 01:42:33 +00:00
Jim Harris
93351b0e01 test: use single core when testing nvme fuzz with nvmf target
There's really no need to specify 4 cores for both the fuzz app
and the nvmf target, since only one is ever used.  Reducing the
mask to a single core each makes the fuzz.sh tests easier to run
in VMs with a limited number of cores.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id956ac8d0d7f75cb0e76b78c9175b4aa520218bf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9725
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-10-06 11:17:21 +00:00
Konrad Sztyber
00d587140f bdev/nvme: remove CSTS from driver-specific JSON info
It's not providing a lot of value, while being pretty problematic, as
the read is blocking and cannot be easily changed to be non-blocking, as
dump_info_json is a synchronous interface.

Now that dump_info_json isn't using any synchronous interfaces from the
NVMe driver, we can send a bdev_get_bdevs call in the async_init.sh
test to verify that.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ida31c8d1000a52b0782f698afe46b071ed4e41df
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9488
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-04 15:00:35 +00:00
Konrad Sztyber
c5ebb7ff99 bdev/nvme: use asynchronous ctrlr detach functions
This patch replaces the synchronous `spdk_nvme_detach()` calls with its
asynchronous counterparts in the controller unregister path.

An additional poller is introduced to periodically poll the NVMe driver
for detach completion.  Once the detach is completed, the poller is
unregistered and the nvme_ctrlr is destroyed.  The poller uses the same
period (1ms) as the async probe poller.

Since reset and detach cannot happen at the same time, reset_poller was
renamed to reset_detach_poller and it can now store the pointer either
to the reset or detach poller, depending on the circumstances.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I5eb2dd6383d98d25d1f9748af08c1a13d18acb0e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8729
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-04 15:00:35 +00:00
Konrad Sztyber
51b018da0f test/nvmf: add asynchronous NVMe initialization test
The test verifies that the NVMe driver initialization is asynchronous.
There are some error logs during shutdown, as the detach path isn't
asynchronous yet, but as long as the detach is performed implicitly,
the test completes successfully.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I97483d8a8ba2487e279f7674514ad2cc2c54d504
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8625
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
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-10-04 15:00:35 +00:00
Ben Walker
4fb3fea387 bdev/nvme: In bdev_nvme_attach_controllers, if adding a path the subnqn
must match.

Change-Id: I4e19ab8668268b273580d2b23ec30eafe21001ef
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9342
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-09-28 07:29:50 +00:00
Ben Walker
8dfefec509 bdev/nvme: Improve error reporting when adding additional paths to a
controller

Change-Id: I53ac0c6f8879bf80bc1345ef620a215d434f536f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9340
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-09-28 07:29:50 +00:00
Ben Walker
bf9e3156a9 test/nvmf: Add detach_controller calls to multicontroller.sh
This test will expand with more ways to add second paths, so we need to
remove the ones we add right after they're added.

Change-Id: Ie95ba01176cdedd858a98306f876d2d253a1c8cc
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9454
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
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>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
2021-09-28 07:29:50 +00:00
Ben Walker
14739d6e13 bdev/nvme: bdev_nvme_detach_controller is now much more flexible
It can match by any provided parameter to remove paths.

Change-Id: I5e7a87342bbb90943dc97fb52f142814fcf0acfa
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9453
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-09-28 07:29:50 +00:00
Jim Harris
213eaed3bd nvme_fuzz: pass trid on command line only
Previously the Transport IDs would need to be an ini-style
config file that the nvme_fuzz app would then parse.  Instead
just add a -F option that tells the nvme_fuzz app which
subsystem(s) to fuzz.  This simplifies the fuzz_app code
a bit and makes it a bit easier to use.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9603
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-09-27 10:55:34 +00:00
Jim Harris
9c968f8e05 test/nvmf: always use loopback when running tests in --iso mode
Using the physical NIC interfaces is really designed more for
CI.  Don't try to use the physical NIC interfaces when running
tests locally in --iso mode.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9602
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
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>
2021-09-27 10:55:34 +00:00
Alexey Marchuk
ecfc50872f test/dma: Add functional test to verify DMA
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: If7eb7da6c3356aae9e8654372ce1c9a89bf25de6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8855
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
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-09-24 07:37:45 +00:00
Alexey Marchuk
ea86c035bb nvme/tcp: NVME TCP poll group statistics
Enable dump of transport stats in functional test.
Update unit tests to support the new statistics

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I815aeea7d07bd33a915f19537d60611ba7101361
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8885
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
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-09-24 07:30:06 +00:00
Alexey Marchuk
343e2c8565 test/nvmf: Add test to cover subsystem destruction
Change-Id: Ide26bd4d1f6a83f28d47f63f09766e54895410f6
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6662
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-09-08 08:04:04 +00:00
Karol Latecki
226a705d83 test/nvmf: reduce number of loops in rpc.sh test
Running create/delete loop 50 times causes the test to
take over 10 minutes and time out in nightly version.

We have various code analyzer tests in place so running
the same script block over 50 times in hope of detecting
memory leak or some similar defect seems a bit redundant.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Icb2acb0ffbbe63d3004532d0b4a261152891216a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9166
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-08-20 07:29:25 +00:00
Michal Berger
4f99de088e test/nvmf: Wait for net devices after they are moved from extra netns
Fixes #2072

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Iab6f1109cb4f3b31b3df62bb9ba678336c8b2502
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9168
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
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>
2021-08-13 07:20:50 +00:00
Jim Harris
0c64044400 test: add connect_stress test
This new connect_stress application connects to a
specified subsystem, creates some IO qpairs and
reads the CSTS register.  It goes through this loop
over and over again until the specified time expires.

The connect_stress.sh test script runs this application,
and then while it is running does continuous add_ns and
remove_ns RPCs.

This stresses nvmf handling of connect (admin + I/O) as
well as get_property commands.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8ab5156045cf5614f74988e38a9d37db96d7d5b9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8572
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-07-19 13:50:29 +00:00
Michal Berger
742f04b3f7 check_format: Fixes for shellcheck's SC2251 directive
SC2251: This ! is not on a condition and skips errexit.
        Use && exit 1 instead, or make sure $? is checked.

This is critical since our test suites heavily depend on errexit
to catch all abnormal conditions. Replace ! foo ... with a call to
NOT() wherever possible. For the test/ocf pieces, use [[ ]] instead
to define the condition for the existance of the ocf bdev.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ied3f99b9f1dc0594e4aef64fc21e51498f19ac23
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8504
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-06-30 22:43:05 +00:00
Shuhei Matsumoto
3aeeb4b68f test/nvmf_multipath: Retry checking if ANA state is changed with timeout
The latest Linux NVMe host (e.g. Linux kernel 5.12) have improved
the quality of multipath but still has an issue such that ANA state
is observed to be invalid even after connection is successfully
created.

By code inspection and system test, initializing ANA state may be
delayed even after connection is successfully created.

We can insert a short sleep but it will be better to retry checking
with timeout. The created function check_ana_state() is applied to
the remaining cases.

This fixes the part of the issue #1819.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifc4eaef7c702d961caeee5bcdc9e6eab4704fc5d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8475
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-06-28 16:25:24 +00:00
Changpeng Liu
67cf3e1c0a test/vfio-user: use variables to make each line more shorter
Also rename `muser` to `vfio-user` finally.

Change-Id: Iaf76a4bfc8f7a35621fcb60fd78cd145ea219269
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8167
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: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-06-09 07:21:31 +00:00
Michal Berger
70f7ea3e30 test/nvmf: Simplify get_nvme_devs()
This function was unintentionally including trace lines in its output
by playing with stderr (where -x is redirecting its output by default).
Avoid that by simply listing the devices and doing proper checks from
within the actual test.

Spotted in https://github.com/spdk/spdk/issues/1973

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: If15375aca152aaa49267c9cc51e70fd859685ea1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8156
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-06-04 19:58:56 +00:00
Changpeng Liu
5b532e80c8 test/vfio-user: add subnqn for all vfio-user tests
After commit a31e319f "nvme: init discovery ctrlr using nvme_ctrlr_process_init"
SPDK will not initialize vfio-user subsystem if we didn't specify it
in the command line, so add this parameter as other transports already use it.

Change-Id: I5331459e9a88d8d94fa8b6ce693e086516b9f0bc
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8120
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-06-03 04:03:04 +00:00
Michal Berger
fead05c025 test/nvmf: Rework the traps
Declare single trap from nvmftestinit() instead overriding main trap
depending on the use-case (veth vs phy).

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I23c66fc5728510d06eee9837843f0734b2d03dcf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7850
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-05-20 15:16:21 +00:00