Commit Graph

30 Commits

Author SHA1 Message Date
Jim Harris
ecb44872b6 test: add some basic raid tests
RAID is experimental for 18.07, pending iov support
which is needed for vhost.  But we need to at least
build RAID in our tests, and run some basic
bdev tests to ensure it doesn't quickly become stale.

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

Reviewed-on: https://review.gerrithub.io/420678
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-07-30 14:59:45 +00:00
Pawel Niedzwiecki
6422837360 json/rpc: Tests for nbd subsystem
Change-Id: Ib5876cb238c37802b2418c594ab9a5f01bbdf637
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/417915
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2018-07-20 20:43:43 +00:00
Paul Luse
4996d7b5c5 test: check for null before deref of g_head
Followup to earlier fix, didn't see this until after fixing bdev
the rest of the way...

Change-Id: Idc663ffe6a90e6cb3511e4e703f2e9c667a3eac4
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/419445
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@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: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-07-19 01:23:52 +00:00
Ziye Yang
1e2b25ec20 bdevperf: fix the reset testing failure issue.
Root cause: we did not check the status of the bdev_io
in bdevperf_verify_write_complete function.

So the fix is that: if the status is failed, we should
not do the read check again, but just complete this I/O.

Change-Id: I3dc796abe47c3f2e7eeb2b6eb0ebc0338122479d
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/419338
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Chunyang Hui <chunyang.hui@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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-07-17 01:30:40 +00:00
Paul Luse
459e899095 bdevperf: don't try to free targets if head is NULL
In the event that something went wrong earluer, we shouldn't
try and touch memory that was never allocated.

This is at least a partial fix for issue 363.

Change-Id: I5174c845fb89f6d386877758fdc99178704ff73c
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/419039
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-07-12 22:09:27 +00:00
Pawel Kaminski
57bce7953f test/json: Add rbd bdev test
Change-Id: I8d8b252bf826e6339810ccf27a4c68ed6a726af9
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/417603
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-07-06 22:48:57 +00:00
Pawel Kaminski
2d7cfda2d4 test/json: Tests for virtio bdevs
Change-Id: Ibb94abdfc6881aa3e8e6dceaf70e494f0146e385
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/406561
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-07-03 17:40:42 +00:00
Maciej Szwed
e48f0bf17d bdev: add delete_passthru_bdev call
Since delete_bdev should be used only for debug purpose,
this patch adds delete call specific for passthru bdev.

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

Reviewed-on: https://review.gerrithub.io/416535
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-07-02 22:53:18 +00:00
Pawel Kaminski
93fca0e79f test/json: Base bdevs test for bdev subsystem.
- load spdk_tgt with bdevs
   - check if json config is properly saved and loaded
   - check if all bdevs are properly loaded
   - check if configuration of spdk_tgt is properly set

Change-Id: I89226bc9c05880e73523fb189116e7433a513244
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/406326
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-06-29 16:27:57 +00:00
Daniel Verkamp
9539edca02 build: add sock dependency for all NVMe lib users
This will be necessary when the NVMe/TCP transport is added, which will
use the sock abstraction library.

Change-Id: I6561ccdad1ff575db2afa418eab2f2cd24806cb9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/416477
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-22 17:09:57 +00:00
Ziye Yang
1c3c50a6cb bdevperf: Enable the debug -L option
Purpose: Help for the debug.

To use the spdk_app_parse_args may be the next patch
(I just checked the spdk_app_parse_args, there are many
conflict args).

Change-Id: I6e601ba62cfdb4d381520b4eab0f6f85ed862bb9
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/415107
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-20 17:42:59 +00:00
Jim Harris
32d7c91cbc bdev: add spdk_bdev_queue_io_wait()
This function is intended to be used when an spdk_bdev
I/O operation (such as spdk_bdev_write or spdk_bdev_write_blocks)
fails due to spdk_bdev_io buffer exhaustion.  The caller
can queue an spdk_bdev_io_wait structure on the calling thread
which will be invoked when an spdk_bdev_io buffer is available.

While here, turn off error messages in bdev.c related to
spdk_bdev_io pool exhaustion, since we now have an API designed
to gracefully recover from it.

Also modify bdevperf as an example of how to use this new API.

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

Reviewed-on: https://review.gerrithub.io/415074
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-20 17:41:47 +00:00
Jim Harris
7699cdeed4 bdevperf: add bdevperf_submit_task helper function
This will be needed when we need to re-attempt an IO submission
when the bdev_io pool is exhausted.

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

Reviewed-on: https://review.gerrithub.io/415301
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-15 20:57:08 +00:00
Jim Harris
89de425ed4 bdevperf: break out prep work from bdevperf_submit_single
This prepares for upcoming patches which handle -ENOMEM
from the SPDK bdev io submit function.  When we retry
submitting the I/O, we do not want to "re-prepare" the
I/O - i.e. we don't want to calculate a new offset or
memset the buffer again for verify workloads.

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

Reviewed-on: https://review.gerrithub.io/415300
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-15 20:57:08 +00:00
Jim Harris
67bc354c37 bdevperf: save bdev io type in bdevperf_task
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia32bd2655a4cc1c082ce5fd5420f6abaabe40133

Reviewed-on: https://review.gerrithub.io/415299
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-15 20:57:08 +00:00
Jim Harris
529d9b0dec bdevperf: simplify bdevperf_submit_single
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I93987ed25779f016e8056f6cd472ec3da99b7d94

