Commit Graph

19402 Commits

Author SHA1 Message Date
Michal Berger
1d563b2d2a autobuild: Drop errexit
It's set from within autotest_common.sh.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I4bf743da1c12895de2c48a6262f66ff81228e32f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15725
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: Kamil Godzwon <kamilx.godzwon@intel.com>
2023-02-02 09:05:56 +00:00
Michal Berger
88f8a6ca22 autobuild: Move .conf check to autobuild_common
Also, keep it in global scope as $spdk_conf rather than passing it
as a positional argument to whatever routine that may depend on it.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I68532d5848e0bd7ee8519ef3e308b24ab6a38876
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15724
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: Kamil Godzwon <kamilx.godzwon@intel.com>
2023-02-02 09:05:56 +00:00
Michal Berger
2bd4ba6e70 autobuild: Split test suite into corresponding SPDK_TEST_AUTOBUILD opts
New option is introduced as well, 'ext', which tells autobuild to
run only external code tests - these deserve to have their own option
as they require proper env to be in place (access to hw, hugepages,
etc.)

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I2d74d1ee9b4b3d4dd83150b235eceff76fafd1ff
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15723
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>
2023-02-02 09:05:56 +00:00
Shuhei Matsumoto
3c5fdc0610 bdev/xnvme: Use bdev_unregister_by_name() to delete a xnvme bdev
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I4551dee96f3241f6004fc3b8ad0381082551db8e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16587
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-31 21:40:09 +00:00
Shuhei Matsumoto
916fb46915 bdev/daos: Use bdev_unregister_by_name() to delete a daos bdev
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I8e73d0d8e6cfa76f253f5cd49b3bf37d42d44b6f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16557
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-31 21:40:09 +00:00
Shuhei Matsumoto
2bb2afd085 external_bdev_passthru: Use bdev_unregister_by_name() to delete a passthru bdev
spdk_bdev_unregister_by_name() is safer than spdk_bdev_get_by_name() +
spdk_bdev_unregister(). It is ensured that the specified callback is
executed after unwinding stack for spdk_bdev_unregister_by_name().

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I5cc1e88a7e389ab173ef1195bd817d2aac6a70d1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16556
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-31 21:40:09 +00:00
Shuhei Matsumoto
a6b0b5b072 bdev: Use error_response() rather than bool_response(false) for JSON RPC
For JSON RPC, boolean response with false value may not be regarded as error.
Previously many cases were replaced to use
spdk_jsonrpc_send_error_response() explicitly. Replace one of the remaining
cases in this patch.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I1b4ffe015c2b2e28d411faf7763c2baca81f66f5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16623
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-31 21:40:09 +00:00
Shuhei Matsumoto
0bac3197b8 iscsi: Use error_response() rather than bool_response(false) for JSON RPC
For JSON RPC, boolean response with false value may not be regarded as error.
Previously many cases were replaced to use
spdk_jsonrpc_send_error_response() explicitly. Replace one of the remaining
cases in this patch.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Ibfcb8c53662238b7ba8f08ecd1678953af8dc202
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16622
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-31 21:40:09 +00:00
Shuhei Matsumoto
841cd8b939 module/blobfs: Use error_response() rather than bool_response(false) for JSON RPCs
For JSON RPC, boolean response with false value may not be regarded as error.
Previously many cases were replaced to use
spdk_jsonrpc_send_error_response() explicitly. Replace one of the
remaining cases in this patch.

rpc_blobfs_detect() uses boolean response for not only true but also
false, but it had a memory leak bug. Fix it together in this patch.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Iaff21115282f638038345daa986b5c743ba9a3ed
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16621
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-31 21:40:09 +00:00
Shuhei Matsumoto
c77bc554d2 module/bdev: Use error_response() rather than bool_response(false) for JSON RPCs
For JSON RPC, boolean response with false value may not be regarded as error.
Previously many cases were replaced to use
spdk_jsonrpc_send_error_response() explicitly. However, this pattern did
not become established and new bdev modules used
spdk_jsonrpc_send_bool_response() with false.

