Commit Graph

12535 Commits

Author SHA1 Message Date
Ziye Yang
687a9ab516 iscsi migration test: Extend the execution time of fio.
When we conduct the ip migration test (i.e., switch the iSCSI target
process from to first process to
second). This time may exceed the 5s in some cases, so
FIO process will exit with error and make the test fail.
Because The total FIO execution time is 10s, and we sleep 5s
in the script. So propose the following approach:

1 Change the sleep from 5s to 3s, we do not need to sleep
it too long for FIO.
2 Extend the FIO execution time from 10s to 12s.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I07d488c6e8a94733534acc1acd2ba8778c4d2eb3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2801
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>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-06-10 13:55:40 +00:00
Ziye Yang
d0818a2cbb test/iscsi: fix wait for iscsi devices in ip migration test
We should wait until login fully performs before fio tests
to avoid intermittent failures.
(Suggested by Shuhei according to the rbd issue fixed previously)

Fixes 1313

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I331bf6d69bf0a5c9ef6e36c4325334159062f949
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2815
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>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-06-10 13:55:40 +00:00
Michal Berger
1780a09847 vm_setup: Add dedicated source for yum
Change-Id: I4669573d9fc28fe4c1bb3614abc45f0a83e7399c
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2522
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-10 13:54:48 +00:00
Michal Berger
4a04fc1976 vm_setup: Add dedicated source for pkg
Change-Id: I394d89b3d69ab559476fc78fdd9ecb47a8a46914
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2521
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-10 13:54:48 +00:00
Michal Berger
ec43840112 vm_setup: Add dedicated source for pacman
Change-Id: Ied0fbf5251b3fc3f1a6a1b5731958ffebed5e0d0
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2520
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-10 13:54:48 +00:00
Michal Berger
16f36c7b88 vm_setup: Add dedicated source for dnf
Change-Id: I4b536b303d9f689c69cfb98aa500a5799b65f27a
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2519
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-10 13:54:48 +00:00
Michal Berger
2b9ac640b3 vm_setup: Add dedicated source for apt-get
Change-Id: I80fd72d38ceb7e325953bad79728ebe9f9526553
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2518
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-10 13:54:48 +00:00
Shuhei Matsumoto
315d47da4b lib/nvmf: Clean up abort AER request operation
Include completion operation into nvmf_qpair_abort() and rename
it by nvmf_qpair_abort_aer() for clarification. Update unit test
accordingly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I763cc7d24b979e27e8775f4e69730466a2351bdf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2712
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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-06-10 13:54:40 +00:00
Shuhei Matsumoto
55c39cd008 lib/nvmf: Change nvmf_ctrlr_abort_aer() to set completion status of aborted I/O to ABORTED
nvmf_ctrlr_abort_aer() has not been used anywhere, and so we may be
able to remove it, but let's update it to set the completion status
of the aborted AERs to ABORTED for future potential use cases, and
then rename it by nvmf_ctrlr_abort_all_aer() to avoid name conflict
with the next patch.

Setting the completion status to SUCCESS is not good in this case
anyway.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie49936429b82dd05724cf8f10a1417e9c5304635
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2709
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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-06-10 13:54:40 +00:00
Shuhei Matsumoto
db96437e42 lib/nvmf: Include redirection into spdk_nvmf_request_complete()
Some cases need to redirect spdk_nvmf_request_complete() to the
thread pointed by qpair->group->thread. Abort command will be
included such cases but abort command is executed in the different
file ctrlr_bdev.c. For the convenience, change spdk_nvmf_request_complete()
to include the redirection and extract the core operation of
spdk_nvmf_request_complete() into a private function
_nvmf_request_complete(). In ctrlr.c, call _nvmf_request_complete()
for non-redirected cases.

