Commit Graph

1591 Commits

Author SHA1 Message Date
Jim Harris
dec7b52654 test: use spdk.unittest.mk for iscsi unit tests
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I833ca74093f55ae296d2db4a2dd7a1e482c945dc

Reviewed-on: https://review.gerrithub.io/399730
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-02-14 11:07:05 -05:00
Jim Harris
aae47b50fb test: use spdk.unittest.mk in blob and blobfs unit tests
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I06d33ff7f6df0724768f5a23236485c26e0568f4

Reviewed-on: https://review.gerrithub.io/399729
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-02-14 11:07:05 -05:00
Jim Harris
d8c3ff5fd6 test: use spdk.unittest.mk in bdev unit tests
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I4b0704021bc8e9ccbc6ed6ce7ac8eb1efad4a561

Reviewed-on: https://review.gerrithub.io/399728
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-02-14 11:07:05 -05:00
Jim Harris
29eb956793 test: use spdk.unittest.mk for nvmf unit tests
This includes removing the nvmf.unittest.mk that these
unit tests were using previously.

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

Reviewed-on: https://review.gerrithub.io/399724
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-02-14 10:40:40 -05:00
Jim Harris
f8ad4dca9d test: use spdk.unittest.mk for json unit tests
This includes removing the json.unittest.mk that these
unit tests were using previously.

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

Reviewed-on: https://review.gerrithub.io/399723
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-02-14 10:40:40 -05:00
Jim Harris
3465da9302 test: use spdk.unittest.mk for ioat unit tests
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I53a04187638a8ea4569b18bb4959b0bcf7f3d860

Reviewed-on: https://review.gerrithub.io/399717
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-02-14 10:40:40 -05:00
Jim Harris
435990003e build: make nvme.unittest.mk the common unittest .mk include
This is the first of a long line of patches which will
reduce Makefile rule duplication in all of our SPDK
unit tests.

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

Reviewed-on: https://review.gerrithub.io/399716
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-02-14 10:40:40 -05:00
Jim Harris
0db2c2ef47 test: remove explicit build rule from nvme/nvmf mk file
These aren't needed - the common %.o rule is sufficient.

As part of this patch, remove OTHER_FILES references from
nvme and nvmf unit tests, and just include these .c files
directly.

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

Reviewed-on: https://review.gerrithub.io/399715
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-02-14 10:40:40 -05:00
Dariusz Stojaczyk
19725e9764 vhost: change vdev global array to a linked list
Drop max vhost initiators limitation in SPDK (64).
We're still limited by rte_vhost limits, but
they're set to 1024 at the moment.

Change-Id: Ia1ad25665d6e798bc22709cdd43b72d60f1f4cf0
Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/389811
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-13 19:27:54 -05:00
Dariusz Stojaczyk
85b0c2b36f ut/vhost: always register a vdev before attempting to unregister it
Rather than being smart and hacking vdev struct
internals, let's properly initialize it with
spdk_vhost_dev_register(). This will avoid
failures on potential vhost changes in future.

Change-Id: I3f13b542e313a2f890963baa96679e9d74c23a9e
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/399443
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-02-13 19:27:54 -05:00
Dariusz Stojaczyk
2c1912f64b ut/vhost: remove test case Remove nonexistent device
This test case doesn't work. The title suggests
that unregistering non-registered device should
fail - but in fact we don't check against that.
The test expects failure, but fails due to a
different issue - the device is in use. And there
is already a separate test for this case.

Device is considered in use when it's vid is != -1,
and we always init the vid to 10 inside alloc_vdev.

Change-Id: I8de1afce8f6bcbd2a6bfbb30870265e30b2a9a41
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/399590
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-02-13 19:27:54 -05:00
Jim Harris
e3f2a3949d sock: add sock_group abstraction
For now, this provides common abstraction for Linux epoll
and FreeBSD kqueue.  It also provides the basis for future
changes where alternate userspace TCP stacks have their own
mechanism for polling a group of descriptors.

While here, remove old epoll/kqueue code in iscsi/conn.c that
was commented out when the iSCSI idle connection code was
recently removed - we now have a real implementation of it
in sock.c so the original code is no longer needed as a
reference.

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

Reviewed-on: https://review.gerrithub.io/398969
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-02-13 19:25:22 -05:00
Karol Latecki
c1d2e971ec test/lvol: fix wrong footer message in test case 700
Change-Id: I1266e8945fe34b030e5a40c0268a99a987b8d8fe
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/399656
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-02-13 18:19:40 -05:00
Karol Latecki
ef4dba3ed5 test/lvol: lower size of bdev in test case 700
Using lower size of bdev might speed up test a little bit
and is enough for this case.

Change-Id: Iaba1b8a771aef58c7b26a880cd351c2ec33f27f2
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/399655
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-02-13 18:19:40 -05:00
Karol Latecki
91c7f6f527 vm_setup: increase number of jobs in make command
Increase number of jobs for make to speed up the script.

Change-Id: Ida5a1f590320b80a65648b841a98abc743ea6514
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/399369
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-13 08:54:53 -05:00
Piotr Pelplinski
7ba8c006c5 blobstore: allow xattrs to be set internally only for blobstore
Patch adds internal version of xattr functions to allow
operations on internal xattrs, which are not visible to
upper layers.
When there is at least one internal xattr set, also
SPDK_BLOB_INTERNAL_XATTR flag is set in invalid_flags to prevent
loading this blob in previous spdk versions.

Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: Iec918ec858f069f7cd9f36d5e8f0495ffa4a42d8
Reviewed-on: https://review.gerrithub.io/395122
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-02-12 19:12:14 -05:00
Daniel Verkamp
3839639759 nvme: add API to allocate CMB I/O buffers
Change-Id: I2a3c7a272dc08be5a5ecb4339622816482c4cbb0
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Signed-off-by: Stephen Bates <sbates@raithlin.com>
Reviewed-on: https://review.gerrithub.io/397036
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-02-12 19:11:44 -05:00
Daniel Verkamp
f185e4ecf8 nvme/pcie: register CMB with spdk_mem_register()
Enable address translation for I/O buffers within the controller memory
buffer region by registering the CMB using spdk_mem_register().

Change-Id: I44829757ad15fbc3ea96fa494b9fb32dd67a7138
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Signed-off-by: Stephen Bates <sbates@raithlin.com>
Reviewed-on: https://review.gerrithub.io/397035
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-02-12 19:11:44 -05:00
Dariusz Stojaczyk
88beac7045 ut/vhost: fix vhost_dev_register() tests
All vhost_dev_register() tests are negative
- they all expect error. They all were failing
on a single check:

*ERROR*: no cpu is selected among reactor mask(=1)
*ERROR*: cpumask 0x1 is invalid (app mask is 0x1)

That's because we mock cpumask parsing. Even when
"parsed", the real cpumask would always be == 0.
Our unit tests were treating this as a valid
behavior. To really test what they should, we
have to properly implement cpumask parsing. That's
what this patch does.

We should also assert against a specific error
code, not just != 0. But that's a matter for
a separate commit.

Change-Id: Iae93b31292a0d9aee4e773ef568b2052a1de714d
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/399442
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-12 14:07:58 -05:00
Dariusz Stojaczyk
e1accdca3a ut/vhost: remove test case Remove device with too long name and path
This was originally introduced to improve
code coverage in vhost_dev_unregister() where
we used to check against buffer overflow. But
the check has been removed long ago. The vdev
socket path string is validated only on device
registration.

The test case is being removed because it
conflicts with upcoming changes. Rather than
trying to refactor and fix it, let's remove it
- it's no longer needed.

Change-Id: I3bac15725e94b38d375db6376bea4a7b1e44d75c
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/399441
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-12 14:07:58 -05:00
Jim Harris
66ced7deb0 test: add spdk_sock unit tests
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I0dc4b679f1865f9f1222be75f8d9e8d07dfb88ad

Reviewed-on: https://review.gerrithub.io/398962
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
2018-02-12 12:30:39 -05:00
Jim Harris
4b10029435 net, iscsi: add struct spdk_sock abstraction
This provides an abstraction layer around TCP
sockets.  Previously we just used fd integers, but
we don't want to be tied to integers for alternative
userspace TCP stacks.

Future patches will do more work to enable multiple
implementations of this abstraction.  For now, just
get the abstraction in place for POSIX sockets and
make all of the iSCSI changes associated with it.

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

Reviewed-on: https://review.gerrithub.io/398861
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
2018-02-12 12:30:39 -05:00
Pawel Niedzwiecki
a1e1b9a5e6 test/virtio: update test_plan.md with tests for emulated virtio-scsi-pci device
Change-Id: I62bbe8422aa92224e227173fe9dbc03c739431fe
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/396426
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-02-12 12:13:54 -05:00
Dariusz Stojaczyk
15e2fa5dac test/vhost: disable QEMU virtio-scsi-pci tests
This seems to be causing intermittent failures after updating qemu to
a newer version; disable this test until the root cause is found.

Change-Id: I0962e0db1bc244abec3d56483308c3f558d4d7f2
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/399263
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-02-09 19:07:50 -05:00
Chen Wang
82b97c4d9a test/vhost: fix typo
Change-Id: I52cfdd0a8247ec2a6ed7a9cb7756545e13d0a9dd
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/399118
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-09 18:25:19 -05:00
Pawel Kaminski
7bd9e8c24b test/lvol: Assign big number to SIGTERM test case
to avoid renumbering test cases in the future.

SIGTERM should be called as last test case, because
it kills vhost instance. If it is called in the middle
another test case should start vhost again.
Want to avoid this.

Change-Id: Idd3e1492bd83e911d17e730c680187cd98f0c125
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/399131
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-09 15:33:11 -05:00
Daniel Verkamp
2d64855897 test/vhost: run test scripts with absolute path
Rather than using 'cd' and then ./-relative paths to launch the vhost
test scripts, just specify the full path relative to $WORKDIR.  This
should allow print_backtrace to find the script sources for these tests
when failures occur.

