Commit Graph

4230 Commits

Author SHA1 Message Date
Tomasz Zawadzki
248fbf2aec ut/blob: use poll_thread_times()
Making use of recently added utility to poll exact number of times.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I23a9dc702c899285626522ace8ec77a9ba0f7757
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/773
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-21 09:35:27 +00:00
Tomasz Zawadzki
d7aff25df0 ut/common: add poll_thread_times() to poll select number of iterations
Right now functions poll_thread() and poll_threads(), polled
always until there were no further messages to process.
This allows to put next operation to execute only after
previous one completed.

Function poll_thread_times() allows to poll certain thread
for exact number of executions. If 0 is passed to max_polls,
then this function executes single message and all pollers,
until no messages are left.

With this change it is possible to only run a thread
selected number of iterations. Allowing to add another operation
without first one finishing.

It will become useful in blobstore UT, where two operations
will be executed with slight delay between them.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I4a6537695389f30130ea2fd2fd43d7b2cb2dea39
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/772
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-21 09:35:27 +00:00
Darek Stojaczyk
94675ba17b test/autotest_common: cleanup discover_bdevs
$rpc_server is hardcoded inside the function and can't
be empty, so remove the check for that.

Change-Id: Ic819089eb113b14a7c2407cd5ce882bcdee044bb
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/522
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-21 09:34:14 +00:00
Artur Paszkiewicz
11495b5c63 ut/raid: put bdev_raid.c into 'raid' subdirectory
To make room for other raid module unit tests.

Change-Id: Icf8b8ff0c9051ccb4c7ebd784807370f8be1a8fb
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/853
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-20 14:40:19 +00:00
Artur Paszkiewicz
a193dcb8f3 module/raid: use macro to iterate over raid base bdevs
Change-Id: Ie3c074e86a3624bcca5b479505efb4380f79cbdd
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/850
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-02-20 14:40:19 +00:00
Darek Stojaczyk
463e8a1cd8 test/lvol: remove delete_bdev_positive
This is a duplicate of test_hotremove_lvol_store_base,
previously known as test case 301.

Change-Id: I2e49652a0d94fc32f8193f724a254a50484844cc
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/682
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-20 09:57:20 +00:00
Shuhei Matsumoto
ffc2cf1c4d bdevperf: Three Cleanups for bdevperf_construct_target()
Firstly, change unmap suppor and I/O size checks to do once per
bdev.  It is enough to check if unmap is supported and check if
I/O size is multiple of data block size once per bdev.  Hence move
these checks from bdevperf_construct_target() to
_bdevperf_construct_targets().

Secondly, use calloc() to remove unnecessary zeroings in
bdevperf_construct_target().

Thirdly, factor out getting next io_target_group from
bdevperf_construct_target().  This is a preparation to make
bdevperf_construct_target() asynchronous by using
spdk_for_each_channel().

These may be better to break-up but these are already included in
the long patch series.   So to reduce the burden of reviewers,
squash these into a single patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2cb94c8aa2b6b1a1b9e9a04da533e1fd093f8f29
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/640
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-20 09:54:50 +00:00
Shuhei Matsumoto
ba9ce36527 bdevperf: Factor out constructing multiple targets for a bdev into a function
Factor out constructing multiple targets for a single bdev from
bdevperf_construct_targets() into an new helper function
_bdevperf_construct_targets().

Then change the return type of bdevperf_construct_targets() to void
and continue creating targets for subsequent bdevs even if failing
for any bdev. Additionally, remove a couple of comments in the source
code to avoid misunderstanding.

These changes will make us easier to use spdk_for_each_channel()
in bdevperf_construct_targets().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I3363931749b863c8de619939939d401f14e43d15
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/638
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-20 09:54:50 +00:00
Shuhei Matsumoto
4579fc9d2c bdevperf: bdevperf_construct_targets_tasks() calls bdevperf_test() at its end by swapping
Creating targets, creating tasks, and then running I/O is the actual
ordering of start-up. So adjust ordering of function calls to make
easier us to follow.

Change the return type of bdevperf_construct_targets_tasks() from
int to void, and call bdevperf_test() at the end of
bdevperf_construct_targets_tasks(). Then replace bdevperf_test() by
bdevperf_construct_targets_tasks().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id1396ff4ba199778300f5ddaf79db5f8f2e0ccb6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/642
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-20 09:54:50 +00:00
Shuhei Matsumoto
039360d302 bdevperf: Call bdevperf_test() at the end of bdevperf_construct_targets()
Move bdevperf_test() into bdevperf_construct_targets() from
_bdevperf_init_thread_done() and rpc_perform_tests(). Following the
last patch, this consolidation will make the code a little cleaner.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ided4653941f45ff6ac8edbea504560cc8a9fb5a0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/637
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-20 09:54:50 +00:00
Michal Berger
dfe17a39e8 test/config_converter: Declare $rootdir, $testdir paths
Make sure that $rootdir and $testdir are accessible in the sourced
environment. This is to follow the convention seen throughout the
entire repo and make sure that nothing that depends on these paths
fails in case they are missing.

Change-Id: Ie20754fc7aca7aab3636cb022499e9ff2f2dd30b
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/777
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-02-20 09:54:15 +00:00
Konrad Sztyber
7f45a12636 lib/ftl: use iovecs instead of single data pointer
Allow ftl_io initialization with a iovec array instead of a single data
pointer.  It'll make it possible to use the vector version of the IO
commands.

Change-Id: I34c1e398cea681f59321605e081366785aa29128
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/894
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Maciej Szczepaniak <maciej.szczepaniak@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-20 09:53:03 +00:00
Jacek Kalwas
6d8f1fc648 nvmf: remove redundant trid obj copy
It is memory optimisation as transport id is 'heavy'. As a side effect
simpler handling of listen and stop_listen on transport specific layer.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I4e9d0e0c5eee2d570ec4ac9079270c32d5afb8db
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/626
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-19 13:43:15 +00:00
Jacek Kalwas
6913a864fb nvmf: add const to trid within listener allowed
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I31b10c860e8a40745e001a0898e081152afac7e9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/914
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-19 13:43:15 +00:00
GangCao
26328b7b1a Test/QoS: enable QoS testing on Malloc with ZCOPY
We've now supported ZCOPY io type and Malloc bdev will use
ZCOPY for the read/write operation. Add the support for the
test case of Malloc with ZCOPY operation.

Change-Id: I291fc9ef82b1eae800c97c5a6b7a0c810c357fe0
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/540
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-19 09:48:08 +00:00
Maciej Wawryk
9ebbf3acac scripts/pkgdep.sh: Add flag for developer tools installation
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I8876fd7c60198c597d931c5f498644c415c2a868
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/596
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-18 14:42:16 +00:00
paul luse
b69c95b67f blockdev.sh/ add QAT AES_XTS to CI
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I1329ffa4e3195b93ae92059e4c58fc0ab33445ed
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/443
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-18 08:05:42 +00:00
paul luse
9e1b82ac9c subsystem/accel: add entry point for .write_config_json
Write config json for setting the selected accel module.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ife11d4d4a776254b56fa6d24dc817481beb78c3c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/664
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-18 08:05:34 +00:00
paul luse
aa7a13afc7 global: rename copy to accel
The copy engine library, modules and public APIs have been renamed.
Use of the word `copy` has been replaced with the word `accel`
short for accelerator in preparation for adding new capabilities
in the future. Additionally, APIs for what was previously called
the `memcpy` engine have been renamed to identify the engine as a
software accelerator.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ia607aa718416146fbba1e6792b8de0f66bd8a5de
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/576
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-18 08:05:34 +00:00
Seth Howell
19260848f6 nvme: publicly declare spdk_nvme_transport
This will be useful in the upcoming spdk_nvme_poll_group api.

Change-Id: Id83340a2ce9887817312f5aac38db4de8c588974
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/577
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-18 08:05:08 +00:00
Ziye Yang
c515a7cab7 sock ut: enable the posix_ut testing in auto test.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ia1c3e68430c44d54ccdc2d42f6c59b1df265f96e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/917
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-02-18 08:05:00 +00:00
Karol Latecki
71efe5db24 Fix Markdown MD026 linter warnings - trailing punctuation in header
MD026 Trailing punctuation in header

This rule is triggered on any header that has a
punctuation character as the last character in the line

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I3ab4894092ef6b5f920d89b74e43c2e46e9581c0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/657
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-17 10:07:21 +00:00
Karol Latecki
93be26a51d Fix Markdown MD022 linter warnings - headers blank lines
MD022 Headers should be surrounded by blank lines

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I768324b00fc684c254aff6a85b93d9aed7a0cee5
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/656
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-17 10:07:21 +00:00
Karol Latecki
a41c031609 Fix Markdown MD012 linter warnings - multiple blank lines
MD012 - Multiple consecutive blank lines

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I3f48cdc54b1587c9ef2185b88f608ba8420f738b
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/654
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-17 10:07:21 +00:00
Shuhei Matsumoto
aefe3fe23c lib/iscsi: Remove dry run processing from portal config file parsing
Dry run processing in iscsi_parse_portal() now only checks if
portal string is not NULL. Portals are managed not by fixed size
array but linked list now. Hence dry run processing is not needed
itself now.

So remove the dry_run parameter from iscsi_parse_portal() and
the dry run loop in iscsi_parse_portal_grp().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib7cb444b51581b8ee603388aad34bc58d1cc9023
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/493
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-17 10:06:47 +00:00
Shuhei Matsumoto
5adeda4807 lib/iscsi: Send message to add connection to poll group even at startup
The next patch will create a SPDK thread for each poll group at
startup. Hence iSCSI configuration management will be done by
different thread from these poll group threads.

Hence send message explicitly to add connection to poll group even
at startup. We can do this for the current master branch.

Remove some code related with SPDK thread framework from unit tests
for iSCSI portal group because thread management is moved to
connection.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I40cacdb2066f65866f7ef83cf3b3e4e8b8cd322e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/489
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-17 10:06:47 +00:00
Alexey Marchuk
c3ba9127d0 nvme: Store NVMEoF ioccsz and icdoff in ctrlr structure
This allows to avoid calculation of ioccsz bytes on each request
and removes access to "cold" ctrlr structures in data path.
Add UT to check validness of calculation

Change-Id: I55ceff99eb924156155e69a20f587a4f92b83f0b
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/519
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-17 10:06:30 +00:00
Tomasz Kulasek
5b3c4b8783 test/nvme: nvme_rpc add test for bdev_nvme_apply_firmware
This patch introduces tests for basic RPC commands not used in
other tests:

	bdev_nvme_apply_firmware

Change-Id: I3a7aff1720108548b03d581fa7664d1ff5498be5
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/533
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-17 10:06:00 +00:00
richael zhuang
94b04d4f2c test: solve error about uninitialised data_buf
When running sock_ut in fedora29 with memcheck, there is an error
"Syscall param sendmsg(msg.msg_iov[0]) points to uninitialised
byte(s)".

Signed-off-by: richael zhuang <richael.zhuang@arm.com>
Change-Id: Iaddb85ed2da2f45e200569c936f05174bc89c99b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/874
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-17 10:05:18 +00:00
Darek Stojaczyk
8e7d6e1b0c app: added --json-ignore-init-errors
If set, SPDK will continue loading the JSON config even if
some commands caused an error. This can be useful when loading
RPC config from spdk_tgt into e.g. bdevperf, which supports
only a subset of RPC commands and would usually fail with
"Method not found" message.

Resolves #840

Change-Id: I070fea862fd99e5882d870e11e6a28dc9d0c8ba6
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/620
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-13 09:53:02 +00:00
Ziye Yang
17cdadf5a9 test/hello_sock: Refactor the program and add -N option
This option is used to make hello_sock can use the
designated sock implementations. We need this patch
since we will provide another uring implementation.

So better to pass the name. Otherwise if the users have
many different implementations, VPP implementation
could not be the highest priority for test.

Change-Id: Ibb3862e9e6588743ec9c01074904ed4f7c9c06a5
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/478
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-13 09:51:46 +00:00
Tomasz Zawadzki
01f2a6e0b1 test/nvmf: make check_ip_is_soft_roce() more generic
Sample output from rxe_cfg:
  Name        Link  Driver  Speed  NMTU  IPv4_addr        RDEV  RMTU
  eno1        yes   tg3            1500  192.168.100.1    rxe0  1024  (3)
  eno2        no    tg3            1500  192.168.100.2    rxe1  1024  (3)
  eno3        no    tg3            1500  192.168.100.3    rxe2  1024  (3)

