Commit Graph

120 Commits

Author SHA1 Message Date
Tomasz Zawadzki
7d6705f833 test/blockdev: run bdevio tests via RPC
With this change, bdevio tests are not ran immediately
after starting the application.
This will allow to configure new bdevs via RPC and
run tests on demand during script's execution.

Change-Id: I9740fca92c26cb2a39fbdc7cfb132ad53cec3787
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455235
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-06-19 03:39:04 +00:00
Tomasz Zawadzki
1599301b7b test/blockdev: add trap for bdev_svc process
There was a gap where nbd tests could fail, but without
trap set the app would still be present.

When here removed trap from end of the script since,
no part of the script set it up.

Change-Id: I0c435c7cd603410c2cd7a034bf955ab424e413f0
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457615
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-06-19 03:39:04 +00:00
Tomasz Zawadzki
f87568a095 test/bdevio: respond with error via RPC on test failure
Previously RPC returned just number of cases that failed,
meanwhile return from the command was 0.

Now whenever there are failures, error is reported via RPC.
This will allow to use it in bash scripts with set -e used.

Change-Id: I34997dd5f08b561bc55f391287f9942861bda57a
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457614
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-06-18 03:40:50 +00:00
Tomasz Zawadzki
1bed9c1f1a test/asan: preload ASAN for fio
ASAN needs to be LD_PRELOADed before SPDK fio_plugin
in order to analyze its code.
Just adding that will report any issues in fio binary as
well as the fio_plugin.
To prevent known fio leaks from affecting the results,
a suppression list for LeakSanitizer (used in conjunction with ASAN).

At this time the suppression list contains known leaks
for fio 3.3. The list might need adjustments as fio
version is updated.

Side note. Even though it is possible to specify directory
to ignore ("leak:/usr/src/fio/"). Which in theory should
suppress any leaks in fio. It has side effect of hiding
SPDK leaks as well, since the fio_plugins leaks are
seen as coming from /usr/src/fio/ioengines.c.

See below for examples of each suppressed error:

Direct leak of 42 byte(s) in 4 object(s) allocated from:
    #0 0x7f9d52f3e320 in strdup (/lib64/libasan.so.5+0x3b320)
    #1 0x41f267 in get_new_job /usr/src/fio/init.c:490

Direct leak of 914936 byte(s) in 10397 object(s) allocated from:
    #0 0x7f74422e8ea6 in __interceptor_calloc (/lib64/libasan.so.5+0x10dea6)
    #1 0x46402e in log_io_piece /usr/src/fio/iolog.c:214

Direct leak of 608 byte(s) in 19 object(s) allocated from:
    #0 0x7f74422e8ca8 in __interceptor_malloc (/lib64/libasan.so.5+0x10dca8)
    #1 0x44c4e1 in add_to_dump_list /usr/src/fio/parse.c:1039
    #2 0x44c4e1 in parse_option /usr/src/fio/parse.c:1098

Direct leak of 173 byte(s) in 20 object(s) allocated from:
    #0 0x7f744227153d in strdup (/lib64/libasan.so.5+0x9653d)
    #1 0x44b50d in __handle_option /usr/src/fio/parse.c:718

Indirect leak of 111925528 byte(s) in 1271881 object(s) allocated from:
    #0 0x7f74422e8ea6 in __interceptor_calloc (/lib64/libasan.so.5+0x10dea6)
    #1 0x46402e in log_io_piece /usr/src/fio/iolog.c:214

Indirect leak of 171 byte(s) in 19 object(s) allocated from:
    #0 0x7f744227153d in strdup (/lib64/libasan.so.5+0x9653d)
    #1 0x44c4ed in add_to_dump_list /usr/src/fio/parse.c:1040
    #2 0x44c4ed in parse_option /usr/src/fio/parse.c:1098