Once again, replace remaining cases in this patch.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Ie8858bc8ff7c36bc3a829977044a91d459db76f2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16555
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-31 21:40:09 +00:00
Shuhei Matsumoto
5feab0ddcf bdev/nvme: Remove spdk_bdev_first/next() calls from apply_firmware RPC
The NVMe bdev module has been refined since the bdev_nvme_apply_firmware
RPC was added. It is enough to open any one NVMe bdev even if one NVMe
controller has multiple namespaces. Hence, let's remove
spdk_bdev_first/next() calls from rpc_bdev_nvme_apply_firmware() rather
than replacing these by spdk_for_each_bdev(). Additionally, not only
spdk_bdev_close() but also spdk_put_io_channel() and
spdk_jsonrpc_send_*_response() should be done on the original thread.
Hence, redirect to the original thread always when a NVMe command is
returned, and rename firm_ctx->thread by firm_ctx->orig_thread for
clarification. orig_thread will be better than comment.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I90b1986584b3926980fd265e4fded194eb5a2d00
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16541
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-31 21:40:09 +00:00
Shuhei Matsumoto
ee1f124801 bdev: Use event_notify abstraction for media management notification
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: Ib775ab6bcbf3af61806f389e88944a4d827b6e82
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16578
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-31 15:28:37 +00:00
Shuhei Matsumoto
3522d43a95 bdev: Unify _resize_notify() and _remove_notify()
The next patch will improve media mgmt notifications but it will be
almost same as _resize_notify() and _remove_notify().

On the other hand, there are a few differences between _resize_notify()
and _remove_notify(). _remove_notify() will be better.

To avoid duplication, unify _resize_notify() and _remove_notify() by
adding abstraction event_notify() and _event_notify().

Add unit tests for the complex race conditions.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: Ibe2478479c61459c0da0db8d28c7273f05275e0f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16577
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-31 15:28:37 +00:00
GangCao
b5497ac213 lib/accel: correct the optional parameter of RPC commands
The relatd RPC commands are:
1. accel_crypto_keys_get (parameter is optional)
2. accel_crypto_key_destory (parameter is required)

Change-Id: I580c6e32bddf8242d0c26be988e2c151f47f2548
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16627
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-31 10:53:33 +00:00
Michal Berger
575a302d75 autotest: Attempt to cleanup SPDK processes prior running tests
There are some occasions where some phy nodes in the CI pool are
not properly cleaned up due to various reasons - hard crashes,
sudden network disconnects, etc. Whenever this happens, subsequent
job on the affected node usually fails due to overall instability
caused by lingering processes that should have been already killed.
Example of such failure is https://github.com/spdk/spdk/issues/2749.

This attempts to mitage potential impact of these issues under
per-patch testing.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I6e5c834ab77813e7484fa7f65c9d39967a305329
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16364
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>
2023-01-31 10:51:21 +00:00
Michal Berger
929ac2180b test/common: Add xtrace_disable_per_cmd()
This function is an alternative to xtrace_disable() which works
within a smaller scope, i.e., per cmd. Useful to quickly hide
verbose output without disabling entire tracing.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I284eafaf0e74764f329a7a6897a7d7fa85176de7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16363
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-31 10:51:21 +00:00
Michal Berger
15e31017dd autotest: Refactor reap_spdk_processes()
This is done in order to speed up entire lookup and be more robust
with matching target processes. This implementation also tries to
detect processes executed outside of the local repo workspace - this
is most relevant for the CI where lingering processes may come from
different jenkins workspaces (i.e. executed by different jobs).

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Id4f62302701f064ad00906497379e16ff8c04993
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16356
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>
2023-01-31 10:51:21 +00:00
Jacek Kalwas
37b5d87b19 env: expose function to get main core
Main core can be different than first core (default behavior) as it
can be specified by application argument. It can be useful to
determine if given thread is matching main core.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I25292a91ad677806eaf19ad68acdda0f28da6cfb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16596
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-31 10:31:04 +00:00
Shuhei Matsumoto
1974117a29 bdev/nvme: apply_firmware RPC embeds request structure into context
It is enough to embed an instance of rpc_apply_firmware structure into
firmware_update_info structure.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I41a480a0b8cd56f4b537512d5f83c5cbd5eee718
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16540
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-31 10:30:52 +00:00
Shuhei Matsumoto
f6f9cc59c6 bdev/nvme: apply_firmware() calls jsonrpc_send_error_response() directly
Previously, bdev_nvme_apply_firmware() used a temporary character array
to reduce the calls of spdk_jsonrpc_send_error_response().