Sample output from other systems rxe_cfg:
  Name  Link  Driver  Speed  NMTU  IPv4_addr  RDEV  RMTU
  ens3  yes   e1000                           rxe0  1024  (3)
  ens4  yes   e1000                           rxe1  1024  (3)

Looking at the above output, amount of columns after greping particular line
varies between systems and configurations.

Meanwhile "rxe_cfg status" is an equivalent command, but allows to add
argument that will be matched to RDEV name.

With this patch we no longer depend on awk to select columns, but instead
printout all soft roce enabled devices and grep for particular dev name.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Id4483c58f0fdcef2f38abdf56257658643a3069f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/619
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-13 09:51:38 +00:00
Tomasz Zawadzki
17d9050f5f test/nvmf: remove unnecessary check for soft_roce in nvmf_lvol
It is a leftover from previous structure of this test.
Since then usage of SUBSYS_NR was removed and this part
was left unused.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ia1f6f8046f82370e793182b47920b4bf4d3231a0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/618
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-13 09:51:38 +00:00
Shuhei Matsumoto
e038e096e3 lib/thread: Fail spdk_thread_exit() if thread has active I/O channel
This is a preparation to support voluntary thread termination by
calling spdk_thread_exit().

The comment in the header file has already said that all associated
I/O channels must be released before calling spdk_thread_exit().
This patch actually checks if it is satisfied in spdk_thread_exit().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I56ac50b561c6ca91d3dc2d60c21c8d91d38f081b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/823
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-13 09:51:15 +00:00
Shuhei Matsumoto
648d6cd5dd lib/thread: Fail spdk_thread_exit() if thread has any registered poller
This is a preparation to support voluntary thread termination by
calling spdk_thread_exit().

Change spdk_thread_exit() to return -EBUSY if the thread has any
registered poller. We enforce all pollers including paused poller
are unresitered before the thread is marked as exited.

By this change, a bug was found in reactor_perf test tool. Fix it
by adding spdk_poller_unregister() and add the g_ prefix to avoid
future potential errors.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If7f40357c9a6f4101b3998ea0da3cc46cc435031
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/487
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-13 09:51:15 +00:00
Shuhei Matsumoto
70ec72871e lib/thread: Fail spdk_thread_exit() if thread is already exiting
This is a preparation to support voluntary thread termination by
calling spdk_thread_exit().

Change spdk_thread_exit() to return -EINVAL if the thread is already
marked as exited.  This will be helpful to detect wrong call sequence
of voluntary thread termination.

Besides, update reactor shutdown and unit test framework shutdown
to incorporate this change accordingly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2296c61e273bf4d9580656dcbc2da0e8a8f3bcf7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/671
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-13 09:51:15 +00:00
Shuhei Matsumoto
13595495a1 lib/thread: Stop new I/O channel after thread is marked as exited
This is a preparation to support voluntary thread termination by
calling spdk_thread_exit().

By the last patch, the asynchronous release of I/O channel will
complete even after spdk_thread_exit() because pending messages will
be reaped.

Then this patch stops new allocation of I/O channel after
spdk_thread_exit().

Hence we will be able to release all I/O channels for exiting
thread within finite time.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I48a45bcba7c4b2c62d8c9d398ac35a584b533627
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/821
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-13 09:51:15 +00:00
Shuhei Matsumoto
d7393e2e4f lib/thread: Stop and reap pending messages after thread is marked as exited
This is a preparation to support voluntary thread termination by
calling spdk_thread_exit().

Previously, the exiting thread had discarded all pending mesasges.

We change this to stop accepting any new message in spdk_thread_send_msg()
and reap pending messages in _spdk_msg_queue_run_batch().

Add unit test case for the new behavior. Adding g_ prefix to global
variables for clarification is done together.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ida78e7bb1b86357602aea6938dd514897b67edd6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/482
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-02-13 09:51:15 +00:00
Shuhei Matsumoto
f2576eb05b ut/thread: Fix bugs in test case for_each_channel_remove()
The test case for_each_channel_remove() did not have any
assertion and the count was not incremented correctly.

This patch fixes several issues in for_each_channel_remove()
by counting spdk_get/put_io_channel() and spdk_for_each_channel()
correctly and achieves what we wanted to do in this test case.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iceffd924f8887452bd7dad48e30d121874ab0b05
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/483
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-13 09:51:15 +00:00
paul luse
93bb4fe598 script: update pmem test script
remove revs to a gerrithub review and a test plan doc
that no longer exist

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I05f4466181e27f60e1e717c42649726ad46f0cac
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/453
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-02-12 12:07:30 +00:00
Michal Berger
a8d016910a test/common: Make sure that extdebug is enabled as soon as possible
if given script, which executes under the debug tracer, fails before
xtrace_restore() is called, the BASH_ARGC[] will miss all the arguments
which were passed down till that very point. Similar case can be
experienced after tracer is disabled as then all the arguments hold by
BASH_ARG{C,V}[] become unavailable (i.e. until tracer is enabled again).

Since there's no actual benefit from toggling the extdebug (in fact, it
could break DEBUG|RETURN traps if ever used), enable it once when
autotest_common.sh is sourced and keep it enabled throughout entire
execution of given script.

Change-Id: I01001ead1570967a2e550d993f85f12b9f62553e
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/477
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-11 08:38:08 +00:00
Shuhei Matsumoto
5780ad9638 bdevperf: Change return type of bdevperf_test() to void and include its error handling
Subsequent patches will call bdevperf_test() as callback to
bdevperf_construct_targets(). Changing return type of bdevperf_test()
to void and including its error handling will make the code cleaner.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I30fe38cfb73fbc593d079d5b66a540c0ce96fe19
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/636
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-10 10:26:28 +00:00
Shuhei Matsumoto
3673217aa3 bdevperf: Move target management functions close to the caller
_end_target() is an exception, and move just above bdevperf_complete().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2197a3b7ceb36ab29f0b69e31f3babd4e996f193
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/635
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-10 10:26:28 +00:00
Shuhei Matsumoto
9226dcce43 bdevperf: Put RPC main handler next to command line main handler
Put rpc_perform_tests() next to bdevperf_run(). This will improve
readability a little.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8816a88be13e794f39ded3ff12e9a76e40c8282a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/514
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-02-10 10:26:28 +00:00
Shuhei Matsumoto
00f1443eb7 bdevperf: Move down help command / usage functions in a file
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I326b3c7e60a7aacce9a692c41dcfd0fc19825444
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/513
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-10 10:26:28 +00:00
Shuhei Matsumoto
f7f504cf42 bdevperf: Delete g_min_alignment and g_buf_size and use per target variables instead
Remove two global variables and use variables per target instead.

g_min_alignment:

Bdevperf creates task on a target after creating the target, and
we has removed any limitation about alignment described in the comment.

Remove g_min_alignment and use each bdev's alignment to call
spdk_zmalloc() instead.

g_buf_size:

We had set the size of task->buf by not g_buf_size but g_io_size
by mistake.  We have not used any global buffer pool and can use
buffer size per io_target instead.

Delete g_buf_size and add buf_size to struct io_target.  Then
initialize target->buf_size in bdevperf_construct_target() and use it
instead of g_buf_size including the fix in
bdevperf_construct_task_on_target().

Besides, as a minor cleanup, remove duplicated initialization of
global variables in this patch. Global variables are already
initialized at their definition. Remove duplicated initialization
from main() function. It is ensured that global variables are
automatically zeroed but write initialized value expilcitly for
compatibility and clarification.

These will be helpful to parallelize targets and tasks management among
multiple threads.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iba23dec3e1da8810da7523da09bae858eb4484a2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/512
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-10 10:26:28 +00:00
Alexey Marchuk
63c50be82e test/nvme: correct nvme controller version
nvme_ctrlr_identify_active_ns checks ctrlr.vs bits but not ctrlr.cdata.ver

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I2d2e4e81de7308dc275f48fda52d7d3ab0cdb74d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/505
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-10 10:25:38 +00:00
Alexey Marchuk
93988db982 test/nvme: add tests to cover spdk_nvme_wait_for_completion
Change-Id: I5dc600b6ae7993d93494092d5fb4a81f840a06a9
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/504
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-10 10:25:38 +00:00
Pawel Kaminski
1fd96c85b4 test/vhost: Replace old style config with json in initiator test
Change-Id: I622448dcd1de960793894395d7da55ebd612dcc7
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/529
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-10 10:25:11 +00:00
Wojciech Malikowski
97f3ad2d8b lib/ftl: Change _ZONE_STATE_CLOSED to _ZONE_STATE_FULL
Ftl should operate on SPDK_BDEV_ZONE_STATE_FULL instead
SPDK_BDEV_ZONE_STATE_CLOSED.

Change-Id: I9ede78e3a1097490c1eb924f9e009fa166a7f3d6
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/553
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-10 10:24:38 +00:00
Michal Berger
83086b5973 test/blobfs: Refactor exit behavior
The on_error_exit() function was being called via the local ERR trap
to cleanup after the tests in case any failure occurred during the
execution. However, this was masking the backtrace trap so the
on_error_exit() had to also call print_backtrace() to compensate -
this was resulting in an additional function being unnecessarily
placed onto the stack and included in the actual backtrace.

Avoid the above by refactoring on_error_exit() into simple cleanup()
function called upon exit()ing from the script. The rationale is that
cleanup has to happen regardless if the script failed or not and
elements like $conf_file are always created from the very scratch by
the script itself anyway prior running the tests.

Change-Id: I6bb8f4155525037624f0bd5aab288f8c502141f6
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/456
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-10 10:24:01 +00:00
Michal Berger
a11aab73e8 test/common: Check if igb_uio is loaded before removing it
igb_uio doesn't necessarily have to be loaded into the kernel as SDPK
still may be built with support for it but only particular set of
tests is actually using it. If such a condition is met then rmmod will
fail the entire test run since it always exits with != 0 if given
module is not found.

Avoid this by checking first if igb_uio is actually in use.

Change-Id: Ib97488797c657f810b588a0b427e578807ebe6c6
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/625
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-10 10:23:39 +00:00
Karol Latecki
3d8a0b19b0 doc: Fix Markdown MD032 linter warnings
"MD032 Lists should be surrounded by blank lines"
Fix this markdown linter error by inserting newlines or
adjusting text to list points using spaces.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I09e1f021b8e95e0c6c58c393d7ecc11ce61c3132
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/434
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2020-02-06 09:46:06 +00:00
Seth Howell
a9a472b99b scripts: update to point to review.spdk.io
Change-Id: I10c79cd421bd735ced2e17919cfa38abec74edf2
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/451
Reviewed-by: Jim Harris
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: <sys_sgci@intel.com>
2020-02-04 23:05:51 +00:00
Michal Berger
9ba80de0dd test/nvme: Don't wait for spdk_stub0 if stub dies prematurely
If stub terminates right after execution, e.g. due to lack of system
resources (requested number of cpu cores to run on, right amount of
memory, etc.) start_stub() would end up blocking forever since there
wouldn't be any entity around that would mknod spdk_stub0 for it to
break the loop.

Avoid the above scenario by checking if $stubpid is still visible
under procfs and return if it goes missing.

To make sure kill_stub() is still called to clean up after start_stub()
declare proper trap prior the call to start_stub().

Additionally, avoid potential stderr noise in case kill|wait are told
to act on a PID that's not visible in the ns anymore.

Change-Id: Ief41200c57957f84b4f96a54baabc8da1f27dd43
Signed-off-by: Michal Berger <michallinuxstuff@gmail.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482653
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-04 20:22:23 +00:00
Michal Berger
4b1dbc948b test/common: Don't take randomize_va_space default setting for granted
Currently, kill_stub() doesn't gracefully handle this particular sysctl
since it overwrites it with assumed default that doesn't necessarily
have to be a part of kernel's config on a given system.

Don't presume what the setting should be, instead, read and save the
current value and try to restore it whenever kill_stub() is called.

