Commit Graph

3581 Commits

Author SHA1 Message Date
Seth Howell
d115518ba0 test/nvmf: use nvmfappstart in bdevperf.
just a little cleanup.

This patch series is aimed at enabling reset handling in the spdk nvme
bdev module and demonstrating how it will work using a test in bdevperf.

Change-Id: I1f9108aa2e6f197c8e1c138f0e3205d78fa89dce
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473760
Community-CI: Broadcom SPDK FC-NVMe 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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-11-14 18:07:39 +00:00
Vitaliy Mysak
fa540f18d8 test/ocf: split tests for io types and get_stats
In bdevperf-iotypes we used to call "bdev_ocf_get_stats" RPC
which is not a part of IO types testing.
As a result, we started to get failures caused by that rpc call which
were not related to ocf bdev IO handling (issue #1025).

This patch isolates the RPC call to separate test.

Change-Id: I3a72ef52452868d49a6ec1ae4d3f9643496c2a28
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474052
Community-CI: Broadcom SPDK FC-NVMe 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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-11-14 15:40:34 +00:00
Karol Latecki
03c71d3741 test/vhost: update raid bdev entries in config file
Edited config file is loaded in test via rpc.py
load_config. Because of that, each parameter is
sent "as-is" from config file, as opposed to using
rpc.py bdev_create_raid which would cause argparse to
convert all params to desired type.

Commit 445e667 changed raid_level to enum while this
config file still used int which caused nightly tests
to fail.

Change-Id: I729c7263261c73e255ab2e6071f76219a351cb19
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473565
Community-CI: Broadcom SPDK FC-NVMe 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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
2019-11-14 03:43:47 +00:00
Maciej Wawryk
17b26b7690 test: Shellcheck - correct rule: Word is on the form...
Correct shellcheck rule SC2140: Word is on the form "A"B"C"
(B indicated). Did you mean "ABC" or "A\"B\"C"?

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I1655b2e76be7a5e3d615c5b34c5af9e4012ac49f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473291
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-11-13 15:03:11 +00:00
Pawel Kaminski
4d0c5091a9 test: Shellcheck - add rule SC2154 to exclude list
Corrected code in some files.
Most of cases cannot be corrected as we use global variables
defined in other files.

SC2154: var is referenced but not assigned.

Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Change-Id: Id333587f81b0bc2456b0c97bac5343a8e5a22774
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472342
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>
2019-11-12 18:14:59 +00:00
Pawel Kaminski
074df1d896 test: Shellcheck - apply rule SC2155
Declare and assign separately to avoid masking return values.

Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Change-Id: Ib90598e4268911a3056e8a0baa7d541edaa29b91
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472287
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>
2019-11-12 18:14:59 +00:00
Pawel Kaminski
c9c576912d test: Shellcheck - move rule SC2162 to exception list
read without -r will mangle backslashes

Change-Id: I9eb59dce40c0bfb59d865319992b419d512dc41b
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471885
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>
2019-11-12 18:14:59 +00:00
Shuhei Matsumoto
933d990e23 ut/iscsi: Use TAILQ_HEAD_INITIALIZER() for g_write_pdu_list
This clarifies that g_write_pdu_list is global.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4292a2fb455f3a47d79ae6ebb5dc6046f0f7dd52
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471951
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-11-12 05:31:59 +00:00
Tomasz Zawadzki
9a25fc12bb test: add SPDK_BUILD_PACKAGE flag
Until now the autopackage.sh execution was tied to
RUN_NIGHTLY flag. This was useful to check for
errors on all jobs/systems during a nightly test.
By their nature nightly does not run on per-patch
basis.

This allows for issues to slip in and be noticed only
by the nightly job after merge occurred.

Adding separate SPDK_BUILD_PACKAGE flag, allows to
explicitly test packaging on single job on per-patch.
RUN_NIGHTLY was kept as trigger for autopackage.sh
to still test it on all systems by default.

Change-Id: I29925fd6256b218e24c24ebcc4974c65a9bd986c
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473519
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: Karol Latecki <karol.latecki@intel.com>
2019-11-08 22:18:24 +00:00
Konrad Sztyber
933bf632d6 event/vmd: write_config_json support
This patch adds support for saving VMD subsystem's configuration to a
JSON formatted file.  It allows saving and then loading configuration
with VMD enabled without having to send the `enable_vmd` RPC.

Change-Id: I59b380ec1e1f25f60f45d2363724ed7ac78c365c
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473405
Community-CI: Broadcom SPDK FC-NVMe 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>
2019-11-07 23:05:38 +00:00
Maciej Wawryk
d352c44ad0 test: Shellcheck - correct rule: Consider using grep -c
Correct shellcheck rule SC2126: Consider using
grep -c instead of grep|wc.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Iceeef8b4fae984a95543d8d4b9fcbf90e9c073aa
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473289
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>
2019-11-07 23:04:10 +00:00
Maciej Wawryk
e764b4ca5d test: Shellcheck - correct rule: Assigning an array to a string
Correct shellcheck rule SC2124: Assigning an array to a string!
Assign as array, or use * instead of @ to concatenate.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Id74c55b7e1c41b6469e84ac388cf8a5bd8e562a6
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473276
Community-CI: Broadcom SPDK FC-NVMe 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>
2019-11-07 23:04:10 +00:00
Maciej Wawryk
9a4a87b573 test: Shellcheck - correct rule: $/${} is unnecessary on arithmetic variables.
Correct shellcheck rule SC2004: $/${} is unnecessary on arithmetic variables.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ibf2879360bc50cc058b0f4434a5777c53c0eeffb
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473265
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-11-07 23:04:10 +00:00
Jim Harris
08a71404a2 test: fix uses of deprecated RPCs
We tried to change all of these when updating the RPC
names, but there were some that were missed apparently.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473340
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-11-07 22:55:38 +00:00
Jim Harris
2be2b6eba5 test: add additional asan suppressions related to fio
We are already suppressing fio (not SPDK fio_plugin)
leaks in a couple of other places, which could likely
be causing the indirect leaks we are now going to
suppress here.

Fixes issue #1003.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473495
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-11-07 22:53:21 +00:00
Jim Harris
acea7bbce4 test/rpc_client_test: remove g_rpc_server_th_done sem_t
The pthread_join() is sufficient.  The server thread really
shouldn't take 1 second to run, but when running in a VM
it's possible things are getting scheduled such that the
timer expires.  This should not be a concern of this test
though - it should just test that the rpc server/client
functionality is working as intended.  So remove the
sem_t that was timing out.

Note: I kept the other sem_t's in here for now.  Maybe
they should be removed too, but for now my main intention
was to fix this annoying intermittent failure.

While here, fix some typos and cases where we should be
printing "server" instead of "client".

I think this fixes issue #839.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473490
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-11-07 22:53:21 +00:00
Karol Latecki
8088176127 test/vhost_perf: add option to not run gen_nvme.sh
Do not run gen_nvme.sh and do not automatically create
nvme bdev configuration.
Allows more control over Nvme/bdev configuration when
running performance tests.

Change-Id: I9ef139921efbcc5d92d3a55c05aace929c6284e7
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464564
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2019-11-07 13:32:41 +00:00
Karol Latecki
7f19b9c66d test/vhost_perf: enable host SAR CPU measurements
Add possibility to measure CPU utilization on host server
while running FIO tests.

Change-Id: Ibc76c2b1469974297350388880a036d8778e4713
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464563
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-11-07 13:32:41 +00:00
jiaqizho
2271c69500 blobfs_bdev_ut : fix memory leak
This memory leak bug is very easy to reproduce.
You can follow this step to reproduce:
   1. clone master spdk , update submoudle
   2. ./configure --with-fuse && make -j24
   3. valgrind --leak-check=full --error-exitcode=2
   test/unit/lib/blobfs/blobfs_bdev.c/blobfs_bdev_ut

It show the memory when you run valgrind.
This is because the ctx in spdk_blobfs_bdev_mount have
not freed when spdk_fs_load(override in blobfs_bdev_ut)
passed.

So i added a unmount operation after mount operation
to fix this problem.

Signed-off-by: jiaqizho <jiaqi.zhou@intel.com>
Change-Id: I770f914123e353dc42d0420c1fb8b34ebdf88f6c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473171
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-11-07 13:24:15 +00:00
dongx.yi
861010b2d3 test/unit: Add bdev_zone_ut.c to unittest.
Add unittest for bdev_zone.c.

Change-Id: I9883592048471efe7307eb65a46df000fc205f1e
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471600
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2019-11-07 13:23:18 +00:00
Pawel Kaminski
50113a0b79 test/openstack: Add possibility to reinstall devstack on required branch
Change-Id: Ia1a55c32bee9eb60c2d49729915a2b9119b73fb3
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468991
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@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>
2019-11-07 13:22:50 +00:00
Xiaodong Liu
6f209f63ae test: fix Blobfs latent failures in test pool
For issue https://github.com/spdk/spdk/issues/990,
It can be solved by setting cache pool a smaller
size in order to fit CI test env.

Change-Id: Ia5478df0f25de523917597eaeedcd858b70ab1e6
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471957
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-11-07 00:33:25 +00:00
Jim Harris
e93449910a nvme: use -EFAULT for vtophys-related failures
Currently we have a mix of -1 and -EINVAL which
is confusing, especially since these types of failures
also result in the caller's callback routine getting
invoked.

While here, document this new -EFAULT return code for
all of the functions that could return it.

Fixes issue #797.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473054
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-11-06 15:19:48 +00:00
Jim Harris
4036f95bf8 thread: return int from spdk_thread_seng_msg
This at least allows the caller to know there was a
problem, and that the messages wasn't actually sent.

SPDK by default creates huge rings so this problem
should never occur, but out-of-tree use cases may
send messages much more often and require at least
a notification when it fails.

While here, change the thread check to an assert.
There's no need to work around someone calling
this function with a null thread parameter.

Fixes issue #811.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472438
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-11-06 15:19:48 +00:00
paul luse
7c77c29268 module/compress: handle enqueue errors
A recent change to the compression API means that we can no longer
assume that rejection from the API means that it was busy. We need
to only queue operations that were from the busy condition and
fail others.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I7fa5d27559eacdf1bdf6982bdc142939333076ae
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472465
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>
2019-11-06 14:49:37 +00:00
Shuhei Matsumoto
3c84535d69 ut/iscsi: Test recursive calls of iscsi_conn_flush_pdus_internal()
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I7d712b7aed6724d7c44c5d814ee81104ce1d41ad
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473253
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>
2019-11-06 14:48:46 +00:00
Pawel Kaminski
39e8a95c71 test: Shellcheck - apply rule SC2152
Can only return 0-255. Other data should be written to stdout.

Change-Id: Idb8b387f438121e6b6afe62840ddee752872d7d7
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472605
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>
2019-11-06 14:48:14 +00:00
Pawel Kaminski
56621dea3c test: apply rule SC2153 where possible
Fix: removed vhost_dir assigment in places where it is not needed.

Change-Id: Idd120099d8c5d28901437e13b5670209f7536568
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472603
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>
2019-11-06 14:48:14 +00:00
Tomasz Zawadzki
3ea70d336a Revert "test: Fix a few instances of errant cd"
This reverts commit 0b9931516d.

"cd $dir && ..." in single line does switch directory for
the following commands.

The patch being reverted, broke the nightly (autopackage.sh) tests.
It was only fixing couple of instances of SC2164,
which is being excluded either way.
https://github.com/koalaman/shellcheck/wiki/SC2164

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Id4f134ad98953b92fdc69cd0d0b80c02660cf7a9
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473220
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-11-05 15:59:17 +00:00
Karol Latecki
c650e14434 test/vhost: fix respecting additional params for vhost_run
Reinstating "shift" removed in commit a2ab5eb as it was actually
needed.

Change "cmd" command string to use $@ instead of $2 so that we're
able to use more than one additional param for vhost instance.

Change-Id: If656c4319d7acfecddd2ff73104d3c79b799689f
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472681
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-11-05 12:31:42 +00:00
Shuhei Matsumoto
6de3ac79ea test/iscsi_tgt: Call remove_backends after iscsicleanup in the trap handler
In the trap handler, iscsicleanup had been called after remove_backends.
This ordering found a bug in SCSI library but is not different from
normal path, and had created LVOL hotplug test unintentionally.

Fix the ordering first and consider an independent test case for
LVOL hotplug + iSCSI target separately later.

The failure which invoked the trap handler will be also investigated
regardless of this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6b2a0d7d38348fcbf7ccc272063dc8408f15315a
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473156
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: yidong0635 <dongx.yi@intel.com>
2019-11-05 12:10:08 +00:00
Liang Yan
6eab1c1608 test/nvme: disable startup test for FreeBSD
The startup tool needs more than 1s to finish in FreeBSD
OS. So disable this test for FreeBSD.

Change-Id: Ibd59cb7d8ed4e27b5df5171888676be9bc37fa8a
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472660
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-11-01 17:56:52 +00:00
Jim Harris
e58deb0257 test/raid: remove unused spdk_thread_send_msg stub
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7fc128a82b3d1d1f780c1c396644f331306de600

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472437
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-11-01 17:46:42 +00:00
Ben Walker
0b9931516d test: Fix a few instances of errant cd
Don't change the directory of the script if at all possible.

Change-Id: I5e20784694cb61fac2cf148628de566361e2673e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472650
Reviewed-by: yidong0635 <dongx.yi@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-11-01 14:38:18 +00:00
Artur Paszkiewicz
445e667f41 module/raid: make raid_level an enum instead of plain integer
Also add functions to convert it to/from string.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I6f7964d832c308b815150fff39eb3dc5c5ae5853
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471079
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2019-11-01 14:34:32 +00:00
Artur Paszkiewicz
fc9ca1d0d6 module/raid: move raid0 functions to separate file
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: Icf74bda40303b3c38a7c58a5331589f3ec229634
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471078
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2019-11-01 14:34:32 +00:00
paul luse
88e48baaaf module/crypto: fix some typos & clean up comments
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I21b6992d2a3a914e44c61d489633b5c3741e70cb
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471690
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-11-01 14:33:45 +00:00
Seth Howell
13f30a254e nvme: don't disconnect qpairs from admin thread.
Disconnecting qpairs from the admin thread during a reset led to an
inevitable race with the data thread. QP related memory is freed during
the disconnect and cannot be touched from the other threads.

The only way to fix this is to force the qpair disconnect onto the
data thread.

This requires a small change in the way that resets are handled for
pcie. Please see the code in reset.c for that change.

fixes: bb01a089

Change-Id: I8a39e444c7cbbe85fafca42ffd040e929721ce95
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472749
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-31 04:50:59 +00:00
Tomasz Kulasek
efbcd259ac lib/nvme: nvme character device tests
This patch adds new script to verify CUSE functionality for NVMe
devices:

 1) Starts spdk_tgt application
 2) Attaches first found controller
 3) Enables NVMe cuse devices for a controller and namespaces
 4) Retrieves CUSE device names for controller and namespaces
 4) Tests operations on exposed namespace devices
 5) Tests operations on controller devices

