Commit Graph

11859 Commits

Author SHA1 Message Date
Ben Walker
ded0c2d146 bdevperf: Break code for running a job into a separate function
This will make some refactoring later a bit clearer.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Iae2c36d1c298377cd20cf3226b3b8dfe712484ff
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1503
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@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>
2020-04-14 11:32:35 +00:00
Ben Walker
5dfd4f261f test/nvmf: Restart target between shutdown tests
For RDMA, it seems we may have to wait out some timeouts to
reset all of the connections to make this test work reliably. Instead,
just restart the target for each test.

If there's a way to force close all of the connections properly in the
future we can go back to running these all on a single target.

Change-Id: If79257349007765dc16bacebf810312a025d70a3
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1609
Community-CI: Broadcom CI
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-04-14 11:32:35 +00:00
Ben Walker
f76cf58294 bdev/iscsi: Release request after connection is done
This request was getting leaked previously.

Change-Id: I6e7dc24c92d7bae7a8df54025d61eb391a569df9
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1591
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>
2020-04-14 11:32:35 +00:00
Ben Walker
50529593c4 bdev/iscsi: Release lun poller on correct thread.
If thread A is the first to grab a channel, the poller will be on thread
A. But then if the shutdown happens such that thread B is the final
channel to release it's channel, it will attempt to free the lun poller
from thread B and crash.

Change-Id: I354f9f28d55e5e82cb6c737c734acadbd80e283d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1590
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>
2020-04-14 11:32:35 +00:00
Jin Yu
c8bdbc12c3 vhost: refactor vhost scsi process_vq
Add scsi_blk_init function to replace the common
code of task initlization. The same to process_vq
function.

Change-Id: Ied0582ad7f087990c581e6e7aacde6ec201964dc
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1613
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-04-13 02:11:40 +00:00
Michal Berger
64cfaf3f16 test/lvol: Add function to handle output from simple jq queries
This function exposes assoc array which consits of fields extracted
out of the parsed jq output.

Change-Id: I189c5c01e6efd60d6f2010df90093920a5d37690
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/778
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-04-10 07:56:21 +00:00
Darek Stojaczyk
eb33c9a659 test/lvol: rewrite construct_lvol_store_with_all_clear_methods to bash
Change-Id: Iaafa521f420d677834f01fd13f56b3aa9e9cf49d
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/709
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
2020-04-10 07:56:21 +00:00
Michal Berger
a317fccab7 test/lvol: rewrite thin_provisioning_filling_disks_less_than_lvs_size to bash
Change-Id: Iec5277f86e2f663eafd2c4c32515c2bf30a1e068
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/708
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-04-10 07:56:21 +00:00
Pawel Kaminski
0e6ee49e3c test/lvol: rewrite thin_overprovisioning to bash
Change-Id: I0cef2a609c2c57708f1cb62ff17025d4643b0ac4
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/707
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-04-10 07:56:21 +00:00
Pawel Kaminski
e4442af984 test/lvol: rewrite thin_provisioning_resize to bash
Change-Id: I0241a4c435a3b28951edcdd7f4aa6a5120a7dc8a
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/706
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-04-10 07:56:21 +00:00
Pawel Kaminski
661adc77c3 test/lvol: rewrite thin_provisioning_data_integrity_test to bash
Change-Id: I9a955143917ecad991a16429d6c7f4aff55acacf
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/705
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
2020-04-10 07:56:21 +00:00
Pawel Kaminski
7d0cd374b3 test/lvol: rewrite thin_provisioning_read_empty_bdev to bash
Change-Id: Id4609dbd3ac196dca13395007831b11e01af70b9
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/704
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
2020-04-10 07:56:21 +00:00
Vitaliy Mysak
9f133b1bcc module/ocf: check cache name during recovery from metadata
Save cache device name in metadata section to
check if names agree during auto creation on examine.

This change prevents accidental creation of ocf devices.

Consider example in which vbdev_split is used as cache:
1) bdev_malloc_create -b Malloc0 ...
2) bdev_malloc_create -b Malloc1 ...
3) bdev_nvme_attach_controller -b nvme ...
4) bdev_split_create nvme 2
5) bdev_ocf_create ocf0 wt nvmen1p0 Malloc0
6) bdev_ocf_create ocf1 wt nvmen1p1 Malloc1
7) *shutdown*
8) *startup*
9) bdev_nvme_attach_controller -b nvme
Now ocf0 bdev gets created with cache = nvmen1 (not nvmen1p0)!