Change-Id: I17ca1ebea393df4da427668645ba6f99356a57da
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/398972
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-09 13:22:28 -05:00
Changpeng Liu
1c164f117d vhost-blk: enable vhost block with new added get/set config messages
New vhost user messages GET_CONFIG/SET_CONFIG can be used for
vhost-blk for the purpose to get configuration parameter such
as: Capacity and block size. This commit enable this feature,
users don't need to append capacity any more when started
QEMU. Also event notifier is added for the purpose to change
capacity of block device while QEMU is running.

Also re-enable the vhost-blk tests.

Change-Id: I06ef697984eeea3abbbd655bdcaccaa3b7aa72d7
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/386546
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-09 13:14:43 -05:00
Daniel Verkamp
1ca22afa2e test/vhost: update QEMU to spdk-2.12-pre branch
Install the new custom qemu branch in a different location
(/usr/local/qemu/spdk-2.12-pre) so it can coexist with the current qemu
branch.

Change-Id: I6986dcaef804dcefc4e77c83c019ba0f3be8dbd6
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/398983
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2018-02-09 13:14:43 -05:00
Pawel Niedzwiecki
d94c5c18ec test/virtio: update test_plan.md with test for kernel vhost-scsi-pci device
Change-Id: I10eb18009b04ea8b298282f201fad2780e1df4d3
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/398821
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-02-09 10:46:50 -05:00
Chen Wang
e8650a81ee autotest: vhost_multi_os_test (porting from nightly to autotest)
Add vhost-scsi and vhost-blk multi-os test case
which used Ubuntu and Centos VM in nightly
Fix vhost nightly readonly case for vm shutdown timeout
The 10s isn't long enough for the VM to shutdown
so the script trap error in line "((timeo-=1))"
in common.sh script and exit

Change-Id: I5a44a2b1bf6b3247383603d5896b8bdde16a9a45
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/393602
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: qun wan <uniqueanna@hotmail.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-08 12:10:04 -05:00
Jim Harris
67c9ea6ad9 net: add sock.h
The socket-related code was already broken out into
lib/net/sock.c, so break out the header portions
from include/spdk/net.h into its own sock.h.

This prepares for some upcoming changes in how
TCP sockets are abstracted, to enable alternative
userspace TCP stack implementations to be used with
SPDK.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I40b162e72ea80c235b49f10b17c2085fcfb385d4
Reviewed-on: https://review.gerrithub.io/398851
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
2018-02-08 12:05:54 -05:00
Tomasz Zawadzki
d13c94b9fb test/lvol: Test cases for lvs thin provisioning.
Change-Id: I019125ee634edf79d2ed6d159fbdad605061377c
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/391492
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-08 10:36:49 -05:00
Ben Walker
47b17299a4 nvmf: Add an rpc to add a namespace to a subsystem
Change-Id: I351c7bda1b32dc161c49d47fb2887595099e4be6
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/396696
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-07 23:22:57 -05:00
Pawel Kaminski
9ee661b493 test/lvol: Test plan for snapshot and clone of lvol bdev
Change-Id: I4c75bb8e44e2dadd7b9046beb8ec3b4a39707626
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/392176
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-02-07 17:32:01 -05:00
GangCao
8518ddacd0 ut_multithread: add the support for start/stop poller functions
The multithread testing framework is well positioned
for the QoS testing. As QoS will initiate poller for
the rate limiting. Added the related poller functions
and proper poll_thread handling here.

Change-Id: I253a72d3f85af381703dde4e4d0d7366fe682d78
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/393012
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-07 12:37:11 -05:00
Pawel Niedzwiecki
dfa9aea409 test/virtio: test qemu virtio-scsi-pci device
test emulated virtio-scsi-pci device

Change-Id: Id7eaaabb5f7117cb72010345a9c892d81334e8cf
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/395986
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-06 19:27:46 -05:00
Pawel Niedzwiecki
d60c81e250 test/vhost: modify vm_setup() to create setup with mixed disk types
vm_setup was creating setup with only one disk type defined.
With this patch it can set disk type per disk by adding disk type
after disk name separated by coma
e.g.
vm_setup --disks="Nvme0n1,spdk_vhost_scsi"

Change-Id: Ib89f440210468f4c9082aadcf07ce461e34c4ff8
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/395980
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
2018-02-06 19:27:46 -05:00
chenlo2x
79beab1686 test: delete all iscsi.conf.* and iscsi.conf files.
Change-Id: I232eff9099bd6c39206004c72783bfd25d1b9f26
Signed-off-by: chenlo2x <longx.o.chen@intel.com>
Reviewed-on: https://review.gerrithub.io/398554
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
2018-02-06 18:49:32 -05:00
paul luse
a0e22e1303 test: add 'match' util and use it with blobstore
Will follow this up with a doc change but want to make sure we're
all good with it first. This is meant to not only beef up
blobstore testing but provide the 'match' utilitiy for all test
cases where we are currently calling an executable and either
counting only on a return code to determine success or failure
or worse yet we're just running it and if it doesn't explode we
assume its a pass.

The 'match' util was borrowed from the PMDK folks after first
adding the "ignore" feature upstream to make it easier to use
in SPDK.  It works like this:

When the developer checks in a test they create and check in
the output of the test with two different file extensions:

.ignore: should include a string per line for output lines
that we want to totally ignore typically because they're
platform specific so the output could be different from
machine to machine.  In this case I'm ignoring all output
lines with 'DPDK' or 'EAL' or '...' in them. The first
few are obvious, the last is because the test tool will
print a varrying number of these as progress indicators.

.match: this is a copy of the output that the developer
'fixes' up by replacing platform specific output strings
with replacable tokens as described in the 'match' help.
This is where you'd want to match an entire line minus
something like a CPU count or free block count or
something. The 'ignore' feature was added simply so we
wouldn't have to edit every single line of an output
file that had DPDK or EAL in it.

Then you modify the test script to save the output and
smply run the match util providing the name of the
match file and if it fails to match the actual output
with the saved output that's been token'ized the script
will error.

The obvious advantage here is that now we can confirm all
of the output from a test executable is as we expect.

Change-Id: I701d36ee83d37b6193e16ed3171e114f814e5eb3
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/397027
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-06 18:05:25 -05:00
Pawel Niedzwiecki
20cb585b0a test/vhost: check vhost return code in spdk_vhost_kill
if vhost retuns error on exit using spdk_vhost_kill, the tests
would continue instead failing

Change-Id: I923d579f9e8614c39b27186418439d185770b3a7
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/398622
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-02-06 14:50:39 -05:00
Daniel Verkamp
64465d0dc8 Remove trailing whitespace before \n in printf()
Tree-wide cleanup of all instances of printf()-style functions where a
format string contains a space before a newline character.

Change-Id: Ib5b5861e97bed9e9d62db03875547e3f771f4769
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/397031
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
2018-02-06 11:16:50 -05:00
Pawel Niedzwiecki
46b93de613 test/virtio: update test_plan.md
Change-Id: I4100883cac98603108c96db0ed3e3cdf2e0e4b57
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/395079
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-02-06 11:16:15 -05:00
GangCao
9aed854be0 bdev: add a common channel resource destroy function
In the different cases to creat a bdev channel, added
a common cleanup function to destroy the resource.
The same function is also called at the bdev channel
destruction.

Change-Id: I81b60cab9df3a8975b0a9982482c9d27899d8a79
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/398351
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-06 11:06:28 -05:00
Dariusz Stojaczyk
fa82f460d1 vhost: remove vdev->type field
This field was only required to check
if we can safely upcast vdev object.
We can just as well check vdev->backend
instead. The vdev->type is not needed here.

Change-Id: I525350957406d4299151e0557b9025ca7bea5371
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/396584
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-06 11:05:01 -05:00
Dariusz Stojaczyk
2307738334 vhost: remove all devices on shutdown
Fixes a memory leak on shutdown.

Change-Id: I1fb922374b98771858757c536ab45202283150f4
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/396576
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-06 11:05:01 -05:00
Dariusz Stojaczyk
672588d736 vhost: unify vdev removal
Instead of:

 * spdk_vhost_scsi_dev_remove(vdev)
 * spdk_vhost_blk_dev_remove(vdev)

we now have

 * spdk_vhost_dev_remove(vdev)

All the logic is already handled internally. This patch only
changes the API. Also, previous vhost_dev_construct()/remove()
functions have been renamed to vhost_dev_register()/unregister()
because that's what they really do.

Change-Id: I7dd0d77bc5b633bec075e0a71345ddbed62697b4
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/396574
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
2018-02-06 11:05:01 -05:00
Daniel Verkamp
0c9878d5b9 test/vhost: add more detailed timing markers
Track individual parts of the setup_vm phase in the vhost initiator test
that builds SPDK inside the VM.

Change-Id: I25c924808db0f934dd53043b06668da96099cf62
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/397285
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-06 10:59:56 -05:00
Shuhei Matsumoto
13cffa4a0d iscsi: Consolidating checking uniqueness of IG into register/unregister
Checking uniqueness of initiator group is done without mutex and
before register/unregister. This is not thread-safe.

This patch is a preparation to dynamic addition of initiator
information to existing initiator groups.

Change-Id: I44f48c857210522eee70d14bc3735ec73b0c5c6f
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/397032
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-02-06 10:54:42 -05:00
Shuhei Matsumoto
2ea005f0a9 iscsi: Unify the ordering of PG create_op between conf-file and JSON-RPC
Orderings of portal group create operation are diferrent between
config file and JSON-RPC. Unification is necessary for correct
concurrency control and the global accept poller like NVMf-tgt.
Hence unify the ordering of operations in this patch.

Common ordering of portal group create operation between configuration
file  and JSON-RPC after this patch is the following:
 - create a portal group
 - create portals
 - add the portals to the portal group
 - open the portals of the portal group
 - add the portal group to the global portal group list

After this patch, the gap between listening socket and accepting socket
will be increased a little when portals groups are creted by config file.
However this will cause no issue because of the TCP backlog and resend
mechanism.