Besides, locate the definition of _nvmf_request_complete() under the
definition of  spdk_nvmf_request_complete() in a file to trick the format
check tool to avoid false positive, and fix a spell error together.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I85546c80e99e01686c9470653e0ddafcf7c6a391
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2115
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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-06-10 13:54:40 +00:00
Shuhei Matsumoto
d13e9dde6e bdevperf: Abort the timeout I/O
Change the I/O timeout callback to abort the timeout I/O if g_abort
is set to true. Increase the task pool twice to submit abort task
in parallel.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1722f3c0ec8fc58a400b937895ad365cba7defbe
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2626
Community-CI: Mellanox Build Bot
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>
2020-06-10 13:54:40 +00:00
Shuhei Matsumoto
3ffdff7c5a bdevperf: Set timeout to detect starved I/O and count timeout I/Os
The following patches will abort the timeout I/O in bdevperf tool.
This is a preparation. Add CLI option to set timeout to detect
starved I/O and add count of timeout I/Os to stats.

spdk_bdev_set_timeout() disables timeout if timeout value is zero.
Hence we do not have to check if g_timeout_in_sec is not zero.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I201682acd321ecd414cfbfd9f5445bf3dc934b41
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2625
Community-CI: Mellanox Build Bot
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>
2020-06-10 13:54:40 +00:00
Shuhei Matsumoto
972ca153d3 bdevperf: Add CLI option to disable using zcopy bdev API
This is convenient to evaluate I/O abort for read or write I/O
to the delay bdev.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Idceebb9d65938837a57629cc6ec8db6507582116
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2624
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-06-10 13:54:40 +00:00
Shuhei Matsumoto
84caaf5a93 bdevperf: Count Failed I/Os
This is a preparation to support I/O abort by bdevperf tool.

Add io_failed to bdevperf_job and increment it per I/O completion.
Then add io_failed to statistics.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I45c15d9644e5d66310fbbe62682015bd81074973
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2623
Community-CI: Mellanox Build Bot
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>
2020-06-10 13:54:40 +00:00
Shuhei Matsumoto
82d77ca6f5 bdev/delay: Set zcopy I/O type to be unsupported regardless of backend bdev module
Delay bdev module does not support delaying zcopy I/O. So change
vbdev_delay_io_type_supported() to return false if the passed I/O
type is zcopy to clarify the use case of delay bdev module.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Icea5ae351d7139250710ce491e4ac466b0cc7f98
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2622
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-06-10 13:54:40 +00:00
Shuhei Matsumoto
a954d2bf30 bdev/delay: Abort I/O delayed to complete
This addition enables us to test the new abort I/O feature on top of
any bdev which supports I/O type ABORT.

Add the abort I/O handler vbdev_delay_abort() into vbdev_delay_submit_request().