This is because nvmen1 and nvmen1p0 have the same metadata.
The result is rather unexpected,
so we would like to verify that cache device
is the one used during creation.
Name is not an ideal way to verify that,
but it should work for most cases.

This change is related to issue #1320

Change-Id: I19ce97163090c5c5b3324eaed90b3134011bb3fb
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1544
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-04-10 07:08:50 +00:00
Michal Berger
42fc807f47 test/nvmf: Don't let nvmfcleanup() to fail upon finishing the test
If this function fails due to, e.g. modprobe not being able to unload
kernel modules, the errexit will prevent nvmftestfini() from killing
target applications.

Avoid this scenario by ignoring nvmfcleanup()'s es when called from
nvmftestfini().

Change-Id: I3a05261f71d3dcc6ed06f786b4cc1988fd733ffc
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1377
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Community-CI: Broadcom CI
2020-04-10 07:08:43 +00:00
Michal Berger
b8805882fc test/ftl: Drop .ini config in favor of json
Change-Id: I962ce508a03aee35b44da512492ef0a483cceb59
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1358
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-04-10 07:08:43 +00:00
Michal Berger
9f815a839d test/openstack: Drop .init config in favor of json
Change-Id: I2cbc31c13df4c0ab75846a262fd50c1769fea5a3
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1357
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-04-10 07:08:43 +00:00
Michal Berger
ddc069c5be test/openstack: Don't trigger errexit from within finish_test()
If, e.g., the rpc call fails the remaining parts of the function
won't be called, resulting in lingering processes tainting the
testing environment.

Avoid the above scenario by intercepting single es from the entire
list.

Change-Id: Ie591935a3d868a1efa2890d1bb14776b0bdb6620
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1356
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-04-10 07:08:43 +00:00
Jacek Kalwas
55e0ec894f nvme: fix identify active ns
NVMe ctrlr init state machine shall be async whenever possible so it
is not blocking other code from processing. It can result in deadlock
when cmd producer and consumer are sharing the same thread.

This patch is making identify active ns async by introducing new
state to wait for completions.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I346d35bab4733d3941e023602854fdd5b1ef23b5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1463
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Broadcom CI
2020-04-10 07:08:09 +00:00
Jacek Kalwas
842ae79aa6 nvme: refactor identify active ns
It is a prework for changes related to ctrlr init state machine.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: If289580f65ae27468b659a7ea07a4e4298876e77
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1489
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Broadcom CI
2020-04-10 07:08:09 +00:00
Changpeng Liu
2b5c47b198 nvme/opal: use the return value as the maximum ranges
Change-Id: Ifa7ce53cfbfa614defec1faa1c38f3f8105d2c74
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1666
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-10 07:07:52 +00:00
Changpeng Liu
76d8bbf3f8 nvme/opal: remove timeout
The timeout is designed for REVERT action, the REVERT needs
even several minutes based on different drives.  Due to the
REVERT is low level API, it does need a response from the drive,
even we returned the timeout to the user, the drive is still in
the REVERT state, and it can't be used anymore, so the timeout
here doesn't help anything, just remove it.

Change-Id: I8f5119630d52f40e5bacea8ef8f3c771ee001aeb
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1665
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-10 07:07:52 +00:00
Changpeng Liu
d5de4af2bc nvme/opal: concentrate security receive and status check in one function
Also rename them to security send/recv to reflect the fact.

Change-Id: Icdeb7f15849a9d1aacf5936c5954bb39875f4cd9
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1651
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-10 07:07:52 +00:00
Changpeng Liu
3add68e3d6 nvme/opal: remove opal_finalize_and_send()
Function opal_cmd_finalize() is OPAL command related, it's
part of the OPAL command construction, and opal_send_recv()
is low level security send/receive channel, so it's better
to use them separately.