Besides, necessary concurrency control is added and minor refactoring
is done.

About portal group delete operation, orderings of application shutdown
and JSON-RPC are already unified.

Change-Id: I1db7ef4400388127134d7734c68e138a4573b734
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/396848
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-02-06 10:54:42 -05:00
Shuhei Matsumoto
04c6347b4e iscsi: Consolidate checking uniqueness of PG into register/unregister
Checking uniqueness of portal group is done without mutex and
before register/unregister. This is not thread-safe.

Hence this patch is added to ensure PG uniqueness.

A little related refactoring is also done.

Change-Id: Iaa3b5e380f2be5cfdaa2d69f9f2763c98954b0c3
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/396847
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-02-06 10:54:42 -05:00
Shuhei Matsumoto
950065042c iscsi: Ensure uniqueness of network portal by mutex
Network portal must be unique globally but mutex is not added yet.
This patch is added to ensure it.

Change-Id: I3cdd85fd524b0da767d3cd83022e0637f3a32bc9
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/396846
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-02-06 10:54:42 -05:00
Karol Latecki
5d2881c6dd test/lvol: Fix test cases for lvol store cluster size
rpc_commands_lib.py: make cluster size optional argument as
sometimes we only need to check if lvol store exists and not
care about details.

Test cases 600 and 601 fix: add missing delete_bdev() at the end,
add using get_lvol_stores to check if lvol store was created.

Test case 601 modified:
Change test case to check if creating a lvol store with cluster
size less than 8192 is disallowed.
Previous check for cluster size of 0 was incorrect as 0 is an
allowed value for that operation and results in setting default
cluster size.

Change-Id: I8bcbed9a7dff3e81fcc0ca4b525da3a1d0627495
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/398370
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-06 10:53:46 -05:00
Ben Walker
6336217e16 nvmf: Add rpc to add listeners to subsystems
The construct_nvmf_subsystem method's "listen_addresses" parameter is
now optional, and new listen addresses may be configured at runtime
using the "nvmf_subsystem_add_listener" method.

Change-Id: Ie0217c5d112e278cc0491a561753f50ed877d842
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/395556
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-06 10:29:42 -05:00
Dariusz Stojaczyk
ea88aefbf8 test/bdevperf: fix memory leak if opening a descriptor fails
This was probably overlooked when developing 57d174ff6.

Fixes: 57d174ff6 ("bdev: add spdk_bdev_open/close")
Change-Id: Idb30287e740ac0300a5c7dc9fad7e06693f58330
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/398585
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-06 10:22:48 -05:00
Dariusz Stojaczyk
25191ba7ab test/bdevperf: fix arithmetic exception if io_size < block_size
Don't divide by 0.

Change-Id: Ib7978df1b9361f76c2d720744923e6e7d6c97718
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/398584
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-06 10:22:48 -05:00
xuhuagen
43016e0328 nvmf: fix a variable name error.
Change-Id: I28b3e07c680eeb4654b5432c0f61c3477ad24ab9
Signed-off-by: xuhuagen <huagenx.xu@intel.com>
Reviewed-on: https://review.gerrithub.io/398367
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-02-05 14:52:18 -05:00
Piotr Pelplinski
c287b5b4ed blobstore: move xattrs parameters passed as options to separate structure
This change will allow reusing this structure for both internal
and external xattrs as well as in functions having optional xattr,
but missing other options (i.e. snapshot, clone implemented in next patches)

Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: Ia6619a75efa0a100168a6f8317be274823af04ab
Reviewed-on: https://review.gerrithub.io/396417
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-02-02 16:58:06 -05:00
Hailiang Wang
ad9b3ef5a5 autotest: bdevperf test with gpt(porting from nightly to autotest)
This patch is used to test bdevperf on one NVMe disk with 2 GPT partition.

Change-Id: I46f6b5be3f4951625678861ff540629265e8931f
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/390709
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-02-01 13:07:56 -05:00
Karol Latecki
cf100c2aa0 test/vhost: run vhost tests with thin provisioned lvol bdevs
Change-Id: I004e6ebae38ec923817410f7ad530dd707a307b1
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/393773
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-31 16:01:19 -05:00
Tomasz Zawadzki
e87d3400a5 lvol: display thin_provision property during get_bdevs
Change-Id: Ib3507a9e69b210cbd173c88d166025d4579e0149
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/397602
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-31 15:39:25 -05:00
Maciej Szwed
cb5178ea40 lvol: set default cluster size to 4MiB
Blobstore default cluster size is currently 4MiB,
but default lvol cluster size overrides it to 1GiB.

Additionally add -c flag in lvol tests to set cluster
size for tests.

1GiB was fine without thin provisioning, but we do not
want to allocate and copy 1GiB of data for newly allocated
clusters on thin provisioned logical volumes.

Note that 4MiB is same as default for Linux LVM.

lvol test case 601 had to be modified to create a malloc
LUN less than size of default cluster size.  This test is
supposed to fail - without the change here, creating the
lvolstore would work, but the script still considered it a
PASS.  Defer fixing that to a separate patch - for now just
keep the same test process.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ic05defbf8e641f613f0ec74175a37bc25986e496

Reviewed-on: https://review.gerrithub.io/397562
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-31 15:37:26 -05:00
Maciej Szwed
11130d09c8 ut/blob: tests for thin provisioned blob unmap
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Iddbc490d1bf311f6e4b6e3ea3b7bdb72889bb2d3

Reviewed-on: https://review.gerrithub.io/394972
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-01-30 18:16:22 -05:00
Maciej Szwed
58c9f6af44 lvol: use spdk_bs_create_blob_ext instead of spdk_bs_create_blob
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I154cea95996b7ad208a9101542afd8c4ea774985

Reviewed-on: https://review.gerrithub.io/397116
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-30 17:29:53 -05:00
Maciej Szwed
9ed6bedd3e lvol: enable creation of thin provisioned lvols
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ie6a651d0238d09729e28d5456a84ba090faeb465
Reviewed-on: https://review.gerrithub.io/391568
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-01-30 17:29:53 -05:00
Maciej Szwed
4132ac52da blob: support for thin provisioned reads and writes
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ibc9609ad36188006e9454e5c799bccd8a92d7991
Reviewed-on: https://review.gerrithub.io/391422
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-30 15:46:18 -05:00
Pawel Wodkowski
efb18b9b46 vhost: add live migration support
This patch adds support for live migration for vhost-scsi and vhost-blk
backends.

Change-Id: Ibfc8a713dbba14ba8cb38377a71e28fd340b1487
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/394203
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-30 15:42:40 -05:00
Jim Harris
98d28d604d blob: allow inserting cluster from non metadata thread
This will be needed for thin provisioning, since a write
I/O may result in needing to insert a cluster into the
blob and that write I/O may not have been performed
on the metadata thread.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I84b0cb6e7af87b1f9c6cab4e2c24fa26b12e2c06
Reviewed-on: https://review.gerrithub.io/396737
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-29 18:54:34 -05:00
Daniel Verkamp
71dba27cab test/vhost: use qemu-img from qemu install dir
The test system may not have qemu-img installed system-wide, since we
build a custom version of qemu and install it in a non-standard path.

Change-Id: I52e16fc7bbf90b9c3d0832f6a81c5cfecd5f24ed
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/396675
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Chen Wang <chenx.wang@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-29 12:53:03 -05:00
Pawel Kaminski
0616b2a506 test/vhost: Preparation for hotremove tests
Code refactoring to accommodate for coming hot-remove tests.

Change-Id: I41cfb04b467bf21a5a991712791ee6bfc87c241c
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/391957
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-26 14:55:55 -05:00
Slawomir Mrozowicz
d4822a7db5 bdev: Add bdev resize function
Add api and unit test functions for
change number of blocks for provided block device.

Change-Id: I55d67c99375cb88bdaa79ce1a36d4298223beddc
Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Reviewed-on: https://review.gerrithub.io/390802
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-26 14:45:08 -05:00
Pawel Kaminski
4ab8589ba3 test/lvol: Test plan for provisioning
Change-Id: Ia1ccf8091fb2dbbb97a7acecc230d9f6cb7c1002
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/391257
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-26 14:43:14 -05:00
Pawel Niedzwiecki
db739e1594 test/virtio: Add vhost initiator tests for pci mode
New tests are performed on guest vm where vhost scsi
controllers are presented as a virtual pci device.
Some changes in common.sh had to be made to allow to build
spdk on vm and to set queue number.

Change-Id: I8289d6aede6020e958c9e5aae893591d844cdbcf
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/394248
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-01-26 12:59:07 -05:00
Seth Howell
4667c5cbd7 vm_setup: add required packages
I missed the libelf-devel and flex in my initial version.

Change-Id: I892c4e15c3704f0ca51ff0fac4e375c456258e83
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/396475
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-01-26 12:57:40 -05:00
Tomasz Kulasek
601bcbcf66 util: extend cpumask to hold more than 64 cpus
Fixes github issue #218.

This patch introduces spdk_cpuset object to store and manipulate
the set of individual CPUs. The main objective of this object is
to replace cpumask declared as uint64_t and extend the limitation
of supported CPUs (lcores) above 64 CPUs.

spdk_cpuset is always allocated dynamically and accessed by opaque
pointer, what makes it easier to extend in the future without
breaking API/ABI.

This patch also extends parsing function allowing to set cpumask
using a list of cpus e.g. "[0-4,10,12]" sets mask of 0,1,2,3,4,10,12
as well as hexadecimal string with and without "0x" prefix.

Change-Id: I475c3ba7fab629021a22e03176e57e400dd24a49
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/390794
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-25 18:51:50 -05:00
Karol Latecki
0ff878d02e test/vhost: live migration test plan
Change-Id: I25f62d221c251a2ce455bfca7f686bb5817aa7d6
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/394199
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-01-25 17:59:04 -05:00
Chen Wang
b1a8455ac8 autotest: vhost_fio_test (porting from nightly to autotest)
Add vhost-scsi and vhost-blk fio test cases which used more cores
and controllers in nightly