NOTE: These tests requires at least one NVMe device with at least one
      namespace available.


Change-Id: I5f5a7c86f8aefa73f12f4727f7520f16a599985b
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468828
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>
2019-10-25 09:07:51 +00:00
Seth Howell
eb2dee2444 test/nvmf: add a test case for trid failover.
Modifying the target_disconnect.sh test to include an example of
transport_id failover for an NVMe-oF controller.

Change-Id: I746ed737ab56c7dec6ee99e840c631ba46ee359e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472230
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-24 23:46:39 +00:00
Tomasz Kulasek
a072421c90 test/vm_setup: add CUSE dependencies
Dependencies required to compile and run nvme-cli tests:
 1) fuse module must be installed,
 2) cuse module must be installed,
    a. Fedora requires to install "kernel-modules-extra" providing
       cuse module for a kernel,
 3) systemd-devel package to compile nvme-cli application

While namespace devices are provided as character devices via cuse
module, this patch also installs nvme-cli version accepting namespaces
as character devices.

Required changes are available for review here:

	https://review.gerrithub.io/c/spdk/nvme-cli/+/472250

After merging the changes will be available on spdk/nvme-cli
repository at 'nvme-cuse' branch.

NOTE: changes above are not required when controller with nsid is
      provided as an nvme-cli option,
      e.g.

          "nvme id-ns /dev/spdk/nvme0 -n 1"

      instead of:

          "nvme id-ns /dev/spdk/nvme0n1"