Change-Id: I1f1ee85c29d5e2ec2f442a54f700e3bc45ee2437
Signed-off-by: Michal Berger <michallinuxstuff@gmail.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482652
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-04 20:22:23 +00:00
Tomasz Zawadzki
16cc6464db lib/log: do not put trailing whitespace in fdump
fdump puts out buffer in following format:
"00000000  76 61 6c 00                                        val.            "

Each buffer is displayed with hex values up to maximum, then
followed up with a value. This is done to keep starting value
with the same alignment between each consecutive line.
Value contents should end at its length instead of
adding trailing whitespace.

After this patch, output is changed to:
"00000000  76 61 6c 00                                        val."

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I26b327e83f296ba3865f1a337f4a70764a80e2b0
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483706
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-04 20:08:02 +00:00
Tomasz Zawadzki
2d687618f3 test/match: do not ignore all input when passing \n
Match script before this change ignored all input
when passing just a new line in ignore file.
This was because \n symbol was stripped from that
particular line (chop()) leaving empty string.
This always matched all of the input when using index().

Now when comparing the input line and ignore line,
we check that ignore line is not empty.

Besides that, to still allow ignoring new lines
we check and compare both strings directly.

Changed chop() to chomp() to prevent further breakage,
difference is that chomp() only strips new line characters.
As that was the original intention anyway.

The loop changed so we exit on first instance of ignored
line matching, rather than mention particular line
multiple times for each matched ignore.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I62d48e1130c600ffff6713d2748239cc955bbe9e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483834
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-04 20:08:02 +00:00
Tomasz Zawadzki
dc06a06d12 test/blob: fix match tool with blobcli
Empty line in ignore file caused all output from the match
tool to be ignored. This made the test to always pass,
regardless of changes made.

Next patch in series will be fixing the match tool,
meanwhile this patch focuses on making the blobstore
test match and ignore files right.

This patch adjusts match file in following ways:
- keep EAL and crypto output up to date
- use $(N) to match any blob id
- adjust out of date xattr value print

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ia0a2312d9691487acbdd06dc08451232171cc46d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483705
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-04 20:08:02 +00:00
Darek Stojaczyk
a531e9d70c test/lvol: rewrite destroy_lvol_store_nonexistent_lvs_uuid to bash
Again, smuggle it into one of the existing test case
to create more opportunities for this test to fail.
We'll now trying to remove an inexistent lvolstore
when there's a valid lvolstore present.

Change-Id: I64a72a8ffe38ba6939d0818d2c6c81e49748a33c
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462468
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
0fa664624c test/lvol: rewrite delete_lvol_store_underlying_bdev to bash
This test case is about hotremoving a malloc with
an empty lvolstore on top. We rewrite it to bash,
but also introduce one more similar test case but
with a single lvol in the lvs.

Change-Id: Iea9666080fe5e73befd97ec5e0b2898d8b30ecd6
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462467
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
9751011fa9 test/lvol: rewrite destroy_multi_logical_volumes_positive to bash
Change-Id: Ia9e2bc269c4c7ee77afca3b001a6ef52612c5264
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462466
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
e9c4aaf260 test/lvol: rewrite bdev_lvol_delete_lvstore_with_lvol_bdev_positive to bash
Those test cases were basically testing hotremove, so
that's how we're going to name them now.

Change-Id: Ib79ab7e50e3022df981f7092436b0a0991d5c9b9
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462189
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
713a14bd2e test/lvol: rewrite destroy_lvol_store_use_name_positive to bash
The test case covers destroying the lvolstore using its
human-friendly name instead of uuid. We destroy lvolstores
all over the basic construct tests, so we just smuggle
one removal by name into one of those existing test cases.

Change-Id: I5027382f727be226f601573367bfcd214baf474a
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462190
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
26b840163c test/lvol: verify the same lvs can't be deleted twice
We didn't really test it so far.

Change-Id: I58e57a47465e3c4bc409d497706a56c7aa5cdaa1
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462465
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
a551ad8756 test/lvol: remove destroy_lvol_store_positive
We already perform the same steps as a part of different
test case in basic.sh.

Change-Id: I0e1931307b3de69df95b2a2994b87147028677e1
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462464
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
cf628b09d0 test/lvol: test resizing lvols using their names
We did not test it so far.

Change-Id: I0769c31691535b5d8f9c49e07899f035208efebb
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462188
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
9d044f25f1 test/lvol: test resize with ongoing I/O traffic
Resize tests were extremely basic so far, extend them
with a test case that actually tries to do some I/O
before and after the resize.

I would like to keep it as a separate test case,
because it uses NBD which used to be quite buggy at
some point. If the resize tests fail on this new test
case, it means the previous very basic resize tests
have passed and the lvol resize functionality itself
doesn't show any failures - this might potentially
simplify some root causing later on.

Change-Id: I7ee45243ee4fc025fc71f6eee4c946211c07a78a
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462187
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
4c945d2332 test/lvol: rewrite negative resize tests to bash
Change-Id: I8f8daa5e1afd747712f8d562966486b7618ba047
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462186
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
5ff75ec292 test/lvol: rewrite test_lvol_resize_basic to bash
Added resize.sh. There won't be too many test cases
in there just yet, but eventually we'd like to lift
some restrictions on lvol resizes and there will be
a fair amount of extra cases to cover.

Change-Id: I3d9db16003ac806241678cfd8441281d557c214c
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462185
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
67ab15d6e7 test/lvol: rewrite construct_lvs_with_cluster_size_min/max to bash
Change-Id: Ifa772d238fd0cbee1d8c9c2bdee67dd6839eaeab
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461881
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
c6e1399118 test/lvol: rewrite nested_construct_lvol_bdev_on_full_lvol_store to bash
Change-Id: I6a33d54260f2181995b962db21efc9556a5a4c0c
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461880
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
912f3b4c12 test/lvol: rewrite construct_lvs_name_twice to bash
Change-Id: Ia14fc807c7812e3de4035f3753dc021bdc8df463
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459679
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
580b19f9df test/lvol: rewrite construct_lvs_on_bdev_twice to bash
Change-Id: Idd0b6e5f54111e22a3f9b5ea1e347d457069829c
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459678
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
c3cc245401 test/lvol: rewrite construct_lvs_nonexistent_bdev to bash
Change-Id: I5e362ec53544f57a11584f449222827bd9be4369
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459677
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-02-04 19:27:53 +00:00
Shuhei Matsumoto
bad8847f7a bdevperf: Use spdk_thread_send_msg() instead of spdk_event_call()
Use spdk_thread_send_msg() for notification of bdev hotplug
and test completion instead of spdk_event_call().

Each I/O target group is associated with SPDK thread now. Hence
use spdk_thread_send_msg() to do bdevperf_target_gone() on the
specified thread. The group is held in struct io_target by the
previous patchm and remove target->lcore safely because it is
not used anymore.

Then use spdk_thread_send_msg() to notify master thread.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I88eadbdd1f120161cf484793f14f5eb0b44d010f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478818
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-04 18:24:11 +00:00
Shuhei Matsumoto
728481f491 bdevperf: Register bdevperf as I/O device and make its start/stop asynchronous
Register the global bdevperf object as an I/O device by
spdk_io_device_register().  Create and destroy I/O target groups
asynchronously by using spdk_for_each_thread() and
spdk_for_each_channel().

spdk_for_each_thread() and spdk_for_each_channel() serialize the
execution among multiple threads, and any lock is not necessary.

Additionally, for bdevperf_submit_on_core() and
bdevperf_stop_io_on_core(), replace for their loop + event call by
spdk_for_each_channel() and rename them by
bdevperf_submit_on_group() and bdevperf_stop_io_on_group(),
respectively.

This advances the work to move bdevperf from core based to thread
based.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I63b512d0b8e734e862afe1f7a4053414b99204d7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478780
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-04 18:24:11 +00:00
Alexey Marchuk
48f38636ce tcp: Cleanup nvme_tcp_pdu structure
With the recent changes which added usage of writev_async to
both TCP target and initiator, nvme_tcp_pdu::writev_offset
becomes useless since it is not updated in data path. This
field is only used in UT. Remove this field from nvme_tcp_pdu
structure, now nvme_tcp_build_iovs builds iov which fully
describes the PDU. Update UT accordingly.

Field padding_valid_bytes is not used at all, delete it too

Change-Id: I2d6040ae64d6847cb455f59f65ec5677de8e5192
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483374
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-04 18:18:49 +00:00
Shuhei Matsumoto
655e8e16e3 lib/thread: Assert if spdk_put_io_channel() is called on the wrong thread
spdk_put_io_channel() was designed to be called on the same thread
that called spdk_get_io_channel(). spdk_put_io_channel() sends a
message to its own thread, to allow the context to unwind before
releasing the resources. This had the side effect to allow an
incorrect thread to call spdk_put_io_channel(). This patch will fix
that.

Bdevperf tool had a design flaw that needed the side effect, but
it was fixed recently.  We do not know if we have any other case.

Hence add assert to spdk_put_io_channel() to find other case.

We found that unit test for blobstore had called
spdk_put_io_channel() and fix it together in this patch.

Besides, correct the comment for spdk_put_io_channel() in
include/spdk/thread.h not to create any other case in future.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6ec7bf074818abef43b23ca40bc9385adac70a75
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479390
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-02-04 18:11:18 +00:00
Wojciech Malikowski
dcd3fc1fd1 bdev/ftl: "use_append" parameter for bdev_ftl_create RPC
Allow for using appends instead of writes.

Change-Id: I2f0d3bcdbb0eee034f7b0b6349de854ddbf7273d
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481839
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-02-04 18:10:01 +00:00
Wojciech Malikowski
b627646359 test/ftl: Update deprecated RPC calls
bdev_nvme_detach_controller call should be used instead of
delete_bdev_controller

Change-Id: Iaa8bb2580d108eaf28c64a9fa7e352991cf2608d
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481837
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-04 18:10:01 +00:00
Wojciech Malikowski
9b4091dbe5 test/ftl: Update deprecated RPC calls
ftl_bdev_create call should be used instead construct_ftl_bdev