Change-Id: I51b47f6272c1b29dff890384087014627238dc68
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/389072
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-25 14:42:42 -05:00
paul luse
74b3dc9a2d test: minor updates to vm_setup script
Added execute permissions and -p to a few mkdir locations to
make re-running after an unrelated failure a little cleaner.

Change-Id: I67592fc4dd91839979fdb8eeda38dcdbcd4b7700
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/395865
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-25 14:35:28 -05:00
Karol Latecki
f6f434b4b4 test/vhost: Update vhost test plan
Also move the test plan file to a more appropiate location.

Change-Id: I462058279d4d2dc03790657b82b3cfeb00c8a93a
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/394180
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-01-25 13:59:47 -05:00
wenzhong wu
52c773ce64 autotest:Add fio_plugin with nvmf lvol backend(Porting from DTS)
To cover fio_plugin as host with nvmf lvol backend.

Change-Id: I5c602d95421f1ab6d2dde660c1833c953c2e5c75
Signed-off-by: wenzhong wu <wenzhongx.wu@intel.com>
Reviewed-on: https://review.gerrithub.io/390381
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-01-25 13:44:18 -05:00
Jim Harris
29be88fab6 test/blob: always use SPDK_BS_PAGE_SIZE instead of PAGE_SIZE
PAGE_SIZE just happens to resolve to same value as SPDK_BS_PAGE_SIZE
on x86-64, but at least some ARM systems do not define PAGE_SIZE
in headers included by blob unit tests, which is only reason this
discrepency was not identified until now.

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

Reviewed-on: https://review.gerrithub.io/396320
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-01-25 11:05:59 -05:00
Pawel Niedzwiecki
3d28498af9 test/virtio: Perform unmap tests on unmap supporting devices
-perform rw tests on all devices
-perform unmap tests + rw tests to match number of jobs and queues

Change-Id: Ica59ea3667c1c3a639ec9cded0fd43ea9d83ef03
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/394074
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-01-24 19:35:36 -05:00
Pawel Niedzwiecki
d66b1e1c91 test/virtio: Move all nightly test cases to per-patch
With multiqueue all jobs run in parallel so
test execution time will not be extended

Change-Id: I6187ee0acf6958b137ba74dd34706538197ce966
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/394389
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-01-24 18:28:49 -05:00
Hailiang Wang
835e5bc225 autotest: blobstore_test (porting from nightly to autotest)
This patch is used to test blobstore automatically
which based on examples/blob/cli/blobcli.

Change-Id: I0309cf01d1561f309574a37aeaff8bfbc395f65c
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/386186
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-01-24 17:12:47 -05:00
Xiaodong Liu
24c7f62fed test/iscsi: check and avoid setting DataDigest
iscsiadm installed by some Fedora releases, like Fedora 27,
loses DataDigest parameter unintelligibly.

Change-Id: I6664146c6e0cb8933188b29166bedd087f4d38e1
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/396076
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-24 16:52:30 -05:00
Seth Howell
4151703690 test/nvmf: add null pointer check to subsystem test
Fedora 27 ships with Clang 5 which throws an erroneous error in the
add_ns subsystem test. It believes that subsystem.ns is a null pointer.
In order to circumvent this error, I add an assert to bail out of the
test if the pointer really is null and then only execute the final
assert if the pointer is not null. This way our tests will still pass
Scan-build tests on Fedora27.

Change-Id: I54d3fae485d56033ba5eb23b0aa323480ae6a6e4
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/396051
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-24 16:50:42 -05:00
Piotr Pelplinski
074f4d7627 blob: set md_ro and data_ro fields only after persisting data
Currently, there is no possibility to save read only blob to disk.
This patch modifies behaviour so that read only flags are applied after syncing blob.
This is analogy to resize, set xattr and remove xattr operations.

Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: Iffed601c78cb83231bb20e7ef05b73847dc3c95a
Reviewed-on: https://review.gerrithub.io/394243
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-01-24 15:56:15 -05:00
Chen Wang
9e8415c688 autotest: vhost_filesystem_test (porting from nightly to autotest)
Add vhost-scsi and vhost-blk filesystem test cases with
lvol and nvme back-end in nightly test

Change-Id: Id2cccd9a45aaa995bef90415855835b93447f2e9
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/390923
Tested-by: SPDK Automated Test System <sys_sgsw@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>
2018-01-24 15:51:03 -05:00
Tomasz Zawadzki
b6aaba0852 bdev: remove vbdevs during spdk_bdev_unregister()
spdk_vbdev_unregister() is part of internal bdev API,
yet bdev module that uses spdk_vbdev_register() directly
will not be removed correctly when using delete_bdev RPC.
spdk_vbdev_unregister() is now consolidated with
spdk_bdev_unregister().

This comes up when deleting lvol bdev, as it does not use
spdk_bdev_part_* functions.
base_bdev->vbdevs entry was not removed for bdev that lvs
is created on.

Additionally patch expands test to create lvol bdev,
after removing it using delete_bdev RPC.
With ASAN enabled this would report accessing
already freed memory previously.

Change-Id: I9547e83862e2daa50355d56a1c9f453aaa6cfdb8
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/395711
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-24 15:50:04 -05:00
Seth Howell
68b96260ed test/unit: replace sprintf call with snprintf call.
This fixes a Klocwork bug.

Change-Id: Ia42bf0f246c8e1b9aa211095a00b9d1ab8e7a085
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/396059
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-24 15:38:05 -05:00
Jim Harris
f570aa654a vhost: only split on 2MB boundaries when necessary
vhost I/O only need to be split on 2MB boundaries if
there is a break in the VM's memtable at that 2MB
boundary.

This should drastically reduce (if not eliminate)
the intermittent test pool failures seen recently.
virtio limits number of segments to 128, but this
2MB splitting could introduce additional segment
breaks which we do not allocate IOVs for.  In almost
all cases, there are no memtable breaks except at
low 2MB, so most of the extra segment breaks we are
adding are unnecessary.

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

Reviewed-on: https://review.gerrithub.io/396058
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2018-01-24 10:33:43 -05:00
Jim Harris
4d48d87a7f iscsi: remove idle connection handling
Some upcoming changes will effectively render this moot
anyways by adding an epoll/kqueue descriptor to poll
on in all cases (not just connections that have been
idle for 5ms).

The epoll/kqueue code was just ifdef'd out instead
of removed - some of this code will be useful
and reusable with minimal changes in the upcoming
patches.

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

Reviewed-on: https://review.gerrithub.io/395553
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
2018-01-22 23:22:17 -05:00
Jim Harris
8c2b8ca7d7 iscsi: put spdk_iscsi_conn_write_pdu() in lib/iscsi/conn.c
This function was originally named spdk_iscsi_write_pdu()
in lib/iscsi/iscsi.c.  Since this is an operation on a
connection, add "conn" to the name and move it to conn.c.

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

Reviewed-on: https://review.gerrithub.io/395522
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-01-22 23:22:17 -05:00
Shuhei Matsumoto
632f0ced75 iscsi/rpc: Set processor affinity of connection through JSON-RPC
Currently setting cpumask to portal is possible only through
iSCSI.conf. This patch makes possible for any user to set cpumask
through JSON-RPC too.

The following are done in this patch:
- To keep compatibility, cpumask parameter handled as optional.
- Python test code is added.
- Current python script for JSON-RPC does not work correctly for
  IPv6 and the issue is fixed.

Change-Id: I42ef397ce95040a36db4430417a35e9e97527477
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/391728
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-01-22 15:54:48 -05:00
xuhuagen
4041ab04fb Test: fix the syntax error issue in the nvme.sh
The nvme.sh will report error If more than one NVMe devices in the system.
Update the nvme.sh to fix this issue.

Change-Id: I9685394ec53eb036f7580a383619bca559f95c60
Signed-off-by: xuhuagen <huagenx.xu@intel.com>
Reviewed-on: https://review.gerrithub.io/394870
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-19 15:52:05 -05:00
Shuhei Matsumoto
f587197d21 iscsi&iscsi/ut: Unify cpumask decode between iSCSI.conf and JSON-RPC
Currently cpumask cannot be specified for each portal when it is
created by JSON-RPC and portal group creation is not unified
between iSCSI.conf and JSON-RPC.

This patch does the following:
 - cpumask string is decoded in spdk_iscsi_portal_create() which
   is common between iSCSI.conf and JSON-RPC.
 - parsing configline of portal is difficult to understand and
   hence it is refactored.
 - UT code is added.

 JSON-RPC will be added by the next patch.

Change-Id: I13b9989263fae5facff260de32a55ec99f5d5a06
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/392447
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-19 15:47:57 -05:00
Seth Howell
52bd445367 fio_jobs: add fsync_on_close to fio args
This is to help facilitate the update of the fio_ubuntu binary to fio-3.3

Change-Id: I4c896dc60255f821a5cf66af818396f210304f07
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/395394
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-19 15:37:08 -05:00
Seth Howell
16386d7b6d vm_setup: add branch checkout
Change-Id: If1855da6017aa1886186953da79139235c54ad75
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/395399
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-19 15:36:37 -05:00
Dariusz Stojaczyk
583a24a489 bdev: share nomem_io data between bdevs built on the same device
When there are two bdevs built on the same io_device,
it is possible that one bdev entirely saturates
underlying queue, not letting the second bdev issue
a single I/O. The second bdev will silently fail any
subsequent I/O and append it to the nomem_io list.
However, since we resend I/O only from I/O completion
callback and there's no outstanding I/O for that bdev
(io_outstanding==0), the I/O will never be resent.
It'll be stuck in nomem_io forever.

This patch makes nomem_io list to be shared between
bdevs built on the same device. It is now possible
that I/O completion callback from one bdev will retry
sending I/O from other bdev.

The shared bdev data is based on thread-local
bdev_mgmt_channel, so doesn't need any external
synchronization.