Change-Id: I0648585726d5caa7b37a4bc6783bcb870c028bd2
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1650
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-10 07:07:52 +00:00
Changpeng Liu
ce25a45654 nvme/opal: allocate session instead of use the global one
Previously the OPAL library uses the global session which
is OK, because the drive can only support 1 session, for
now, we can change the code to use allocated session, this
can make the library to be used in asynchronous way.

Change-Id: Ie033f905bd41c1171b8222d59925dc25729df84e
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1649
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-10 07:07:52 +00:00
Changpeng Liu
5b767e1787 nvme/opal: remove callback from opal_finalize_and_send()
The function inside opal_finalize_and_send() will be executed
synchronously, so remove the callback will make the code more
clear.  Also rename the completion function with "_done" suffix.

No code logic change from this patch.

Change-Id: I03c5875457e52009768410ad29a89730a7df1c8b
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1648
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-10 07:07:52 +00:00
Karol Latecki
6d1bb438bf autobuild.sh: delete scanbuild output files before the build
"all_c_files.txt" had output always appended, not overwritten.
This caused autobuild.sh to fail if next builds had different
configuration.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I9ba52d7f5a71d79a269c962e6c38c2a7d48f294c
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1652
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-04-10 07:07:23 +00:00
Tomasz Zawadzki
454ff1726b test/ioat: ioat_perf app will exit with error code
This change will make sure that ioat_perf application
exits with error code 1 whenever there was
no test performed.

Mainly by checking number of ioat channels available.
Other changes made to align with returning 1 on error.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Id94fa947fd097d5085285d3348aeb41ff280e731
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1672
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-04-10 07:07:11 +00:00
Tomasz Zawadzki
5a48cd9690 test/ioat: verify app will exit with error code
This change will make sure that verify application
exits with error code 1 whenever there was
no test performed.

Mainly by checking work_fn return code.
Other changes made to align with returning 1 on error.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I28a36dd5d5adb50bb4f54b1cc724c80da96af564
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1671
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-04-10 07:07:11 +00:00
Darek Stojaczyk
23a7e4b94f env/pci: cleanup spdk_detach_rte by moving code
Change-Id: I1dee015e44ecfbd7fcb1680cce0e6d527d083c99
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1728
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-04-10 07:07:05 +00:00
Tomasz Zawadzki
9db8040738 autopackage: remove SPDK_BUILD_PACKAGE flag
Remove SPDK_BUILD_PACKAGE flag, since it was not set
on any of the CI jobs. The default value "0" was always used.

Only indicator whether second part of the script executed,
was handled by RUN_NIGHTLY flag.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I1c5a660ed86bb520972c630118f8499966bdb6d5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1607
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-09 13:44:21 +00:00
Tomasz Zawadzki
bea4b14a9d autopackage:replace tarball and compile with debug build
Removed part of the script was only creating tarball from
sources and built from them.

Since SPDK is not distributed in this way usually,
this test does not add much value.

On the other hand this was the only palce where
release build (--disable-debug) was tested.

This patch replaces original tarballing,
with release build test as that was the only
part of the script adding value.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I6a054e15e6caf827653b671543c08d4a0986f353
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1606
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-09 13:44:21 +00:00
Tomasz Zawadzki
e8c42ef37c raid_ut: initialize ch_ctx in test_multi_raid_with_io
Lack of this initialization cause compilation error on release builds.

bdev_raid_ut.c: In function ‘test_multi_raid_with_io’:
bdev_raid_ut.c:2007:3: error: ‘ch_ctx’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
 2007 |   verify_io(bdev_io, g_max_base_drives, ch_ctx, pbdev,
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2008 |      g_child_io_status_flag);
      |      ~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I2221aa1d78d640439d5876a781a0d173a370e2a7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1626
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-09 13:44:21 +00:00
Shuhei Matsumoto
99e4374f8d lib/thread: Add busy count for poller to increment only when some work was done
Currently run count of poller has been incremented per execution.
It will be helpful for us to know how poller is busy by adding busy
count which is incremented only when some work is done.

spdk_thread_poll() has used the same timestamp in it, and so this is
the maximum we can do for now.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0adfbf9a62c959499978124ecc97d377c96c3769
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1713
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-09 13:44:14 +00:00
Shuhei Matsumoto
b32411ddaa ut/thread: Test creating and destroying nested I/O channels
This patch creates a test case to simulate nested I/O channels by
generic bdev layer and bdev modules. The nested level of I/O
channels is two at a maximum now but the nested level of the test
case is three.