vbdev_delay_abort() aborts the target I/O if it is delayed to complete,
or calls spdk_bdev_abort() otherwise.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I191143357b95eeb56ada708d2d7ce30cf772bdcf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2602
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-06-10 13:54:40 +00:00
Michal Berger
8661ded761 check_so_deps: Small refactor
Move all operations on "integers" to proper arithmetic evaluation
constructs. This is to avoid the following seen in the build logs:

  check_so_deps.sh: line 353: [: : integer expression expected
  check_so_deps.sh: line 353: [: : integer expression expected

This can be seen whenever an object file is missing maj.min numbers
from its name.

Additionally, shuffle the code around to simplify parsing of the
abidiff output.

Change-Id: I8f4aef10f11382788533aa2d92e9ffdcd6a72e4b
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2743
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
2020-06-09 07:38:10 +00:00
Shuhei Matsumoto
44ab133f70 example/nvmf: Fix the case when thread is terminated by communicating with other threads
As we have done for SPDK reactor, SPDK thread termination needs communication
among SPDK threads. So At application shutdown, create the while loop
until all threads are destroyed and in the loop, check each thread
is exited, and destroy the thread if exited or mark it as exiting
and retry checking after traversing other threads.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I7a1008b95f3303de17449d574e917eb47cbe54b5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2660
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-09 07:37:50 +00:00
WANGHAILIANG
90be351f87 lib/makefile: move vhost_user.c into lib/virtio directory
'make clean' can't remove compiled file in virtio_user directory.
So I move vhost_user.c into lib/virtio directory and fix it.

Change-Id: Ic7d41709d3a5d6cf2333c4deee285800b414a3fb
Signed-off-by: WANGHAILIANG <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2750
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-06-09 07:37:43 +00:00
Shuhei Matsumoto
c01fe4c530 bdev/delay: Abort all I/Os delayed to complete at reset I/O
Improve reset I/O to abort all I/Os delayed to complete by parsing
all channels. The generic bdev layer stops new I/O submission during
reset processing. So freezing/unfreezing channels is not necessary.

Additionally, clean up the code which run if I/O submission failed.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I63e1ba78971944558d9317b63befecd86a6d6b60
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1993
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-09 07:37:29 +00:00
Shuhei Matsumoto
bfc9ddde2d bdev/passthru: Support I/O type ABORT
Passthrough bdev module sets the passed bdev_io to the cb_arg of
the bdev_io submitted to the underlying bdev. Hence call
spdk_bdev_abort() with bdev_io->u.abort.bio_to_abort for the I/O
type ABORT.

Passthrough bdev module returns the supported I/O type of the
underlying bdev. Hence vbdev_passthru_io_type_supported() is not
necessary to change.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifb7627a92409649ab08ae233ba517fbc1bc55a9f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2799
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-09 07:37:29 +00:00
Shuhei Matsumoto
269f4a3c25 bdev/null: Support I/O type ABORT
As malloc bdev module supports I/O type ABORT, it will be helpful
if any bdev module other than NVMe bdev module supports I/O type
ABORT.

Update bdev_null_io_type_supported() to return true for
SPDK_BDEV_IO_TYPE_ABORT and update bdev_null_submit_request() to
try aborting the target I/O if queued.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4614c48840ef069a11991486d184d45789bc3000
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2798
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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-06-09 07:37:29 +00:00
Shuhei Matsumoto
e2d1dfb4fa bdev/malloc: Always return failure but support I/O type ABORT
Malloc bdev module does not manage submitted I/Os by any list,
and so cannot abort any submitted I/O. However malloc bdev module
can always fail any submitted abort request.

Hence let's update bdev_malloc_io_type_supported() to return true
for SPDK_BDEV_IO_TYPE_ABORT and update _bdev_malloc_submit_request()
to complete with failure for SPDK_BDEV_IO_TYPE_ABORT.

This will enable us to use delay bdev + malloc bdev to test I/O
abort feature conveniently.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If4c411f5ab8589291ac90c10264d3ef30c06df83
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2797
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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-06-09 07:37:29 +00:00
Michal Berger
8ddeccad58 vm_setup: Use pre-defined cmdline when compiling ref spdk on FreeBSD
The selected options are based on how CI runs the make test.

Change-Id: I71d7bc13250f0f4b5212eff4d13794979bcd4b6d
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2454
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-08 09:35:47 +00:00
Darek Stojaczyk
6fd492e3e0 test/rpc: remove $PWD requirement
Use context-independent paths instead. This allows running the
test from $PWD different than $rootdir.

Change-Id: Id3835aab46bcd473d3852e5e1e0d6b2c1d241b37
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2752
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
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>
2020-06-08 09:35:16 +00:00
Darek Stojaczyk
ba23cec182 rpc: don't allow starting RPC server on a TCP port
`-r` and `--rpc-socket` command line options will now require
path for a UNIX domain domain socket. The socket can be still
exposed over TCP with external programs. Hence, for (some)
compatibility reasons, the test scripts, jsonrpc-client, and
rpc.py will still be able connect directly via TCP.

Change-Id: I22a935f1596ce5f9c313b5be42cb85f772368c03
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/605
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
2020-06-08 09:35:16 +00:00
Darek Stojaczyk
8179b09e99 test/spdkcli/tcp: general cleanup
Polling for TCP connection seems cool, but it's a lot of code
that's impossible to debug. Rely on the same code inside rpc.py
instead. If the connection fails, rpc.py will give us the best
error message we can get.

Change-Id: I1ca99bb2256a38004269927b057335208cc5d968
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1333
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>
Community-CI: Mellanox Build Bot
2020-06-08 09:35:16 +00:00
Darek Stojaczyk
00b52bf5dd scripts/rpc.py: add new parameter to retry connecting
This can potentially replace waitforlisten() in our test scripts.

$ ./scripts/rpc.py -h
  -r CONN_RETRIES       Retry connecting to the RPC server N times with
                        0.2s interval. Default: 0
[...]

$ ./scripts/rpc.py -r 10 spdk_get_version
<SNIP the usual python exception>
rpc.client.JSONRPCException: Error while connecting to
/var/tmp/spdk.sock
Error details: [Errno -2] Name or service not known

real    0m2.452s
user    0m0.242s
sys     0m0.020s

Change-Id: I204da366360647fcce8f8de0eb25b0f576aabc5b
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2751
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-08 09:35:16 +00:00
WANGHAILIANG
8f0e8ff149 test/nvme: fix a multiple bdf error
If there are two or more Nvme SSDs in system, $bdf includes many bdfs.
Function get_first_nvme_bdf() have no effect on local phy servers.
nvme_rpc.sh will report error as below.

 09:16:06       # /home//spdk/scripts/rpc.py bdev_nvme_attach_controller -b Nvme0 -t PCIe -a 0000:03:00.0 0000:04:00.0
usage: rpc.py [options]
rpc.py: error: unrecognized arguments: 0000:04:00.0

Change-Id: I91be02b874fcc4ee4626c082b16d06e722797744
Signed-off-by: WANGHAILIANG <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2715
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-08 09:34:58 +00:00
Dayu Liu
415abe87fc check_format: fix pattern error of regular expression
In a few tools or languages, slash(/) is maybe a delimiter by default in regex.
An unescaped delimiter must be escaped with a backslash (\).
Otherwise the pattern of regular expression will be error
when delimiter is slash(/) in a few special environment, i.e. in MinGW32 git bash.

Signed-off-by: Dayu Liu <liu.dayu@zte.com.cn>
Change-Id: I73b556416b98e135eb240078dcc68f80e08c5e74
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2488
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-08 09:34:35 +00:00
Maciej Szwed
ade2aa25ac doc: Add description for pluggable RPCs
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Iddc4d592aa3a750cb0a977ec9c5257518626e27b

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2420
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2020-06-08 09:34:26 +00:00
Michal Berger
623c3bc62b rxe_cfg: Fix reporting for net devices with >10G speed
Change-Id: I1bb68d0f5bbc1255671bbeefc98a8d65f66b5918
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2783
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-06-08 09:34:18 +00:00
Seth Howell
4521e05b35 doc: add library documentation.
This user guide details the SPDK library structure,
naming and versioning conventions, and instructions for
use.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I1a7ec422730ba169662de76847c77b9433cc3b04
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2404
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@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: Mellanox Build Bot
2020-06-08 09:33:58 +00:00
Shuhei Matsumoto
972b3ae3aa lib/bdev: Use not SPDK thread count but core count for mempool cache size
Cache size of mempool is not based on SPDK thread but DPDK thread,
i.e. CPU core. So replace spdk_thread_get_count() by
spdk_env_get_core_count() to determine cache size of mempool in
spdk_bdev_initialize().

Besides, allocate and free stub cores at the corresponding unit tests.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Icc4deae84c74820af4de61e991fa3f8683add058
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2767
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-08 09:33:50 +00:00
Darek Stojaczyk
433223865e Update to intel-ipsec-mb v0.53
From v0.52 to v0.53. The new DPDK build system depends on some
defines only available in v0.53 and up.

Change-Id: Ibd7a985bcc99e0f6a43abc6ba846796fba37e09e
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1455
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-08 09:33:42 +00:00
Darek Stojaczyk
da2aa2aca0 test/nvme/hotplug: create QEMU host drives at startup
We used to create them at runtime with QEMU monitor, but
they can be created just once at startup. While here, start
using loops in bash to create/modify 4 equal drives.

Change-Id: Ie73ba3496a1cfb5d5a173118d331d90eee713270
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2144
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-08 09:33:35 +00:00
Darek Stojaczyk
85d0f9a83a test/nvme/hotplug: don't copy unnecessary files to the VM
This cuts down even 10 seconds. We only need a few binaries and spdk
./scripts directory on the VM, not all SPDK sources.

Change-Id: If63bdaec9ee4cf3f42ab7fce1bf107847580dbf7
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2145
Community-CI: Mellanox Build Bot
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-06-08 09:33:35 +00:00
Maciej Wawryk
90190aef02 scripts/pkgdep: Add clearlinux dependencies for spdk cli
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I6c8d705e98d901cb79b6ed66804046bc2ad06e57
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2773
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Community-CI: Mellanox Build Bot
2020-06-08 09:33:15 +00:00
Shuhei Matsumoto
8d4b319c98 lib/bdev: Change completion status of I/O aborted by reset from FAILED to ABORTED
Using not FAILED but ABORTED for the completion status of the I/Os
aborted by reset will be reasonable and is done in this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8c8181dd33453a330888cffa93505e6fc462f278
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2708
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
5bc400f382 lib/bdev: Add spdk_bdev_io_get_cb_arg() to get cb_arg of bdev_io
bdev_io is passed to the callback to the timeout I/O, but the context
of bdev_io is stored in cb_arg and spdk_bdev_abort() needs cb_arg.

Hence add an new helper function, spdk_bdev_io_get_cb_arg(), to get
cb_arg of bdev_io.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5eb25ffdad2467c55a1b55f8cf0accef8799bb4b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2621
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
97a5ea5796 lib/bdev: spdk_bdev_abort supports I/O splitting
The last patch ensures that the parent I/O terminate with failure
before continuing splitting process if one of child I/O failed.
This simplifies abort operation for I/O splitting.

Then we can use bdev_abort() and bdev_abort_io() nestedly.

Add necessary unit test together.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I562bb6675f1fa380bc53dbe369138317ead66fe0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2235
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
089d178abb lib/bdev: Terminate parent I/O with failure immediately if one of child I/O failed
Previously, bdev_io_split_done() had continued splitting process
even if the status became failed. To abort split I/O, this patch
changes bdev_io_split_done() to terminate with failure before
continuing splitting process if the status became failed. Add
necessary unit test together.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifd1ea49c22523e8c06fb45ebdcb2c84a57afd2ef
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2234
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
fc3e40618c lib/bdev: Add all submitted I/Os to the list including any I/O generated by splitting
This is a preparation to abort split I/Os. To abort any I/O by
bio_cb_arg, they have to be managed by the submitted I/O list.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9459d9d2d3511aad0325dcc20d88610444a4ea04
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2231
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
29f86a2630 lib/bdev: spdk_bdev_abort supports queued I/O due to buffer allocation
Buffer allocation is done after redirection to the QoS thread.
Hence add a new helper function bdev_abort_queued_io() and add
its call to bdev_io_do_submit() for both buf_need_small and
buf_need_large.

For zcopy API, buffer allocation is done before buffer allocation
but the caller can get bdev I/O object, and can abort the I/O
directly if needed.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2d6170de5ab2ba4d260df99db3e376c0e2c5ffaf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2250
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
c2ce2f8540 lib/bdev: Rename bdev_abort_buf_io by bdev_abort_all_buf_io
Current bdev_abort_buf_io() aborts all queued I/Os due to buffer
pool capacity, and we want to use the name for the new function
which aborts only the specified I/O if queued. So rename
bdev_abort_buf_io() by bdev_abort_all_buf_io() in this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I50a4ef1f5c4d2f8db9a0781413520345a7f13e59
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2395
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
0d31e2bae6 lib/bdev: spdk_bdev_abort supports queued I/O due to out of memory
Add abort queued I/O due to out of memory into bdev_io_do_submit().
Any bdev I/O is queued due to out of memory only on the submitted
channel.

Aborting queued I/O due to out of memory is necessary only if
shared_resource->nomem_io is not empty.

Checking if shared_resource->nomem_io is not empty has been done
in this function.

However add the abort operation without and before checking if
shared_resource->nomem_io is not empty because the following patch
will abort queued I/O due to buffer pool capacity.

The purpose is to improve readability by consolidating all abort
operations into a single place.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I69a40f096aff13b84c1ed345fa8bd0dd80cef0e1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2249
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
f048f3d3d3 lib/bdev: spdk_bdev_abort supports the case when QoS is enabled
When the target I/O is controlled by QoS, the abort request is
submitted on the same channel that the target I/O is submitted.

By using this, add a helper function bdev_abort_queued_io(), and
change _bdev_io_submit() to call bdev_abort_queued_io(), and
call _bdev_io_complete_in_submit() with success if bdev_abort_queued_io()
returned true when QoS is enabled on the corresponding channel.
Add necessary unit test together.

Update unit test accordingly, especially, update stub_submit_request()
to abort the matched I/O, update io_during_io_done() because we need to
know not boolean but the exact completion status now, and update
basic_qos() to reset the rate limit to test the abort I/O feature.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I16ca21e7c32cabfdce5d0e5c27a8af8bb00f11c5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2230
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
5771019fc0 lib/bdev: Factor out bdev I/O complete operation in _bdev_io_submit()
The following patch will add another spdk_bdev_io_complete() call
in _bdev_io_submit(). Then, factoring out set/clear in_submit flag,
incrementing counts and calling spdk_bdev_io_complete() into a helper
function will be simpler.

in_submit flag is set and clear in bdev_io_do_submit() anyway,
and bdev_qos_io_submit() needs in_submit flag only for
bdev_io_do_submit().

All cases to call spdk_bdev_io_complete() in _bdev_io_submit() are
not performance critical.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibb783d7d001a9c36e61d791c664c67fdc46a09e2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2386
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
339a0419d3 lib/bdev: Rename bdev_abort_queued_io by bdev_abort_all_queued_io
Current bdev_abort_queued_io() aborts all queued I/Os, and we
want to use the name for the new function which aborts only the
specified I/O if queued. So rename bdev_abort_queued_io() by
bdev_abort_all_queued_io() in this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2125d91bffc870a0a4be4bb74037c1d27bce2d36
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2385
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
8889f7b7f4 lib/bdev: Add SPDK_BDEV_IO_STATUS_ABORTED to notify the upper layer correctly
The I/O aborted by the abort command should be completed with SC = 07h, i.e.,
"Command Abort Requested". However, if the generic bdev layer or non-NVMe
bdev module aborted the I/O, the aborted I/O would complete with SC = 06h, i.e.,
"Internal Error". To fix this unexpected behavior, add an new I/O status
SPDK_BDEV_IO_STATUS_ABORTED and update spdk_bdev_io_get_nvme_status() to
set SC to 07h if the I/O status is SPDK_BDEV_IO_STATUS_ABORTED.
If the NVMe bdev module aborts the I/O, the I/O status is set to
SPDK_BDEV_IO_STATUS_NVME_ERROR and SC is set as expected.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifc99a97248a8d54a8c8d2fab74a90c7ce99c2e6e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2582
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-08 09:28:27 +00:00