Indirect leak of 167 byte(s) in 19 object(s) allocated from:
    #0 0x7f744227153d in strdup (/lib64/libasan.so.5+0x9653d)
    #1 0x44c502 in add_to_dump_list /usr/src/fio/parse.c:1042
    #2 0x44c502 in parse_option /usr/src/fio/parse.c:1098

Change-Id: I9b5811993508421be50b12af160645c77ea93d7e
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456315
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-06-18 03:40:50 +00:00
Karol Latecki
fb9c4ee651 test: replace backticks with dollar-parenthesis syntax
Scripts were using a mix of two approaches, lets unify that so
just dollar-parenthesis syntax is used.

Change-Id: Id093b6c82d1f766ba6af13bed720977eceaa7ffc
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457744
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-06-17 07:19:03 +00:00
Shuhei Matsumoto
73204fe2e5 dif: Add data offset to DIF context separately from start block address
Data offset are intended to correspond to DATAO in NVMe/TCP and
Buffer Offset in iSCSI.

Previously for iSCSI, buffer offset had been merged to start block
address, but passing buffer offset separately from start block address
clarifies the logic more.

On the other hand, for NVMe/TCP, passing DATAO separately from start
block address will be critically important because DATAO will bave any
alignment and will be necessary to use for not only reference tag
but also guard computation.

This patch adds data_offset to struct spdk_dif_ctx and adds it to the
parameters of spdk_dif_ctx_init(). ref_tag_offset is also added to struct
spdk_dif_ctx and it is computed by dividing data_offset by data_block_size
and is used to compute reference tag.

The next patch will use this change when getting DIF context in SCSI.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id0e12ca9b1dc75d0589787520feb0c2ee0f844a5
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457540
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>
2019-06-11 18:53:58 +00:00
Tomasz Zawadzki
416c5e29ab bdevperf: move checking test parameters to verify_test_params()
Moving verifying test parameters to single function function.

This is start of series that will add RPC to start bdevperf tests,
allowing configuration beforehand.

In future verify_test_params() will be used to verify parameters
passed via RPC as well.

Change-Id: I0aff7d9fa9f99205b3559b0ea081aa3690013faa
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457223
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-06-11 05:13:48 +00:00
Konrad Sztyber
fc3e1b6fb0 bdevperf: target bdev selection
Allow the user to select target bdev to be used by bdevperf. It's useful
when the config contains multiple bdevs, but only one is supposed to be
utilized by bdevperf directly.

Change-Id: I51aa645dcf60a4413057d86f68fe24442b280367
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456787
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-06-10 04:15:10 +00:00
Konrad Sztyber
5012fcc148 bdevperf: update target list in bdevperf_construct_target
The target list is now updated inside bdevperf_construct_target. That
way, if the target is successfully created, it'll already be on the
target list once this function finishes.

Change-Id: I364c45005c28deadae37615b6ac85f3860fc5080
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457089
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-06-10 04:15:10 +00:00
Tomasz Zawadzki
3b9db6c403 test/fio: export single variable for running fio_plugins
This patch adds functions in autotest_common.sh,
fio_bdev() and fio_nvme() for their respective plugins.
It simplifies its usage throughout the scripts.

Additionally will help with expanding the fio cmd
line with nessecary changes only in single place.

This will be used in next patch in series to
LD_PRELOAD ASAN before fio_plugin.

Note: Did not implement changes for perf scripts,
since they are usualy run separately and didn't want
to affect those.
Similarly didn't change vhost initiator tests,
because the exported directories do not work for
inside the VM. Will need to think of a way to change it
there as well.

Change-Id: Idf750ee7aa9d5e30efc0ce430d15fa45ceccb203
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456314
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>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-06-06 05:17:16 +00:00
Tomasz Zawadzki
0668025839 test/bdevio: add nvme admin passthrough test
This test sends identify controller command to the NVMe device.

Change-Id: Icc262a1a1fa52bafe5cb019151c3d196bd268673
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454609
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>
2019-06-04 23:34:43 +00:00
Konrad Sztyber
66bace41d7 bdevperf: use separate metadata buffers
Use separate buffers for metadata transfer if bdev supports it.