Change these to call spdk_jsonrpc_send_error_response() directly.

This will simplify the next patch to replace spdk_bdev_first/next() by
spdk_for_each_bdev()ss.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I87ffc9416232dcaba30202ebbe0cb4b185a9563d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16539
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-31 10:30:52 +00:00
Shuhei Matsumoto
f5885db9ed bdev_fio_plugin: Replace spdk_bdev_first/next_leaf() by spdk_for_each_bdev_leaf()
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Icf7bd4348de200d33c242fa63f4facb9592abcaa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16538
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-31 10:30:52 +00:00
Shuhei Matsumoto
5647948681 bdevperf: Replace spdk_bdev_first/next_leaf() by spdk_for_each_bdev_leaf()
Replace all spdk_bdev_first/next_leaf() calls by spdk_for_each_bdev_leaf().

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I61e8302346a70b0dc219fff29b06158b542dd87f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16537
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-31 10:30:52 +00:00
Shuhei Matsumoto
9ef9d4bd23 bdevperf: Factor out creating multithread job config into helper function
The next patch will replace spdk_bdev_first/next_leaf() calls by
spdk_for_each_bdev(). As a preparation, factor out creating multithread
job config for a bdev into a helper function.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Ib4df53af8b1bba5b012e93ff9d00c4089cca774e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16536
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-31 10:30:52 +00:00
Shuhei Matsumoto
f91ba919c5 test/bdevio: Replace spdk_bdev_get_by_name() by spdk_bdev_open_ext()
spdk_bdev_get_by_name() is also not safe and bdevio_construct_target()
calls spdk_bdev_open_ext(). Hence, by adding a extra abstraction, remove
spdk_bdev_get_by_name() call.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I6f4cbe82a02ff1affb215c7e2d8681d76d1afb96
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16535
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-31 10:30:52 +00:00
Shuhei Matsumoto
d9cea478b2 test/bdevio: Replace spdk_bdev_first/next_leaf() by spdk_for_each_bdev()
At the previous refactoring, most use cases for spdk_bdev_first/next()
were replaced by spdk_for_each_bdev(). However, test/bdevio was not
changed because this was a test tool. Finally, replace
spdk_bdev_first_leaf() and spdk_bdev_next_leaf() by spdk_for_each_bdev()
for test/bdevio in this patch.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Ie62e7d2438b877e903af7882181564f8b7407c4d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16534
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-31 10:30:52 +00:00
Nathan Claudel
669069da0f lvol: fix jsonrpc error code sign in create_lvstore
`vbdev_lvs_create` returns negative errnos. The sign was flipped here.

Change-Id: I57e0813c2ecd10695395273a1c4ea750ef00b930
Signed-off-by: Nathan Claudel <nathan.claudel@kalrayinc.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15273
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-30 16:57:14 +00:00
Jim Harris
9e4875c398 bdev_nvme: remove duplicated line from bdev_mdns_client.c
Reported-by: Alexey Marchuk <alexey.marchuk@nvidia.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I075d909304d01f94ffbe150dac1109bf809f3436
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16275
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Boris Glimcher <Boris.Glimcher@emc.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-30 16:30:01 +00:00
plestk
96dca1676b nvmf: Fix new line at the end of log message
Signed-off-by: plestk <plestringant@kalray.eu>
Change-Id: I24c59d0d5b7a889e03d77a40b14ac95f6fe42afe
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16102
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2023-01-30 16:29:49 +00:00
Jim Harris
dba35d8e44 nvme/perf: include config.h to get SPDK_CONFIG_URING
perf has support for io_uring when SPDK_CONFIG_URING
is set, but we have to include config.h to get it.

