Commit Graph

327 Commits

Author SHA1 Message Date
Michal Berger
3f912cf0e9 misc: Fix spelling mistakes
Found with misspell-fixer.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: If062df0189d92e4fb2da3f055fb981909780dc04
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15207
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-12-09 08:16:18 +00:00
Michal Berger
1f59abaebf scripts/setup: Use driver_override to bind devices
Using new_id attribute is global in scope, meaning that depending
on the kernel's setup seen prior running setup.sh, single write
to it may re-bind ALL matching devices. This doesn't play well
with our PCI_{ALLOWED,BLOCKED} options as they can't be enforced
in such a case. Consider the following example:

  > modprobe -r nvme # all nvme ctrls are detached from the kernel
  > echo 0xdead 0xbeef >/sys/bus/pci/drivers/uio_pci_generic/new_id

  # setup.sh-wise

  > modprobe -r nvme
  > PCI_BLOCKED=some:dead:beef.bdf setup.sh
  # PCI_BLOCKED device still ends up bound to userspace driver.

After this single write, ALL matching devices will end up bound to
uio_pci_generic. To avoid this, we should override preferred driver
on per-bdf basis.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Ic4613e33321303b92b47ce3f4d7e1f29ecca3036
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13813
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-12-08 14:16:40 +00:00
Evgeniy Kochetov
e5ed83fe8b test/nvme/simple_copy: Allow to connect to NVMf target
Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: I475e51af200d406287c3641ef3478a6c04d2e5c0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14352
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-11-30 08:50:06 +00:00
paul luse
eb53c23236 add (c) and SPDX header to bash files as needed
per Intel policy to include file commit date using git cmd
below.  The policy does not apply to non-Intel (C) notices.

git log --follow -C90% --format=%ad --date default <file> | tail -1

and then pull just the year from the result.

Intel copyrights were not added to files where Intel either had
no contribution ot the contribution lacked substance (ie license
header updates, formatting changes, etc)

For intel copyrights added, --follow and -C95% were used.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I2ef86976095b88a9bf5b1003e59f3943cd6bbe4c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15209
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-11-29 08:27:51 +00:00
Krzysztof Karas
29784f35cd bdevperf: promote bdevperf from test to example application
bdevperf application is utilized in multiple test scenarios
and most prominently in SPDK performance reports.
Similar to perf and fio_plugins, it is used to measure performance.
It is intended to represent the expected behavior of users
application that use SPDK bdev layer.

Applications under --enable-tests are intended for specific test
scenarios and user interaction is usually via a test scripts.
Meanwhile --enable-examples are used more broadly to teach and
show usage of SPDK libraries.

As an added benefit with this patch, its possible to compile
bdevperf without need to satisfy additional requirements to
compile all the test applications.

Change-Id: I9aaec1f9d729a1cdee89b5fdc365d61c19b03f82
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14558
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2022-11-16 09:52:41 +00:00
paul luse
a6dbe3721e update Intel copyright notices
per Intel policy to include file commit date using git cmd
below.  The policy does not apply to non-Intel (C) notices.

git log --follow -C90% --format=%ad --date default <file> | tail -1

and then pull just the 4 digit year from the result.

Intel copyrights were not added to files where Intel either had
no contribution ot the contribution lacked substance (ie license
header updates, formatting changes, etc).  Contribution date used
"--follow -C95%" to get the most accurate date.

Note that several files in this patch didn't end the license/(c)
block with a blank comment line so these were added as the vast
majority of files do have this last blank line.  Simply there for
consistency.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Id5b7ce4f658fe87132f14139ead58d6e285c04d4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15192
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>
Community-CI: Mellanox Build Bot
2022-11-10 08:28:53 +00:00
Michal Berger
f17fe62924 test/xnvme: Use null_blk device instead of zram for the backend device
zram doesn't support some of the uring-specific setup that xnvme may
be using, in particular the IORING_SETUP_IOPOLL, so switch to something
more common like null_blk module. For details see:

https://github.com/spdk/spdk/issues/2708

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I48b91ba356b4054433eb1835fa3e2708c8d2628c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14920
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-10-27 09:06:37 +00:00
Krzysztof Karas
ce29e0131f hotplug: use RPC instead of reading hotplug logs
A new RPC perform_tests has been added.
This request will help us avoid reading hotplug generated
logs, and instead we can stop hotplug right before
it begins generating IO, and resume it when the test
scripts are ready.

Additionally a new command line option has been added
to the hotplug application "--wait-for-rpc", which
indicates that hotplug should wait for
perform_tests RPC before starting its IO.

Change-Id: I71ca148201854ac155cc2a61171a4fb5fc427a19
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13962
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-09-23 12:54:44 +00:00
Michal Berger
9c0181451b nvme/perf: Read NUMA node id from nvme subsystem
Instead looking up the pci bus extract the info from the nvme
subsystem under sysfs. Also, remove deprecated commit about
buggy kernels - this shouldn't be the case for newer releases.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I0ef46eb3b1935bd5bf86f7b06f9310ca8f1a1a2b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14592
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-09-22 15:53:18 +00:00
Michal Berger
6baf5d8359 nvme/perf: Add xnvme support into benchmark scripts
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Id77e499d25452bc07d595ed41e683c99082babd9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14242
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-09-22 15:53:18 +00:00
Krzysztof Karas
1819d49e4f sw_hotplug: run the hotplug in the background
Currently we run the remove_attach_helper() function
in the background and hotplug application in the
foreground - if hotplug hangs unexpectedly, the whole
script will freeze.

This patch pushes hotplug to run in background to ensure
the control over the whole test is on sw_hotplug.sh
script's side. This way we can enforce a timeout and
stop the execution.

Change-Id: I5ae5e4e029f65faf5d41e2f7e1d576823d30ac33
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13407
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-09-21 15:47:36 +00:00
Krzysztof Karas
dc43aae54d hw_hotplug: use all available GPIO lines
Prepare Beetles to use all available GPIO lines to
manage NVMe drives.

The two reasons are:
 + we want to test multiple NVMes instead just one
 + setting all GPIO will make it easier to physically
   connect NVMe connectors to Beetles

Change-Id: I0351dd2e7cfef0a75eff0692be3c746ad1b5664f
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13748
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2022-09-21 08:48:25 +00:00
Krzysztof Karas
40cb3961ec hw_hotplug.sh: add -q option to grep to generate fewer logs
Change-Id: I24ab10a3021d52e71bb20cd2cdf748fa8713339c
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14523
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>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2022-09-21 08:17:16 +00:00
wanghailiangx
c43a50ea00 test/nvme: Counting io_submitted after starting I/O success
Change-Id: I1e79c40d25dd67c84f583b8aab362e0eb65f522e
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14536
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-09-20 10:19:39 +00:00
wanghailiangx
69b4e8b17f test/nvme: Replace -s with -o for "io size in bytes"
For most of apps, -o is for "io size in bytes",
-s("io size in bytes") was changed to -o a long time ago.
-s is now for "memory size in MB for DPDK".

Change-Id: I0977d4a7bc30a4f2e135707ff6e77b6254240fb9
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14533
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-09-19 13:11:55 +00:00
yidong0635
1ad140676e test/aer: Complete requests before detaching.
The failed stack:
The calling processes:
	spdk_nvme_detach_async->nvme_ctrlr_detach_async->
	nvme_ctrlr_get_ref_count->nvme_ctrlr_proc_put_ref->
	nvme_ctrlr_remove_inactive_proc->nvme_ctrlr_get_current_process->
	nvme_ctrlr_remove_process

The proc->active_reqs list processing steps:
	spdk_nvme_ctrlr_process_admin_completions->
	spdk_nvme_qpair_process_completions->
	nvme_transport_qpair_process_completions->
	nvme_pcie_qpair_process_completions->
		*nvme_pcie_qpair_complete_tracker
		*nvme_pcie_qpair_insert_pending_admin_request
	and
		*nvme_pcie_qpair_complete_pending_admin_request
Issue assert:
	assert(STAILQ_EMPTY(&proc->active_reqs));
The assert means there are outstanding active requests in
proc->active_reqs list.