Change-Id: Ie0fa3d3c1f5b14f99c13f2d6b5b22edc216c6d64
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451468
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>
2019-06-03 23:35:42 +00:00
Tomasz Zawadzki
7140c2f710 test/bdevio: add perform_tests RPC
New RPC added specifically to the bdevio app.
It will launch all tests on all targets by default.
When optional parameter for bdev name provided is supplied
tests will be ran against just that bdev.
After finishing, the application will await another RPC.

stop_init_thread() and __run_ut_thread now pass json request.

Added separate test.py to not pollute rpc.py with custom RPC
just for the bdevio application.

Added '-w' argument to the bdevio app, so that instead
of performing the tests immidietly - it awaits RPC.
After a lot of changes to blockdev.sh, we might end up
removing this argument and just use it as default.

Change-Id: I82e52352bdf8082c1712caa223ad5ab78aa4e7fa
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455200
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-05-30 21:58:23 +00:00
Tomasz Zawadzki
04f7575bc4 test/bdevio: test functions now execute test calls directly
Before simplifying test suite execution it was needed
to loop around function actually running the tests.

So the test functions now can directly contain whatever
that was doing, without intermidiate function between.

Change-Id: Ic4b648d8d26d6be7a3bf1efb1b1ee3f2615ee5fa
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455672
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>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-29 21:29:28 +00:00
Tomasz Zawadzki
6a8d00949b test/bdevio: setup separate suites for each target
With this patch each target has separate suite,
tests are ran just once for all setup suites.

Suite init/fini functions were added that move
current g_current_io_target ahead for next suite.

Results what works for particular bdev are of more use
rather than combination for all bdevs.
This will come useful when we want to perform RPC for only
select targets.

In case of CUnit library error, application is stopped without
returning number of failures. This is because at that point
its numbers are not reliable.

Change-Id: Ie82b6e33374841bf829da09a16a401fddd1fd81c
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455199
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>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-27 07:48:16 +00:00
Tomasz Zawadzki
3c45798173 test/bdevio: enable RPC listening socket
Previously it was explcitly set to NULL, so that
the application didn't even setup up the socket.

Change-Id: I2174fe0ff5790efd6578807f17702978cd9cf451
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455197
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-22 15:51:36 +00:00
Tomasz Zawadzki
3f1cda12e4 test/bdevio: enable every kind of RPC to the app
Adding app_rpc and bdev_rpc allowing every kind of RPC
interaction with the app.

Change-Id: I738095686dc8ad61101a998b473df63cddc490a2
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455196
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-22 15:51:36 +00:00
Tomasz Zawadzki
84429e7bbb test/bdevio: add function to create target from single bdev
Adding ability to create targets from single bdev,
will allow to create set of targets (not all) to run tests.

Idea is for bdevio to no longer run tests on all bdevs and
shutdown right after. Rather await RPC for configuring bdevs
then start test suite on select targets via RPC.
This is first patch in that direction.

Change-Id: I8645a3c22150e8611ff8a59f740e2ebf4edb4c1f
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454622
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-05-16 20:33:49 +00:00
Tomasz Zawadzki
1cb299addc test/bdevio: return failure when unable to open a bdev
Tests shouldn't disregard when opening a bdev fails.

Change-Id: I5211e9d7bcb48ed3e7e22f7480106ceeea12c23a
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454621
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-05-16 20:33:49 +00:00
Tomasz Zawadzki
42cefebe1d test/bdevio: exit with error when no bdevs were configured
Tests shouldn't report success when no actual tests were ran.
Using bdevio without any bdevs configured, does not serve
any purpose and should report failure.

Change-Id: I489a0d03f5b5c2482dede56cad92befd97d24057
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454620
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-05-16 20:33:49 +00:00
Jim Harris
0f1ce06deb test/bdevio: move reset test earlier in the list
This makes sure we do some I/O after the reset.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453941
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>
2019-05-14 13:49:19 +00:00
Tomasz Zawadzki
9011f2401b test/raid: switch from config file to RPC
bdev_raid.sh was using configuration file (bdev.conf.in)
made for blockdev.sh. Changes in that config file affected
the raid tests.