Besides, any poller registered on the nested I/O channel is not
visible to the upper layer. So include such pollers into the test
case.

By combining thread termination, test the fix for the github issue
is correct.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6a04d753e462cdaba7364678b5118c45b09708ca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1390
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
2020-04-09 13:44:14 +00:00
Shuhei Matsumoto
a12aae4c85 lib/thread: Add timeout to wait until exiting thread is exited
Set 5 seconds timeout to wait until exiting thread is exited into
spdk_thread_poll(). After the timeout, collect error log and then
move the thread to exited forcefully.

Add necessary unit test case accordingly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ied8f58a2023a3bbe098530810fd3288bef93c3e7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1644
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-09 13:44:14 +00:00
Shuhei Matsumoto
e9aec6746a lib/thread: thread_poll() polls until the exiting thread is exited
Extract _spdk_thread_exit() from spdk_thread_exit() and
_spdk_thread_poll() calls _spdk_thread_exit() if the thread is in
the exiting state. spdk_thread_exit() changes to move the state to
the exiting state. The spdk_thread_poll() loop will end after the
thread moves to the exited state because the caller of
spdk_thread_poll() will check if the thread is in the exited state,
and break the loop if true.

If the user does not call spdk_thread_exit() explicitly, the reactor
has to terminate all existing threads at its shutdown. In this case,
multiple threads may have some dependency to release I/O channels or
unregister pollers. So the reactor has the large two loops, the first
loop calls spdk_thread_exit() on all threads, the second loop calls
spdk_thread_destroy() if exited or spdk_thread_poll() otherwise for
each thread until all threads are destroyed.

Besides, change the return value of spdk_thread_exit() to return
always 0. Keep it for ABI compatibility. Change ERRLOG to INFOLOG
for _spdk_thread_exit() because it is called repeatedly now. Remove
the check of I/O reference count from _spdk_thread_exit() because
_free_thread() cannot free I/O channel. Refine the unit test
accordingly.

Fixes issue #1288.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iee5fb984a96bfac53110fe991dd994ded31dffa4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1423
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-09 13:44:14 +00:00
Maciej Wawryk
282b1505e5 scripts/perf: Fix cpu_frequency parametr passing
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I9617cd92d20b07c32761fb67ce6a1b30e0985831
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1697
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-09 08:08:38 +00:00
Maciej Wawryk
a61af6cfc9 scripts/perf: replace dots by floor sign in percentile variable
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I34e912dd207f16b1926edb37df41128a0524bc4c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1711
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>
2020-04-09 08:08:17 +00:00
Richael Zhuang
13d6d00347 examples/blob: skip '\0' when dump xattr's value
In show_blob(), value_len of xattr contains terminator '\0',
which is printed as '.' when calling spdk_log_dump().
For example, we set key/value pair as <key1,xattr value>, we get
"xattr value." but not "xattr value" when showing blob info.
Skip '\0' will fix this.

And "data[BUFSIZE]" seems redundant here, remove it.

Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: I4e7c3276e51f14badf43b660b80b24ae85bb0900
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1745
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-04-09 08:08:07 +00:00
yidong0635
97e345002b test/nvme_poll_group: Fix uninitialized value in unittest.
Compiling with warning:
nvme_poll_group_ut.c: In function ‘test_spdk_nvme_poll_group_add_remove’:
nvme_poll_group_ut.c:268:8: warning: ‘tgroup’ may be used uninitialized
in this function [-Wmaybe-uninitialized]
  qpair = STAILQ_FIRST(&tgroup->active_qpairs);

tgroup may can't be initialized as:
                if (tmp_tgroup->transport == &t1) {
                        tgroup = tmp_tgroup;
                } else {
                        CU_ASSERT(STAILQ_EMPTY(&tmp_tgroup->active_qpairs));
                }

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Id915e651f73ca3814a7e8d3f95c8793b8b880990
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1738
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-04-09 08:07:50 +00:00
Shuhei Matsumoto
a91d650245 test/bdevperf: fix 4 issues with the outstanding bit array
fix #1: fix issue when setting outstanding bit array