Change-Id: I413c33d9891c5a39a5388ea7407d798c138b0584
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472024
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>
2019-10-24 23:43:59 +00:00
Maciej Szwed
72e079a880 lib/nvme: implement external IO processing
This patch allows to send IO requests from external module to the nvme
device.

External module should call nvme_io_msg_ctrlr_start() to start IO message
producer on the controller and enable sending messages.

nvme_io_msg_send() is used to send IO to NVMe driver thread context,
where passed function will be called. Allowing the external module to
issue IO as needed.

NVMe driver users should poll spdk_nvme_io_msg_process() to move forward,
sending IO from external module and process their completions.

Change-Id: Ie59abac69870c4e4daa50120c747f3b620395921
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471386
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-24 23:43:59 +00:00
Alexey Marchuk
fbe5822572 test/mem_callbacks: Fix compilation on ARM
This file fails to compile with DPDK 19.08

Change-Id: I7d0d811a9c6759e9c23743bab2c42d271c9d13af
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472260
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>
2019-10-24 19:21:06 +00:00
Michael Haeuptle
53b92a6c18 nvme: allow setting of completion queue CDW0
This change allows setting of the NVMe completion queue
CDW0 in spdk_bdev_io_complete_nvme_status.

Before that change, handling of vendor specific NVMe IO
commands was limited since there wasn't a way to return
command specific info back to the initiator.