Since the test actually only used two malloc devices as
raid bases, switching to RPC makes it simpler clearer
to understand what is used in tests. Additionally
making raid tests standalone from blockdev.sh.

Fixes issue #777

Change-Id: Ia4c5858852241a9fd8212690aefbf015c98d1b57
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453644
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-08 14:43:59 +00:00
Tomasz Zawadzki
a394f62868 test/raid: always call rpc_py with correct socket
Previously the socket was only used in single rpc call,
upcoming patch will use of the $rpc_py.
Moving socket to $rpc_py simplifies calling it in multiple
parts of the script.

Change-Id: Id1ba86740237c32a6f0259562c0b5c11d917bbcf
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453643
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-08 14:43:59 +00:00
Jim Harris
4460761f22 test/bdevio: allow reset test to fail on NVMe
NVMe-oF target doesn't support reset yet - but we want
to use bdevio to test other NVMe-oF target functionality
in the next patch.

An issue will be filed against the reset support so
that it gets added.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452935
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-07 05:23:31 +00:00
Jim Harris
460796a60a test/bdevio: add another nvme passthrough test
This sends a known invalid opcode.  This is useful
for NVMe-oF target testing, since the target will
decode READ and WRITE opcodes and we want to exercise
its passthrough code path.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452932
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>
2019-05-06 23:01:49 +00:00
Jim Harris
a529ff946f test/bdevio: add test for NVMe passthrough read/write
This uses the bdev nvme passthrough API to do a write
followed by a read, checking for final data integrity.
It helps verify the passthrough API is working correctly.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I25fe685b0bdcb88c7537c165cc60f8df31823b24
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452931
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>
2019-05-06 23:01:49 +00:00
paul luse
47097a3fe4 test: only run hello_world bdev test nightly
May not be the long pole in the tent right now but it is 11 secs
to make sure our example app is working, it adds no nvme coverage
so move it to nightly instead of per patch.

Change-Id: I779a9f2a6951b3c51a82403c8cf085a251fb955c
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452801
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-05-06 17:54:34 +00:00
WangHaiLiang
2237e0e72d bdev/raid: Print a message indicating that RAID tests were skipped
RAID tests are skipped when the OS is not Linux or if nbd isn't available.

Change-Id: I141a01603f849d38a1772686a0747beb08f7c265
Signed-off-by: WangHaiLiang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451723
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-05-01 17:44:21 +00:00
Jim Harris
196b8e6f27 test/crypto: move gen_crypto.sh to test directory
This script is not general purpose like gen_nvme.sh,
so move it to the test directory at least for now.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451785
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-04-26 11:18:09 +00:00
Jim Harris
629c109282 test/crypto: always test aesni, even if qat is available
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I138de9ef2b4e1b7f6e228c159fe447d6135e63d0

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451784
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.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>
2019-04-25 05:36:13 +00:00
Ben Walker
14bf912df9 bdevperf: Use new zcopy API for reads
Change-Id: I71023d56f9023f46ff65291d22b1b8d31595a7b5
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/416579
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-23 18:38:39 +00:00
Xiaodong Liu
efdd6edba2 nbd: optional nbd_device in start_nbd_disk
Enhance RPC method start_nbd_disk to take nbd_device as
one optional parameter. If it is not assigned, automaticly
choose an available nbd device path from /dev/nbd0 to
/dev/nbdN.
For github issue #324:
https://github.com/spdk/spdk/issues/324

Change-Id: I72c064d8bd476df342f5aa0af4d6120eb021c7ed
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/440453
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>
2019-04-04 08:35:50 +00:00
Piotr Pelplinski
de5f53220c notify: add notification library
This patch adds library that will provide ability to notify about
events. On one side each spdk library can specify what kind of
notification it can produce and on the other side libraries can fetch
those notifications.