Change-Id: Ia5ac3a1627ce3de4087e43907c329aa7d07ed7c7
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/394658
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
2018-01-18 00:29:46 -05:00
Dariusz Stojaczyk
5e799ff470 ut/bdev/mt: prepare for multi-bdev tests
See subsequent patches for details

Change-Id: I17dd842cb6df0b1a6ee3e2745a265cbef321336e
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/395165
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-18 00:29:46 -05:00
Chen Wang
8fdea55ef2 test/vhost: fix typo and increase the sleep time
Fix the nightly vhost readonly test case issue
in physical machine.

Change-Id: Ie0799f06268bcef4a230b162bc70266ce4aae8cd
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/395014
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-17 17:49:31 -05:00
Jim Harris
e3d083f8d5 test/scsi: fix dev.c unit tests
These broke due to a conflicting merge that wasn't
found until both were committed to master.

Fixes 3b3c6002c9.

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

Reviewed-on: https://review.gerrithub.io/395173
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-17 16:16:09 -05:00
Shuhei Matsumoto
afc97ddcf7 iscsi/rpc: Configure Header/Data digest through JSON-RPC
This patch makes possible to set and get Header Digest and Data
Digest of target.

Change-Id: I1d1b892f9dfb747c0f5ad8fc4fddef40929b4143
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/394482
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-01-17 12:41:29 -05:00
Shuhei Matsumoto
de70d712fb iscsi: Check CHAP params when a target is created by JSON-RPC
When a target is created by iSCSI.conf, only valid CHAP params
are passed to spdk_iscsi_tgt_node_construct().

When a target is created by JSON-RPC, help information encourages
users to specify valid CHAP params but
spdk_iscsi_tgt_node_construct() does not check CHAP params and
users can create targets whose CHAP params are invalid.

Change-Id: I7e9057a982f21f04782481cda74208a139c1fdad
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/394481
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-17 12:41:29 -05:00
Shuhei Matsumoto
f04569140c rpc/iscsi: Adding an LUN to an existing target
Add JSON-RPC to add an LUN to an existing target. The parameter
lun_id is optinal and if skipped, the lowest free LUN ID will be
assigned.

This JSON-RPC is tested in iscsi_tgt/rpc_config.

Change-Id: I010619f2d4ccec89c589bb0618466b4d15949ebb
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/385181
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-17 12:41:29 -05:00
Shuhei Matsumoto
3b3c6002c9 iscsi: Add LUN to an existing target (not runtime)
Removing an LUN from an existing iSCSI target is possible by
removing the corresponding BDEV. However adding an LUN to an
existing iSCSI target is not possible yet.

Add a new function spdk_iscsi_tgt_node_add_lun() and related
functions first toward supporting this function.

JSON-RPC for this operation will be submitted an another patch.

Informing the newly added LUN to the initiator is not included
in this patch. Hence this operation is possible only for any
inactive target.

Change-Id: I3a28f4d75a17126e49c9d12ce64c3ad68f231840
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/385180
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-17 12:41:29 -05:00
Maciej Szwed
bd4c63b317 blob: add missing callback in spdk_blob_sync_md function
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Iadb29a8ce8dcebfea68d4feeb5f3de1bb3124f16

Reviewed-on: https://review.gerrithub.io/392286
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-01-17 07:58:57 -05:00
Maciej Szwed
65fe29f8dd blob: cluster allocation/deallocation for thin provisioned blob
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ib3470fbac49e92308ed14e20ccde6655354f2580
Reviewed-on: https://review.gerrithub.io/389577
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-17 07:58:57 -05:00
Pawel Wodkowski
85a61ea6f0 scsi: fix LUN removal/hotremoval path
bdev hotremove event is send directly to hotremove callback given
during spdk_scsi_dev_construct() call. So any bdev hotremove might be
promoted to whole SCSI device removal (like in vhost) wich will trigger
LUN removal. But after returning from hotremove callback LUN and device
might be still referenced (eg to register poller or by outstanding IO).

Even worse: spdk_scsi_dev object is not dynamicaly allocated but
returned from static array which mean there is no way to detect
use-after-free error on spdk_scsi_dev by any tool. This might lead to
using SCSI device that is freed or assigned to different device.

To fix this:
- always delete LUN using hotremove path
- defer spdk_scsi_dev delete/removal after all LUNS are really
deleted.

Change-Id: I65598bf42cd507f620095dff5d32509a0424d060
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/393674
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-16 19:14:00 -05:00
Jim Harris
d1c4502b19 test/vhost: remove extra quote in readonly.sh
This was causing failures in the test pool.

Test run shows there are still issues with this script
that need to be debugged.

Fixes e6e2fc5b07 (test/vhost: don't call vm_setup.sh helper script to setup VM)

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

Reviewed-on: https://review.gerrithub.io/394592
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Paweł Niedźwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-16 19:09:19 -05:00
Xiaodong Liu
bef23a925c test/iscsi: add digests enabled test
iscsi_tgt tests with different header and data
digests configuration.

Change-Id: I6e444eacccebccd66c099ea349be4bdeb063ba67
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/393717
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-16 10:57:04 -05:00
Shuhei Matsumoto
583e969922 scsi: remove lun name
There is no need to keep a lun name anymore - we always
use the bdev name as the lun name so it is not providing any
additional value. This also keeps us from associating
the same bdev with different LUNs on different iSCSI target
nodes or vhost-scsi controllers.

Side effect of this change is:

1) Use "bdev_name" across the APIs to make it more clear
   what these names refer to.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I3d42fde22087352ce1d5dc80178bd8c5cac8cb7c
Reviewed-on: https://review.gerrithub.io/390843
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-11 18:37:34 -05:00
Shuhei Matsumoto
c3e890e92b iscsi/ut: Test for read task splitting
Splitting an iSCSI task into primary and sub tasks is complex
operation and a degradation was caused for it.

Hence adding test codes is required but there is no UT code for
it yet.

primary->bytes_completed is for read completion from bdev and
it is tested by this patch.

Additional test codes will follow:
- primary->bytes_completed is tested when read tasks do not
  complete in order.
- primary->task.data_transferred is for write completion to
  initiator through network.
- primary->task.data_transferred is tested by another patch
  because primary->bytes_completed is used in iscsi/conn.c but
  primary->task.data_transferred is used in iscsi/iscsi.c.

Change-Id: I94b47048111a3d3b249b84d5c54941b0a89ccd40
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/394143
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-11 18:37:34 -05:00
Cunyin Chang
6951b97964 blobfs: make the cluster size of blobfs configurable.
Change-Id: I26738d71316b8509cf8e98fee549a0745bb09bfa
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/393715
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-11 15:50:01 -05:00
Piotr Pelplinski
b9252b1272 blob: check if resize failed
This patch provides logic for returning errors instead of
assert when size is larger than blobstore size.

Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: I16d12338e2b682c39bd33d507d57ea126501a0d7

Reviewed-on: https://review.gerrithub.io/392749
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-11 15:05:47 -05:00
Pawel Niedzwiecki
9a723c1a48 test/virtio: Add vhost initiator tests for multiqueue
We define 'size' and 'offset' parameter as % of device so on nvme
devices the tests are run with big files and small on malloc so we
can remove the 4G test case

Change-Id: I4840e859732696dd981ab0ab11e5270c025ff248
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/391838
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-11 14:28:42 -05:00
Pawel Niedzwiecki
37fd86f0f7 test/virtio: Add vhost initiator tests for multitarget.
test virtio devices created from scsi controller with multiple targets

Change-Id: Ibef135c4dc6fdb324bec6b42c9e532add92e656a
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/391836
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2018-01-11 14:28:42 -05:00
Pawel Niedzwiecki
8d57f4da2a test/virtio: Add vhost initiator tests for multisocket
test multiple devices simultaneously instead each device
individually

Change-Id: I514ee080a2a585a87c7bcfc2a10da89456b285a4
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/393944
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2018-01-11 14:28:42 -05:00
Pawel Niedzwiecki
b251ebdd9d test/virtio: Refactor existing code
- replace generating job files with pre-existent fio job file
- construct vhost scsi controllers with rpc
- replace generating path to vhost socket in bdev.conf with
static path
- add function usage

Change-Id: I44dedb7fd9a3d96e3d348450c4351cfae6d20116
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/391827
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2018-01-11 14:28:42 -05:00
Maciej Szwed
2a8d46cece blob: fix bs recovery
Recovery code did not claim clusters taken by metadata.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: If6726eddd22f4e1a3f9814b2348243155fb0fdb9

Reviewed-on: https://review.gerrithub.io/394173
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-01-11 12:54:58 -05:00
Hailiang Wang
ebdb06bcb8 stub: fix a io_queue_size limitation
io_queue_size is 256(default) in stub.c, it probably be a limitation
for some performance testing.

Change-Id: Iaf4a15966e7b814323bd8bf134d8f657635aca8e
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/394168
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-11 11:48:06 -05:00
Dariusz Stojaczyk
3ef8dc1074 scsi/lun: simplify task submission path
Removed task `pending` queue. All tasks were
temporarily put in this queue just to be moved
out of it yet within the same reactor cycle.

Change-Id: I32d402f7abd3cfa21c263f41149425abdc71992f
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/393911
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-11 11:47:08 -05:00
Seth Howell
a1a47b5592 nvmf/subsystem.c: add checks for valid utf-8 chars:
The NVMe spec states that nqn names are to be encoded in utf-8. The
prefixes of all nqn's are already required to be ascii by virtue of
their structure so they are already valid utf-8, but the user specified
strings should be checked for valid utf-8 strings.

Change-Id: I20090d366e93e98af4932eaa120d4edb6e512206
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/394118
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-11 10:57:38 -05:00
Lance Hartmann
095f4254f1 lib: Return instead of exit/abort in env_dpdk
Modifies spdk_env_init() and spdk_mem_map_init() such that
they return on failure instead of terminating with exit()
or abort().