Change-Id: I250d5df3bd1e62ddb89a011503d42bd4c8390f9b
Signed-off-by: Michael Haeuptle <michael.haeuptle@hpe.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470678
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>
2019-10-24 18:02:38 +00:00
Maciej Wawryk
f3b3fa7753 test: Shellcheck - correct rule: Use "${var:?}"\
Correct shellcheck rule SC2115: Use "${var:?}" to
ensure this never expands to /* .

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I4a6beef338b7a3c496f1b74a0cdbbdff83403ddc
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471464
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>
2019-10-24 17:36:52 +00:00
Maciej Wawryk
a8dee6d1b9 test: Shellcheck - correct rule: Useless echo?
Correct shellcheck rule SC2116: Useless echo?
Instead of 'cmd $(echo foo)', just use 'cmd foo'.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I940eb1ec72ba00ecb89ca770300f5d37e90e8a86
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471452
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>
2019-10-24 17:36:52 +00:00
Maciej Wawryk
64d0c173cd test: Shellcheck - correct rule: Use a ( subshell ) to avoid having to cd back
Correct shellcheck rule SC2103: Use a ( subshell ) to avoid having to cd back.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I474e11f5753c3482c7924548ab7c0183d4ac419d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471437
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>
2019-10-24 17:36:52 +00:00
Seth Howell
5215fad6ef nvme: Add an API for updating a controller trid.
This can be useful when trying to perform multipath failover at the
application level. However, the controller must be in the failed state
before calling this function.

Change-Id: I5403c0036fed5dd3600ee20592925297494ba8aa
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470699
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-24 17:36:31 +00:00
Seth Howell
ecd108eb4b examples/nvme: add a reconnect example.
This is simply a dumbed down version of perf so that we don't add extra
functionality to perf that might impact its performance.

Change-Id: Ia2716a61abcc5269dafcda394d40517d156fdb2a
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471661
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>
2019-10-24 17:36:31 +00:00
Seth Howell
e45b619c3d nvme: add function to reconnect qpairs.
While it is unlikely that a single qpair will be failed, it is important
to make it possible to reconnect a single qpair.

This function is also handy at the application layer when going through
a reconnect workflow. If we get -ENXIO from a qpair when we poll, we
will turn around and call this function. If we get -ENXIO from this
function, then we know the whole controller is failed and we need to do
a reset.

Change-Id: I6a8ea0ce27fce2f5fc0a5b3db05834acd68e6a39
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471417
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-24 17:36:31 +00:00