These returns at the end of functions, so remove them.
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I1f54d812956727e1871f4879c8bc9a526d7d14c5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2848
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
The implementation of Calsoft case tc_login_29_1
is wrong. We should return "Irrelevant" to the initiator
when Session type is discovery.
Also also update the known failure test cases of
Calsoft.
Fixes 958.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I38cd2cf39bf80fd025ab74bc9dfe6ac412d01328
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2846
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
The plan is to push the logic that assigns qpairs to poll groups down
into the nvmf library. To do that, we'll need to have a list of the poll
groups.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Iea59ac1a439dbd1bcae68fb2977a47a855884a15
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2811
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
'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>
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>
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>
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>
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>
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>
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>
`-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
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
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>