Commit Graph

4011 Commits

Author SHA1 Message Date
Karol Latecki
73d398dd29 test/nvme-perf: refactor preconditing step
Move all related steps to common.sh/preconditioning() function
so that everything is in one place.

Change-Id: I253a185a5c16e9ba31c84aa945f6c3033f80d53f
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479815
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: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-01-16 09:21:18 +00:00
Karol Latecki
b5069cd01d test/nvme-perf: make date variable global
This variable was hidden as lowercase var at the
very end file while in fact it's used as global in the
main script.

Change-Id: I68d53d953a63a3f53a3129f1817c7108a38da4bc
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479814
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: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
2020-01-16 09:21:18 +00:00
Karol Latecki
49975f19c1 test/nvme-perf: reorganize perf script options
Reorganize help message and variables by grouping related
parameters together. Makes it easier to read.

Change-Id: I7d9f44d7cdfebefcaf7a1395a3aafb8b29fd6345
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479813
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: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-01-16 09:21:18 +00:00
Karol Latecki
a44dfbea1d test/nvme-perf: make global variables uppercase
Change-Id: I75dce3c594c95d9418ac7025a00096cc60fb307e
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479812
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: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-01-16 09:21:18 +00:00
Tomasz Kulasek
3cca1b3673 test/nvme: handle errors for nvme-cli tests
Change-Id: I409da2520fd20c7b572e9ac9424c4ff468d0e878
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478613
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-01-16 09:20:20 +00:00
Jacek Kalwas
708ed4fb6e nvmf: pass listen done cb to transport specific code
This would allow to respond for add listener rpc request even
when there are async calls in transport specific function.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I94a9f45b7ba9e8d46a60ae3785953cea12554732
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479511
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: 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: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-16 09:18:38 +00:00
Shuhei Matsumoto
29e5c544c0 test/nvmf: Leave 2 seconds before starting the next shutdown test case
On the target side, disconnection process is asynchronous and ack is
sent to the initiator before completion.  This has caused latent
failure in a test case.  As a workaround, leave 2 seconds before
starting to the next test case for now.  Better solution will be
followed and so we don't care much about the location to insert
sleep.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id49349e3b7303ef9523b73d7a04d4e9837246c44
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479102
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-16 09:16:52 +00:00
Shuhei Matsumoto
f594537a48 bdevperf: Reset g_run_rc to 0 after sending RPC reply
When RPC kicks the test and the test results in error, RPC response
should return error but bdevperf application should not return error.

RPC can kick the test multiple times, and if RPC kicks the test again
and it completes normally, RPC response should return success.

So reset g_run_rc to 0 after sending RPC response.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I59a7c06a293ba7f7b5caa8171bcfb54d736524da
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479914
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-16 09:16:52 +00:00
Shuhei Matsumoto
9b36011acc bdevperf: Hold io_target_groups until exiting bdevperf
Previously bdevperf_free_targets() had freed not only io_targets
but also io_target_groups.  This had made repeated runs by RPC
impossible.  This patch series will fix this issue later but we
cannot wait for that and fix the issue now.

Fixes #1139.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I88cf5725579b704bc3826bd4c0b2dd9f4e70db30
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479912
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-16 09:16:52 +00:00
Shuhei Matsumoto
116a4afcc3 bdevperf: Unregister pollers immediately when target exits with error
_target_gone() and end_target() do almost same operations.  We had
not unregistered  pollers at the cases that sets target->is_draining
to true. The later had hit assert when the test ended with I/O error
before completion because when target->run_timer is expired,
end_target() would be called after target is freed.  Hence we do
both in this patch.

Factor out the operations from _target_gone() and end_target() into
a helper function.

Then, when the target exits with error, unregister pollers of the
target immediately by replacing setting target->is_draining to true
by _end_target(target). We had seen the assert for a single case
but apply the fix for all cases.

Fixes issue #1140

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If39779817ed99c9441e368c1d4512c66d13d3378
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479911
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>
2020-01-16 09:16:52 +00:00
Mateusz Kozlowski
c3e3e81a50 bdev/zone: Get zone info
Added handling of get zone info command

Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Change-Id: I2d80885af83345c945af22a46a41abf55e1eb413
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468036
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: 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: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-16 09:13:55 +00:00
Kozlowski Mateusz
3ba5dd2852 bdev/zone: Per zone information
Added zone specific information during initialization (starting LBA,
capacity etc.)

Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: If0599960f0f872117691c801dce497649da20da6
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468034
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
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>
2020-01-16 09:13:55 +00:00
Kozlowski Mateusz
214483e834 test/zone: Cleanup mocked rpc request handling
Unify function names and memory handling for create/delete rpc mock
functions in unit test for block zone bdev.

Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: Ib8613a78623279447cd5a6b9cf0c686e15b69d32
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479644
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
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>
2020-01-16 09:13:55 +00:00
Kozlowski Mateusz
351c38d570 bdev/zone: Add helper function for unit test
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: I9853d49299ca4e566dc60da321919493e0e7c32f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479541
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-16 09:13:55 +00:00
Ziye Yang
d1a8a7bee1 sock: Add a priority parameter in SPDK_NET_IMPL_REGISTER
Purpose: Prepare for setting priorities for different
kernel based sock implementations.

The g_net_impls list is maintained in decreasing order
according to the priority of each sock implementation.

For examaple, if there are 3 sock implementations, i.e.,
posix (priority = 0), vpp (priority = 1), sock_ut (priority =2),
then the list will be maintained as:
sock_ut -> vpp -> posix.

Then if users use spdk_sock_open/listen with impl_name as NULL,
then the order to try is: sock_ut, vpp, then posix

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I43899de5bac14751ab060a11eb814cd7a0a83cc6
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479488
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>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-16 09:11:32 +00:00
Ziye Yang
0bfaaace8f sock: Add impl_name parameter in spdk_sock_listen/connect.
Purpose: With this patch,

(1)We can support using different sock implementations in
one application together.

(2)For one IP address managed by kernel, we can use different method
to listen/connect, e.g., posix, or uring. With this patch, we can
designate the specified sock implementation if impl_name is not NULL
and valid. Otherwise, spdk_sock_listen/connect will try to use the sock
implementations in the list by order if impl_name is NULL.

Without this patch, the app will always use the same type of sock implementation
if the order is fixed. For example, if we have posix and uring together,
the first one will always be uring.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ic49563f5025085471d356798e522ff7ab748f586
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478140
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@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: Jim Harris <james.r.harris@intel.com>
2020-01-16 09:11:32 +00:00
Seth Howell
f6cf92a31f lib/nvme: make transport.c use fn tables.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ida58785784b4ed50393e1d43a9cd902de74a2eaa
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478873
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-01-16 09:10:38 +00:00
Seth Howell
e4eef6975c lib/nvme: add function tables for all transports.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I4e7af1c42a19346f4abcb17910a41f8104a2de1b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478871
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-01-16 09:10:38 +00:00
Seth Howell
5cddf93b47 test/nvme: add common_stubs.h file.
A lot of the stubs between these transports will end up being common.

Change-Id: Ib9c8ff947b95f34633eb13953405d3153a7f4ac7
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479602
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>
2020-01-16 09:10:38 +00:00
Seth Howell
771d759312 lib/nvme: add spdk_nvme_transport_available_by_name
This new api function will enable us to work with custom transports.

This is needed to enable properly parsing and comparing custom transport
IDs that may all resolve to the same enum value.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I26aa3cb8f76f8273f564799d9b2af8041ea0d219
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478752
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-01-16 09:10:38 +00:00
Seth Howell
f038354efa lib/nvmf: enable pluggable NVMe-oF transports.
Change-Id: If1fd7d6c2385f42ca32dea0f8ecb528a60778d40
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477504
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-16 09:10:38 +00:00
Seth Howell
b397546e9d lib/nvmf: get_transport now takes a string.
This function previously accepted a trtype enum, but needs to be able
to accept a string to support custom transports.

Change-Id: I931aed30ca3be65468552ffa1bb1ef3f91275fda
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479601
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: Jim Harris <james.r.harris@intel.com>
2020-01-16 09:10:38 +00:00
Seth Howell
5b3e6cd137 lib/nvmf: opts_init and transport_create use string now.
This will help enable pluggable NVMe-oF transports.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I1947cc2e6e4ff078609f8bdbbdfefc5b110674c2
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478753
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
2020-01-16 09:10:38 +00:00
Seth Howell
a050dcf21d lib/nvmf: add a default value to trtype enum.
For custom transports, we should use a range outside the spec value
to identify them.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I82b29c349e143b8906f79ce2de818def116a3fe4
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478747
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-16 09:10:38 +00:00
Seth Howell
7ed0904b9b lib/nvme: update trid struct with trstring.
The trtype should be stored as both an enum and string. This is intended to
help pave the way for pluggable NVMe-oF transports.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I6af658d7a17c405e191ff401b80ab704c65497e7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478744
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: Alexey Marchuk <alexeymar@mellanox.com>
2020-01-16 09:10:38 +00:00
Maciej Wawryk
19e48a66a4 test: Shellcheck - correct rule: Iterating over ls
Correct shellcheck rule SC2045: Iterating over ls output is fragile. Use globs.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I436878774d6f86c23b1c5cf5220da297053f03e2
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477397
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-15 14:30:06 +00:00
Maciej Wawryk
a291cb0606 test/vhost: fix parted error
Vhost nightly test fails on Error: Partition have been written, but
we have been unable to inform the kernel of the change, probably
because it/they are in use.