Fixes problem with perf -R option not working, even
when user specified --with-uring.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I403ae755349e702c39dba332c5fb335d171f0d02
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16584
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-30 16:29:35 +00:00
Karol Latecki
a86fa6d1a4 scripts/perf: replace spaces for BMC's sensor names
Replace spaces with undescores for each sensor name
to avoid dealing with filenames with spaces later.

Change-Id: I2115cc14a15a53a7d92a7dae5cb6d1bfa7fb4402
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15352
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jaroslaw Chachulski <jaroslawx.chachulski@intel.com>
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-30 16:29:19 +00:00
Michal Berger
533039a235 autobuild: Make autobuild test suite more granular
Split each test into its own function. Oncoming patches will expand
on this approach.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I61f3a8847ae65a25504acdf22301757d35c0408d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15722
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2023-01-30 16:29:09 +00:00
Michal Berger
92109c88d7 autobuild: Move make_install test into a separate function
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Ife9e941b8afb3d33155e336b06c82b52bb4ac292
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15721
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
2023-01-30 16:29:09 +00:00
Michal Berger
1995571dba autobuild_common: Use absolute paths
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Ib559eb30decc21af58617cac3c81382b6f57d2c6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15523
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-30 16:29:09 +00:00
Michal Berger
fa030043df autotest: Make UT coverage setup independent from autotest.sh
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Idacba4abc5a33492e2de06522c446fd68230ea6b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15080
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2023-01-30 16:29:09 +00:00
Michal Berger
4eb8f5b4d1 autobuild: Move autobuild.sh's functions to a separate source file
This will allow for these routines to be used by the external
entities, allowing for more granular approach.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Ibb753a4900ef927b82e50b7c8af2780d8ff695ec
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15522
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
2023-01-30 16:29:09 +00:00
John Levon
6b206e3110 nvmf: sanity check passthru handlers
These routines can only handle a single buffer; double check that is the
case, and fail if not.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: I136482c27c73655887c49405f747b8ed073f7b69
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16198
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: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-30 16:28:35 +00:00
John Levon
9b7c2bf544 nvmf: use req->iov consistently in unit tests
Use req->iov as needed, to make it easier to remove req->data later.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: I3084254ec44cfc4e11f8beccc61c895232daf272
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16197
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: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-30 16:28:35 +00:00
John Levon
e1413e9197 nvmf/rdma: use req->iov consistently
Use req->iov as needed, to make it easier to remove req->data later.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: Ie625f374e846f7e6afd6a5d143a5174d27d419b4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16256
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: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-30 16:28:35 +00:00
John Levon
fd05a2ff47 nvmf/tcp: use req->iov consistently
Use req->iov as needed, to make it easier to remove req->data later.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: I4095e3c4089b730db123705d0168cd409375cc43
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16196
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-30 16:28:35 +00:00
John Levon
c0ddb423e0 nvmf/vfio-user: use req->iov consistently
Use req->iov as needed, to make it easier to remove req->data later.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: Id23c4ef8018d6a7aad42c3d5054fa9addcf16f0a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16195
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-30 16:28:35 +00:00
John Levon
49c0d28ab1 nvmf: drop req->data usage in ctrlr.c
Refer to req->iov instead of req->data. As the queue connection code
already presumes a single data buffer, add some sanity checking for
this.