According the test app's coding style, it needs to foreach the dev and
complete the outstanding commands before spdk_nvme_detach_async
especially  it launched spdk_nvme_ctrlr_register_aer_callback .

Bring the aer tests back, to check it.

Fixes issue #2674.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Ic0d3946f8c8743155cf3067aea1c9b4676748d2f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14433
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-09-12 07:25:41 +00:00
wanghailiangx
809ae055b4 usage: Add ] for [-G enable debug logging
Change-Id: I02944e2c40c9a5d288d20b53548371d5e7b97069
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14334
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-09-06 07:16:32 +00:00
Krzysztof Karas
c527d09f30 hotplug: add new software hotplug test
Add a new test to sw_hotplug.sh based on SPDK target
in addition to examples/hotplug application.

Change-Id: I352ee4dfe934fa88082101bb92c6db41da10c10c
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10088
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>
2022-09-01 11:15:03 +00:00
Krzysztof Karas
eaebf84102 autotest_common.sh: change rpc_py to rpc_cmd
Change rpc_py to use rpc_cmd function.
The former needs to be defined explicitly in the scripts
that uses function, while the latter is a function
already available in autotest_common.sh.
Additionally delete unnecessary rpc_py declarations
and override rpc_cmd where additional arguments are
needed (like -s sock_name.sock).

Change-Id: I835f7eb308cd77658a2a425e153ab7ca460b5b61
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12872
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>
2022-09-01 11:15:03 +00:00
Jim Harris
2d37b82e6b test: disable aen tests until root cause
We've had a few more issues with the AEN tests since
they were recently enabled (#2660, #2662, #2664, #2674).
It looks like #2674 is the only one still open, but
it's causing a lot of failures in the test pool so
let's disable the tests again while it gets root
caused.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ib57240e176a05f9b99856ceb6d0bf8afcb24ff95
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14245
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-08-29 23:34:01 +00:00
Curt Bruns
b668e6d853 test: update multi-process Async Event Report test
Updated the existing nvme aer test to only print information
about AEN one time per controller. If the SSD is slow to
reset the temperature setting, it could continually generate
AENs and spam the output logs.

Fixes: #2660.
Fixes: #2662.
Fixes: #2664.

Signed-off-by: Curt Bruns <curt.e.bruns@gmail.com>
Change-Id: Ibbaa9c54bd5f27a018d85ad53390933628975883
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14239
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: Dong Yi <dongx.yi@intel.com>
2022-08-29 11:42:03 +00:00
Michal Berger
53ec23cae6 test/xnvme: Add simple test covering xnvme
This test is meant to simply verify basic IO and rpc integrity with
regards to different io_mechanisms.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I936d57c6ac539e77761656a1ec2b8ad1013f918f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14119
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-08-29 11:40:08 +00:00
Curt Bruns
2a559a43af test: update multi-process Async Event Report test
Updated the existing nvme aer test to remove a race condition
where the aer_cb is executed and the g_temperature_done variable
is incremented just before it is reset back to 0, which causes
the test to loop indefinitely. Also changed the reset_ctrlr call
to check for non-zero instead of < 0 to check for failure.

Fixes #2559

Signed-off-by: Curt Bruns <curt.e.bruns@gmail.com>
Change-Id: Ib0679917684cdbd4c8038279426c6ec368be5f11
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13467
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-08-23 07:16:57 +00:00
Jim Harris
a100b4a4a4 test: remove nvme deallocated_value test
This test was originally written to validate
assumptions around the QEMU deallocate implementation.
It's not really very useful anymore, so rather than
continuing to maintain it (including adding
support for interleaved and separate metadata),
let's just remove it.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I4588cf7bc5f4b339674afc0e09f386784ab874e2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14096
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>
2022-08-18 08:35:02 +00:00
yidong0635
62378c24be test/reset: Remove unused usage.
Here "-m " is not used or related.

so remove it.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Ic8700bd0a262bb70b6116bbee86330eece5c03b0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13879
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-08-08 13:48:49 +00:00
Changpeng Liu
0989766060 test/deallocated_value: shutdown controllers before the quit
The test tool doesn't shutdown controllers when exiting the
process, so here we shutdown the controllers, also fix the
exceptions when no active Namespaces in controller.

Change-Id: I21cbdb1e7bdf37a06f66b917a2bb9bd94e06b444
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13495
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-07-01 09:29:52 +00:00
Ben Walker
8dd1cd2104 check_format: For C files only, fix return type breaks
In SPDK, declarations have the return type on the same line. Definitions
have the return type on a separate line. Astyle has an option for
enforcing this. Unfortunately, it seems to have two bugs:

1) It doesn't work correctly at all on C++ files.
2) It often fails on functions that return enums, or long type names