Closes #1090

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Iafd051e02b3dd32ede8a62c69c7079a0facade0c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476639
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-15 14:28:51 +00:00
Konrad Sztyber
aac65dcfd8 test/unit: remove vhost dependency from ftl tests
The tests were only built if CONFIG_VHOST was enabled, which doesn't
make sense, as they're not related to vhost in any way.

Change-Id: Idb151b3bdf8c5f2a90357e41099528b10a98f331
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481505
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-01-15 13:37:19 +00:00
Maciej Szwed
ca0eeaab21 unit/bdev: Unit tests for spdk_bdev_comparev_blocks.
These are unit tests for non emulated version of
spdk_bdev_comparev_blocks function.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I459ac614e1a03e42b9d584aaa907a1448a13d16e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478969
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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>
2020-01-15 12:25:26 +00:00
Maciej Szwed
3eda8bf6d3 unit/bdev: Extract common code for comparev tests
Upcoming patch will use most of the comparev test code
so let's reuse it.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479832
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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>
2020-01-15 12:25:26 +00:00
Maciej Szwed
bee042e431 unit/bdev: Add SPDK_BDEV_IO_TYPE_COMPARE to g_io_types_supported
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I509947d7b5a2139c9f721dc55e80d9eb8e744bd6

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478949
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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>
2020-01-15 12:25:26 +00:00
Maciej Szwed
77183c9c80 unit/bdev: Unit tests for spdk_bdev_comparev_blocks (emulated)
This patch adds test for spdk_bdev_comparev_blocks
function. For now it tests only emulated compare
operation. For native compare call will be created
separate patch.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478948
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-15 12:25:26 +00:00
Maciej Szwed
393afcb1d6 nvme: Unit test for spdk_nvme_ns_cmd_comparev_with_md
This is vectored version of test_nvme_ns_cmd_compare_with_md
test.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478947
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>
2020-01-15 12:25:26 +00:00
Wojciech Malikowski
f2c8083ef3 lib/ftl: Functional tests
This patch adjust functional tests to
new FTL stack.

Change-Id: I0b8ff08c61793d7f1685942031aecf9cc88d1f24
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468738
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-15 12:24:44 +00:00
Wojciech Malikowski
151e37cfaa bdev/ftl: Examine config support
Bdev FTL is dependent on base bdev and cache
bdev. Allow for examine config if dependent
bdevs are not ready during bdev FTL creation.

Change-Id: I917994d7015f3b74a29ccd066f0c6989ad3c1c4e
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471375
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-15 12:24:44 +00:00
Wojciech Malikowski
843f296e2e lib/ftl: Replace Open Channel dependencies with zone bdev API
This patch replaces NVMe Open Channel API usage
inside FTL library with corresponding zone bdev
API calls. This include following calls:
 - spdk_nvme_ctrlr_cmd_get_log_page -> spdk_bdev_get_zone_info
 - spdk_nvme_ocssd_ns_cmd_vector_reset -> spdk_bdev_zone_management
 - spdk_nvme_ns_cmd_read -> spdk_bdev_read_blocks
 - spdk_nvme_ns_cmd_write_with_md -> spdk_bdev_write_blocks

Change-Id: I1b5a6863d9ce72f4af1cfbb0e449fc1a5b638144
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479702
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-15 12:24:44 +00:00
Tomasz Zawadzki
72f6c8086a ut/blob: check for clone count in blob_snapshot UT
Previously this UT was only checking the snapshot counts.
This was correct, but since the blobs in this tests are
clones of each other - it would make sense to check it as well.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Id9dec7f0a292cbb52da8196bfc77679fc0f49d8b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478976
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-01-14 17:13:15 +00:00
Jim Harris
ae43c81a30 bdev: add spdk_bdev_comparev_and_writev_blocks
We will only support a vectored variant of
compare-and-write for now.

This does no locking for now.  Ii will be added
in a separate patch.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5bd075c912de60090e19cf8fced19c4879fcc900
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475941
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-14 07:51:45 +00:00
Jim Harris
2a2b7296ee bdev: do not allow overlapped locked ranges
We can't allow overlapped locked ranges - otherwise
two different channels could be deadlocked.

So add a pending_locked_ranges to the bdev.  When we
start a lock operation, check if the new range overlaps
one that's already locked.  If so, put it on the pending
list.  When an unlock operation completes, we will
check if any pending ranges can now be locked.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478537
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-01-14 07:50:26 +00:00
Jim Harris
ebd1a4f76c bdev: inherit locked ranges for new channels
Keep a mutex protected list of the active locked ranges
in the bdev itself.  This is only accessed when a new
channel is created, so that it can be populated with
the currently locked ranges.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477871
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-14 07:50:26 +00:00
Jim Harris
b90b7ce477 bdev: queue new IO that overlap a locked region
Add an io_locked TAILQ to each channel, which hold
IO that will write to a currently locked region.

Also add a new step to the locking process per channel.
Each channel needs to wait until all existing outstanding
writes to the newly locked range have been completed.

Only the channel that locked an LBA range may submit
write I/O to it.  It must use the same cb_arg for the
write I/O as the cb_arg used when locking the LBA range.
This ensures that only the specific I/O operations needing
the lock will bypass the lock.

When a range is unlocked, we will just blindly try to
resubmit all IO in the io_locked tailq.  This could be
made more efficient in the future, but we don't expect
this path to occur very often, so going for simplicity
in the first pass.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478226
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-01-14 07:50:26 +00:00
Jim Harris
d84a88c1a0 bdev: add base infrastructure for locked lba ranges
This adds new internal APIs bdev_lock_lba_range and
bdev_unlock_lba_range.  To start, these APIs will
manage dissemination of lock/unlock requests to all
existing channels for a given bdev.  This does not
yet interact at all with any I/O sent to the channel.

Future patches will check new I/O to see if they
are trying to write to a range that is locked.  Future
patches will also ensure we do not have overlapping
ranges active at once.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I6d5b1cc84b41a7adc2a3c5791c766bb77376581f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478225
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-01-14 07:50:26 +00:00
Jim Harris
b87080efa2 bdev: add lba_range and overlapping checks
This will be used by upcoming patches for implementing
LBA range locks.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478224
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-01-14 07:50:26 +00:00
Seth Howell
a571eb03e9 test: move report_test_completion into run_test
This also requires us to change the create_test_list function to rely on
the run_test function for creating the canonical test list.

Change-Id: Ib35e7752935a3ac83de2702b6dfbd42539027f6a
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476962
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-14 07:49:08 +00:00
Seth Howell
2f476a638f autobuild.sh: simplify and unify test suite.
We have added a lot of flags to this script over time to try and shorten
parts of it that take a long time or modify the way we make and
whatnot.

In the test framework today we really have two settings, we either want
to run the entire autobuild package with all the bells and whistles, or
we just want to make the code and get on with the rest of the tests. I
believe this change can save between 1 and 3 minutes on each of the
functional test suites.

Change-Id: I7519e8320aa16b57f09f633f866dc36cb494aa80
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478483
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-14 07:49:08 +00:00
Seth Howell
cbc1e069ee configure: allow cuncurrent build of RBD and reduce
This was disabled in configure because at one time there was an ISA-L
dependency break between the RBD libraries and our own submodule.
It seems that the dependency break was fixed a while ago, but the check
to not allow one to build with the other was never removed.
Unfortunately, I don't have the details on what that fix was.

Either way, this compilation works now.

Change-Id: Ic249791549dae36c7279114d67e77be94e842ddf
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479726
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-14 07:49:08 +00:00
Pawel Kaminski
8d4ecf1e22 test/vhost: Fix. vm_run takes vm numbers as separate arguments.
In patch fdc82d3 'vm_run $@' was changed to 'vm_run "$@"' but
arguments like 'vm_run "0 1"' should be passed as
'vm_run 0 1'.

Change-Id: I2a51a31fc0b0b55079963b11587be55d9bf86a87
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476087
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-01-13 12:45:04 +00:00
Tomasz Zawadzki
159703c9dc ut/blob: added poll_threads() after deleting blob
For deletion to actually deliver results, poll_threads()
has to be called.

g_bserrno came from previous API call, not delete itself.

This patch fixes it so that g_bserrno is from the delete itself.

Next patch in series adds checks for number of clones.
Having such checks in first place,
would allow to notice lack of poll_threads() here before.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I3477f5c5b99106b70ee3d5706906a4dc94283180
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478975
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-10 08:47:13 +00:00
richael zhuang
858df2692e test: fix error when running vhost_test.sh
Met error "touch: cannot touch './timing.txt': No such file or
directory" when running vhost_test.sh. For the working directory
is removed in "vhost_kill 0", And then "timing_exit clean_vhost"
will fail to touch timing.txt in the removed directory.

Signed-off-by: richael zhuang <richael.zhuang@arm.com>
Change-Id: I2d0818b1228ebfd6767c258a0f4c1fbbfc728016
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479482
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-01-10 08:47:01 +00:00
dongx.yi
ee15ba45fb test/nvme: Fix confliction of core 0.
Reset core mask is 0x1 and stub core mask is 0xF.
Avoid to use core 0 both apps.

Fixes issue #1134.