Example is bdev module, which lib notify about added or removed bdev.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Change-Id: Ia95e564a8a43400b2745d9de8217b9cc84cd1b16
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/431920
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-03-29 21:15:14 +00:00
Ben Walker
deb8ee5c33 event: spdk_app_start now takes spdk_msg_fn
This callback type takes 1 argument instead of 2.

Change-Id: Ic3710fafb2828f08fc064f7658849b3d20521092
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446997
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-03-19 15:54:34 +00:00
Ben Walker
362879570a event: Remove arg2 from spdk_app_start()
We never used this anywhere, and I need to move to a model where
the start up action is a thread message instead

Change-Id: I6b21ba9afb93a3245aceca2fe24713ffd16d0933
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446986
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-05 08:43:12 +00:00
Xiaodong Liu
3d951cd321 bdev/raid: enable unmap support
Change-Id: If0e3c483ce16680ecea0252c389e134c59b2793e
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/441309
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-02-28 04:22:39 +00:00
Jim Harris
af46393e1d bdevio: fix opts.name
This utility used to be called "bdevtest" so that's
what opts.name was set to for spdk_app_opts_init().
Change it to the new name "bdevio".

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

Reviewed-on: https://review.gerrithub.io/c/445800
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>
2019-02-25 07:06:04 +00:00
Shuhei Matsumoto
8696cd4288 dif: Add seed value for guard to avoid 0 in case of all zero data.
Allow user to add seed value for guard compuation to DIF context.
This will avoid the guard being zero in case of all zero data.

NVMe controller doesn't support seed value for guard computation
explicitly, and hence if we want to use such a seed value in
NVMe controller, we have to format metadata more than 8 byte,
and add seed value into the reserved metadata field.

But some popular iSCSI/FC HBAs and SAS controllers have supported
seed value for guard computation, and so supporting seed value
in the SPDK DIF library is very helpful for some use cases.

Hence this patch makes the DIF library possible to specify seed
value for those use cases.

Change-Id: I7e9e87cb441bf263e64605c7820409fdc22dd977
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/444334
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: wuzhouhui <wuzhouhui@kingsoft.com>
2019-02-22 17:52:51 +00:00
Shuhei Matsumoto
8ad0935b81 bdevperf: Fix incorrect error detection and log for IO size
g_io_size is already verified not to be zero when args are originally parsed,
and if g_io_size < data_block_size, then g_io_size % data_block_size != 0.

So current error log is not correct and just testing if IO size is multiples
of block size will be correct.

Change-Id: I5d32425e251773f1c96740c674b4d238dfb80f8d
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/444310
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-02-13 06:42:11 +00:00
Shuhei Matsumoto
3c3510a2fd bdevperf: Support DIF enabled bdevs
Extract DIF check type settings from the bdev and hold them
in the target, then generate DIF for write I/O based on them.

Change-Id: Ice85121423b6b8545e45d7def1aabed59ed6ce8e
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/443357
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>
2019-02-13 06:42:11 +00:00
Shuhei Matsumoto
ee23785130 bdevperf: Enlarge data buffer to include metadata
Enlarge data buffer to include metadata if md_size is not 0 and
md_interleave is true of target bdev. Then generate and verify
data pattern by skipping metadata field.

If md_size is not 0 but md_interleave is false, return immediately
until bdev supports APIs with separate metadata.

Change-Id: Ia3c2ae5fbcc5b7612585f1dfeb5d30e821d48acf
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/443356
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>
2019-02-13 06:42:11 +00:00
Shuhei Matsumoto
530ae91505 bdevperf: Factoring out construct task on target operation into a function
The possible reason of failure of task construction is out of memory.
Hence it's OK to return pointer to the constructed task simply.