In the case where spdk_bit_array_get() is false after selecting
an offset, we'd fail to set the outstanding bit in the array for
that location based as it was included inside of the conditional
that would have us try another. Switched the logic up to avoid
needing a second check on g_verify.

fix #2: fix offset_in_ios to be relative with the range of the job

offset_in_ios was absolute but size of bit map array was the
range of the job. The comment in the source file said it was
relative, but did not match the code.

Change offset_in_ios to be relative with the range of the
job and use it for spdk_bit_array_set, spdk_bit_array_get, and
spdk_bit_array_clear.

fix #3: fix bit was not cleared when submission failed

When bdevperf_submit_task() failed to submit, the corresponding
bit was not cleared from job->outstanding.

fix #4: fix bit was not cleared when submitted I/O failed.

bdevperf_complete() had cleared bit only if the I/O succeeded.

This bug is apparaent only when -C option is enabled.

fixes issue #1329

Signed-off-by: paul luse <paul.e.luse@intel.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5b7e1d0b2e489b807906a94ed5d05da65067e6ab
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1736
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>
2020-04-09 08:07:31 +00:00
Michal Berger
a195335f7a test/nvme_perf: Drop .ini config in favor of json
Change-Id: I60ba7acd3c3b56563dbce8055aad125f47a2a346
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1291
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-08 06:44:22 +00:00
Michal Berger
8a41d97c6e test/nvme: Make sure that $rootdir is declared
perf/common.sh uses autotest's common tooling which depends on this
variable to be set. Without it, execution of the run_perf.sh simply
fails.

Change-Id: Ib68d565b1d38c80df3d3f1a09f5fa7bef6eaaffd
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1290
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-04-08 06:44:22 +00:00
Michal Berger
524b0ddb46 test/vhost_perf: Drop .ini config in favor of json
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ida15585aa2c16e03f000ca115babc8a5a3629fe8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1284
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-04-08 06:44:22 +00:00
Seth Howell
9cb8c2387a autobuild: optimizations around compiling tests.
This commit combines a couple of small optimizations to
help make the unittest scan-build checks more comprehensive
while not taking extra time to compile examples when we are
doing functional tests that don't require them.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I1d3af0026b4be6e799516ef52e9414790eab85e6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1270
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-08 06:44:15 +00:00
Karol Latecki
91407607e5 test/vm_setup.sh: add parted for Arch Linux
Parted is not installed in the system by default and
is needed by number of spdk tests.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I5d8628be2e328d528a8aa47a8084d33fbb63b187
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1482
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-08 06:44:03 +00:00
Ziye Yang
71fc81620f posix: Add the socket into pending_recv list if migrated from another polling group.
When the socket is migrated from one polling group to another
(e.g., iSCSI target example), we should add it into pending_recv_list

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I56d34000344ae452a25b82952c831f09e0266d66
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1448
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-04-08 06:43:56 +00:00
Tomasz Zawadzki
4faa7b5837 test: remove RUN_NIGHTLY_FAILING flag
Purpose of this flag is sketchy at best.
Failing tests should be either fixed or disabled/removed.
Running separate job in hopes of it fixing itself,
might not bring the expected outcome.

Case in point - test case in this patch
was added to this flag over a year ago.

This is last remaining test case under this flag.
So there is no need for it to exist.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I8481ac7102245889047dde083b34276d22271a03
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1495
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-04-08 06:43:31 +00:00
Maciej Wawryk
7c1e69b3fa scripts/nvmf: Fix subsystem divide and format error
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I874c3a28c453737d0ba6ab42ec0d0a9fbc4719f7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1679
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>
2020-04-08 06:43:16 +00:00
Shuhei Matsumoto
6397735bc9 lib/thread: Introduce thread state to distinguish exiting and exited
Add enum spdk_thread_state made of RUNNING, EXITING, and EXITED, and
the current state to struct spdk_thread.

The state EXITING is not actually used in this patch yet.

Replace the flag exit simply by the state EXITED.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6e5dc7184d50ae6d00e6ba00f5e2cf6045e5d48d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1630
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>
2020-04-08 06:43:05 +00:00