Signed-off-by: dongx.yi <dongx.yi@intel.com>
Change-Id: Ic423ec03896e38cf748929e458922f73dd2a7241
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479771
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-10 08:46:48 +00:00
Darek Stojaczyk
c96cefbfd7 test/lvol: rewrite construct_lvol_bdev_name_twice to bash
Change-Id: Ice91dbec4c2d09b6a056711b7a0c6b29b20476cc
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459676
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-01-10 08:46:07 +00:00
Darek Stojaczyk
c997d12694 test/lvol: rewrite construct_lvol_bdev_on_full_lvol_store to bash
Change-Id: I789c13f6613180b0d9becca035ea4055fa3ee321
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459675
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-01-10 08:46:07 +00:00
Darek Stojaczyk
ba43a0b3ce test/lvol: rewrite construct_logical_volume_nonexistent_lvs_uuid to bash
Change-Id: I1223de42f328d16864e49e795efb4b81f0c5ba17
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459674
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-01-10 08:46:07 +00:00
Darek Stojaczyk
cf510c7047 test/lvol: rewrite construct_lvol_bdev_duplicate_names_positive to bash
Change-Id: Ib0d0b685582913deb2a6ce09f2753fc6a1288630
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459673
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-01-10 08:46:07 +00:00
Pawel Kaminski
0db73d0975 test/lvol: Fix - improve checking failed commands
Instead of using "!" use rpc_cmd && false to check
that command should fail but succeded

Change-Id: Ied564c13b96ea6d4a45aab1460b3323edd1d9554
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478328
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-01-10 08:46:07 +00:00
Wojciech Malikowski
0637e2d9be lib/ftl: Rename ftl_dev_num_bands() to ftl_get_num_bands()
This patch is part of name refactoring associated
with moving FTL to work with zone bdev API.

Change-Id: Ia4c6ec7b245600bca895f7802fb7f68c8d0400e4
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479845
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2020-01-10 08:42:51 +00:00
Wojciech Malikowski
2c2a005695 lib/ftl: Rename ftl_dev_num_punits() to ftl_get_num_punits()
This patch is part of name refactoring associated
with moving FTL to work with zone bdev API.

Change-Id: I9e0a569e9dfd0e8b8236c0840ce10b92362c4996
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479844
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2020-01-10 08:42:51 +00:00
Wojciech Malikowski
3ff9d6e45b lib/ftl: Rename ftl_dev_lbks_in_zone() to ftl_get_num_blocks_in_zone()
This patch is part of name refactoring associated
with moving FTL to work with zone bdev API.

Change-Id: I09f671a9c6539cc259c297514b24978587c9b392
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479673
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2020-01-10 08:42:51 +00:00
Wojciech Malikowski
3725b4484a lib/ftl: Rename ftl_num_band_lbks() to ftl_get_num_blocks_in_band()
This patch is part of name refactoring associated
with moving FTL to work with zone bdev API.

Change-Id: I09781323b2ee25dbcee61eecf95ce7eca703ab93
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479672
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2020-01-10 08:42:51 +00:00
Wojciech Malikowski
1735a0acd3 lib/ftl: Remove position from ftl zone structure
There is no need of tracking position of zone inside
band.

Change-Id: I1488f23ccfd1f7eee1bd85fdb7ef8ace08ffca40
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468347
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: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
2020-01-10 08:42:51 +00:00
Wojciech Malikowski
04f754d419 lib/ftl: Remove ftl_punit structure from device
ftl_punit is not needed anymore.

Change-Id: I90f22b980f8e0436e8c899941dddb20b13167766
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468346
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: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
2020-01-10 08:42:51 +00:00
Wojciech Malikowski
7ef136d3f4 lib/ftl: Remove punit from ftl_zone struct
Parallel unit is not needed anymore in ftl_zone
structure.

Change-Id: Ie8d78e3ccf64db84aff19ad2ce11e662d4f3f724
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468345
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-10 08:42:51 +00:00
Wojciech Malikowski
aea8e78df2 lib/ftl: Consume whole underlying OCSSD device
Moving to zoned bdev API will not allow to setup
physical range of underlying device so we need to
remove such capabilities from ftl device.

Change-Id: Ia807a11e992a221fce906d4ab122a6c3b1391280
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467949
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-10 08:42:51 +00:00
Wojciech Malikowski
52a9661d94 bdev/ftl: Remove punit parameter from ftl bdev configuration
FTL library is consuming whole OCSSD device
so punit parameter is not needed for bdev ftl
configuration.

Change-Id: I56f62ea6d09b3157b70c02ccfffcd3cb07ba4597
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467950
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2020-01-10 08:42:51 +00:00
Wojciech Malikowski
e47e16d3a4 lib/ftl: Replace ftl_ppa struct with ftl_addr
FTL working on top of zoned bdev doesn't need
physical page address (PPA) anymore.
ftl_ppa was replaced with ftl_addr which represents
zoned device addressing schema.

Change-Id: Ied5750a7ab2f4ce42067ff3e69c1f26f85f5022a
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467633
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
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>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2020-01-10 08:42:51 +00:00
Wojciech Malikowski
748785c2a9 lib/ftl: Change ftl_ppa fields to be zone specific
Remove some Open Channel dependencies from ftl_ppa struct.

Change-Id: Ic088b84c56a928906c6c01c6ef74e69be6d0107f
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479549
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-10 08:42:51 +00:00
Wojciech Malikowski
7083fa3e35 lib/ftl: Remove group from ftl physical address
ftl_ppa address do not need to expose group
information when FTL will move to zones API.

Change-Id: Iece1b32f9bcd8985260668c953089eb9951f13cc
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467603
Community-CI: SPDK CI Jenkins <sys_sgci@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: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-10 08:42:51 +00:00
Seth Howell
39fe5c849b autotest_common: fix xtrace_restore_enable
My previous patch enabling this to be called recursively didn't
take into account that a single call to xtrace_restore would
override multiple levels of xtrace_disable nesting. This change fixes
that.

fixes: 190b2245c5

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I2167ba460e68223c9426b3d71e9c17019f947924
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478959
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-08 15:46:18 +00:00
Shuhei Matsumoto
71600c57b3 bdevperf: Add struct spdk_bdevperf and allocate its global instance
Add struct spdk_bdevperf and include header of io_target_group list
in it, and then allocate its global instance g_bdevperf statically.
Rename g_head by groups for clarification.

The next patch will register g_bdevperf as SPDK IO device and
allocate io_target_group as context of the corresponding IO channel.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6755ce8cc05b00cbc0d5dc7983ec01fe3483f4cf
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478779
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-01-08 09:12:35 +00:00
Shuhei Matsumoto
679f6d6e3c bdevperf: bdevperf_fini() and rpc_perform_tests_cb() refer g_run_rc directly
Remove a parameter from bdevperf_fini() and rpc_perform_tests_cb()
and they refer g_run_rc directly.  This is a preparation to the next
patch to avoid introducing any dynamically allocated context.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I42f1c7e8bc662799b3fcbf2769139174bb527314
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478834
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-08 09:12:35 +00:00
Shuhei Matsumoto
ceaee98aa9 bdevperf: Extract and inline bdevperf_free_targets() into bdevperf_test_done()
We don't have ordering constraint between bdevperf_free_targets()
and sending RPC response. So extract bdevperf_free_targets() from
bdevperf_fini() and rpc_perform_tests_cb() and inline it into
bdevperf_test_done(). As a result of this change, bdevperf_fini()
calls just spdk_app_stop(), but is still necessary in the subsequent
patches. So keep bdevperf_fini().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie8ed2d04db754b8a265296932f73d3a602d1f90b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479373
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-08 09:12:35 +00:00
Shuhei Matsumoto
411f1c90c6 bdevperf: Factor out finish operation of command line and RPC invocation
Factor out test finish operation of command line invocation case and
RPC invocation case.  Then apply the new funciton bdevperf_test_done()
to all calls bdevperf_fini() or rpc_perform_tests_cb().

The purpose of this refactoring is as follows:
- Consolidating finish operation improves code readability and
  maintainability, and may enable further improvement in future.
- The next patch will consolidate bdevperf_free_targets() from
  bdevperf_fini() and rpc_perform_tests_cb() into bdevperf_test_done().
  This refactoring is a preparation.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I06801541e4c4ed28774debad56d901dbeb5a9193
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479372
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-08 09:12:35 +00:00
Shuhei Matsumoto
95754cd170 bdevperf: Reorder state checks in spdk_bdevperf_shutdown_cb()
io_target_group manages io_targets, and hence checking g_head
should be done earlier than checking g_target_count.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I112018d8f487b387ae5f4f444a342be2c8da167d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479350
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-01-08 09:12:35 +00:00
dongx.yi
1044fe25e6 test/unit: Add set_host_id_cmds to unittest.
This function was ignored and a little different from others.
Add this to increase code coverage rate.

Signed-off-by: dongx.yi <dongx.yi@intel.com>
Change-Id: I35b51feb8894aca54a3b21436bc21ec12e37adf7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475814
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-08 09:12:10 +00:00
Maciej Szwed
80da95481b unit/bdev: Rename stub_submit_request_aligned_buffer
Rename stub_submit_request_aligned_buffer function
to stub_submit_request_get_buf and its callback function
to stub_submit_request_get_buf_cb.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478944
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
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>
2020-01-07 12:31:32 +00:00
Tomasz Kulasek
1c5d980300 lib/nvme: add hw support for fused operations
Change-Id: I2a184a2d60f18439947afa2d4855d51b92ed282e
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476137
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-01-07 12:31:32 +00:00
Seth Howell
8209c8cfa0 lib/nvmf: rdma qpairs now store device, not port.
The only reason the qpair ever uses the port is to get to
the device attributes so skip the middle man.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ib14a97ceaa0c49176027d6c35c5cb2787a845cc1
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478961
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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>
2020-01-07 12:21:36 +00:00
dongx.yi
94f2def65a test/unit: Add nvme_uevent_ut.c to unittest.
Add nvme_uevent_ut.c to unittest, and test parse uevents.

Signed-off-by: dongx.yi <dongx.yi@intel.com>
Change-Id: Id8bb8336790ae5e031b357dc49163d86dfa1cd57
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475080
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-07 12:20:01 +00:00
GangCao
be4a5602ce blobfs: write IO directly if it is lba aligned
UT also added for the block aligned write and verification
of the written data.