Deal with 1) by adjusting the check_format.sh script to only tell astyle
to fix return type line breaks for C files and not C++. Deal with 2) by
adding a few typedefs to work around the problem.

Change-Id: Idf28281466cab8411ce252d5f02ab384166790c6
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13437
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-06-27 09:33:48 +00:00
Curt Bruns
b3692ea671 test: disable aen tests until root cause
AEN single and multi testing are causing failures in the CI env
and have not been root caused. Disabling their tests from the
nvme.sh script for now until root-cause of issue #2559 is found
and fixed.

Signed-off-by: Curt Bruns <curt.e.bruns@gmail.com>
Change-Id: I6471d1f4b1d435356cd6b2f8db1f87a26bb9b162
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13469
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-06-27 09:17:07 +00:00
Tomasz Zawadzki
98292d1eee test/cuse: fix ns_dev format truncation
gcc 12 assumes that nsid might take value of UINT32_MAX,
which when represented as a string does not fit in ns_dev.

This is fixed by accomodating the UINT32_MAX string representation
and the 'n' character.

Following error was shown before this patch:
cuse.c: In function ‘verify_devices’:
cuse.c:133:42: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
133 |         snprintf(ns_dev, sizeof(ns_dev), "%sn%" PRIu32, ctrlr_dev, nsid);
  |                                          ^~~~~~
In file included from /home/tzawadzk/spdk/include/spdk/stdinc.h:23,
	     from /home/tzawadzk/spdk/test/spdk_cunit.h:9,
	     from cuse.c:7:
/usr/include/inttypes.h:104:27: note: format string is defined here
104 | # define PRIu32         "u"
  |                           ^
cuse.c:133:9: note: ‘snprintf’ output between 3 and 267 bytes into a destination of size 266
133 |         snprintf(ns_dev, sizeof(ns_dev), "%sn%" PRIu32, ctrlr_dev, nsid);
  |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I14e058edc780d33abdd5eb6ce5ab47ac5d18f10a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13412
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2022-06-23 08:08:30 +00:00
Curt Bruns
8597aa5a7b test: optimize the print statements in aer test
The aer test print statements were overly complicated for multi
process mode, so a macro was created to simplify them. The macro
will prepend "[Child]" to the child process print statements to
make it easier to see which process is doing the printouts.

Signed-off-by: Curt Bruns <curt.e.bruns@gmail.com>
Change-Id: I0ecc5e2526b156fa7f98d44c745408ba922ebeff
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12881
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
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: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-06-15 08:11:10 +00:00
Curt Bruns
fb12887fd8 test: add multi-process Async Event Report test
Modified the existing nvme aer test to include a multi-process
option that verifies that two processes will receive an async
event notification. Also added the multi-process aer test to
the CI test suite.

Signed-off-by: Curt Bruns <curt.e.bruns@gmail.com>
Change-Id: I08731fad317d43dcfb1766d22a3f4c6aa1738d2a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12293
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-06-15 08:11:10 +00:00
Jim Harris
488570ebd4 Replace most BSD 3-clause license text with SPDX identifier.
Many open source projects have moved to using SPDX identifiers
to specify license information, reducing the amount of
boilerplate code in every source file.  This patch replaces
the bulk of SPDK .c, .cpp and Makefiles with the BSD-3-Clause
identifier.

Almost all of these files share the exact same license text,
and this patch only modifies the files that contain the
most common license text.  There can be slight variations
because the third clause contains company names - most say
"Intel Corporation", but there are instances for Nvidia,
Samsung, Eideticom and even "the copyright holder".