Change-Id: If361ca6be8c5118dd55579e8c0a219041b7f1e94
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481811
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-04 18:10:01 +00:00
Jacek Kalwas
fcca8ea6a9 nvmf/ctrlr: introduce ctrlr connect backdoor
This internal interface allows to create nvmf ctrlr and connect io
qpairs on add listener rpc request (i.e. when subsystem is stopped
and listener is not yet on subsystem's list).

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I998cb72ed773094faacc6668cf069ba9e2a6bf50
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481409
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-04 15:16:12 +00:00
Jacek Kalwas
489815dcf5 nvmf/ctrlr: introduce utils used during ctrlr connection
Had to remove one part of a unit test because the null
checking is moved to a different function.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I0a95d0a9a9a5708416fdc7efefb36e17b1ffe010
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/480008
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
2020-02-04 15:16:12 +00:00
Mike Carlin
06fc4cadbe util/base64: Extend b64 decode to calculate exact len
When attempting to decode a base64 string, while there is a way to
calculate the maximum possible decode length, there isn't a way to
calculate the exact decode length without duplicating some base64
specific logic located in spdk_base64_decode. With this change, the
spdk_base64_decode function can now optionally calculate the exact
decode length without actually performing the decode by passing NULL
in as the dst argument.

Change-Id: Ice83db979f86a6fe9f39d236d3083102ca37ec68
Signed-off-by: Mike Carlin <mikefcarlin@protonmail.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479479
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-03 11:39:49 +00:00
Michal Berger
1c06235ab3 test/blobfs: Fix typo in the mount check
The actual check was ORing the execution of mount instead of sending
its stdout to grep - in case mount returned with != 0, this would
block execution of the entire script as grep would wait for input on
its stdin still attached to a terminal.

Also, quote $mount_dir to avoid potential word splitting.

Change-Id: Iea531eef0af79a3742e0a954ea6188e304d0d14a
Signed-off-by: Michal Berger <michallinuxstuff@gmail.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483433
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-03 11:39:18 +00:00
Michal Berger
18b9303dfb test/common: Include BASH_ARGV[]s in the backtrace
Enable extdebug and try to include all the arguments passed down
the function stack in the backtrace.

Change-Id: I81381c936b0f895f1ca8e31d57ef8116d737c6cd
Signed-off-by: Michal Berger <michallinuxstuff@gmail.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482695
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-01-31 12:39:22 +00:00
Michal Berger
1baf379e69 test/common: Don't attempt to read backtrace from unavailable source
In case cwd is changed during the execution of given BASH_SOURCE, i.e.,
when the dirstack is mangled by calls to cd, the actual executable may
end up missing from the path when run directly from its directory in
the ./ fashion. Example:

  [root@fedora31 fuzz]# ./autofuzz.sh --module=vhost --transport=all

autofuzz.sh cds into the $rootdir hence the BASH_SOURCE[i] in form of
./autofuzz.sh won't be found there, thus during a failure, since run
under a debug tracer, nl will fail with -ENOENT while trying to read
it.

To mitigate, check if $src is available for reading, if not, log that
the backtrace is not available.

Change-Id: I68988350ba36cca8464bdfac437f662ed4c30f67
Signed-off-by: Michal Berger <michallinuxstuff@gmail.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482694
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-01-31 12:39:22 +00:00
paul luse
e914958951 module/compress: rename set_compress_pmd RPC to match convention
set_compress_pmd -> compress_set_pmd

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Icb1ecc7adfe10485c44f98ab9e31eaa6857596e7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482597
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-31 12:37:31 +00:00
Seth Howell
f257be1313 doc: replace all cloudfront refs with ci.spdk.io
It's good to have a human readable domain again.

Change-Id: If773e28a267b635a94a45b07fba9a32d62d0c248
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483146
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-31 12:36:19 +00:00
Seth Howell
e0f63b969d test/nvmf: disable bdevperf tests on soft-roce
Github issue 1165 details some issues we have with soft-roce and these
tests. Right now we are disabling them for build stability.

Change-Id: I3a9e28ff3cc1c6ac7d9aa91d93541e295514bb7b
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483300
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-30 16:52:10 +00:00
Seth Howell
8b47b31a17 test/unit: clean up conditional checks and duplicate tests
Change-Id: Ibd99f40f19e73b119ff7de434a4ddf9a29ed3191
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482444
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-30 16:52:10 +00:00
Tomasz Zawadzki
12d1404125 lib/blob: set default use_extent_table to true
Extent table and extent page descriptors are now
set to be default way clusters are serialized on disk.

With this patch UT are ran with and without
extent table.

Changed two asserts in test, since amount is dependent on
which type of serialization is used.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ica58fce6a4effd014d7dd40ee26edd0fa3196d0f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481901
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-01-28 09:15:23 +00:00
Tomasz Zawadzki
954cb9cd55 ut/blob: redefine spdk_blob_opts_init()
This will be used to add another run of whole UT suite
with extent pages on/off.

Next patch in series will be enabling both types of
extent serialization for all UT.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ia8b4b8822edefb90ffc13cf777885f9af95e4545
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482170
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-01-28 09:15:23 +00:00
Tomasz Zawadzki
6a5bb712b4 ut/blob: replace all blob creation with extended version
All the non-ext version of the call is doing, is calling
ext with NULL as opts. Then default opts are used in
its place.

This change was facilitated by next on in series,
where all blob opts will be initalized in UT
with parameter use_extent_table either set to
true or false.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I62b642c1808b38a5f7c94a5900f25f4978a4ec39
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482859
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-01-28 09:15:23 +00:00
Ben Walker
c85a3d105c test/nvmf: In filesystem.sh, wait for partition to be unused
The network operations are now asynchronous, so wait for the kernel
to stop using the NVMe partition after unmounting the filesystem.
The kernel is presumably checking for partition tables or unmapping.

Change-Id: Ibefe8e072823a230a896ecfd0adcd9d5fff2723f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482926
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
2020-01-28 09:15:23 +00:00
Alexey Marchuk
8818ace2f4 nvme: Don't use stack variable to track request completion
A pointer to a stack variable is passed as an argument to
nvme_completion_poll_cb function, later this variable is used
to track completion in the spdk_nvme_wait_for_completion() function.
If normal scenario a request submitted to the admin queue will be completed
within the function which submitted the request.
spdk_nvme_wait_for_completion() calls nvme_transport_qpair_process_completions
which may return an error to the caller, the caller may exit from the
function which submitted the request and the pointer to the stack variable
will no longer be valid. Thereby the request may not be completed at that time
and completed later (e.g. when the controller/qpair are destroyed)
and that will lead to call to nvme_completion_poll_cb with the pointer
to invalid stack variable.
Fix - Dynamically allocate status structure to track the completion;
Add a new field to nvme_completion_poll_status structure to track status
objects that need to be freed in a completion callback

Fixes #1125

Change-Id: Ie0cd8316e1284d42a67439b056c48ab89f23e0d0
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481530
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-27 22:48:18 +00:00
Tomasz Zawadzki
97a7cacc72 ut/blob: assure bs and blobs have expected state during power failure
After creation of blobs in both tests, only clusters indexed from
0 to 10 are supposed to be used. Index 0 for md and 1-10 for data
of single blob since it was create thick provisoned.
Cluster allocations are done in order so if there was a bug for
overflow amount of clusters claimed, first in order would be
one with index 11.
This patch adds asserts after each bs load for first data cluster
that is supposed to be used and for first data cluster that is
not.
During the tests those should remain constant.

When creating/deleting snapshots, the blobs are affected
by changing their type to/from thin_provisioned.
Added asserts to verify their state at every blob open.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I38418da55850d5b8468e578b3c42c5b817ae8045
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482661
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-27 18:06:43 +00:00
Tomasz Zawadzki
6429953a65 ut/blob: do not check for success on power failure UT
g_bserrno from blob deletion or snapshot creation,
should not be checked. It is implementation
dependent whether the error (or success) from those
calls actually means that enough data was persisted
on disk.
This test case should work even if we set the threshold
high enough that no failed opperations occur.

On the other hand some parts of those calls do cleanup
in them, meanwhile there is enough metadata data on disk already.
Such as cleaning up unused clusters or pages issue
writes, but at that point the blobs already are in expected
state.

Thus removed assert for g_bserrno, as failure is not indicative
of impossibility to recover.

While here, removed the spdk_bs_unload(). This UT are for
testing power fail safety. Never should it be the case that
enough writes occured in create/delete, but blobs are not
in the expected state.
When such bug would be introduced, it could be covered up
by spdk_bs_unload() cleanly closing up the blobstore.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ic69c3061f2cc1fe04bf895632cdb11efb2fe6912
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482660
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-27 18:06:43 +00:00
Tomasz Zawadzki
eebbd951cf lib/blob: pass Extent Page offset on cluster allocation
Extent Pages claim and insertion can be asynchronous
when cluster allocation happens due to writing to a new cluster.

In such case lowest free cluster and lowest free md page
is claimed, and message is passed to md_thread.
Where inserting both into the arrays and md_sycn happens.

This patch adds parameters to pass the Extent Page offset
in such case.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I46d8ace9cd5abc0bfe48174c2f2ec218145b9c75
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479849
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-27 18:06:43 +00:00
Ben Walker
7ef33c86b8 sock/posix: Zero copy send
If available, automatically use MSG_ZEROCOPY when sending on sockets.
Storage workloads contain sufficient data transfer sizes that this is
always a performance improvement, regardless of workload.

Change-Id: I14429d78c22ad3bc036aec13c9fce6453e899c92
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471752
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Or Gerlitz <gerlitz.or@gmail.com>
2020-01-27 17:42:24 +00:00
Ben Walker
a02207d778 test: Make nvmf target filesystem test more robust
Change-Id: Id35254c1cdc4c8fa938e0322d5455bdab825efa8
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482004
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-27 17:42:24 +00:00
Ben Walker
a2adca79d9 nvmf/tcp: Set up math to always use 1 R2T per nvme command
With our target design, there's no advantage to sending
multiple R2T PDUs per nvme command. This patch starts by
setting up the math so that at most 1 R2T PDU is required
per request. This can be guaranteed because the maximum
data transfer size (MDTS) is pre-negotiated in NVMe-oF
to a reasonable size at start up.

It then proceeds to simplify all of the logic around mapping
requests to PDUs. It turns out that the mapping is now always
1:1. There are two additional cases where there is no request
object at all but a PDU is still needed - the connection response
and termination request. Put an extra PDU on the queue object
for that purpose.

This is a major simplification.

Change-Id: I8d41f9bf95e70c354ece8fb786793624bec757ea
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479905
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
2020-01-27 17:42:24 +00:00
Ben Walker
399529aaa1 nvmf/tcp: Set max h2c size equal to max I/O size
We can always accept up to the maximum I/O size in an H2C,
so eliminate the #define.

Change-Id: I349dab5f9b6ec482a7c580b1396e03c8d30a250b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482278
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-27 17:42:24 +00:00
Ben Walker
4dba507224 nvmf/tcp: Simplify qpair resource initialization
The resources allocated to a queue pair do not need to be directly
correlated to the queue size requested by the initiator in NVMe-oF, as
long as enough resources are present. The RDMA transport, for instance,
does complex pooling of the resources behind the scenes when using a
shared receive queue.

Simplify the resource allocation for a TCP qpair to just always allocate
the max allowed queue size right away. This is a configurable parameter,
so system administrators can adjust for their needs. The initiator may
then request a queue size less than or equal to that, which will only be
enforced by queue depth counting and not impact the actual number of
resources allocated on the target.

This change relies on the MaxC2HSize being equal to the Maximum Data
Transfer Size (MDTS) reported. That is the default configuration, but
MDTS is configurable. Changing the MDTS with this patch to a value
larger than 128k will cause the target to break. This is addressed in
the next patch in this series.

Change-Id: Ibd4723785c6a4d8d444f9b7bbfa89f98de2320f5
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479733
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
2020-01-27 17:42:24 +00:00
Maciej Szwed
931ac757fb test/bdevio: Add compare and write test
This patch adds test for compare-and-write fused
command. First it runs successful call of compare
and write command and then it runs again and the
second run is expected to fail.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482606
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-27 17:39:52 +00:00
Tomasz Kulasek
327668c8c9 test/common: make gdb_attach global
Change-Id: Ib73bd9513681360f22251b54a2d15ca9807b72c2
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478807
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-27 17:39:52 +00:00
Tomasz Kulasek
b27f6f9d80 unit/nvmf: spdk_nvmf_bdev_ctrlr_compare_and_write_cmd
Change-Id: I2c82cfceed9dac466501da8cfe485f916f202b01
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481407
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-27 17:39:52 +00:00
Tomasz Kulasek
98bbb72dc2 unit/nvmf: fused compare and write
Change-Id: Iad60e3d53a9f6b0a6f71b95d66b57d6852d90cb2
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481406
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-27 17:39:52 +00:00
Maciej Szwed
a83644fe2b bdev: Lock LBA range for fused command execution
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I577f961484b2ebf350f4f795eda1a018c5f0fd7a

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481710
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-27 17:39:52 +00:00
Maciej Szwed
71beb568d6 nvmf: Add call support for compare and write cmd in spdk_nvmf_ctrlr_process_io_cmd
Add call for spdk_nvmf_bdev_ctrlr_compare_and_write_cmd
function in spdk_nvmf_ctrlr_process_io_cmd function
when fused command is discovered.

This patch also removes redundant defines for fused flags.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I61971a56577ab32b52e1fde1e572f718a9a2d9aa
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476621
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-27 17:39:52 +00:00
Maciej Szwed
941d9e7aa8 nvmf: Add support for compare op command
This patch introduces new spdk_nvmf_bdev_ctrlr_compare_cmd
function which implements support for compare operation.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477782
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-27 17:39:52 +00:00
Karol Latecki
6df2fa8c2e test/vhost_perf: refactor test scripts to use disk map
Use provided configuration file via --disk-map option
instead of creating bdevs and VMs in ordered sequence
(e.g. 0 to 10, etc.).

This allows to:
- specify which NVMe device we want to use
  (PCI BDF identifier)
- how to name it in  SPDK nvme bdev configuration
- how many splits or lvol bdevs to create on this device
- which VMs should use created bdevs

With CPU mask configuration file this allows to better
control resources when running the test (especially in
case of NUMA optimization where using sequential for/while
loops is not a good approach).

vm_count and max_disks parameters removed. These are not
needed anymore as they're controlled by config file.

Example of config file contents:
(BDF,Spdk NvmeBdev name,Split count,VM list)
0000:1b:00.0,Nvme1,2,2 3
0000:89:00.0,Nvme3,4,4 5 6 7

Change-Id: I9fc73458825d8072537aa04880765a048e034ce4
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464565
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-24 15:13:00 +00:00
Seth Howell
08add32896 test: add test to validate dpdk mem utility
This test essentially confirms that the new RPC properly creates a test
file and that the script can parse that file and run through a basic set
of operations and exit without an error.

Change-Id: Idf0c831020696a3a62fcef13171eedf3fcf63f5b
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477867
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-24 05:46:43 +00:00
Jim Harris
12ae64f863 Revert "test/iscsi: add application for target fuzz testing."
This reverts commit 4700ef0fa6.

This has merge conflicts with the iSCSI async write patch
series that was merged.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5a27460a369ef5f13bf490a287603e566071be40
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482482
2020-01-23 06:19:00 +00:00
Shuhei Matsumoto
2c8ddd08bd module/crypto: remove need to allocate a buffer for writes
Use new bdev aux buf feature.  Huge performance benefit for writes.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I5a27460a369ef5f13bf490a287603e566071be41
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478384
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-23 02:36:51 +00:00
Hailiang Wang
4700ef0fa6 test/iscsi: add application for target fuzz testing.
Enables us to test randomized data against the iSCSI target interface.

Change-Id: I9ff9a06c11bb16b315686156b27855664f21bd48
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470925
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-23 02:32:28 +00:00
Ziye Yang
16d5a6155a lib/iscsi: Using async writev for ISCSI_OP_LOGIN_RSP PDU
Change-Id: Ia69c996c731dfd89702bbb28468d8798c391034d
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481922
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-23 02:29:58 +00:00
Ziye Yang
098d32273a lib/iscsi: Add two parameters in spdk_iscsi_conn_write_pdu
This is prepared for the further call back usage.

Change-Id: Iccf304c87e67debfb4e7c330acc9cc233cc3ec48
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481917
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-23 02:29:58 +00:00
Ziye Yang
d648dde682 lib/iscsi: Use asychronized writev for sending data on sockets
This patch eliminates the flushing logic and simplies
the writev logic. And this patch can also improve the performance.

We support async write for PDUs other than login response, logout response,
and text response in this patch. We will support async write also for them
later in this patch series.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I243f598f297d594da0bb18466bc47dab918ed3ee
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481686
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-23 02:29:58 +00:00
Ziye Yang
377a016f69 lib/iscsi: add the conn in spdk_iscsi_pdu
Purpose: Prepare for the async writev usage for spdk
iSCSI target application.

Change-Id: Iff0e932159b0ad80be32aed3fc543b67d8fb8f51
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481644
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-23 02:29:58 +00:00
Anil Veerabhadrappa
9857ff6015 nvmf/fc: Fix compilation errors in FC ut
Fix includes passing correct argument to spdk_nvmf_get_transport_ops()
and also add the spdk_nvme_trid_populate_transport() function stub.

Signed-off-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Change-Id: Ic470dbf7c4c674531358df2dec14a09c12a41f4e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482199
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
2020-01-22 13:54:34 +00:00
Or Gerlitz
e61b0904a8 sock/posix: Add flush
Initiator drivers (e.g nvme/tcp) don't use poll groups but rather directly
poll the qpair. In this case we want to allow the polling function (e.g
_qpair_process_completions()) to flush async writes pending on the socket.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Change-Id: Ibd8c73691213d58e287b7110d0f5a381a89a64d0
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475419
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-22 13:53:09 +00:00
jiaqizho
f1687a1bd2 script: add iostat.py to check bdev iostat
this tool likes sysstat/iostat
added to qos test

Signed-off-by: jiaqizho <jiaqi.zhou@intel.com>
Change-Id: I7ed6538095d34fa8c5835f28b25d618f1b3d81b7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476537
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-22 13:51:41 +00:00
Seth Howell
253fb41b65 autobuild: Confirm we are building all files w/ scanbuild
This gives us an assurance that we know scan-build is being run against
all relevant files in the repository.

Change-Id: Ic0b871e98a9ea7acd2d6b2a99ab81955af29fc66
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479898
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-01-22 13:50:17 +00:00
Seth Howell
de30327534 test/blockdev: parameterize the blockdev tests.
Now we can actually know which tests we are running on which bdevs when
we call blockdev.sh. Removing the conditionals from the configuration
setup (or failing if they don't succeed) and then calling run_test from
the top level allows us to reliably track the bdev tests and fail if
they don't run on a desired class of bdev.

Change-Id: I14e6e3d993b4af4995adcbc5f138bac4ae9d63be
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478247
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-22 13:50:17 +00:00
Seth Howell
6ac949c0d1 test/blockdev: check bdev list before running unmap
Some bdevs don't support unmap so they may not be able to run the fio
unmap tests. In case none of the bdevs we are testing support this
operation, the test will be skipped.

Change-Id: I5063297f0378bc87abf50e5311d147251cfe0ad9
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478337
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-01-22 13:50:17 +00:00
Seth Howell
5883d34300 test/blockdev: parameterize the nbd test.
This allows us to run the NBD tests on any combination of bdevs
based on the flags passed to the script. Previously we ran the tests
on a specific grouping of bdevs and opted to only free one type (passthru)
over RPC after the test ran. Rather than free all bdev types in the new
implementation, I opted to not free any of them via RPC and rather allow
the application to close them at termination time.

Change-Id: I574db4f941bfbb073cceed4610e1f5d43028569f
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478246
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-22 13:50:17 +00:00
Seth Howell
b2235c1f97 test/blockdev.sh: parameterize hello_world test
Just to make sure that we always test against a valid bdev.

Change-Id: I7c9786f32b8d5ff5f2bf9c86151fb7f2bdfdf5f3
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478245
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-01-22 13:50:17 +00:00
Seth Howell
d4e52cacfd test/bdev: remove the gpt conf file / parameterize tests
Previously, we only ran bdevperf tests against GPT partitioned NVMe
drives. These tests are generally applicable and should be run against
all of the bdev types we support.

So long story short this configuration file isn't needed and we can just
get rid of it.

Change-Id: Ia6ded22ce16fc1f76b7d99643b9d37e3ecbd1c60
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478244
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-22 13:50:17 +00:00
Seth Howell
e4eee61717 test/bdev: move all configuration to functions
This will allow us to parameterize the blockdev.sh script and call it
individually from different jobs.

Change-Id: I8585c12dedfb1a32ea206a09a544440d2e794d4b
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478242
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-01-22 13:50:17 +00:00
Seth Howell
8d945f5256 test/blockdev: move configuration into the script.
Change-Id: I795e729f6e0497a56a0328bb308bc9d32f44922b
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478241
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-22 13:50:17 +00:00
Seth Howell
e0f9038893 test/blockdev.sh: change the way we run fio tests.
Previously, we conditionally ran one test in per patch, and another in
nightly tests. However, the only difference between these tests was the
configuration options sent to FIO. All other tests in the build pool
follow a pattern where they simply change the options and run the same
test in nightly and per-patch.
Following that pattern makes it easier to set a specific list of jobs
that must be run before a tet run is considered complete.

Change-Id: I6b2f49114155fdfa1d1e07faf45f03e64572eeb8
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481908
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-01-22 13:50:17 +00:00
Seth Howell
df254d5a25 autorun_post: add a file for tests we don't run.
Change-Id: I8beac9959d08026ee984833d0e90ec17381a66e5
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478240
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-22 13:50:17 +00:00
Seth Howell
ea781d6dbb test: report test domains for tests.
This will allow us to run test cases under multiple suites without
clogging up the logs too much, but it will also preserve information
about which test suites were run or (more importantly) not run.

Change-Id: I2434a54a0877ae36b9f84bfab8a62653ac1172f8
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477367
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-01-22 13:50:17 +00:00
Mateusz Kozlowski
a6ff97602c bdev/zone: Zone append handling added to vbdev
Changed write function to be able to work in zone append mode.

Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Change-Id: I3af98f1d8e69eac6922e19addebabbc6ce847c63
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468042
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-21 08:43:31 +00:00
Mateusz Kozlowski
68c3a79a15 bdev/zone: Add finish zone handling to zoned vbdev
Handle finish zone management function to zoned block vbdev

Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Change-Id: Iffe24572609e741a79b6bb92f72b56cede4906ca
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468041
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-21 08:43:31 +00:00
Mateusz Kozlowski
011cc5d61c bdev/zone: Add close zone handling
Handle close zone management function to zoned vbdev

Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Change-Id: I001e25a157ba738724012ca366ef901016733944
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468040
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-21 08:43:31 +00:00
Mateusz Kozlowski
d8ccf6e7e5 bdev/zone: Read IO handling
Added handling of reads to a zone; blocks outside of a write pointer
are zeroed out.

Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Change-Id: Iaf60d6ff74caf9831998862e048446ccd0a0fa3f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468038
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-21 08:43:31 +00:00
Mateusz Kozlowski
ab1641eb30 bdev/zone: Write handling
Added handling of write commands, including zone state changes and write
pointer updates.

Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Change-Id: I576ca18b52474bb299c20296a7561f25e5afa85b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468037
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-21 08:43:31 +00:00
Mateusz Kozlowski
d530c103ab bdev/zone: Open and reset zone handling
Add handling of two of the zone management commands for vbdev.

Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Change-Id: I2868a96d15acbc2d13d18dea405b6d98cb4573d6
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468039
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-21 08:43:31 +00:00
Tomasz Kulasek
c879a8eed4 test/nvme: cuse nvme-cli check if oacs firmware supported
When firmware upload is not supported, fw-log may return
random data.

This patch compares an output of fw-log only if oacs.firmware
is set.

Change-Id: I74d7766ca6ebdf0a94f200a35e6215ed44ef1062
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481670
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-01-20 10:01:00 +00:00
Tomasz Kulasek
5700688366 test/nvme: check nvme-cli output for cuse device
This patch compares an output of nvme-cli for NVMe Linux
driver with SPDK NVMe CUSE implementation.

Some commands may fail or provide different outputs:
 1. smart-log -- data may change,
 2. list-ns, list-ctrl, get-feature -- depends on spec
    version of device (unknown or reserved field for spec 1.0),
 3. fw-log -- may return random data for fws if firmware upload
    is not supported -- this case is removed now and will be
    added in next patch

Change-Id: I47873f004efbe333e1de02010ba594baf253d093
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476170
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-01-20 10:01:00 +00:00
Maciej Wawryk
53147e0dc8 test: fix issue with changing device names in waitforblk function
During test before upgrading our vm's to Fedora31 there were issue with failing
nvmf test on function waitforblk. In some cases hardcoded nvme0n1 name was not
found in system. Here is fix that change searching by name to searching by nvme
serial.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ic5ee70804652a057fa26b8cc004b5227262d2122
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478471
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-20 10:00:06 +00:00
Seth Howell
9c659fb125 test/fuzz fix end of test behavior.
The fuzz jobs should fail if the nvmf or vhost target crashed while they
were running. Otherwise they should pass. Some recent changes to the
way killprocess and nvmftestfini work were causing this to break. This
change fixes that.

Change-Id: Id14fd47c2d8c7d91358c5e8a69e53ec4cf33ddce
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481911
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-20 09:59:49 +00:00
Pawel Kaminski
20c5fc9dce test/lvol: Add test to check 'clear_method unmap' behaviour
Change-Id: Ib14022bdce2ba21cd3fdc4be5bf156359bef1573
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471255
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-20 09:57:16 +00:00
Pawel Kaminski
6fc7f49c16 test/lvol: Add test to check 'clear_method none' behaviour
Change-Id: I5e4581a8d9b100c965d14dc3e263084c4b729af6
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467967
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-20 09:57:16 +00:00
paul luse
ea69d6d6cc lib/blob: store clear_method in per blob metadata
Accept a clear method option on blob create by adding clear_method
to the opts structure passed in to _spdk_bs_create_blob(). Store
these 2 bits in md_ro_flags so that earlier versions without an
understanding of these bits can not alter metadata.

The new metadata values will be used later in the series.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I5440645ca20b426778d13b2e544b65dc2b3b83c7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472204
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-20 09:57:16 +00:00
Michael Haeuptle
bf4db834b9 lib/nvmf: Functional test for custom admin cmd handler
This test verifies the custom identify handler functionality
by querying the NVMe drive and comparing serial and model
number from the NVMe drive with the corresponding info
from the NVMF identify result.

Signed-off-by: Michael Haeuptle <michael.haeuptle@hpe.com>
Change-Id: I9d4edb1bf32550cbf5fbd45cbfa85f9afc408fc0
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481910
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-20 09:56:35 +00:00
Michael Haeuptle
3fa2205647 lib/nvmf: custom admin cmd handler
This commit provides the capability to install a
    custom admin command handler for NVMF.
    It can be used to implement or replace NVMe admin commands that
    are currently not handled by the NVMF subsystem.

    The handler implementation is pretty generic and the handler function
    has to figure out what to do with the command based on the bdevs
    that are configured for the subsystem.
    In cases where admin commands need to be forwarded to an NVMe bdev,
    the commit provides functions that allow access to the underlying bdev.

    There is an example handler in lib/nvmf/custom_cmd_hdlr.c.

Change-Id: I4f9d538c53669c176a836e8bdd379db0070a87dc
Signed-off-by: Michael Haeuptle <michael.haeuptle@hpe.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479167
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <jacek.kalwas@intel.com>
2020-01-20 09:56:35 +00:00
Jim Harris
5a04e473b2 test/nvme: fix shellcheck error
Fix perf/common.sh to remove the useless cat operation.
Fixes shellcheck SC2002 error.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482005
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-17 18:07:30 +00:00
Pawel Kaminski
0cd9241a2d test/json_config: Freebsd supports python3 now so use it
Change-Id: I7a03dddfbc455f9d9374ce864dc3c9fab157d81e
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481889
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-17 14:07:39 +00:00
Pawel Kaminski
13c6c8db6e test: shellcheck - apply rule SC2002
SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.

Minor fix in test_converter: don't use python3 as
    config_converter.py is executable.

Change-Id: I250e893b48fa95e94778dcc31deb91e6ac0b39c0
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481600
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-17 14:07:39 +00:00
paul luse
989261d6c3 module/crypto: load balance QAT qp assignment
For the latest QAT devices there are 3 CPMs each with 16 VFs and
2 qp each VF. To load balance for multi-thread operations we want
to assign each new queue pair (QP) on a per CPM (processing module)
basis so this patch assigns the next QP, for QAT,  by taking the
last + 32 modulo the total number of QP. This will results in each new
channel getting a QP on the next CPM.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Iea608ada68517b6f2faecd45701c7aae6d23a2d0
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477082
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-17 14:07:12 +00:00
paul luse
5db021089d module/crypto: split global device/qp list into one per PMD
Previously one global list of device/qp combinations was used
regardless of PMD and when assigned, the device name was checked
to make sure a matching one was pulled from the list.

Later in this series a patch will make use of having different
lists as we discovered a decent way to load balance QAT but the
implementation with all PMDs on one list was too complex.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I54dfbd0206a881d126831ba27a4ae05cdc6f7c11
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477152
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-17 14:07:12 +00:00
Karol Latecki
d82c680d60 test/nvme-perf: group kernel mode setup into one block
Group all kernel conditionals for various ioengines in
one if block.

Change-Id: I14f736c1ab8fce13effeb9ec06731b3d14859941
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479818
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-01-17 09:00:57 +00:00
Karol Latecki
73059a2a53 test/nvme-perf: shorten results path
Part of results_dir variable was unnecesarily repeated.

Change-Id: I282e1f7389f79aeccf44b09f257ef33842be517b
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479938
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-17 09:00:57 +00:00
Karol Latecki
18fbf2e15d test/nvme-perf: add nvme perf option
Allow running tests with nvme/perf. This will be needed
for comparison with bdevperf and/or fio nvme plugin.

Change-Id: Ie351d1b3c9d8eae430161779f9818c04d87e6ed7
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479821
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-01-17 09:00:57 +00:00
Alexey Marchuk
52f1e4b029 nvme: Update spdk_nvme_wait_for_completion_robust_lock error handling
Update error handling of spdk_nvme_wait_for_completion_robust_lock to
differentiate cases when request is completed (possibly with error)
or polling was aborted by transport/device error
The function returns 0 on success, -ECANCELED if transport/device
error occurred and -EIO if the request is completed with error

Change-Id: Ibf7f3c330317af0d8f27ba9cd10d8b773f6a796b
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481529
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-17 08:59:46 +00:00
Alexey Marchuk
9ad2046ae1 nvme: Update spdk_nvme_wait_for_completion_timeout error handling
Update error handling of spdk_nvme_wait_for_completion_timeout to
differentiate cases when request is completed (possibly with error)
or polling was aborted by timeout or transport/device error
The function returns 0 on success, -ECANCELED if transport/device
error occurred or operation timed out and -EIO if the
request is completed with error

Change-Id: I314f40d1acaa6cfa9b88e5417b1ee2c9801bbbd6
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481528
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-17 08:59:46 +00:00
Wojciech Malikowski
39965ab048 lib/ftl: Change "lbk" name to "block"
"lbk" name is more OCSSD specific so in
generic FTL "block" name is more suitable.

Change-Id: I792780297b792bf5e02f13cc20346da56b032918
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472284
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-17 08:59:08 +00:00
Wojciech Malikowski
777ce6d83c lib/ftl: Replace some fileds in ftl_zone with spdk_bdev_zone_info
ftl_zone had reduntant fields to spdk_bdev_zone_info.

Change-Id: I5ec5bbc74912f286d798027afed06d0cd1917cc2
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471909
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-17 08:59:08 +00:00
Wojciech Malikowski
55342d972b lib/ftl: Zone append support
Zone append command allow to write to the
zone with queue depth greater than one.
Append location is read during write
completion callback.

Change-Id: Ie08ce8d31d5d0fb521cdc2b95f3e29b92e02e63f
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471627
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-17 08:59:08 +00:00
Wojciech Malikowski
d6234332fb lib/ftl: Represent ftl_addr just with the offset value
This patch removes parallel unit and zone id fields
from ftl_addr struct.

Change-Id: Ica42208eafdbbecab60430708197f5f3ba6167d6
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468701
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-17 08:59:08 +00:00
Wojciech Malikowski
59acbc91c2 lib/ftl: Use nbd during fio test
Until fio_plugin get RPC support use
nbd for FIO tests.

Change-Id: Ic034005aceb0c3b2503d47d36e515e2dcd616b31
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469396
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-16 12:33:17 +00:00
Karol Latecki
7ef2b05295 test/nvme-perf: use core mask option with bdevperf
Previously it only ran on single core.

Change-Id: I1eb16c56cb733bc327b9e1ab7a63ae8ada3cda68
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479820
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-01-16 09:21:18 +00:00
Karol Latecki
3208f391b0 test/nvme-perf: pass fio params via heredoc
Try to pass most of fio configuration file parameters via
configuration file instead of using double dash command line
arguments.

This improves readibility of script and makes fio config file
more useful if it's archived after finished test run.

Change-Id: I0b718a98dc8b5096dc0c15a87c8ed1a4b64251a3
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479819
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-01-16 09:21:18 +00:00
Karol Latecki
0aeea0366e test/nvme-perf: rename options for SPDK engines
Change-Id: I3e6551445c7d940c7e680c9c8f1b4ab687d18aa2
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479817
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-01-16 09:21:18 +00:00
Karol Latecki
96ff6348b6 test/nvme-perf: move executable lines from common file
Move executable lines from common.sh body into a function.
Otherwise these are run when file is sourced.

Leaving getopts as only executable in common.sh, this can
be fixed later and does not cause problems now.

Change-Id: Iddbfd9aff5cd006cf3afb579f627f3463663ea6a
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479816
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-01-16 09:21:18 +00:00
Karol Latecki
73d398dd29 test/nvme-perf: refactor preconditing step
Move all related steps to common.sh/preconditioning() function
so that everything is in one place.

Change-Id: I253a185a5c16e9ba31c84aa945f6c3033f80d53f
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479815
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-01-16 09:21:18 +00:00
Karol Latecki
b5069cd01d test/nvme-perf: make date variable global
This variable was hidden as lowercase var at the
very end file while in fact it's used as global in the
main script.

Change-Id: I68d53d953a63a3f53a3129f1817c7108a38da4bc
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479814
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
2020-01-16 09:21:18 +00:00
Karol Latecki
49975f19c1 test/nvme-perf: reorganize perf script options
Reorganize help message and variables by grouping related
parameters together. Makes it easier to read.

Change-Id: I7d9f44d7cdfebefcaf7a1395a3aafb8b29fd6345
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479813
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-01-16 09:21:18 +00:00
Karol Latecki
a44dfbea1d test/nvme-perf: make global variables uppercase
Change-Id: I75dce3c594c95d9418ac7025a00096cc60fb307e
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479812
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-01-16 09:21:18 +00:00
Tomasz Kulasek
3cca1b3673 test/nvme: handle errors for nvme-cli tests
Change-Id: I409da2520fd20c7b572e9ac9424c4ff468d0e878
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478613
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-01-16 09:20:20 +00:00
Jacek Kalwas
708ed4fb6e nvmf: pass listen done cb to transport specific code
This would allow to respond for add listener rpc request even
when there are async calls in transport specific function.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I94a9f45b7ba9e8d46a60ae3785953cea12554732
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479511
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-16 09:18:38 +00:00
Shuhei Matsumoto
29e5c544c0 test/nvmf: Leave 2 seconds before starting the next shutdown test case
On the target side, disconnection process is asynchronous and ack is
sent to the initiator before completion.  This has caused latent
failure in a test case.  As a workaround, leave 2 seconds before
starting to the next test case for now.  Better solution will be
followed and so we don't care much about the location to insert
sleep.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id49349e3b7303ef9523b73d7a04d4e9837246c44
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479102
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-16 09:16:52 +00:00
Shuhei Matsumoto
f594537a48 bdevperf: Reset g_run_rc to 0 after sending RPC reply
When RPC kicks the test and the test results in error, RPC response
should return error but bdevperf application should not return error.

RPC can kick the test multiple times, and if RPC kicks the test again
and it completes normally, RPC response should return success.

So reset g_run_rc to 0 after sending RPC response.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I59a7c06a293ba7f7b5caa8171bcfb54d736524da
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479914
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-16 09:16:52 +00:00
Shuhei Matsumoto
9b36011acc bdevperf: Hold io_target_groups until exiting bdevperf
Previously bdevperf_free_targets() had freed not only io_targets
but also io_target_groups.  This had made repeated runs by RPC
impossible.  This patch series will fix this issue later but we
cannot wait for that and fix the issue now.

Fixes #1139.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I88cf5725579b704bc3826bd4c0b2dd9f4e70db30
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479912
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-16 09:16:52 +00:00
Shuhei Matsumoto
116a4afcc3 bdevperf: Unregister pollers immediately when target exits with error
_target_gone() and end_target() do almost same operations.  We had
not unregistered  pollers at the cases that sets target->is_draining
to true. The later had hit assert when the test ended with I/O error
before completion because when target->run_timer is expired,
end_target() would be called after target is freed.  Hence we do
both in this patch.

Factor out the operations from _target_gone() and end_target() into
a helper function.

Then, when the target exits with error, unregister pollers of the
target immediately by replacing setting target->is_draining to true
by _end_target(target). We had seen the assert for a single case
but apply the fix for all cases.

Fixes issue #1140

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If39779817ed99c9441e368c1d4512c66d13d3378
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479911
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-01-16 09:16:52 +00:00
Mateusz Kozlowski
c3e3e81a50 bdev/zone: Get zone info
Added handling of get zone info command

Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Change-Id: I2d80885af83345c945af22a46a41abf55e1eb413
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468036
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-16 09:13:55 +00:00
Kozlowski Mateusz
3ba5dd2852 bdev/zone: Per zone information
Added zone specific information during initialization (starting LBA,
capacity etc.)

Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: If0599960f0f872117691c801dce497649da20da6
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468034
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-16 09:13:55 +00:00
Kozlowski Mateusz
214483e834 test/zone: Cleanup mocked rpc request handling
Unify function names and memory handling for create/delete rpc mock
functions in unit test for block zone bdev.

Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: Ib8613a78623279447cd5a6b9cf0c686e15b69d32
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479644
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-16 09:13:55 +00:00
Kozlowski Mateusz
351c38d570 bdev/zone: Add helper function for unit test
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: I9853d49299ca4e566dc60da321919493e0e7c32f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479541
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-16 09:13:55 +00:00
Ziye Yang
d1a8a7bee1 sock: Add a priority parameter in SPDK_NET_IMPL_REGISTER
Purpose: Prepare for setting priorities for different
kernel based sock implementations.

The g_net_impls list is maintained in decreasing order
according to the priority of each sock implementation.

For examaple, if there are 3 sock implementations, i.e.,
posix (priority = 0), vpp (priority = 1), sock_ut (priority =2),
then the list will be maintained as:
sock_ut -> vpp -> posix.

Then if users use spdk_sock_open/listen with impl_name as NULL,
then the order to try is: sock_ut, vpp, then posix

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I43899de5bac14751ab060a11eb814cd7a0a83cc6
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479488
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-16 09:11:32 +00:00
Ziye Yang
0bfaaace8f sock: Add impl_name parameter in spdk_sock_listen/connect.
Purpose: With this patch,

(1)We can support using different sock implementations in
one application together.

(2)For one IP address managed by kernel, we can use different method
to listen/connect, e.g., posix, or uring. With this patch, we can
designate the specified sock implementation if impl_name is not NULL
and valid. Otherwise, spdk_sock_listen/connect will try to use the sock
implementations in the list by order if impl_name is NULL.

Without this patch, the app will always use the same type of sock implementation
if the order is fixed. For example, if we have posix and uring together,
the first one will always be uring.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ic49563f5025085471d356798e522ff7ab748f586
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478140
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-16 09:11:32 +00:00
Seth Howell
f6cf92a31f lib/nvme: make transport.c use fn tables.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ida58785784b4ed50393e1d43a9cd902de74a2eaa
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478873
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-16 09:10:38 +00:00
Seth Howell
e4eef6975c lib/nvme: add function tables for all transports.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I4e7af1c42a19346f4abcb17910a41f8104a2de1b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478871
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-16 09:10:38 +00:00
Seth Howell
5cddf93b47 test/nvme: add common_stubs.h file.
A lot of the stubs between these transports will end up being common.

Change-Id: Ib9c8ff947b95f34633eb13953405d3153a7f4ac7
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479602
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-16 09:10:38 +00:00
Seth Howell
771d759312 lib/nvme: add spdk_nvme_transport_available_by_name
This new api function will enable us to work with custom transports.

This is needed to enable properly parsing and comparing custom transport
IDs that may all resolve to the same enum value.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I26aa3cb8f76f8273f564799d9b2af8041ea0d219
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478752
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-16 09:10:38 +00:00
Seth Howell
f038354efa lib/nvmf: enable pluggable NVMe-oF transports.
Change-Id: If1fd7d6c2385f42ca32dea0f8ecb528a60778d40
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477504
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-16 09:10:38 +00:00
Seth Howell
b397546e9d lib/nvmf: get_transport now takes a string.
This function previously accepted a trtype enum, but needs to be able
to accept a string to support custom transports.

Change-Id: I931aed30ca3be65468552ffa1bb1ef3f91275fda
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479601
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-16 09:10:38 +00:00
Seth Howell
5b3e6cd137 lib/nvmf: opts_init and transport_create use string now.
This will help enable pluggable NVMe-oF transports.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I1947cc2e6e4ff078609f8bdbbdfefc5b110674c2
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478753
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
2020-01-16 09:10:38 +00:00
Seth Howell
a050dcf21d lib/nvmf: add a default value to trtype enum.
For custom transports, we should use a range outside the spec value
to identify them.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I82b29c349e143b8906f79ce2de818def116a3fe4
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478747
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-16 09:10:38 +00:00
Seth Howell
7ed0904b9b lib/nvme: update trid struct with trstring.
The trtype should be stored as both an enum and string. This is intended to
help pave the way for pluggable NVMe-oF transports.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I6af658d7a17c405e191ff401b80ab704c65497e7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478744
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
2020-01-16 09:10:38 +00:00
Maciej Wawryk
19e48a66a4 test: Shellcheck - correct rule: Iterating over ls
Correct shellcheck rule SC2045: Iterating over ls output is fragile. Use globs.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I436878774d6f86c23b1c5cf5220da297053f03e2
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477397
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-15 14:30:06 +00:00
Maciej Wawryk
a291cb0606 test/vhost: fix parted error
Vhost nightly test fails on Error: Partition have been written, but
we have been unable to inform the kernel of the change, probably
because it/they are in use.

Closes #1090

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Iafd051e02b3dd32ede8a62c69c7079a0facade0c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476639
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-15 14:28:51 +00:00
Konrad Sztyber
aac65dcfd8 test/unit: remove vhost dependency from ftl tests
The tests were only built if CONFIG_VHOST was enabled, which doesn't
make sense, as they're not related to vhost in any way.

Change-Id: Idb151b3bdf8c5f2a90357e41099528b10a98f331
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481505
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-01-15 13:37:19 +00:00
Maciej Szwed
ca0eeaab21 unit/bdev: Unit tests for spdk_bdev_comparev_blocks.
These are unit tests for non emulated version of
spdk_bdev_comparev_blocks function.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I459ac614e1a03e42b9d584aaa907a1448a13d16e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478969
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-15 12:25:26 +00:00
Maciej Szwed
3eda8bf6d3 unit/bdev: Extract common code for comparev tests
Upcoming patch will use most of the comparev test code
so let's reuse it.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479832
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-15 12:25:26 +00:00
Maciej Szwed
bee042e431 unit/bdev: Add SPDK_BDEV_IO_TYPE_COMPARE to g_io_types_supported
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I509947d7b5a2139c9f721dc55e80d9eb8e744bd6

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478949
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-15 12:25:26 +00:00
Maciej Szwed
77183c9c80 unit/bdev: Unit tests for spdk_bdev_comparev_blocks (emulated)
This patch adds test for spdk_bdev_comparev_blocks
function. For now it tests only emulated compare
operation. For native compare call will be created
separate patch.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478948
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-15 12:25:26 +00:00
Maciej Szwed
393afcb1d6 nvme: Unit test for spdk_nvme_ns_cmd_comparev_with_md
This is vectored version of test_nvme_ns_cmd_compare_with_md
test.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478947
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-15 12:25:26 +00:00
Wojciech Malikowski
f2c8083ef3 lib/ftl: Functional tests
This patch adjust functional tests to
new FTL stack.

Change-Id: I0b8ff08c61793d7f1685942031aecf9cc88d1f24
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468738
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-15 12:24:44 +00:00
Wojciech Malikowski
151e37cfaa bdev/ftl: Examine config support
Bdev FTL is dependent on base bdev and cache
bdev. Allow for examine config if dependent
bdevs are not ready during bdev FTL creation.

Change-Id: I917994d7015f3b74a29ccd066f0c6989ad3c1c4e
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471375
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-15 12:24:44 +00:00
Wojciech Malikowski
843f296e2e lib/ftl: Replace Open Channel dependencies with zone bdev API
This patch replaces NVMe Open Channel API usage
inside FTL library with corresponding zone bdev
API calls. This include following calls:
 - spdk_nvme_ctrlr_cmd_get_log_page -> spdk_bdev_get_zone_info
 - spdk_nvme_ocssd_ns_cmd_vector_reset -> spdk_bdev_zone_management
 - spdk_nvme_ns_cmd_read -> spdk_bdev_read_blocks
 - spdk_nvme_ns_cmd_write_with_md -> spdk_bdev_write_blocks

Change-Id: I1b5a6863d9ce72f4af1cfbb0e449fc1a5b638144
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479702
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-15 12:24:44 +00:00
Tomasz Zawadzki
72f6c8086a ut/blob: check for clone count in blob_snapshot UT
Previously this UT was only checking the snapshot counts.
This was correct, but since the blobs in this tests are
clones of each other - it would make sense to check it as well.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Id9dec7f0a292cbb52da8196bfc77679fc0f49d8b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478976
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-01-14 17:13:15 +00:00
Jim Harris
ae43c81a30 bdev: add spdk_bdev_comparev_and_writev_blocks
We will only support a vectored variant of
compare-and-write for now.

This does no locking for now.  Ii will be added
in a separate patch.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5bd075c912de60090e19cf8fced19c4879fcc900
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475941
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-14 07:51:45 +00:00
Jim Harris
2a2b7296ee bdev: do not allow overlapped locked ranges
We can't allow overlapped locked ranges - otherwise
two different channels could be deadlocked.

So add a pending_locked_ranges to the bdev.  When we
start a lock operation, check if the new range overlaps
one that's already locked.  If so, put it on the pending
list.  When an unlock operation completes, we will
check if any pending ranges can now be locked.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478537
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-01-14 07:50:26 +00:00
Jim Harris
ebd1a4f76c bdev: inherit locked ranges for new channels
Keep a mutex protected list of the active locked ranges
in the bdev itself.  This is only accessed when a new
channel is created, so that it can be populated with
the currently locked ranges.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477871
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-14 07:50:26 +00:00
Jim Harris
b90b7ce477 bdev: queue new IO that overlap a locked region
Add an io_locked TAILQ to each channel, which hold
IO that will write to a currently locked region.

Also add a new step to the locking process per channel.
Each channel needs to wait until all existing outstanding
writes to the newly locked range have been completed.

Only the channel that locked an LBA range may submit
write I/O to it.  It must use the same cb_arg for the
write I/O as the cb_arg used when locking the LBA range.
This ensures that only the specific I/O operations needing
the lock will bypass the lock.

When a range is unlocked, we will just blindly try to
resubmit all IO in the io_locked tailq.  This could be
made more efficient in the future, but we don't expect
this path to occur very often, so going for simplicity
in the first pass.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478226
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-01-14 07:50:26 +00:00
Jim Harris
d84a88c1a0 bdev: add base infrastructure for locked lba ranges
This adds new internal APIs bdev_lock_lba_range and
bdev_unlock_lba_range.  To start, these APIs will
manage dissemination of lock/unlock requests to all
existing channels for a given bdev.  This does not
yet interact at all with any I/O sent to the channel.

Future patches will check new I/O to see if they
are trying to write to a range that is locked.  Future
patches will also ensure we do not have overlapping
ranges active at once.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I6d5b1cc84b41a7adc2a3c5791c766bb77376581f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478225
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-01-14 07:50:26 +00:00
Jim Harris
b87080efa2 bdev: add lba_range and overlapping checks
This will be used by upcoming patches for implementing
LBA range locks.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478224
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-01-14 07:50:26 +00:00
Seth Howell
a571eb03e9 test: move report_test_completion into run_test
This also requires us to change the create_test_list function to rely on
the run_test function for creating the canonical test list.

Change-Id: Ib35e7752935a3ac83de2702b6dfbd42539027f6a
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476962
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-14 07:49:08 +00:00
Seth Howell
2f476a638f autobuild.sh: simplify and unify test suite.
We have added a lot of flags to this script over time to try and shorten
parts of it that take a long time or modify the way we make and
whatnot.

In the test framework today we really have two settings, we either want
to run the entire autobuild package with all the bells and whistles, or
we just want to make the code and get on with the rest of the tests. I
believe this change can save between 1 and 3 minutes on each of the
functional test suites.

Change-Id: I7519e8320aa16b57f09f633f866dc36cb494aa80
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478483
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-14 07:49:08 +00:00
Seth Howell
cbc1e069ee configure: allow cuncurrent build of RBD and reduce
This was disabled in configure because at one time there was an ISA-L
dependency break between the RBD libraries and our own submodule.
It seems that the dependency break was fixed a while ago, but the check
to not allow one to build with the other was never removed.
Unfortunately, I don't have the details on what that fix was.

Either way, this compilation works now.

Change-Id: Ic249791549dae36c7279114d67e77be94e842ddf
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479726
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-14 07:49:08 +00:00
Pawel Kaminski
8d4ecf1e22 test/vhost: Fix. vm_run takes vm numbers as separate arguments.
In patch fdc82d3 'vm_run $@' was changed to 'vm_run "$@"' but
arguments like 'vm_run "0 1"' should be passed as
'vm_run 0 1'.

Change-Id: I2a51a31fc0b0b55079963b11587be55d9bf86a87
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476087
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
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>
2020-01-13 12:45:04 +00:00
Tomasz Zawadzki
159703c9dc ut/blob: added poll_threads() after deleting blob
For deletion to actually deliver results, poll_threads()
has to be called.

g_bserrno came from previous API call, not delete itself.

This patch fixes it so that g_bserrno is from the delete itself.

Next patch in series adds checks for number of clones.
Having such checks in first place,
would allow to notice lack of poll_threads() here before.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I3477f5c5b99106b70ee3d5706906a4dc94283180
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478975
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-10 08:47:13 +00:00
richael zhuang
858df2692e test: fix error when running vhost_test.sh
Met error "touch: cannot touch './timing.txt': No such file or
directory" when running vhost_test.sh. For the working directory
is removed in "vhost_kill 0", And then "timing_exit clean_vhost"
will fail to touch timing.txt in the removed directory.

Signed-off-by: richael zhuang <richael.zhuang@arm.com>
Change-Id: I2d0818b1228ebfd6767c258a0f4c1fbbfc728016
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479482
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-01-10 08:47:01 +00:00
dongx.yi
ee15ba45fb test/nvme: Fix confliction of core 0.
Reset core mask is 0x1 and stub core mask is 0xF.
Avoid to use core 0 both apps.

Fixes issue #1134.

Signed-off-by: dongx.yi <dongx.yi@intel.com>
Change-Id: Ic423ec03896e38cf748929e458922f73dd2a7241
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479771
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-10 08:46:48 +00:00
Darek Stojaczyk
c96cefbfd7 test/lvol: rewrite construct_lvol_bdev_name_twice to bash
Change-Id: Ice91dbec4c2d09b6a056711b7a0c6b29b20476cc
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459676
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-01-10 08:46:07 +00:00
Darek Stojaczyk
c997d12694 test/lvol: rewrite construct_lvol_bdev_on_full_lvol_store to bash
Change-Id: I789c13f6613180b0d9becca035ea4055fa3ee321
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459675
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-01-10 08:46:07 +00:00
Darek Stojaczyk
ba43a0b3ce test/lvol: rewrite construct_logical_volume_nonexistent_lvs_uuid to bash
Change-Id: I1223de42f328d16864e49e795efb4b81f0c5ba17
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459674
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-01-10 08:46:07 +00:00
Darek Stojaczyk
cf510c7047 test/lvol: rewrite construct_lvol_bdev_duplicate_names_positive to bash
Change-Id: Ib0d0b685582913deb2a6ce09f2753fc6a1288630
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459673
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-01-10 08:46:07 +00:00
Pawel Kaminski
0db73d0975 test/lvol: Fix - improve checking failed commands
Instead of using "!" use rpc_cmd && false to check
that command should fail but succeded

Change-Id: Ied564c13b96ea6d4a45aab1460b3323edd1d9554
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478328
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-01-10 08:46:07 +00:00
Wojciech Malikowski
0637e2d9be lib/ftl: Rename ftl_dev_num_bands() to ftl_get_num_bands()
This patch is part of name refactoring associated
with moving FTL to work with zone bdev API.

Change-Id: Ia4c6ec7b245600bca895f7802fb7f68c8d0400e4
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479845
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2020-01-10 08:42:51 +00:00
Wojciech Malikowski
2c2a005695 lib/ftl: Rename ftl_dev_num_punits() to ftl_get_num_punits()
This patch is part of name refactoring associated
with moving FTL to work with zone bdev API.

Change-Id: I9e0a569e9dfd0e8b8236c0840ce10b92362c4996
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479844
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2020-01-10 08:42:51 +00:00
Wojciech Malikowski
3ff9d6e45b lib/ftl: Rename ftl_dev_lbks_in_zone() to ftl_get_num_blocks_in_zone()
This patch is part of name refactoring associated
with moving FTL to work with zone bdev API.

Change-Id: I09f671a9c6539cc259c297514b24978587c9b392
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479673
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2020-01-10 08:42:51 +00:00
Wojciech Malikowski
3725b4484a lib/ftl: Rename ftl_num_band_lbks() to ftl_get_num_blocks_in_band()
This patch is part of name refactoring associated
with moving FTL to work with zone bdev API.

Change-Id: I09781323b2ee25dbcee61eecf95ce7eca703ab93
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479672
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2020-01-10 08:42:51 +00:00
Wojciech Malikowski
1735a0acd3 lib/ftl: Remove position from ftl zone structure
There is no need of tracking position of zone inside
band.

Change-Id: I1488f23ccfd1f7eee1bd85fdb7ef8ace08ffca40
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468347
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
2020-01-10 08:42:51 +00:00
Wojciech Malikowski
04f754d419 lib/ftl: Remove ftl_punit structure from device
ftl_punit is not needed anymore.

Change-Id: I90f22b980f8e0436e8c899941dddb20b13167766
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468346
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
2020-01-10 08:42:51 +00:00
Wojciech Malikowski
7ef136d3f4 lib/ftl: Remove punit from ftl_zone struct
Parallel unit is not needed anymore in ftl_zone
structure.

Change-Id: Ie8d78e3ccf64db84aff19ad2ce11e662d4f3f724
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468345
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-10 08:42:51 +00:00
Wojciech Malikowski
aea8e78df2 lib/ftl: Consume whole underlying OCSSD device
Moving to zoned bdev API will not allow to setup
physical range of underlying device so we need to
remove such capabilities from ftl device.

Change-Id: Ia807a11e992a221fce906d4ab122a6c3b1391280
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467949
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-10 08:42:51 +00:00
Wojciech Malikowski
52a9661d94 bdev/ftl: Remove punit parameter from ftl bdev configuration
FTL library is consuming whole OCSSD device
so punit parameter is not needed for bdev ftl
configuration.

Change-Id: I56f62ea6d09b3157b70c02ccfffcd3cb07ba4597
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467950
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2020-01-10 08:42:51 +00:00
Wojciech Malikowski
e47e16d3a4 lib/ftl: Replace ftl_ppa struct with ftl_addr
FTL working on top of zoned bdev doesn't need
physical page address (PPA) anymore.
ftl_ppa was replaced with ftl_addr which represents
zoned device addressing schema.

Change-Id: Ied5750a7ab2f4ce42067ff3e69c1f26f85f5022a
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467633
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2020-01-10 08:42:51 +00:00
Wojciech Malikowski
748785c2a9 lib/ftl: Change ftl_ppa fields to be zone specific
Remove some Open Channel dependencies from ftl_ppa struct.

Change-Id: Ic088b84c56a928906c6c01c6ef74e69be6d0107f
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479549
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-10 08:42:51 +00:00
Wojciech Malikowski
7083fa3e35 lib/ftl: Remove group from ftl physical address
ftl_ppa address do not need to expose group
information when FTL will move to zones API.

Change-Id: Iece1b32f9bcd8985260668c953089eb9951f13cc
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467603
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-10 08:42:51 +00:00
Seth Howell
39fe5c849b autotest_common: fix xtrace_restore_enable
My previous patch enabling this to be called recursively didn't
take into account that a single call to xtrace_restore would
override multiple levels of xtrace_disable nesting. This change fixes
that.

fixes: 190b2245c5

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I2167ba460e68223c9426b3d71e9c17019f947924
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478959
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-08 15:46:18 +00:00
Shuhei Matsumoto
71600c57b3 bdevperf: Add struct spdk_bdevperf and allocate its global instance
Add struct spdk_bdevperf and include header of io_target_group list
in it, and then allocate its global instance g_bdevperf statically.
Rename g_head by groups for clarification.

The next patch will register g_bdevperf as SPDK IO device and
allocate io_target_group as context of the corresponding IO channel.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6755ce8cc05b00cbc0d5dc7983ec01fe3483f4cf
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478779
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-01-08 09:12:35 +00:00
Shuhei Matsumoto
679f6d6e3c bdevperf: bdevperf_fini() and rpc_perform_tests_cb() refer g_run_rc directly
Remove a parameter from bdevperf_fini() and rpc_perform_tests_cb()
and they refer g_run_rc directly.  This is a preparation to the next
patch to avoid introducing any dynamically allocated context.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I42f1c7e8bc662799b3fcbf2769139174bb527314
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478834
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>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-08 09:12:35 +00:00
Shuhei Matsumoto
ceaee98aa9 bdevperf: Extract and inline bdevperf_free_targets() into bdevperf_test_done()
We don't have ordering constraint between bdevperf_free_targets()
and sending RPC response. So extract bdevperf_free_targets() from
bdevperf_fini() and rpc_perform_tests_cb() and inline it into
bdevperf_test_done(). As a result of this change, bdevperf_fini()
calls just spdk_app_stop(), but is still necessary in the subsequent
patches. So keep bdevperf_fini().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie8ed2d04db754b8a265296932f73d3a602d1f90b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479373
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 CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-08 09:12:35 +00:00
Shuhei Matsumoto
411f1c90c6 bdevperf: Factor out finish operation of command line and RPC invocation
Factor out test finish operation of command line invocation case and
RPC invocation case.  Then apply the new funciton bdevperf_test_done()
to all calls bdevperf_fini() or rpc_perform_tests_cb().

The purpose of this refactoring is as follows:
- Consolidating finish operation improves code readability and
  maintainability, and may enable further improvement in future.
- The next patch will consolidate bdevperf_free_targets() from
  bdevperf_fini() and rpc_perform_tests_cb() into bdevperf_test_done().
  This refactoring is a preparation.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I06801541e4c4ed28774debad56d901dbeb5a9193
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479372
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-08 09:12:35 +00:00
Shuhei Matsumoto
95754cd170 bdevperf: Reorder state checks in spdk_bdevperf_shutdown_cb()
io_target_group manages io_targets, and hence checking g_head
should be done earlier than checking g_target_count.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I112018d8f487b387ae5f4f444a342be2c8da167d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479350
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
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>
2020-01-08 09:12:35 +00:00
dongx.yi
1044fe25e6 test/unit: Add set_host_id_cmds to unittest.
This function was ignored and a little different from others.
Add this to increase code coverage rate.

Signed-off-by: dongx.yi <dongx.yi@intel.com>
Change-Id: I35b51feb8894aca54a3b21436bc21ec12e37adf7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475814
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-08 09:12:10 +00:00
Maciej Szwed
80da95481b unit/bdev: Rename stub_submit_request_aligned_buffer
Rename stub_submit_request_aligned_buffer function
to stub_submit_request_get_buf and its callback function
to stub_submit_request_get_buf_cb.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478944
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-07 12:31:32 +00:00
Tomasz Kulasek
1c5d980300 lib/nvme: add hw support for fused operations
Change-Id: I2a184a2d60f18439947afa2d4855d51b92ed282e
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476137
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-01-07 12:31:32 +00:00
Seth Howell
8209c8cfa0 lib/nvmf: rdma qpairs now store device, not port.
The only reason the qpair ever uses the port is to get to
the device attributes so skip the middle man.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ib14a97ceaa0c49176027d6c35c5cb2787a845cc1
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478961
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-07 12:21:36 +00:00
dongx.yi
94f2def65a test/unit: Add nvme_uevent_ut.c to unittest.
Add nvme_uevent_ut.c to unittest, and test parse uevents.

Signed-off-by: dongx.yi <dongx.yi@intel.com>
Change-Id: Id8bb8336790ae5e031b357dc49163d86dfa1cd57
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475080
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-07 12:20:01 +00:00
GangCao
be4a5602ce blobfs: write IO directly if it is lba aligned
UT also added for the block aligned write and verification
of the written data.

Change-Id: I8751f437c71dd7f3a4556fee420460d6dffdd4e5
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478424
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-07 12:19:14 +00:00
JinYu
ada795302a nvmf_example: add the acceptor poller
Add acceptor poller to handle all the connections.

Change-Id: I3228547d63a5812b90fe4394641cf124d9e64d12
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468660
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-07 12:16:05 +00:00
JinYu
c871ee40e6 nvmf_example: add the signal handler
Add the same handler for SIGINT and SIGTERM so that
the working thread can exit.

Change-Id: If1ce617ddd778e92bed6f95089c48caf841e256f
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468661
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-07 12:16:05 +00:00