Change-Id: I8751f437c71dd7f3a4556fee420460d6dffdd4e5
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478424
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-07 12:19:14 +00:00
JinYu
ada795302a nvmf_example: add the acceptor poller
Add acceptor poller to handle all the connections.

Change-Id: I3228547d63a5812b90fe4394641cf124d9e64d12
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468660
Community-CI: SPDK CI Jenkins <sys_sgci@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>
2020-01-07 12:16:05 +00:00
JinYu
c871ee40e6 nvmf_example: add the signal handler
Add the same handler for SIGINT and SIGTERM so that
the working thread can exit.

Change-Id: If1ce617ddd778e92bed6f95089c48caf841e256f
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468661
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: GangCao <gang.cao@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>
2020-01-07 12:16:05 +00:00
Seth Howell
9db5eca6a8 test/ocf: use run_test framework directly.
Change-Id: I7363102aac4363e1d8cf8e68281ad869afb4269b
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476956
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-01-07 12:15:34 +00:00
Seth Howell
9f9f120cac test/iscsi: use run_test semantics in filesystem test.
Change-Id: Ie58dfb5e6147437d325439fca9bbcaebbb4ccebb
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476946
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-01-07 12:15:34 +00:00
Seth Howell
3e1393a795 test/nvme_opal: use run_test framework
Change-Id: I39a4a279c365114d52e103bbd2a08a16bfbb3b7c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476942
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-01-07 12:15:34 +00:00
Seth Howell
e33f835484 test/event: follow test_run framework
Change-Id: I6159292441269819eebcf858a6b7447a95cbbc7c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476941
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-01-07 12:15:34 +00:00
Seth Howell
543bb88c11 test/unit: organize unittests by directory/name
Change-Id: Ibe29b3a838426f968af2b5d50a2c6b63a86bd7a1
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478534
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-01-07 12:15:34 +00:00
Shuhei Matsumoto
801e76d8bf bdevperf: Change g_run_failed to g_run_rc and use it correctly
Change bool g_run_failed to int g_run_rc.  If any error is detected
during bdevperf running, negative return code is directly set to
g_run_rc. Then g_run_rc is passed to rpc_perform_tests_cb() or
bdevperf_fini().

Besides, we had updated g_run_failed even after spdk_app_start()
returned.  However return code of spdk_app_start() might not be of
bdevperf_run().  Hence change main() to return the return code of
spdk_app_start() simply without updating g_run_failed.

Additionally, even if g_target_count becomes zero in
spdk_bdevperf_shutdown_cb(), g_run_rc may indicate error.  So,
change spdk_bdevperf_shutdown_cb() to pass g_run_rc to
bdevperf_fini().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia85680679087c3106ba687d7e58027ae8ff4a5c7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478833
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-01-03 15:07:58 +00:00
Shuhei Matsumoto
5412468f87 bdevperf: Use negative errno to pass bdevperf_fini() or rpc_perform_tests_cb()
bdevperf_fini() had expected to get one but rpc_perform_tests_cb()
had expected to get negative errno for any error. Using negative
errno will be reasonable and change the code accordingly.

The next patch will unify local rc variables and the global g_run_failed
by changing g_run_failed to g_run_errno.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia43da0793f8e77a5d5491758589e9b77f4cf86e7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478832
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-01-03 15:07:58 +00:00
Shuhei Matsumoto
c3aad41fb1 bdevperf: Factor out free targets and call app_stop() into bdevperf_fini()
This is a preparation to subsequent patches. They will make start
and stop of bdevperf asynchronous. Encapsulating free targets and
call app_stop() will be helpful for them.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1a86d787614be048cec66e5d5fcfeb85de843ad5
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478817
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-01-03 15:07:58 +00:00
Shuhei Matsumoto
e7a300e096 bdevperf: Free all targets before exiting bdevperf application
We will use SPDK application framework (SPDK thread, IO channel, and
etc) to manage IO target groups, and will need to free IO target
groups before exiting bdevperf application.  As a preparation,
move bdevperf_free_targets() before returning from spdk_app_start().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id695a88107f87a9573c281f7f7d26d91d3a307b5
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478778
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-03 15:07:58 +00:00
Shuhei Matsumoto
f4e536cb57 bdevperf: Use rpc_perform_tests_cb to remove duplicated code
Due to the last patch, we can use rpc_perform_tests_cb() in
rpc_perform_tests() simply and remove the duplicated code.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id56da12fb5c52b6d178912f2f6cc7ead8a9cc36e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478761
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-03 15:07:58 +00:00
Shuhei Matsumoto
15cc012336 bdevperf: Move g_target_count check into bdevperf_test()
Subsequent patches will make bdevperf_construct_targets() asynchronous
and call bdevperf_test() as its callback. Moving g_target_count
check into bdevperf_test() will make the change easier.

As a result of this move, rpc_perform_test() is simplified a little.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I308ab472a0021278af1a1f5aa65268126a60673f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478760
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-03 15:07:58 +00:00
Shuhei Matsumoto
fd9c6a3d66 bdevperf: Use SPDK event to call bdevperf_target_gone() on the correct core
Fix the issue that target->run_timer and target->reset_timer needed to
be called on the core which runs the target.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia36681ac51a46f272e5738d0ae63838939e71e28
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478712
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-03 15:07:58 +00:00
Shuhei Matsumoto
aa3df27439 bdevperf: Call put_io_channel on the core which called get_io_channel
spdk_put_io_channel() sends message if the core on which it is
called is different from the core which called spdk_get_io_channel().

However, ch->ref is guarded by mutex at free and we should call
spdk_put_io_channel() on the core which called spdk_get_io_channel()
as possible as we can.

Hence move spdk_put_io_channel() from end_run() to bdevperf_complete().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8816b28625869662c6b9124036b619b76bf96a3c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478709
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-03 15:07:58 +00:00
Shuhei Matsumoto
1d0048097d bdevperf: Change io_target_groups from array to linked list
This patch changes io_target_group from array to linked list
and removes g_coremap.

In particular, change how to choose io_target_group for each
target, and reverse if condition in performance_dump(). These
changes will the code clearer.

Besides, remove blockdev_heads_destroy() because it just calls
bdevperf_free_targets() now.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I170a1c58fe2df9a11902224dd8634462a9af6123
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478565
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-01-03 15:07:58 +00:00
Shuhei Matsumoto
333fd3ee32 bdevperf: Delete g_coremap and use lcore of io_target_group instead
The role done by the variables has been replaced by lcore of
struct io_target_group. So we can delete them safely.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2ed856c8ccfda1d72b3fc97677fecaf295df37af
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478706
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-01-03 15:07:58 +00:00
Shuhei Matsumoto
f20617066e bdevperf: Hold associated core ID in struct io_target_group
Hold associated core ID in io_target_group and use it later.
This simplifies event calls in bdevperf because we don't need
to get core ID from io_target.

The next patch will delete g_coremap safely because io_target_group
manages lcore correctly now. lcore of the struct io_target will
be deleted too but it will be more later.

The subsequent patches will move bdevperf from core based to
thread based and the added core ID will be removed eventually in
this patch series. However these changes are helpful even so.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia763a79bc3810a15485285aebb9fc15a8d48332f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478705
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-03 15:07:58 +00:00
Shuhei Matsumoto
bc08958b6a bdevperf: Add io_target_group and chain associated io_targets to it
Add struct io_target_group and chain associated io_targets to it.

Particularly, replace current target->next pointer by TAILQ, pass
not the head io_target pointer but the io_target_group pointer to
event call, and use TAILQ_INSERT_HEAD() in bdevperf_construct_target()
to keep the current ordering.

Besides, add pointer to the queued io_target_group to struct
io_target to use it later.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib37db825a863f7795c55c19fae0d38efd80c607e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478563
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-03 15:07:58 +00:00
Shuhei Matsumoto
60eb6da8b7 lib/event: Add spdk_for_each_reactor to process event for each reactor
This API will be used in the upcoming reactor_get_stats RPC first.
This API is not public but internal in SPDK. Add necessary unit test
together.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I761ffe3c8d6d8da4594c0d728b479f9f40275fc9
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478024
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
2020-01-03 08:33:25 +00:00
Shuhei Matsumoto
368be3b199 ut/event: Add test case for reactor's thread schedule
Test if spdk_reactor_schedule_thread() scheduled thread correctly
to one of the allowed cores.  Use thread library and expect
spdk_reactor_schedule_thread() is called at the end of
spdk_thread_create().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibb536d16849c29081fb63341f5dbe1a4c0db1d18
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478157
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-01-03 08:33:25 +00:00
Shuhei Matsumoto
c697cbfd9e ut/event: Add test case for SPDK event call
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4977d1e438b1187411d1e20c392708520780fb3f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478155
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-01-03 08:33:25 +00:00
Shuhei Matsumoto
5940e9cd63 ut/event: Add test case for reactor initialization
Use the newly added mocks for CPU core operations.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If90bba6fd68c29c83cdb3c201a2a9fbdb40f6755
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478154
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-01-03 08:33:25 +00:00
Shuhei Matsumoto
f74107fb85 test/common: Mock CPU core operations for unit tests
Mock DPDK lcore operations for unit tests. Remove duplicated stup
from unit tests for NVMe-oF FC transport. The next patch will use
them.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4f6fbd8f45942ca13fcf10ba1740a9fe8e573063
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478153
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-01-03 08:33:25 +00:00
Shuhei Matsumoto
0bc0463e3e test/bdevio: Use local instance of cpuset in test_main()
bdevio test tool is not critical but change it to use instance
of cpuset to spread statically allocation of cpuset throughout.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9722d491cb6ec3202312285013105f7b6aeb1f15
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478581
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-03 08:32:38 +00:00
Jin Yu
cbc9d34362 test: add the UT of the timeout IO in mt
Extend the unit test of the timeout IO to multi-thread.