Used a bash script to automate replacement of the license text
with SPDX identifier which is checked into scripts/spdx.sh.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iaa88ab5e92ea471691dc298cfe41ebfb5d169780
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12904
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: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: <qun.wan@intel.com>
2022-06-09 07:35:12 +00:00
Krzysztof Karas
13b6c53dcf hw_hotplug: remove log.txt before exiting script
hw_hotplug job would most of the time throw errors on one of device
removals, while running with vfio-pci driver. This issue was not
present for uio_pci_generic driver.

The hw_hotplug.sh script would detect "Starting I/O..."
log, before "Initializing NVMe Controllers" in function
register_controllers() was printed. This indicates
that the log.txt contained logs from previous hw_hotplug
test.

Change-Id: Iad56511ba689cd6b2a794aee6b952c7bba0fe8ef
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12677
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>
2022-06-01 08:58:15 +00:00
Karol Latecki
a877ca604d test/nvme_perf: wait longer for discovering bdevs
With high number of NVMe drives being attached to
SPDK it might take some time to fully initialize all
controllers. Wait a bit longer before trying to
initialize performance tests.

Change-Id: I5104f962e667ee39db6054750afa0fe7bcb6f26a
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11424
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-05-19 08:24:09 +00:00
Maciej Wawryk
7bce0a3ead test/nvme: fix get_numa_node function
.driver_specific.nvme is an array, so return all elements
of this array before trying to access .pci_address field.

We only expect a single PCIe address in this test, so it's
safe.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I0697ab2ffb1adff2c6f288bba460858bf594b219
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11406
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-05-19 08:24:09 +00:00
Karol Latecki
657da2b647 hw_hotplug: use exit instead of return
Can only 'return' from a function or sourced script.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ie6104adeec0f07557989d9ba25ca9aa2f563e1d5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12422
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-05-02 18:55:14 +00:00
Karol Latecki
75aff5abf1 hw_hotplug: add hosts-related SSH options
Do not perform strict host checking and mask
known hosts file. The test might run just after
IP address is set up and we don't want to get
stuck at ssh interactive prompt for adding remote
host to known hosts list.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I10e5e473520994e09562e667b27ee655fceb2dd5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12348
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.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-05-02 18:55:14 +00:00
Karol Latecki
f2ad26d9ca hw_hotplug: allow to use custom SSH key
Put the SSH routine into a function and allow to
use custom SSH key by using an optionally set
environment variable.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I6b1f552af9e28ab0b94d027c8848ef0dd5480791
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12339
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.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-05-02 18:55:14 +00:00
Konrad Sztyber
6e8e184bca scripts: fix PYTHONPATH references to scripts/ directory
After 7610bc38d, python modules are now located in the python/
directory.  That patch also updated PYTHONPATH assignment in most of the
scripts, but one of the perf script and some docs/messages were missed.

Change-Id: Iff3588526f2a382e599f5734d38fc32c15a7bf56
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12223
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-04-18 17:22:09 +00:00
Krzysztof Karas
35828d55ee hw_hotplug: set Beetle's GPIO to high upon exiting with error
Set the GPIO pin to HIGH during trap command.

This is to avoid errors in other test suites, when
hardware hotplug test returns with an error.

Change-Id: I953d42b8f87196a072c3b4530a38b9bf59c62316
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12155
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>
2022-04-07 07:24:48 +00:00
Jim Harris
74cd76db68 test/nvme, test/nvmf: add fused_ordering test
This test reproduced issue #2428. It does the following:

1) submit some large writes (requiring R2T or RDMA READ)
2) submit fused compare (first fused)
3) variable number of qpair polls
4) submit fused write (second fused)

The RDMA and TCP transports were not accounting for the
fused bits, and would send a non-fused command down to
the target layer between the two fused commands.