We also need to fix vfio_user.c as a result to correctly set ->iovcnt.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: Ib1e4ef3885200ffc5194f00b4e3fe20ab1934fd7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16194
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-30 16:28:35 +00:00
John Levon
ecc80dfcfb util: add spdk_iov_xfer_*() API
Add a new API for incremental copying in or out of an iovec, and replace
current code to use the new API.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: I088b784aef821310699478989e61411952066c18
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16193
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2023-01-30 16:28:35 +00:00
Jim Harris
833992d09c doc: nvme-cuse is no longer experimental
This has been actively supported for several years
now, but this part of the documentation was never
updated to reflect that.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iad69552ecd37a01ca6d281a0169d527c59c233b3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16582
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-30 08:13:01 +00:00
Jim Harris
6dc9dbe5ca env_dpdk: don't call remove_rte_dev from secondary proc
During secondary process shutdown, when nvme device
would get detached, it would trigger env_dpdk to
send rte_eal_hotplug_remove event for the corresponding
BDF.  But this isn't valid from a secondary process -
we can only attach/detach from the primary process.

Usually this would just result in a bunch of annoying
print messages as the secondary and primary process
sent rte messages between each other.  But occasionally
one of the response messages from the primary process
could arrive just as the secondary process was going
through rte_eal_cleanup.  The message would get
kicked to the DPDK intr thread, we would do bus_cleanup
which frees all of the PCI state, and then the message
would execute on the intr thread causing seg faults,
use-after-free or some other violation.

It's possible some kind of cleanup should be
implemented in DPDK, but for now, let's just not
induce incorrect behavior from SPDK, and don't send
the hotplug_remove messages from a secondary
process.

Fixes issue #2651.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16553
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-27 08:46:05 +00:00
Jim Harris
cf64422ad7 bdev: call unregister callback on correct thread
We should always called the unregister callback on
the same thread that spdk_bdev_unregister() was
originally called.  So save the thread pointer and
use an spdk_thread_send_msg() to make sure it gets
called on the correct thread when the unregister
finishes.

Also add unit test that reproduces the original
issue.

Fixes issue #2883.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16554
Reviewed-by: Mike Gerdts <mgerdts@nvidia.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-27 08:45:28 +00:00
Liu Xiaodong
651c558d0e doc: describe ublk target in user guide
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Change-Id: I0de47e21a34d7766c4addd6f751098b03d8a4a9e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16245
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>
2023-01-26 20:59:22 +00:00
Krzysztof Karas
6c0da14649 DPDK: use -Ddisable_apps option
Reduce build time and size by passing -Ddisable_apps.
This option will be used instead of pushing a backport
to DPDK fork that would manually disable app building.

Tested on DPDK 22.07 and DPDK 22.11.1.

Change-Id: I94df5550315567f6dbd72d354f733fe5126c5930
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15929
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>
2023-01-26 20:23:16 +00:00
Krzysztof Karas
eb5b45cb64 dpdkbuild/Makefile: move sed-ing disabled libs and drivers
Currently those are being sed-ed as a part of the meson setup
command, which elongates that line to over 300 characters.

To reduce size of that command, move sed-ing out to
variables and use only those as part of meson setup
command.

Change-Id: I5f8900d43b8d1f929a68d0e3a3ded962a6f8d1e2
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16533
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>
2023-01-26 20:23:16 +00:00
Tomasz Zawadzki
62876270a9 CHANGELOG: added missing entries for SPDK 23.01
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I92258ad0e6b4994275cac956b27af6186925f1dc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16549
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>
2023-01-26 17:33:59 +00:00
Liu Xiaodong
b2b1e8d76a ublk: turn ublk_start_disk in async
Since ublk_start_disk internally runs ublk_ctrl_cmd
asynchorously, the result should be returned after the
whole process of ublk_start_disk is completed.
Add a callback into ublk_start_disk parameter, and change
rpc_ublk_start_disk to send response in callback.

Change-Id: Icc0d9e8cb81f2b67bf99fdead423bfe8159714bc
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16500
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-26 17:22:04 +00:00