Reviewed-on: https://review.gerrithub.io/415073
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-06-14 14:57:11 +00:00
Daniel Verkamp
9c577fe7c0 Add copy module dependencies to Makefiles
Several apps link against $(COPY_MODULES_LINKER_ARGS) without adding
$(COPY_MODULES_FILES) to the dependency list.  This means that those
apps would not get rebuilt if the copy modules were modified without a
'make clean'.

The blobfs example apps were also missing other dependencies; add those
while we're here.

Change-Id: Iac6606b650d32bf21f7f31bd2727f9e92c0da748
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/414888
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-06-12 23:15:25 +00:00
Shuhei Matsumoto
239e63be7d copy/ioat: Change the default of IOAT from Enabled to Disabled
This patch changes the default setting of IOAT copy engine from
Enabled to Disabled. Accordingly this patch changes the config file
specification for IOAT copy engine from "Disable Yes/No" to
"Enable No/Yes".

Subsequent patches will add a new JSON RPC to configure IOAT
copy engine dynamically.

Change-Id: I754990cbb6ecc096953dd2fb9d34366b91111bf8
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/410757
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-12 17:41:29 +00:00
Ben Walker
a83f91c29a thread: Replace #include of io_channel.h with thread.h
Change-Id: I6babd4cf990bf19b510db88bdfb0ca81e29d9252
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/414700
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Madhu Pai <mpai@netapp.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-12 15:24:07 +00:00
Ben Walker
02d75f6237 thread: Move threading abstraction code out of util
This makes more sense as a first class library.

Change-Id: Ibd5c578f8708bd8c7d83fe1629e97c9a3316b56b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/414698
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Madhu Pai <mpai@netapp.com>
2018-06-12 15:24:07 +00:00
Daniel Verkamp
f9117f050e Remove executable permissions on source files
A couple of files were accidentally marked as executable.

Change-Id: I89ff0bc037fba1b5d073ceea55c78fb5d9cb19b2
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/414675
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-11 20:35:02 +00:00
Jim Harris
1fd0107026 bdevperf: print error message and exit when no bdevs found
While here, don't print out empty performance data if the
test run failed (for example, if no bdevs were found).  Also
remove superfluous "done" message at the end of main - it
really serves no purpose and looks silly especially if the
test failed.

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

Reviewed-on: https://review.gerrithub.io/414064
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-07 17:46:02 +00:00
Chunyang Hui
3d9b3e972a bdevperf: Add flush io type
Change-Id: Ia954418cdf9423a015358d793a34722169c087ed
Signed-off-by: Chunyang Hui <Chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/414082
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-07 15:43:59 +00:00
Jim Harris
58bcd554b5 bdevperf: add unmap IO workload
There is an existing unmap "workload" but it is not a
real workload - it's just used as a type of verify
function to check if an unmapped region later returns
zeroes.  This has typically been true for Intel NVMe SSDs
but is not universal, so this functionality is not really
useful.  It's not used anywhere in any of the tests in the
SPDK tree either.

So replace it with a real "unmap" workload that will
do sequential unmap operations on the underlying
bdev.  A future enhancement could make these unmap
operations random across the bdev - but that can be
added later.

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

Reviewed-on: https://review.gerrithub.io/413151
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-01 21:01:42 +00:00
John Kariuki
8b75f85f2d examples/bdev: add hello world example
This commit adds a simple hello world example that writes the string
"Hello World!" to a bdev. The example can be used on a block device
such as Malloc or virtual bdev such as the passthru vbdev. The
sample bdev.conf configuration file includes a configuration for 2
malloc bdevs and one passthru bdev on top of Malloc0.

Change-Id: I1414183e3ddfac988ef61f24b8271653ac57e7c1
Signed-off-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-on: https://review.gerrithub.io/407220
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-05-11 15:22:22 +00:00
Tomasz Zawadzki
0629b01d21 test/rbd: add configurable monitoring IP address for ceph
Ceph monitor IP address was always 127.0.0.1, with this change
it can be configured at setup time.

Since each test might prefer to specify different addresses
or ones that do not exist at start of autotest.sh. rbd_setup was
moved to begining of each test respectively.

Change-Id: I5626f7ea979d0db921208355ba23314cf48e971f
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/407910
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-04-17 13:55:44 -04:00
GangCao
9bad29c18c bdev: update the name of Passthru section
Change-Id: I28fa033378649f9cf02bf216698b9d2058f77c9d
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/406883
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-10 15:44:54 -04:00
GangCao
61e8486c10 bdev/qos: add the QoS setting in conf file
For application like vhost/iSCSI target/NVMe-oF target/etc,
a new section as below can be added for the QoS rate limiting.

[QoS]
  Limit_IOPS Malloc0 100000
  Limit_IOPS Nvme0n1 500000

Also added a sample change at test/lib/bdev/bdev.conf.in

Change-Id: I7c7d951fbe1352ca2571f135c657bc4fa43b56c7
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/393221
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-04-03 19:36:58 -04:00
Daniel Verkamp
6b5a1d6c24 bdev/pmem: add conf support to test in blockdev.sh
The long-term plan is to use the JSON-based configuration format, but
for now, we need a config file section to be able to test a bdev module
in blockdev.sh.

Change-Id: I2a69f7172693ed6d4939a3b938747e2a1c62ff83
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/405908
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-04-03 14:14:29 -04:00
Seth Howell
f9d5ed28ca test: move the bdev directory up one level
Change-Id: I6e291c3361b9b8529e4ad44c4bc41bdb4b3b2b47
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/404957
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-23 19:45:09 -04:00