By adding the variable amount of delay between the fused
command submissions, it creates a window where a large
write's payload is fetched from the host and submitted
to the target between submission of the two fused commands.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I1abd5a6bca08386279c09f8135387826149d30ef
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11963
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-04-05 08:32:06 +00:00
Krzysztof Karas
c8802892ab hotplug: rename and refactor hotplug.sh
Rename hotplug.sh to sw_hotplug.sh (software hotplug)
and refactor its code in preparation for new software
based hotplug test.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I751fc60ee013de341e064c83f0be3a9b404008e7
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8834
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>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-04-05 07:42:43 +00:00
Jun Wen
d740599bde test/nvmf: add aer test for vfio-user
Signed-off-by: Jun Wen <junx.wen@intel.com>
Change-Id: Ia650f91c21ce5495eaf49027cca0e10f71be1f6f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11724
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-03-22 09:29:47 +00:00
Tomasz Zawadzki
c733cd682f scripts/common: set special name to test partitions
SPDK test script can fail during any point of the
execution. To keep using the same devices
between test runs in CI, those devices have to
be cleaned between runs.

To select device for tests or to clean before tests,
the partition table and lack of mount points is used.
SPDK GPT partitions were always considered not in use.
Meanwhile Linux GPT were not, even if lacking a mount
point.

Some of the SPDK tests create Linux GPT partitions,
which might remain after a test run.

Linux GPT partitions created during tests now contain
"SPDK_TEST" as part of their partition name.
This allows marking such block devices as 'not in use',
to be cleaned and used in further SPDK test.

fixes #2345

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I0098776239da9b0c5dcc748625485284e4863525
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11220
Reviewed-by: Michal Berger <michallinuxstuff@gmail.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.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-26 19:07:43 +00:00
Tomasz Zawadzki
b8a51a937e test/common: move all LIB paths to autotest_common.sh
The common file is sourced in all test scripts, so it
is ideal place to put all library paths.

It will make changes to those paths simpler in next patch.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ic37148e6be669f296e8561d6554e735132941413
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6685
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2022-01-26 08:19:06 +00:00
GangCao
765cf74d07 lib/nvme: only active process to operate the unmap operation
Fix issue: #2320

Only the primary process will do the unmap bar operation as for
the map bar operation.

The DevHandle is process specific and the issue here is the
secondary process's function pointer of DevHandle is not properly
set.

Change-Id: I95dddc76c6ce4be8775b6aaf54699002baffd3b9
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11216
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-01-24 20:12:51 +00:00
Changpeng Liu
a391e3ad01 nvmf/vfio-user: assign IO SQs which use shared CQ into same poll group
We will assign each SQ with different poll group in round
robin way by default, this may cause race condition to
post completions to one CQ in different threads, so here
we will assign the SQs which share one CQ into same poll
group.

Also enable multiple cores NVMe compliance tests so that
to cover shared IO CQ case.

Change-Id: I9d7cc78aaedceed23986d9f89ed945e0eb337e09
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11115
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>
2022-01-20 00:13:42 +00:00
Changpeng Liu
a4de4529da nvme/compliance: add shared CQ test case
Change-Id: I5bdc62a2270602095d3a4878ec1f7d1d9a822f2e
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10533
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: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-01-19 02:06:29 +00:00
Ahriben Gonzalez
0345729e00 nvme: Add metadata support to io commands
Adding metadata support for io commands. Currently metadata is ignored
even if present in the cmd struct. Making metadata adress
readable/writable depending on data transfer bits. Adding extra unit
test to make sure metadata fields are populated.

Signed-off-by: Ahriben Gonzalez <ahribeng@gmail.com>
Change-Id: I1d01974a6b2831c82b43e94073065d235eea429a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10854
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-01-14 11:10:13 +00:00
Ahriben Gonzalez
9e14341bd9 nvme: Always set result field for passthru cmd
Modify admin passthru so that result field of passthru struct is always
populated. This should be safe since dw0 is either reserved or contains
command specific info. This is specifically meant for the namespace
management command when attempting to create a namespace. As per spec:
"Dword 0 of the completion queue entry contains the Namespace Identifier
created.". So for nvme cli and perhaps other application to see what is
the id of the namespace created there needs to be a way to pass the
information back.

Signed-off-by: Ahriben Gonzalez <ahribeng@gmail.com>
Change-Id: Ide4effc126ad9eedac95b0700dd65041ed4b35b1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10633
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-01-14 11:10:13 +00:00