Change-Id: I6cd19b629a5f1e473f69685f495fa067a5f5da25
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476052
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-30 11:49:04 +00:00
Shuhei Matsumoto
df8992dfb1 bdevperf: Change break to continue in some for loops
Number of entries of the array g_head is spdk_env_get_core_count(),
and hence we did not need to break from some for loops.  For them,
continue to the next iteration will be more appropriate and do the
changes in this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6e97099622d58f44d92482beaf24ca61de4ca038
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478756
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-12-30 11:46:51 +00:00
Shuhei Matsumoto
3b69ae8596 bdevperf: Remove the code A = spdk_min(A, A) from bdevperf_parse_arg()
period_in_usec = spdk_max(period_in_usec, period_in_usec) doesn't
look meaningful. So remove it.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iaca35259f40dde02a89f6e3ffed070dd920192c5
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478691
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-30 11:46:51 +00:00
Shuhei Matsumoto
e4e4a96543 bdevperf: Always pass the submitting task to bdevperf_submit_single()
Extract bdevperf_target_get_task() from bdevperf_submit_single().
Then inline the contents of bdevperf_prep_task() into
bdevperf_submit_single() and remove bdevperf_prep_task().

These two patches simplify a little weird nesting and parameter
passing of bdevperf_submit_single().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I37f4ca732d6d9479553365cd612b90dec51e2228
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478690
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-30 11:46:51 +00:00
Shuhei Matsumoto
50b79fa639 bdevperf: Factor out getting free task from io_target to a function
This patch and the next patch will simplify the nesting of task
submission.

Factor out the operation to get free task from io_target into a
helper function bdevperf_target_get_task(). Use
bdevperf_target_get_task() in bdevperf_submit_single() and
reset_target().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4cb147a5a6c84cc2b0e517dc35a106d37affaa10
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478689
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-30 11:46:51 +00:00
Jin Yu
f29d20a21e vhost: add a protocol_features parameter in vdev
Add the protocol_features in vdev. There are two features
would be used in vhost device one is the virtio_features
the other is the vhost-user protocol_features. For different
vhost device, the supported features are different so we can
separate them.
Another reason is that I tested the VHOST_USER_PROTOCOL_F_
INFLIGHT_SHMFD in vhost-scsi with QEMU(version:4.0) and found
that Qemu can not boot up. After investigating found that inflight
flag is negotiated but the Qemu doesn't support this feature
and in DPDK function it is handled as an error and disconnect
with Qemu. It's a bug in DPDK and will fix it.

Change-Id: I72e418cb1885bf7dcbd0285d9cec1ad6af0665de
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478814
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-30 11:46:24 +00:00
Seth Howell
005d87ed4d test/unit: add run_test to all other tests.
Change-Id: I69dc9721cb7ccb103f404eccc680f46d1adc8d13
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478533
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-24 08:24:42 +00:00
Seth Howell
cb57725fb9 test/unit: put all util tests under run_test call
Change-Id: I50ad2c1ff280292a250590238b3f6afc6344b508
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478532
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-24 08:24:42 +00:00
Seth Howell
d6050f9b23 test/unit: move all scsi tests under run_test call
Change-Id: I10b88210d15c2fd933005bb4b13f8d3359be877d
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478531
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-24 08:24:42 +00:00
Seth Howell
0c69772056 test/unit: move all nvmf tests under run_test calls.
Change-Id: I356655debe23437d6177e49377821370bb193d7b
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478530
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-24 08:24:42 +00:00
Seth Howell
ad73816c17 test/unit: put all nvme tests under run_test calls
Change-Id: I04cd9bb5aee263450f55ebfd1fe2f2a487e73478
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478529
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-24 08:24:42 +00:00
Seth Howell
44616ea55f test/unit: move json tests under a single run_test
Change-Id: Idb8fb5a60adeba958cdb6a477f73c1c96fd3988c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478528
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-24 08:24:42 +00:00
Seth Howell
d7241356ff test/unit: move iscsi tests under a single run_test
Change-Id: I6222091d79d67b92b4e1c3b3cf399287ad821ffb
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478527
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-24 08:24:42 +00:00
Seth Howell
c7f594abba test/unit move ftl tests under single run_test
Change-Id: I7563e66ad2940b9398ac785e71d722e92fce3295
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478526
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-24 08:24:42 +00:00
Seth Howell
41c30a72d3 test/unit: move event tests under single run_test
Change-Id: I1794d84546b9b479192677d2e6a97db47fbf3bac
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478525
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-24 08:24:42 +00:00
Seth Howell
38cde5bc4c test/unit: move blob tests under single run_test call.
Change-Id: Ie30f8e965bc46580a6762f5c5e2c35c4f7928c35
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478524
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-24 08:24:42 +00:00
Seth Howell
986c915522 test/unit: move bdev related unittests to one spot
Change-Id: Ia2974605da2c0f4f1f7ee2954f64d4b4e6da0ffc
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478523
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-24 08:24:42 +00:00
Seth Howell
cb90136c33 test: eliminate case and suite from run_test
We will be able to distinguish case and suite in the post process
scripts based on if they have any internal tests.

Change-Id: Iff2aa5caa251924d8a842085d87eb2a17aca45d4
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478522
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-24 08:24:42 +00:00
Wojciech Malikowski
77d591e172 lib/ftl: Change ftl_chunk structure to ftl_zone
This is starting point for moving current FTL
implementation which is working on top of
Open Channel NVMe driver to work on top of
abstracted zoned bdev.

This patch is changing name of ftl_chunk structure
to ftl_zone and start using zone states from zdev
interface.