Change-Id: I054c1d9b2e46516ff53d845328ab9547f54bdbc4
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/393987
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2018-01-10 16:20:15 -05:00
Jim Harris
6361254c3d bdevperf: reuse tasks more efficiently
Instead of inserting a task into the TAILQ and then
immediately taking it back off, just pass the task
to bdevperf_submit_single instead.

This reduces overhead of bdevperf compared to nvme/perf.
nvme/perf does not use a TAILQ at all, and does something
similar by passing the just completed task so it can be
reused by its submit function.

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

Reviewed-on: https://review.gerrithub.io/393833
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-01-10 09:51:31 -05:00
Pawel Wodkowski
29e017f406 test/vhost: silence some very noisy loops and better checking for ssh
key file

When using '-x' option some loops produce huge amount of useless debug
logs. It would be good to have different log levels but for now let
silence those places.

Use 'readlink -e' while checking default ssh keyfile path. This ensure
to fail if keyfile is invalid link.

Change-Id: I1e24fe02a3e1a1646b710e5e3d8c2ee2c1abf2a4
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/393799
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-01-09 19:30:21 -05:00
Piotr Pelplinski
489ea86e6e blob: add thin_provision opt for spdk_bs_create_blob_ext
This only adds the option and metadata flags.
Actual functionality will be added in an upcoming commit

Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: I66015f48f34d4c7c64fce1831ebaed134098407c
Reviewed-on: https://review.gerrithub.io/390196
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-09 14:57:04 -05:00
Piotr Pelplinski
4bfe81b676 blobstore: fix serializing flags
This patch fixes issue when blobstore doesn't serialize flags
when there is also at least one extent or xattr. 

Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: I85d5031dc45df510cebe1acf4694ab62bca2e720

Reviewed-on: https://review.gerrithub.io/393770
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-09 14:57:04 -05:00
Pawel Wodkowski
db6d5f0e7b test/vhost: don't forward http/https in VM
Forwarding http/https might increase boot time in some distros (like
Ubuntu). Test don't use it so might be removed.

Change-Id: Ia9f07bbae03c37888bcf06fec480577ae79e78cd
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/393176
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-01-09 14:56:37 -05:00
Pawel Wodkowski
e6e2fc5b07 test/vhost: don't call vm_setup.sh helper script to setup VM
vm_setup.sh is a proxy script for vm_setup function which should
be called directly.

Change-Id: If9cd70a9bf67a743144142ea75887dfbd539b38a
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/393160
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-09 14:56:37 -05:00
Jim Harris
97cbd304db test/nvmf: use correct names for spdk_nvmf_subsystem_create/destroy
This fixes b21fad1a80 (nvmf/subsystem: spdk_nvmf_valid_nqn fits nvme spec).
This patch was not rebased before last revision and some of these functions
had changed.

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

Reviewed-on: https://review.gerrithub.io/394110
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-01-09 14:27:15 -05:00
Pawel Wodkowski
a862d1cdd6 scsi: remove lun_db
Change-Id: Icc40b66cd0c6f63242bc3d3f26b34f323450c570
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/393501
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-09 13:56:00 -05:00
Seth Howell
b21fad1a80 nvmf/subsystem: spdk_nvmf_valid_nqn fits nvme spec
Added tighter regulations to the NVMe-oF nqn checking to conform with
the nvme 1.3 spec. including, adding checks for valid nqn's in the case
of a generic uuid based nqn and checking for reverse domain name and
colon prefixed strings in a user specific nqn. Unit tests included.

Change-Id: I3ee4b269d0655ac9968699617e43e3297695c7ed
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/393265
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-09 13:30:24 -05:00
Jim Harris
fb8acd90aa util: make spdk_io_channel_get_ctx() inline
This requires exposing struct spdk_io_channel in the
public header - mark it as internal with Doxygen
comments to make it extra clear that applications
should not use the data structure directly.

This is a very hot function in the main I/O path,
so making this function inline has a significant
performance benefit.  A bdevperf microbenchmark
using null bdevs shows a 11% improvement.

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

Reviewed-on: https://review.gerrithub.io/393824
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-01-09 12:46:35 -05:00
Pawel Wodkowski
61ba62bdae test/vhost: don't call vm_run.sh helper script to start VM
vm_run.sh is a proxy script for vm_run function which should
be called directly.

Change-Id: Ia7ac242fe8c24b9ce76e6d5483bd52f84225b0bb
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/393159
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-01-08 18:01:33 -05:00
Pawel Wodkowski
aa0f44b53b test/vhost: don't call run_vhost.sh to start vhost app
run_vhost.sh is a proxy script for spdk_vhost_run function which should
be called directly.

Change-Id: I6ca3e049e812bf05c9251e16c75f6ff90c3b0f0a
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/393145
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-01-08 18:01:33 -05:00
Pawel Wodkowski
ac021a2e7d test/vhost: make FIO be configurable through env variable
Change-Id: I45b366ed39964514a8d409fe894ca941e8895b73
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/393057
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-01-08 18:01:33 -05:00
Pawel Wodkowski
575a291fa3 test/vhost: introduce notice, warning, error and fail message
helpers

So we can better trace what failed.
notice - just echo to stdout
warning - just echo to stderr
error - echo to stderr and return false, so trap ERR can catch this
fail - like err but call 'exit 1' at the end so if no trap ERR is used
it will exit anyway.

Change-Id: I5c7b3682fd6c0d81c07c58a5ec965155c7593407
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/392218
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-01-08 18:01:33 -05:00
Xiaodong Liu
c3b3138117 nbd: remove nbd test app
nbd functionality now can be gotten by nbd rpc.

Change-Id: I85ebcb44d9ed263bcee19162dc060f3b268dddcd
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/391371
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-01-05 17:39:48 -05:00
Xiaodong Liu
cc8533a990 nbd: add rpc test scripts
Test nbd rpc methods:
  start_nbd_disk
  get_nbd_disk
  stop_nbd_disk

Verify nbd data read and write by dd and cmp.

Change-Id: Ie32639d11727893ceac7adce0119b9c2085e74e1
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/391732
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-05 17:28:13 -05:00
Daniel Verkamp
d57306d8eb scsi: pass only task to SCSI exec functions
Retrieve LUN data directly from struct spdk_scsi_lun rather than copying
them into struct spdk_scsi_task, and access the LUN via the task->lun
pointer.

Change-Id: Id8745f116bc559fb2f9e58811c2b9781c8cbdae8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/393709
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-01-05 13:49:05 -05:00
wenzhong wu
ec25ddd9cf autotest: Add perf as host with lvol backend and test different qd/io_size test in nightly
And perf as host with nvmf lvol_bdev backend and test differnet qd
and io_sizes in nightly(Proting from DTS).

Change-Id: I857fb66488d644ae0cc092dc1fff3370be09ba5e
Signed-off-by: wenzhong wu <wenzhongx.wu@intel.com>
Reviewed-on: https://review.gerrithub.io/387556
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-01-05 13:08:16 -05:00
Daniel Verkamp
e229b873e6 test/iscsi_tgt: add FIO test with 512KB QD=128
Change-Id: I21be11c2a8428fdc711c404bf3ce489979159ed5
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/393712
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
2018-01-05 12:24:58 -05:00
Daniel Verkamp
e45437aba7 scsi, iscsi: move task->parent to iSCSI task
The SCSI layer no longer needs to know about the parent/subtask
relationship maintained by iSCSI.

Change-Id: Ia6f7c5367c5b656bd7521ed1abb6d0f713a0500b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/393697
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
2018-01-05 00:01:37 -05:00
Shuhei Matsumoto
c013db36fc scsi: SCSI string name format
it appears that scsi name string designator
format in SPDK is not correct. The name strings
are not null terminated (which causees garbage
to appear in scsi_inq -p 0x83). Further, they
are not padded correctly.

SCSI port name and device name strings must be null
terminated. Further, the length must be a multiple
of 4 bytes, and must be padded with 0s.

See SPC-5 Section 7.7.6.11.

Change-Id: Id7c4ad27e5c3a17ad68e5e466142801c0d03b1f2
Signed-off-by: Karandeep Chahal <devilsgrotto@gmail.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/393027
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-04 15:48:28 -05:00
Pawel Wodkowski
891c12a63c util: add spdk_strerror() wrapper with TLS support
This patch remove need for additional buffer when translating error code
to string.

Change-Id: Iaa60088b5c450581d3cdddbb425119b17d55a44b
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/386114
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-04 15:00:09 -05:00
Sebastian Basierski
a70a000997 bdev: Renamed lvol->old_name to lvol->unique_id
Also added vbdev_get_lvol_by_unique_id function.

Change-Id: I55a64df008c23c0fedb8a59ef67e2c356097e780
Signed-off-by: Sebastian Basierski <sebastianx.basierski@intel.com>
Reviewed-on: https://review.gerrithub.io/392658
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-01-04 13:15:09 -05:00
Sebastian Basierski
b9afa3c732 bdev: Added bdev aliases list.
Added aliases list to bdev struct.
Added 2 API calls to add and remove aliases.
Added test for adding and removing aliases.

Change-Id: I1815aec8c02cfa398b2d1de41577197315665fdc
Signed-off-by: Sebastian Basierski <sebastianx.basierski@intel.com>
Reviewed-on: https://review.gerrithub.io/390200
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2018-01-04 13:15:09 -05:00
Karol Latecki
6d8dc5239e test/vhost: keep fio config file name for log output
Copy fio config to guest VM with the same name instead of
renaming to /root/fio.job.
Use the same file name for creating log file in desired directory.

Remove not needed ls command in common/run_fio while at it.

Change-Id: I9e13d8cd6f7892a77d89afb99f7d57ef79f7b11f
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/393469
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-01-04 02:15:53 -05:00
GangCao
3166267411 tool: add the config for interval of real time perf display
There used to be a fixed 1 second of real time performance
display with the "-S" parameter. Make it as a configurable
parameter, the minimum interval is still 1 second while user
can configure a larger value.

