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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
-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>
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>
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>
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>
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>
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>