Change-Id: If6e270caefb61192c8f0055506d957c3c5d07016
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/443355
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>
2019-02-13 06:42:11 +00:00
Shuhei Matsumoto
fdf7e1bcb2 bdevperf: Factoring out construct target operation into a function
Bdevperf have returned immediately if -ENOMEM, continued if failure
due to other reasons, and registered the created target otherwise.

So, keep this behavior by passing the reference to the pointer to
struct io_target, and check both return code and the value of the
reference.

And this refactoring will clarify the logic related with target
assigment to cores.

Change-Id: I24593f7b4523daf4395643bdc8886499c36ea3c7
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/443354
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>
2019-02-13 06:42:11 +00:00
Shuhei Matsumoto
14c18abb7a bdevperf: Add the prefix "g_" to coremap
Coremap is a global variable in bdevperf, and add the prefix "g_" to
it.

Change-Id: Ia22802ce2152d8748cffc6916197be4ddd615618
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/444013
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-02-12 17:57:25 +00:00
Jim Harris
d593193fd3 bdevperf: fix -S in usage message
-S takes a parameter for how many seconds to wait
between each stats output - that was missing in the
usage message.

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

Reviewed-on: https://review.gerrithub.io/c/443282
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>
2019-02-05 17:25:31 +00:00
Pawel Niedzwiecki
2240a8b2ef test/nightly: Add tests to RUN_NIGHTLY_FAILING.
Test case in blockdev.sh is causing nightly tests to fail
so put it back to nightly_failing list.
Put vhost read-only test on the list to check if it passes
on qemu 3.0.0. Bring back vhost live migration test since it
is missing vhost.sh.

Change-Id: Ic8b5341808cdf843850d22fb6a22a64e92dccafa
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/436840
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-02-01 13:16:35 +00:00
Jim Harris
ab696ae1cf bdevperf: remove extra blockdev_heads_destroy() in failure path
The stop handler already calls blockdev_heads_destroy(), so we
don't need to call it if bdevperf_construct_targets_tasks()
fails.  Calling it twice actually results in double-frees and
other types of memory corruption.

Fixes #592.

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

Reviewed-on: https://review.gerrithub.io/c/442628
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: Changpeng Liu <changpeng.liu@intel.com>
2019-01-30 06:37:49 +00:00
Shuhei Matsumoto
b78e763c1a string: spdk_strtol to delegate additional error checking
Error check of strtol is left to users of it. But some use cases
of strtol in SPDK do not have enough error check yet.

For example, strtol returns 0 if there were no digits at all.

It should be avoided for each use case to add enough error checking
for strtol.

Hence spdk_strtol and spdk_strtoll do additional error checking
according to the description of manual of strtol.

Besides, there is no use case of negative number now, and to keep
simplicity, spdk_trtol and spdk_strtoll allows only strings that
is positive number or zero.

As a result of this policy, callers of them only have to check if
the return value is not negative.

Subsequent patches will replace atoi to spdk_strtol because atoi
does not have error check.

Change-Id: If3d549970595e53b1141674e47710fe4dd062bc5
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/441626
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: wuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2019-01-29 00:10:57 +00:00
Piotr Pelplinski
0656ba9437 histograms: tests for bdev histograms
This patch adds tests for bdev histograms using bdevperf.

Patch also adds bdev_rpc dependency in bdevrpc Makefile
to enable histograms RPC calls in bdevperf.


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

Reviewed-on: https://review.gerrithub.io/c/437640
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@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>
2019-01-24 21:50:18 +00:00
GangCao
316cb3b150 QoS/Bdev: add the Read/Write separate bandwidth rate limits
This patch adds the support of read and write separate
bandwidth rate limits control with the configuration file.

Below is the example (in MiB) for the configuration section:

[QoS]
  Limit_Read_BPS Malloc0 100
  Limit_Write_BPS Nvme0n1 200

Change-Id: I0221516ce70c3fbb07b9e80c1c814ed5ba271c88
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/416672
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@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: Ben Walker <benjamin.walker@intel.com>
2019-01-22 23:21:43 +00:00