Change-Id: I159d867f2b6019b095d0291c436f01b110ff69d8
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/393306
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-03 15:32:18 -05:00
Dariusz Stojaczyk
fc03485b9d scsi/lun: fix hotremove with no io_channels open
When LUN with no io_channels is being hotremoved,
the hotremove poller was being started on the core
pointed by lun->lcore. However, this field is only
valid when there are io_channels open. For example,
when user tries to delete a bdev that's attached to
an unused vhost controller (no io_channels ever opened)
the scsi layer could start a hotremove poller on
lun->lcore == 0. If SPDK runs on a different cpuset -
not containing CPU0 - SPDK could even segfault.

Change-Id: I31a363352875d944f220b0296d5cfe570319023d
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/371863
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-03 14:38:11 -05:00
Dariusz Stojaczyk
e7885a9a05 test/vhost: send SIGABRT on vhost shutdown failure
There's a bug lurking somewhere in vhost
shutdown path causing intermittent
failures. Sending a SIGABRT instead of SIGKILL
will make the process dump core. We could use
it to speed up debugging.

Change-Id: I0825deecbf26e32ff073fdbcdfe42640c52453b9
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/393477
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-03 14:22:49 -05:00
Daniel Verkamp
f0c2093477 scripts: factor out iter_pci helper functions
Add a new file, scripts/common.sh, that can be shared between not only
autotest scripts, but also scripts/setup.sh, scripts/gen_nvme.sh, etc.,
and move the PCI iteration functions there.

The iterators are also expanded to work identically for both dev_id and
class_code on Linux and FreeBSD.

Change-Id: I98423cd06242e78535f5da4fce82166812ea96a8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/393416
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-03 14:09:22 -05:00
Daniel Verkamp
581107c77a test/nvme: only run setup.sh test on Linux
For now, our scripts don't support detecting mounted filesystems on NVMe
devices on FreeBSD, so only run those tests on Linux.

Change-Id: I558715bf4e95eaad2dd2d8a546626269c0837edb
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/393420
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-03 14:09:22 -05:00
Daniel Verkamp
75bb8a5c5f test/nvmf: shorten nightly nvmf+pmem test
This test ran for 10 minutes, which is half of the allotted time for the
entire nightly test run.

While we're here, remove some of the duplication - we don't need to run
both the nightly long run and the shorter normal test run of the same
test, and they should be grouped together.

Change-Id: I66385054d425fb8b032e282050fd39e927a8eb80
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/393095
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-03 14:02:26 -05:00
GangCao
f95dacd504 bdevperf: explicit destroy the target when failing to alloc resource
The task resource is allocated one by one and when it fails
to allocate at some point, call the explicit destroy to release
the resource.

Change-Id: Ida916ed25a279806fee76104990f1f92daf3e1b6
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/393009
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-03 14:01:14 -05:00
Daniel Verkamp
331af9ea96 test/iscsi: add default IP addresses
The iscsi_tgt test scripts can assume that the default case is testing
on a local machine using the kernel TCP stack; add a fallback TARGET_IP
and INITIATOR_IP to make it easier to run the individual iSCSI tests
outside of the autotest.sh framework.

Change-Id: I07c58201691dc5f053d5f67787768dfee4110f73
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/393214
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-03 14:00:37 -05:00
Daniel Verkamp
ddfc063f90 test/event_perf: remove DPDK dependency
Use the SPDK env layer functions to get the number of cores and iterate
over core numbers.

Change-Id: I77870ebcffc07db680bbb3783fbe5944cf88e2ea
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/393188
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-03 12:05:59 -05:00
Daniel Verkamp
543cb17248 build: remove $(ENV_CFLAGS) where not necessary
Only Makefiles for libraries that directly depend on DPDK (rather than
the SPDK env abstraction) should add $(ENV_CFLAGS).

Change-Id: Ifdf44d3ef8c42bbf7f20edd524b330d00658235b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/392818
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-03 12:05:59 -05:00
Daniel Verkamp
61c1493785 iscsi: disallow netmask prefix of 0 bits
Netmasks with 0 bits of prefix do not make sense.  For example,
192.168.1.2/0 would allow hosts from any address, but this is
indicated with a special "ANY" value rather than a normal netmask.

Netmask prefixes of the full address size (e.g. 32 for IPv4 and 128 for
IPv6) are still allowed, since this represents a valid configuration
that matches a single specific address.

This also allows the IPv4 netmask math to be done entirely in uint32_t
instead of promoting to unsigned long long to avoid undefined behavior
when bits == 0 (shift count would have been 32 in that case).

Change-Id: I021b718e6a46f628c96a358edae816de81cd8929
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/392969
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-03 12:02:06 -05:00
Piotr Pelplinski
c315d8e8eb blob: Add read_only opt and spdk_bs_md_set_read_only to blobs.
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: Ibffb43e39b44e5f443d3dfbfa5b5d7dcac3243ef

Reviewed-on: https://review.gerrithub.io/391182
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-03 12:00:30 -05:00
Piotr Pelplinski
c355bbb144 blob: Add xattrs to spdk_blob_opts.
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: Ic2c23d16360b26359c2a32920b89f2f3a21a2a9a

Reviewed-on: https://review.gerrithub.io/391191
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-03 12:00:30 -05:00
Ben Walker
95ac75aabe nvmf: Add synchronization primitives for subsystems
This allows the user to pause a subsystem, make some
modifications, and then resume it.

Change-Id: Ia18371023d8fc66e1797fda293a01b68c0a61c96
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/392422
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-03 11:58:11 -05:00
Ziye Yang
acbec142ae bdevperf: remove static array allocation for head and coremap
We can use spdk_env_get_core_count() to determine the
core count

Change-Id: I854ec86f10c5670b02295214d1d36fe5d57e31a4
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/392934
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-12-29 16:02:35 -05:00
Jim Harris
fe8138cebb test: add histogram unit tests
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I79c2c30e15b8254c3cb75af5615dfafee84a9abd
Reviewed-on: https://review.gerrithub.io/392709
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-12-29 14:20:48 -05:00
Jim Harris
bc00666271 util: enable dynamic spdk_histogram_data sizing
Currently, each histogram range is hardcoded to
128 buckets (1ULL << 7), resulting in 58 ranges
(64 - 7 + 1) and a total size of 58 * 128 *
sizeof(uint64_t) = 59392 bytes.

To allow for more usage models in cases where this
size is prohibitive, enable the following changes:

1) specify number of buckets per range (in number of bits)
2) specify max datapoint value (in number of bits)

The latter can be useful for cases where datapoints
are never close to requiring all 64 bits - and allows
reducing the number of ranges.  Any data points that
exceed the max will be tallied in the last bucket
in the last range.

Testing shows no performance disadvantage using the
dynamic approach.

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

Reviewed-on: https://review.gerrithub.io/392707
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-12-29 14:20:48 -05:00
Jim Harris
ea17499c6c test: add util/histogram_perf test application
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I050ecd4f3bbccbd527387d080ce595fae16479d3

Reviewed-on: https://review.gerrithub.io/392704
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-12-29 14:20:48 -05:00
Daniel Verkamp
97f145c8b8 scsi: convert unmap command to bdev blocks API
Use spdk_bdev_unmap_blocks() in place of spdk_bdev_unmap(), since the
SCSI UNMAP descriptor already natively operates in blocks rather than
bytes.

Change-Id: I16a0c38d203cf5f60484229e7872783b11d8de6e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/393202
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
2017-12-29 13:43:29 -05:00
Daniel Verkamp
a520198dba scsi: convert sync command to bdev blocks API
Use spdk_bdev_flush_blocks() in place of spdk_bdev_flush(), since the
SCSI SYNCHRONIZE CACHE command already natively operates in blocks
rather than bytes.

Change-Id: I11810948fb8d0b6b911d48620e2a363f767cc7f7
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/393201
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
2017-12-29 13:43:29 -05:00
Shuhei Matsumoto
b29d208267 vhost: Replace RTE_MAX_LCORE by spdk_env_get_last_core()
Adopt two improvements for iSCSI by Ziye to VHOST.
- iscsi/conn: remove rte_config.h header
- env: export spdk_env_get_last_core function

Change-Id: I8f067093d593c8d483c52587669f8b0b706f497f
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/392910
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-12-28 12:03:40 -05:00
Shuhei Matsumoto
0686f0381b vhost: Remove DPDK dependency and simplify load balancing
The latest patch for the iSCSI connection is applied to the vhost
too.

RTE_MAX_LCORE in the for loop is removed and the for loop is
replaced by SPDK_ENV_FOREACH_CORE().

When the cpumask is unexpectedly 0, not 0 but the first core is
returned.

Change-Id: I39cfc2219a3532eccc8c0ce59712102b947a76d7
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/392588
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2017-12-28 12:03:40 -05:00
Pawel Niedzwiecki
62dc3292f5 test/lvol: update help message
update help message to match reordered and new test cases

Change-Id: Id85391cfc84c1ee1567cae07da9ff797a95a6f68
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/392675
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-12-28 11:42:56 -05:00
Shuhei Matsumoto
f53462b432 iscsi: ANY does not work as wild card netmask of ACL (degradation)
A few previous changes replaced ALL by ANY for the initiator group
because ANY was normal for this case. ANY was tested enough for
the initiator name of the initiator group but not tested for
the netmask of the initiator group.

Hence the previous changes caused degradation.
This is the bug fix and UT code is added together.

Change-Id: Idf7642dd4c111a4788aca31a0105b3497631aecd
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/392923
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-12-26 17:21:50 -05:00
Karol Latecki
122c7db7bf test/vhost: use full path in spdk_vhost.sh
Current relative work dir path caused problems with downstream
test scripts when running spdk_vhost.sh using relative path

Change-Id: Ifd47bd37650a6328cb0f548a03cb4de010093320
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/392744
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paweł Niedźwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-12-26 11:17:12 -05:00
Karol Latecki
08a7e4f4f8 test/vhost: change mask for ctrl construct negative test
Tests need adjustments due to patch:
https://review.gerrithub.io/#/c/392587/