Change-Id: I5429f489cc08a1ac27f09aba3dca4b40ea95eeb3
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467391
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: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-24 08:14:55 +00:00
Richael Zhuang
64bf0a6e8f test/env: fail to build mem_callbacks.c on non-x86
When building spdk on arm64 with --enable-werror, there are error:
"implicit declaration of function ‘rte_eal_init’ ". For X86,
mem_callbacks.c's dependency header file rte_rwlock.h includes
rte_spinlock.h(rte_spinlock.h->rte_lcore.h->rte_eal.h), but for
arm64 and ppc rte_spinlock.h isn't included. So I include ret_eal.h
explicitly here.

Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: If8859f5272aeb220dc448a312cb0d1c65e149742
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478570
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-12-23 08:44:22 +00:00
dongx.yi
0edc874f85 test/nvme: fix wrong exit commands.
Issue reports:
	return: can only `return' from a function or sourced script.
Use "exit 1" instead, and ignore changes to json.power_on_time.hours.

Issue link: https://github.com/spdk/spdk/issues/1111
This is to fix issue #1111

Signed-off-by: dongx.yi <dongx.yi@intel.com>
Change-Id: I90198e8237cb587fbeb7777f6b2da783fd15ba04
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478014
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>
2019-12-20 10:07:39 +00:00
Shuhei Matsumoto
46e52a0bcb test/common: Set invalid value to CPU core API stubs
This change verifies that all existing unit tests don't care about
CPU core configuration.  The subsequent patches will mock CPU
core operations.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I44cc56908cf8609870625ff19d6100e21036c00f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478152
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-12-20 10:05:38 +00:00
Shuhei Matsumoto
b2927bedea ut/event: Add unit test for reactor.c
Add framework and a simple test case to test creating reactor.
Subsequent patches will add more test cases.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie0eb0e49bfe40469b351b21e40558a1bf5584cce
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478151
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-12-20 10:05:38 +00:00
Changpeng Liu
ff9516bdcc nvme: call the callback for the queued requests when there is submission failure
For the requests which don't have children requests, SPDK may queue them to
the queued_req list due to limited resources, in the completion path, we
may resubmit them to the controller.  When the controller was removed
the submission path will return -ENXIO and we will free the requests directly,
so the callback will not be trigerred for these requests.  Here we added a
flag to indicate the request is from queued_req list or not, so for the failure
submission, we can triger user's callback.

Fix issue #1097

Change-Id: I901ac81733c2319e540d24baf5b8faa1c649eb35
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477754
Community-CI: SPDK CI Jenkins <sys_sgci@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: Alexey Marchuk <alexeymar@mellanox.com>
2019-12-20 10:04:57 +00:00
Changpeng Liu
10cd9e86b9 UT/nvme: use STUB macro for the empty function APIs
Change-Id: Id037a0cdc1e054dad0454e0897b04629b78e7d50
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478018
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-12-20 10:04:57 +00:00
JinYu
b9793e6809 nvmf_example: add an nvmf example
use the nvmf lib to add an nvmf example which
doesn't use the spdk app framework. It can show
how to use the nvmf lib to build your own nvmf target.

We encouage you to use the RPC cmds so this example will
not supply the configuration file. You can read the
README.md to get the steps how to build your nvmf target
and test the IO status.

Change-Id: I8d175934f7364d40fb44d36e85c31d8ea5063654
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468457
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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: GangCao <gang.cao@intel.com>
2019-12-20 10:03:34 +00:00
Shuhei Matsumoto
f29c728980 lib/iscsi: Move iscsi_conn_abort_queued_datain_task() from iscsi.c to conn.c
Followin the last patch, move iscsi_conn_abort_queued_datain_task()
and iscsi_conn_abort_queued_datain_tasks() from iscsi.c to conn.c.

Refine unit tests to check more accurately. Adding more test cases
will be done later.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I30530e6871a78a58d9fb472f62168862298884a0
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477417
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-12-20 10:03:00 +00:00
Konrad Sztyber
9ec598d115 lib/thread: poller pause / resume
Added spdk_poller_(pause|resume) that allow a poller to be paused and
then resumed at a later point.  These functions come in handy in cases
when a poller is known to be idle until a certain event occurs.

Change-Id: I7f21c80eb9ac4e8e1cf24d66f99da5687aafe358
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477920
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-20 10:02:15 +00:00
Konrad Sztyber
f4576dec88 bdev/ocssd: media management events
This patch adds the logic for retrieving chunk notification log and
translating it into media management events to be sent to appropriate
Open Channel bdev.

Change-Id: I7e4860eda23e61d6208fc5f5861e8fd2b75685d3
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471461
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-20 10:02:15 +00:00
Konrad Sztyber
64fe514efa bdev/ocssd: parallel unit ranges
This patch adds the ability to create bdevs on specified parallel unit
ranges on one OCSSD controller.  It allows the user to create multiple
isolated bdevs, each operating on a separate set of parallel units.

To create a bdev on a specified range, a new parameter -r|--range was
added. For example:
 rpc.py bdev_ocssd_create -c nvme0 -b nvme0n1 -r 0-4

will create a bdev on parallel units 0 through 4 (inclusive).  If the
parameter is ommited, the bdev will span across all available units.

Change-Id: Icd94cf1e22fcc72806ef1ce1efd2d7031010009f
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469898
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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>
2019-12-20 10:02:15 +00:00
Seth Howell
4328a67ea7 lib/reduce: add array bounds checking for iovs.
We also need to make sure that the deconm_iov is large enough to handle
all of the iovs we claim to support plus 2, one for offset into the
chunk when doing writes and one for the remainder.
Plus a unittest to demonstrate the possible out of bounds error in the
library.

Change-Id: I7747ad39f76e50f25ecf5168b01e046f71fa0ea8
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478125
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-19 11:04:57 +00:00
dongx.yi
c3fe5e4adc bdevperf: Unify the units with perf.
Other tools have already changed these units to IOPS and MiB.

Unify the units, that makes the result comparing more clear
with bdevperf and perf.

Signed-off-by: dongx.yi <dongx.yi@intel.com>
Change-Id: Iedc47f5757839e1abbcbaf5d97179c90ab130773
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478280
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
2019-12-19 11:04:39 +00:00
Jim Harris
1d94a0b0e1 ut/bdev: fix histogram buffer parameters
These buffers weren't actually used, but "buf" is an array,
so we should just pass buf, not &buf.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478119
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-12-18 10:09:45 +00:00
Shuhei Matsumoto
e37fc5a32a lib/nvmf: Accept KATO for discovery controller
Some NVMe applications require SPDK NVMe-oF target to support
KATO for discovery controller.  Hence change discovery controller
to accept KATO.  Update unit tests accordingly.

Fixes the issue #1089.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib56e3b0b0faaf58276f9e692704763c1e5e5b042
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476810
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
2019-12-18 09:38:46 +00:00
GangCao
82f60376ae test: properly handle the killprocess case
To check whether the process already killed and if the
process is not there, return error.

This is to fix the below issue:
https://github.com/spdk/spdk/issues/1066

Change-Id: I5f36213237a4b0eed8edbc69e666037cf17488b2
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476127
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-17 15:28:37 +00:00
Seth Howell
f506cc42bd test/bdev: fix nightly failure on hello_bdev
Currently the blockdev.sh tests fail due to using a GPT partition on the
hello_bdev portion of the test. On some of the test machines, sgdisk is
not installed, so they silently fail to create the GPT partitions that we
were trying to use.

This change is only geared towards fixing the current nightly failure in
the bdev tests. It does not address the test machines silently failing to
create GPT partitions.

fixes: issue #1107

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: If58201ff4eb7dce9a44e2f93dfe25601ad1b508a
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477611
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-17 14:54:40 +00:00
Seth Howell
5854d3c0a5 test/vhost: convert migration tests to run_test
This test suite was doing some things as far as formatting that are
covered by the run_test framework. Also, the way the tet cases were
organized was obfuscating which migration tests are actually being run
in the autotest jobs. This configuration makes it a lot easier to
manage.

As a side note, migration-tc3a.sh and migration-tc3b are not referenced
anywhere in the test scripts. They may be extraneous.

Change-Id: Ibe6782b38cb87c90b2bc61f112f10cd35f5b4a44
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476937
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-17 14:54:40 +00:00
Seth Howell
6b9e48df95 test/vhost: fix variable error in vm_setup
apparently getopt used $i when iterating over variables because when
weuse --force and don't set i ourselves, bash throws errors that look
like "line 594: [[: --test-cases=1,2: attempted assignment to
non-variable (error token is "=1,2")".

Change-Id: I89937f1cdd3d3c0557c931a11707df17c7b8d87e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478079
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-17 14:54:40 +00:00
Seth Howell
34ae11720d test/vhost: shell_restore_x -> xtrace_restore
The shell_Restore_x variable and xtrace_restore were attempting to
accomplish the exact same thing. However, when assigning
shell_restore_x, if -x was not set, then the assignment would result in
an error causing the scripts to fail.
So just get rid of that variable entirely and replace it with the more
robust xtrace_disable, xtrace_restore mechanism.

Change-Id: Ic823ad8433bd3dc181aaa0930297cd9d74bcf528
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477966
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-17 14:54:40 +00:00
Seth Howell
190b2245c5 test: make xtrace_disable multi-call safe.
Previously, if you made two sequential calls to xtrace_disable without
calling xtrace_enable, you would lose the original value of x. Now this
is not the case. It allows us to call xtrace_disable freely without
worrying about whether xtrace_disable is invoked later in a function we
call.

Change-Id: I9818ae97532e7a31db576bb9bd2e2e30d67ab410
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477965
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-17 14:54:40 +00:00
Seth Howell
c4d4abcf64 test/bdev: convert fio test to run_test semantics
Change-Id: I842491321a8797cadca973caba499251a91dfa2f
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477491
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-12-17 14:54:40 +00:00
Seth Howell
d6379a8833 test/bdev: convert qos tests to run_test semantics.
Change-Id: I5b52cc57c09bebcb80921821f293ab464c9f915a
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477490
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-12-17 14:54:40 +00:00
Seth Howell
8295a2b0b7 test/bdev: start converting to run_test semantics.
Change-Id: Ic007e6cf8e00402fb5a1e0343b3314f4242efcd0
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477489
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-12-17 14:54:40 +00:00
Tomasz Zawadzki
1d11ab120d ut/crypto: redirect mock rte_lcore_count
With DPDK 19.11 rte_eal_get_configuration() and rte_config
structure were made private. Those were only used in
the inline rte_lcore_count() included from DPDK.
After the update they were no longer available.

Since only rte_lcore_count() was used directly in crypto,
mock that and return 1, as was done previously.

This was tested with DPDK 19.08 and DPDK 19.11.

Change-Id: I13e4d9743b17a34ad786283f8b567d01e036d368
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477841
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2019-12-17 09:29:39 +00:00
Tomasz Zawadzki
2fbeb7ea52 ut/compress: remove rte_eal_get_configuration stub
This went unused in the unit tests.
Tested with DPDK 19.08 and DPDK 19.11.

Change-Id: I738919379b5751697f9533f72fbaf77993cb6fb5
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477840
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2019-12-17 09:29:39 +00:00
Shuhei Matsumoto
3c7890d24f lib/iscsi: Move iscsi_conn_handle_queued_datain_tasks() from iscsi.c to conn.c
Operations to queue iSCSI tasks are in iscsi.c and conn.c and cross
references due to this separation makes us difficult to create unit
tests.

This and subsequent patches will try to disentangle cross references
by moving some functions from iscsi.c to conn.c.

This patch moves spdk_iscsi_conn_handle_queued_datain_tasks() from
iscsi.c to conn.c.  For unit tests, we don't add anything new in
this patch and just create necessary simple stubs.  After code
movement, new unit tests will be added.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If5b8501a1ef7ea53682a3437c7eb2375aa52ee3b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477416
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-17 09:29:10 +00:00
Shuhei Matsumoto
ff7e7c83e6 ut/iscsi: Replace trace library link by stubs
Subsequent patches will change trace functions to be called in
unit tests.  Using stubs is enough as done in other libraries
and do the change in this patch.  For iscsi_ut.c, add stubs to
not iscsi_ut.c but common.c to cover other files.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia14bc932f451b14bdb0ba6e0cb949463490a879e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477414
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-17 09:29:10 +00:00
Shuhei Matsumoto
d4914dee06 ut/iscsi: Initialize struct to zero by not memset but "={}" in tgt_node_ut.c
Using "={}" at definition is clearer and saves lines.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I75a99583f1ecc84d4c47cacd9ce58034edb4e756
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477413
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-17 09:29:10 +00:00
Shuhei Matsumoto
ce3b8472ad ut/iscsi: Initialize struct to zero by not memset but "= {}" in iscsi_ut.c
Using "= {} at definition is clearer and save lines.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I410279bd3640e03aa9b6eeb488be4404d110b0bd
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477412
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-17 09:29:10 +00:00
Konrad Sztyber
1ad438311e bdev/ocssd: request resubmission
If a spdk_bdev_io cannot be completed, because it is sent to a zone that
is currently busy, reschedule its submission.  This mechanism will be
used by appends, as mutliple append commands can be directed to the same
zone at the same time.

Change-Id: I60da2bd1835380812d22536ea275fb8fed9f8561
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477437
Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-17 09:28:35 +00:00
Konrad Sztyber
153fbcb1f8 bdev/ocssd: JSON configuration
This patch adds support for saving JSON configuration of the OCSSD
bdev module required to recreate the current state.

Change-Id: Iedbdb8b4a2b7dd02a223ce6f073553e71b9c040a
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469090
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-17 09:28:35 +00:00
Konrad Sztyber
88406f3302 bdev/ocssd: retrieve chunks' info during initialization
OCSSD bdev needs to keep track of some portion of zone's state (write
pointer, its capacity, whether it's busy) in order to support the append
operation.  To achieve that, all the info needs to be retrieved for all
of the chunks and translated to zone format.

Change-Id: Id88282576aba337b50e7c7e1b9e9ff5aba25a3db
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468937
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-17 09:28:35 +00:00
Konrad Sztyber
7ac802e848 bdev/ocssd: get zone information command
Added zone information command translating Open Channel's chunk
information to spdk_bdev_zone_info structure.

Change-Id: Ifdb15f2e0ea2fb8422810fa64f18942fcb6e4582
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468213
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-17 09:28:35 +00:00
Konrad Sztyber
704830b3b7 bdev/ocssd: zone reset command
Added zone reset command.  It's very similar to a regular data set
management deallocate command with the only difference being that it
operates on zones instead of blocks.

Change-Id: Iae4d77c6877b6906231336b13fad1167de149f20
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467920
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: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-17 09:28:35 +00:00
Karol Latecki
b9395621ae test/vhost: restore possibility to use custom Qemu binaries
Use env variables to select custom qemu-img and qemu-system-x86_64
binaries. This is needed to test versus latest Qemu versions from
Github.
If env variable QEMU_BIN is not present then the defaults for test
are system-wide installed packages.

This partly reverts changes done in patch:
5502294d76
which removed possibility to run with custom Qemu binaries.

Change-Id: I8138a079ba7013dcd97aad95ae2eed6417f5b18c
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477776
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-16 12:34:47 +00:00
Ben Walker
5d497f6cf5 nvmf/tcp: Use writev_async for sending data on sockets
This eliminates the flushing logic, simplifying the tcp
transport.

This also happens to greatly improve performance, especially
on random read tests. The batching done in spdk_sock_writev_async seems
to be more effectively than the previous batching logic in the tcp
transport.

Change-Id: Id980ac6073e380dc75f95df3f69cb224f50fb01b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470532
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-16 12:34:02 +00:00
Ben Walker
7db1ed8b67 sock/posix: Use sendmsg instead of writev when flushing
This is preparation to add flags to the call.

Change-Id: I36109c069b42bd3ec22e023079c62d41a435f44c
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471771
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>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-16 12:34:02 +00:00
Ben Walker
ab22d249e2 sock/posix: Add a pending list for asynchronous requests
Add an additional queue for requests that have been sent on the network
but aren't complete yet. As of this patch, the code
is still calling writev with no flags in the POSIX layer, so it completes
synchronously. That means requests pass through this new pending list
only very briefly inside of one function.

Change-Id: Iaab6efc118a6d5fe9589199515eb3a7293db4b8e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471768
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Or Gerlitz <gerlitz.or@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-16 12:34:02 +00:00
Ben Walker
b7ad942612 sock: Add an asynchronous writev
Add spdk_sock_writev_async for performing asynchronous writes to
sockets. The user of this call is responsible for allocating their own
spdk_sock_request structures to pass to this call.

spdk_sock_writev_async will not return EAGAIN and will instead leave the
requests queued until they are fully sent or aborted due to socket
error.

Change-Id: Idf3239e65d26a3024e578122c23e4fb8f95e241b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470523
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-12-16 12:34:02 +00:00
Jin Yu
f1d47d69ef test: add the UT of the set IO timeout
Add the unit test to verify the submitted list,
timeout IO poller and timeout IO check.

Change-Id: Ie7832cc29e19a624328a1a96cffe313bf9f18a69
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476051
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-16 12:20:43 +00:00
Tomasz Kulasek
bd3244325c test/nvme: add cuse smartctl tests
Change-Id: Id6ed39a4e6c4d360111aea96f630bb678f5b306e
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475754
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-12 14:52:20 +00:00
Shuhei Matsumoto
54c3d1bc67 lib/iscsi: Replace DMIN32/64() by spdk_min()
The macro DMIN32/64() are local in iscsi.c.  Replace them by the
generic macro spdk_min() will improve the portability.

Replace it in test/unit/lib/iscsi/conn.c/conn_ut.c together.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5f6992b3dc091cd748b4e138810fb01761a1ab24
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477202
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-12-12 14:41:41 +00:00
Shuhei Matsumoto
4c577b1fce lib/iscsi: Change spdk_iscsi_is_deferred_free_pdu() to private and rename it
spdk_iscsi_is_deferred_free_pdu() is called only in a single
place of conn.c.  So change it to private in conn.c.  Additionally,
iscsi_is_free_pdu()_deferred() may be a little more meaningful
and rename to it.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic1e3d7ff435c454f40e81f9a4f90fe76589ec7b2
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477189
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-12-12 14:41:41 +00:00
Shuhei Matsumoto
62d14e2ca1 ut/iscsi: Re-order operations in abort_queued_datain_task_test()
Re-order operations in abort_queued_datain_task_test() to align it
with comment, and fix a type error.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Idde4726bfe370ad742b2de67e0786aebb7237d45
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477409
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-12 14:41:41 +00:00
Shuhei Matsumoto
19eb63fcad lib/iscsi: Stop splitting immediately when aborting SCSI read I/O
We changed read I/O submission to stop splitting when detecting LUN
hotplug very recently. We can do the same refinement for read I/O
abortion.

In _iscsi_conn_abort_queued_datain_task(), set all remaining length
to the new task and complete it immediately. We keep the code to
process the case that queued_datain_task completed but is still in
queue, but we can change its if condition to assert.

Simplify the corresponding unit tests accordingly, and set
task->scsi.transfer_len in abort_queued_datain_tasks_test() to
exercise the changed paths.

In iscsi_pdu_payload_po_scsi_read(), if task->scsi.transfer_len is not
larger than SPDK_BDEV_LARGE_BUF_MAX_SIZE, no minimum calculation is
necessary and we can substitute task->scsi.transfer_len to
task->scsi.length simply.  This change is too small to be an independent
patch and is done together.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iea93e51b103eae141a007a0abdaf13cbe6d5287f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476984
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>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-12 14:41:41 +00:00
Ben Walker
bed4cdf6c7 nvme: Use sgls, if available, even for contiguous memory
The hardware sgl format can describe large contiguous
buffers using just a single element, so it's more
efficient that a prp list even for a single memory
segment. Always use the sgl format.

Change-Id: I9c62582829f0d64dcd1babdbc48930ddb4d9e626
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475542
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-12-11 11:06:57 +00:00
alokkataria
6d6052ac96 env: Use rte_malloc in spdk_mem_register code path when possible
For TCMalloc regions which we register with spdk at runtime in the MMapHook, we
need to ensure that SPDK doesn't do any allocations in that path otherwise we
will hit a livelock situation. MmapHook is invoked when TCMalloc is out of free
memory and needs to get more memory from the system, for the hugepage case it
gets via mmap.

In the current code, we could end up calling malloc in the spdk_mem_register
call via the following call path.

spdk_mem_register -> spdk_mem_map_set_translation -> spdk_mem_map_get_map_1gb

To avoid this livelock situation we call rte_malloc instead which shouldn't
invoke the system allocator. Note that in try_expand_heap_primary() which is
invoked in the rte_malloc code path, we can still call malloc, so we need to
only use this when dynamic memory allocation is disabled via --legacy-mem.
It is possible in the future we could work around even this limitation,
but for now this implementation will be much simpler.

Have verified this change fixes the livelock condition which I was hitting in
my setup without this fix.

Change-Id: I69d0813a70da1f26f8c4d9d8895e406c026be18b
Signed-off-by: Alok N Kataria <alok.kataria@nutanix.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475943
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-11 11:05:10 +00:00
Jim Harris
396c445cb1 env_dpdk: tell spdk_mem_map_init whether legacy_mem was specified
We will use this in a future patch to determine whether it's safe
to use DPDK allocated memory when allocating new 1gb page entries.

We could use it in this patch to decide whether or not to register
the memory hotplug handler, but there's really no harm registering
it even when it's not needed.

Ideally DPDK would provide some kind of API to query how DPDK was
configured.  In the normal case we know whether legacy-mem was
specified, but if users initialize DPDK themselves and then call
spdk_env_dpdk_post_init(), we won't know if legacy-mem was specified.
So in that case, we will just assume that it wasn't specified.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477086
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-11 11:05:10 +00:00
jiaqizho
ab04d59c57 ut/tcp: add nvmf incapsule data unit test
This patch is used to test the pending buffer policy
of nvme request which has incapsule data. When
group->pending_buff queue not null , we should make
sure spdk_nvmf_tcp_capsule_cmd_hdr_handle method still
can handle the request.

relate to : issues/995

We try to simulate the following manner: If there
is req waiting for the buffer in the list, the
nvme request which has incapsule data will be
handled firstly even it is added into the
pending_buf_queue. The reason is that currently,
those command will get the buffer from its own queue.

We made these test steps:

 1. submit a tcp request into spdk_nvmf_tcp_req_process
    and make sure it pause in group->pending_buff queue
 2. submit a incapsule tcp request into
    spdk_nvmf_tcp_capsule_cmd_hdr_handle method , and
    this method will call the spdk_nvmf_tcp_req_process
    method to handle this request.
 3. check whether the incapsule tcp request is handled
    correctly. and check the group->pending_buff queue
    remain.

Signed-off-by: jiaqizho <jiaqi.zhou@intel.com>
Change-Id: I85fcbb49e309e1203b4b308115e3bfefc0fcba2a
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472665
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-10 17:33:11 +00:00
Seth Howell
5170ac8d83 test/blockdev: move configuration before tests.
This is a significant simplification to the whole test script. Note, it
does force us to run the hello_bdev example against a gpt bdev instead
of an nvme bdev directly, but I see this as an acceptable tradeoff since
it seems like the purpose of running the hello_bdev example is mostly to
ensure that the example itself is not broken.

Change-Id: I8c2a1ede8e7ece2a82222593a7ae46704cc658af
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476935
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-12-10 17:12:03 +00:00
Seth Howell
b9ca149ee7 test/nvmf: convert filesystem to use run_test
This test specifically gets a little more complicated looking when we do
the test this way, but the goal is to enable deterministic reporting of
test completions on a per build basis.

Change-Id: Ica36986f821337c22654fb4cc25f9a72a3d73517
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476825
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-10 17:12:03 +00:00
Seth Howell
67645f4dea test/nvmf/filesystem: explicitly use nvme0n1
This test has always relied on /dev/nvme0n1 being the location of our
test drive which means that it is the only one in the system at the time
the test is run.

So instead of trying to loop multiple non-existant nvme drives, just
call it out directly.

Also, add a todo to remove the dependence on NVMe0n1 since we could run
this test on a machine where the main filesystem is on an NVMe drive
which would break this test.

Change-Id: Ibb2448d9367a5c80d85a1c91b0c6e44e58237751
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476952
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-10 17:12:03 +00:00
Seth Howell
d29169bd77 test/iscsi: convert data_digests tests to run_test
We had very granular timing reporting on this test, but we really only
had two test cases running for the whole thing.

Change-Id: I11650e124e24e93b1f217c6b8efd2fb006284515
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476824
Tested-by: SPDK CI Jenkins <sys_sgci@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>
2019-12-10 17:12:03 +00:00
Seth Howell
c6767000a4 test/nvmf: convert target_disconnect to run_tests
Change-Id: I8a632fb9c782b50246123f6c2d1cfd2e3f333471
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476823
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.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>
2019-12-10 17:12:03 +00:00
Seth Howell
f470cf3d0c nvmf/shutdown.sh: convert to run_test framework
This cleanns up the logs for this test and makes it easier to follow.

Change-Id: Ifc6fcea8672d4d186e3e622eddfc200fdfd076ce
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476822
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Karol Latecki <karol.latecki@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>
2019-12-10 17:12:03 +00:00
Seth Howell
968d4dfd65 test/vmd: convert to run_test framework
This makes the script much more readable and helps delineate test cases
more clearly.

Change-Id: I729ca0380a7173151d074ebd73ed9766c5008480
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476821
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-12-10 17:12:03 +00:00
Seth Howell
a0304f54f9 test/nvme: convert tests into run_test
This unifies the script and makes it easy to see what exactly we are
testing.

Change-Id: Icdbc08077ea4397bfde50493c718f99c3c499062
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476809
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2019-12-10 17:12:03 +00:00
Seth Howell
785c3f0fe4 test/ioat: clean up timing calls.
Change-Id: Ife273ac10968ad3fc19f8a46f69e50fa755ba815
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476807
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-10 17:12:03 +00:00
Seth Howell
3c87c8973c test/rocksdb: convert test cases to run_test
cleanup.

Change-Id: I8e358a1cb327215d0b3b932bd9b1d28d495501a4
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476806
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2019-12-10 17:12:03 +00:00
Seth Howell
fe4d1dce58 test/env: convert program calls to run_test
allows us to remove a lot of extra timing_* calls.

The next several commits are aimed at converting the majority of the
tests to this single framework of using the run_test suite or run_test
case function calls. Hopefully it makes it much easier to understand the
logs over time.

Change-Id: I6d46982108be469a05f70c24b373e60726aa061e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476805
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-10 17:12:03 +00:00
Seth Howell
36ac0c4340 test/lvol: use the run_test framework directly
Change-Id: Iabec093a7cd632cf35fb163cfcc0048ed66fc856
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477077
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-12-10 17:12:03 +00:00
Seth Howell
1fafd71bc3 test: add timing calls to run_test
And clean out the corresponding calls to timing_enter and timing_exit
from the various test scripts.

Change-Id: I0759417b5a529e4c3649ce04cca1799c089da278
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476804
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>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2019-12-10 17:12:03 +00:00
Seth Howell
fd17f1aabc test: make run_test more robust
make sure we have enough arguments.

Change-Id: I76ce35635ef14289061323ee401d93d8d081888c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476801
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2019-12-10 17:12:03 +00:00
Seth Howell
b8042c3850 test: use human readable names in test logs.
Change-Id: I163a7e08bfeff3da2ee627d9fad9f2f1a249c593
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476820
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2019-12-10 17:12:03 +00:00
Seth Howell
3710048472 test: add a test_name param to run_test
This will allow us to use timing_enter and timing_exit directly
inside the run_test function. That function already lends itself well to
nesting the way we do our timing.

This patch series is aimed at combining the timing_*, run_test, and
report_test_completions calls all into a single place. This will greatly
reduce the number of lines of code in our bash scripts devoted to
tracking timing, formatting, and test completion. It will also enable us
to expand on the reporting of test completions. Further down the line,
this will also allow us to unify test case documentation.

Change-Id: I8e1f4bcea86b2c3b88cc6e42339c57dfce4d58f2
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476799
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
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>
2019-12-10 17:12:03 +00:00
Tomasz Kulasek
716f5e77d0 test/nvme-cli: check if cuse device is destroyed after detach
Change-Id: If1fdafd282c898ccd4e7427d575507c1df4bd778
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473294
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>
2019-12-09 17:40:35 +00:00
Tomasz Kulasek
b7b45bc7bc lib/nvme: remove device name parameter from nvme cuse
This patch removes posibility to set cuse device path. Instead
"/dev/spdk/nvme*" path is used.


Change-Id: I7c3087772a3661eebe03fce21356c35cc8204b49
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474598
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-12-09 17:40:35 +00:00
GangCao
5d106e75e0 net: add the check for the add and delete IP operation
To properly return the error case when adding an existing
IP or delete a not existed IP. Proper test case is also
updated.

This is also to fix below issue:
https://github.com/spdk/spdk/issues/992

Change-Id: Ia4d3af8cc86d9bdb66b18a165510cd08f9bfa555
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476543
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-09 17:39:50 +00:00
Karol Latecki
a34d7d7b2f test/nvme: wait after reloading nvme module
Make sure that all setting files under /sys/block/nvme*
have time to get created properly.

Change-Id: I9e3bf973fc09d2f5c38be3b29aa1fea4137c0402
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476557
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-09 17:39:22 +00:00
Karol Latecki
cfb6aec8ab test/nvme: fix typo in performance script
It's "iostats", not "io_stats".
Remove extraneous "$" from variable substitution.

Change-Id: I287797a8ab44032ce5c32ee48efdec52bba59f53
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476556
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-09 17:39:22 +00:00
GangCao
841b7a786e test/vhost/fuzz: remove the unncessary killproces
Change-Id: Ida9b2d6aade8ab12004fccd8830452c93eca30eb
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476702
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Liang Yan <liang.z.yan@intel.com>
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>
Reviewed-by: Seth Howell <seth.howell@intel.com>
2019-12-09 17:38:46 +00:00
Changpeng Liu
f4e3f59e0e nvme: fix potential memory leak when there is controller scan failure
The nvme_transport_ctrlr_scan() may return failure while there are
multiple controllers, so the probe context's init_ctrlrs list may
not null for this case, so when free the probe context, let's ensure
there is no controller in the init_ctrlrs list.  Also added a UT to
cover this case.

Fix issue #1095.

Change-Id: I4d9a10ad73cf00bbe159edd1f5b919797333feb6
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476969
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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>
2019-12-09 13:58:01 +00:00
Seth Howell
61537a190e nvme: replace nvme_qpair_state_equals.
nvme_qpair_get_state fits more closely with the semantics in other
modules.

Change-Id: I6ea8e02abe27253d9b4d779a43ac1963be56356a
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476920
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: Alexey Marchuk <alexeymar@mellanox.com>
2019-12-09 13:55:41 +00:00
Seth Howell
3911922005 nvme: remove redundant transport_qp_is_failed checks
The qpair state transport_qpair_is_failed is actually equivalent to
NVME_QPAIR_IS_CONNECTED in the qpair state machine.

There are a couple of places where we check against
transport_qp_is_failed and then immediately check to see if we are in
the connected state. If we are failed, or we are not in the connected
state we return the same value to the calling function.

Since the checks for transport_qpair_is_failed are not necessary, they
can be removed. As a result, there is no need to keep track of it and it
can be removed from the qpair structure.

Change-Id: I4aef5d20eb267bfd6118e5d1d088df05574d9ffd
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475802
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-12-09 13:55:41 +00:00
Seth Howell
3369105f31 test/lvol: fix shellcheck failures on master.
Change-Id: Ia3dd62384a34564092b352487042a1eb2908f9fc
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477079
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-06 20:10:57 +00:00
Karol Latecki
283890cb71 test/vhost: remove unused test options from manual.sh
fio.sh script is never used for vhost performance testing.
There are separate test scripts created just for this purpose.

Change-Id: I55e9b8c0d53100d1ce8077cf1758590bbe971dee
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476601
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: Changpeng Liu <changpeng.liu@intel.com>
2019-12-06 17:27:25 +00:00