Change-Id: I098aca99fe22a9e01246da74b4b9fbf25f4b5b99
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/392745
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paweł Niedźwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-12-22 13:19:23 -05:00
Karol Latecki
90aca6641d test/vhost: add trap to lvol test
Change-Id: Ibd3e485085793260ca4bb2bfa3da6025b2c997aa
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/392450
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-12-21 14:21:52 -05:00
Shuhei Matsumoto
14797d839d vhost: Allow set cpumask more than active cores for vhost
The latest change for the portal group is applied to the vhost.
The following comment is quoted from it.

Currently the cpumask must be a subset of the reactor mask.

However, this is different from sched_setaffinity() function
and taskset command of FreeBSD and Linux.  The latter will
be familier for more people. Hence the later is adopted.

The following is quoted from the FreeBSD Man Page of taskset:

  The CPU affinity is represented as a bitmask, with the lowest
  order bit corresponding to the first logical CPU and the
  highest order bit corresponding to the last logical CPU.

  Not all CPUs may exist on a given system but a mask may specify
  more CPUs than are present.

  A retrieved mask will reflect only the bits that correspond to
  CPUs physically on the system.

  If an invalid mask is given (i.e., one that corresponds to no
  valid CPUs on the current system) an error is returned.

  The masks are typically given in hexadecimal.

Change-Id: Idcd72a12ef52e4ccec8476e7d54fab82867cf936
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/392587
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-12-21 13:32:31 -05:00
Jim Harris
40c911b957 blob: add used blobid bit array for valid blobids
This can be used for two purposes:

1) more quickly iterate the blob list, avoiding
   metadata pages that are valid but not the first
   page in the blob's metadata list
2) close races between delete and open operations -
   now we can clear the bit in the blobid bit array
   when the delete operation is in progress, ensuring
   no one else can try to open the blob

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

Reviewed-on: https://review.gerrithub.io/391695
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-12-21 12:28:21 -05:00
Karol Latecki
d6bf976af4 test/nvmf: increase number of subsystems in lvol test
Number of susbystems for test on physical server increased.
Due to SoftRoce limitations number of subsystems is not
increased for VM tests.

Change-Id: I6875204238f55f4bc4a819512ee0fd6a46c44fee
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/380459
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Piotr Pelpliński <piotr.pelplinski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-12-21 12:20:42 -05:00
Karol Latecki
c7b8fb9116 test/nvmf: decrease number of subsystems for software rdma
SoftRoce does not implement enough queues
for multiconnection tests and cause test pool failures.
In case interface used for test is software
emulated - reduce number of NVMf subsystems in test.

Change-Id: I52cc78015e72603c487a5774b91c6bd4523326b0
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/392357
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-12-21 12:20:42 -05:00
Ziye Yang
cf1ab98c90 bdevperf: change the type of io_time_in_usec into uint64_t
Purpose: To avoid overflow, if the passed value is too
big.

Change-Id: I59d31c0baa742cab14e22dcd88a61cb5adca247a
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/392579
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-12-21 12:20:15 -05:00
Pawel Wodkowski
b5207c4488 test/vhost: remove obsolete parameters 'qemu-src' and 'dpdk-src'
This was removed some time ago.

Change-Id: I5e4b588fb881793d750999ff73e8bf891cb58fc0
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/391952
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-12-21 11:28:09 -05:00
Pawel Wodkowski
3911366d66 test/vhost: make run_fio.py to just run fio
Make shell scripts prepare fio jobs and just call run_fio.py to run
those jobs. This way run_fio.py don't need to know anything about test
environment configuration.

Change-Id: I10b6954011855e9139ff7b5372070ec553009d33
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/391929
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-12-21 11:28:09 -05:00
Jim Harris
d8b8bc4353 test/lvol: wait for lvolstore tasting after nvme bdev construction
A couple of the lvol tests delete the nvme bdev, then construct
it again to test lvolstore tasting.  But constructing the nvme
bdev and then the tasting can take a tiny bit of time, and if
we check for the lvolstore too soon, it could fail.  There are
a large number of intermittent test failures in the test pool
that show this signature.

So sleep one second to allow time for the tasting to complete.

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

Reviewed-on: https://review.gerrithub.io/392559
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2017-12-21 10:42:17 -05:00
Changpeng Liu
739cd41912 test/nvme_dp: cleanup swap16/32 with spdk endian library
Change-Id: I6ddce54d24570099f5237ea3acbac7e3be78e520
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/392434
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-12-20 15:12:26 -05:00
Changpeng Liu
9ca670ac8a util/crc16: add crc16 library support and unit tests
Change-Id: I7174f1799361b8337ff5590b90ad6a0564ca8e9b
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/391899
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-12-20 15:12:26 -05:00
Daniel Verkamp
1fe9ba9dba bdevperf: replace floats with doubles
Use double-precision floating point in the performance_dump() function,
since we can be dealing with large numbers (especially now that
io_completed is now uint64_t).

This isn't part of the I/O path, just used to print statistics, so
there should be no performance impact.  Also, the arguments passed to
printf() were already implicitly being promoted to double, so this
actually removes an extra conversion step.

Change-Id: I12aae36bc42e83777eaa050561eb5e55060ae81c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/392414
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-12-20 13:53:08 -05:00
Karol Latecki
233c5189ab test/vhost: refactor lvol test
- Removing hardcoded lvol bdevs and blk controller sizes
Lvol bdevs will now be created with roughly equal size based on
size of used NVMe backend
- Create lvol structures and VMs setup independently

Change-Id: Ib1cfe1b60033200a9896fa0c8d1b17af41ea0eb1
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/390983
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-12-20 11:39:34 -05:00
Shuhei Matsumoto
b37d1b60f1 scsi&test/iscsi_tgt: SCSI device == iSCSI name
In the iSCSI specification, the SCSI device name is defined to be
the iSCSI name of the node.

However, when g_spdk_iscsi.nodebase is used, the SCSI device name
is made of the device specific string (the part of IQN after the
colon).

The size of the temporary buffer fullname[MAX_TMPBUF] in
spdk_iscsi_tgt_node_construct() is 1024 and the size of
spdk_scsi_dev.name is 255. The former is larger than the later.

However the max length of IQN, EUI, NAA are 223, 20, and 36,
respectively. All are less than 255.

Hence even if we use fullname as the SCSI device name, no overflow
will occur. Even if fullname is more than 255, strncpy() does not
write more than 255 in spdk_scsi_dev_construct().

It's possible to check the length of iSCSI name strictly, but I
will do the least in this patch.

Change-Id: Icc6655fcd846797720867c10e316d2951c664030
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/390360
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-12-19 13:34:03 -05:00
Cunyin Chang
6e82aa5ace nvme: Add support of hot remove vfio-attached devices in pcie layer.
Change-Id: Ia7d6ca2d6c0bec6345f05718f6a6328eccda2dcc
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/391329
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-12-19 13:07:20 -05:00
Ziye Yang
65a7fb47ff bdevperf: change type of io_completed to uint64_t
Reason: If test a very long time, it will overflow
when we use int

Change-Id: I729e8cb5862ab78808da5121666b41e599e1dddb
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/392122
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-12-19 11:58:30 -05:00
Maciej Szwed
13ece6a735 blob: add spdk_bs_create_blob_ext
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Iba33c55f129c60fad2d58f5254dec5c54ed56805
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Reviewed-on: https://review.gerrithub.io/388217
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-12-19 11:55:36 -05:00
Shuhei Matsumoto
a652471c99 autotest: uninitialized value in test/unit/lib/iscsi/tgt_node.c
It looks that initiator groups which were initialized after
being inserted to linked lists caused failures.

Change-Id: I43f4a6324e77221f0e9657667c0185b15e9c229c
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/392100
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-12-19 11:41:43 -05:00
Jim Harris
df03f9d119 test: add timing calls to vhost/initiator/blockdev.sh
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5e19266d5d418e1b356308d2b9efa419c1b22232

Reviewed-on: https://review.gerrithub.io/392002
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-12-19 11:10:57 -05:00
Seth Howell
102746245e test/nvme.sh: add support for older kernel versions
the sysfs for NVMe drives on some older versions of the linux kernel
differs slightly from the latest kernel versions. This patch adds a
fallback to support those older kernel versions.

Change-Id: I2787e0d15d310ce1f264b0a303f53e48525a9a1d
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/391983
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-12-18 14:53:07 -05:00
Seth Howell
80016bd9be test/vm_setup.sh: add missing packages from pkgdep.sh
Change-Id: Ib32434bfa81fa3de2b7bae88fdfbadba6f59a2d4
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/391984
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-12-15 16:16:31 -05:00
Seth Howell
40f8c5f951 vm_setup.sh: add libiscsi checkout
libiscsi will be used to test our iscsi target for spec compliance. I
check out the source from github incase we need to modify it and create
our own branch later.

Change-Id: I2d1c037e1aee47fa7f6f700ae186dd402f9ad52b
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/391887
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-12-15 16:16:31 -05:00
Cunyin Chang
bdcb0d709a nvmf: add support of hotplug for nvmf.
Change-Id: Iebd5b75e3525e77bf256f5b7f52aa2504d7a68c3
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/390549
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-12-15 16:14:02 -05:00
Cunyin Chang
7f5864be20 nvmf: Add public interface of remove ns from subsystem.
Change-Id: I9c2746dd54a13f3dae0ac2bab1d5fced931e8591
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/391699
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-12-15 16:14:02 -05:00
Ziye Yang
3f1b35f970 bdevperf: Fix the period performance print info data.
This patch does the following things:

1 Set the time period 1 second into a global variable,
then if we modify that value, we will make sure that
we change it in the whole file.

2 Fix the period performance printing data . We should not pass
the time period, but we should pass time period * times, since
I/Os completed are caculated from the beginning.

Change-Id: I1eaaf1655389cbccefdcc879a51fca94028afdcb
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/391421
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-12-15 15:57:03 -05:00