Commit Graph

19628 Commits

Author SHA1 Message Date
Michal Berger
8ad5671fbb test/common: Silence vhost/commo.sh during cleanup
It's too verbose and may send confusing (in context of the actual
cleanup) messages.

Change-Id: I9e86e20afcf567fb54fec3a6cfb9008ad2080a12
Signed-off-by: Michal Berger <michal.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17485
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>
2023-04-13 21:39:59 +00:00
Changpeng Liu
544e2a273b lib/vhost: register VQ interrupt handler when enable VQ
In commit 23baa67, we will start virtio device only once,
and update the VQ's information in SET_VRING_KICK message
context, so when multi-queues are enabled, SPDK doesn't
register VQ's interrupt handler, here we add it when enable
VQ.

Fix issue #2940.

Change-Id: I29dbd7bf0b81b23c2e47e37c467952cc5887b5bf
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17354
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-04-13 21:39:33 +00:00
Jim Harris
89188e84f1 bdev: assert that internal status is PENDING for completed IO
bdev modules should have call spdk_bdev_io_complete twice
for the same IO.  We can help find cases where this happens
by adding an assert in spdk_bdev_io_complete - confirming
that the current status is still PENDING, before changing
it to the status passed by the caller.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id8a044a94113f1ac5e3c8d86e426654bfa8d5c5a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17330
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2023-04-13 21:38:10 +00:00
Jim Harris
42567ba294 bdev: reset status immediately to PENDING for nomem_io queue
Reset the status for a bdev_io that fails with NOMEM status
back to PENDING immediately when it is put on the nomem_io
list, instead of waiting until it gets submitted again.

This helps keep the bdev_io states consistent, so that if
we need to complete these IO for abort reasons later, that
we aren't completing IO that already have a non-PENDING
state.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I9532095141209ed6f7af362b52c689da62e755ce
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17335
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
2023-04-13 21:38:10 +00:00
Alexey Marchuk
79e1c3f298 test/nvmf: Add more Nvidia NIC IDs
Even though these NICs are not used by Community CI,
all tests fail if to run on a system with
CX6 Dx, CX7, BF2 and BF3.

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: I23aaf8ddbc5b165f0a4372108d1f4b34f0b2ccf7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17166
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-04-13 21:35:30 +00:00
Alexey Marchuk
0de1c21570 lib/nvmf: Deprecate cb_fn in spdk_nvmf_qpair_disconnect
Handling this callback is quite complex and may lead to
various problems. In most of places, the actual event
when qpair is dosconnected is not importnat for the
app logic. Only in shutdown path we need to be sure
that all qpairs are disconnected, it can be achieved
by checking poll_group::qpairs list

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: I453961299f67342c1193dc622685aefb46bfceb6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17165
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2023-04-13 21:35:30 +00:00
Alexey Marchuk
d478b20ddf lib/nvmf: Update spdk_nvmf_qpair_disconnect return value
If the qpair is already in the process of disconnect,
the spdk_nvmf_qpair_disconnect API now return -EINPROGRESS
and doesn't call the callback passed by the user.

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: If996b0496bf15729654d18771756b736e41812ae
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17164
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-04-13 21:35:30 +00:00
Alexey Marchuk
0496a2af3b lib/nvmf: Do not use cb_fn in spdk_nvmf_qpair_disconnect
Current implementation of spdk_nvmf_qpair_disconnect
saves and calls user's callback correctly only on
the first call. If this function is called when
qpair is already in the process of disconnect, the
cb_fn is called immediately, that may lead to stack
overflow.

In most of places this function is called with
cb_fn = NULL, that means that the real qpair disconnect
is not important for the app logic. Only in several
places (nvmf tgt shutdown flow) that is important to
wait for all qpairs to be disconnected.

Taking into account complexity related to possible stack
overflow, do not pass the cb_fn to spdk_nvmf_qpair_disconnect.
Instead, wait until a list of qpairs is empty in shutdown path.

Next patches will change spdk_nvmf_qpair_disconnect behaviour
when disconnect is in progress and deprecate cb_fn and ctx
parameters.

Fixes issue #2765

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: Ie8d49c88cc009b774b45adab3e37c4dde4395549
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17163
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-04-13 21:35:30 +00:00
Alexey Marchuk
bcd0ea8c1c nvmf/vfio_user: Post SQ delete cpl when qpair is destroyed
This patch removes usage of cb_fn argument of
spdk_nvmf_qpair_disconnect API. Instead of relying
on the callback, post a completion on delete SQ
command when transport qpair_fini is called.

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: I68dec97ea94e89f48a8667da82f88b5e24fc0d88
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17168
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2023-04-13 21:35:30 +00:00
Michal Berger
6693862f9e autotest: Consider processes from deleted workspaces during cleanup
Common practice is to purge workspace on the jenkins side when the
job is done. When that happens, stuck processes may still linger,
but readlink -f will fail to resolve exe link as the target binary
won't exist anymore. Instead, just see what the link points at
and include it in the list.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I437a720e12e43e33fbf04345a6b77987167864fe
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17050
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-04-13 21:27:08 +00:00
Alexey Marchuk
6b7cca1542 accel/dpdk_cryptodev: Handle OP_STATUS_SUCCESS
SW PMD might process a crypto operation but failed
to submit it to a completions ring.
Such operation can't be retried if crypto operation
is inplace.
Handle such crypto op as a completed.
Verified by integrating rte openssl driver and
adding additional logs to check that SUCCESS
status received and completed as expected.

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: Ida161cec045167af752ebd5b57f41b2bbfe8b97c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16995
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>
2023-04-13 21:26:20 +00:00
Sebastian Brzezinka
56eced4280 fuzz/llvm: move coverage data to llvm/coverage
There is no access to fuzzer logs if `index.html` is in the same dir,
move covrage to `$output_dir/llvm/coverage`.

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Change-Id: I139a6d780754aaf5b1333a2e5b0183bd24488bfa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16341
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2023-04-13 21:23:07 +00:00
Sebastian Brzezinka
7cc7d52830 fuzz/llvm: provide a prefix to use when saving artifacts
Save crash files and other artifacts in `$output_dir/llvm/`

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Change-Id: I2ff82b414592cc492b79c9178b7257b2e87440b5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15827
Reviewed-by: Michal Berger <michal.berger@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>
2023-04-13 21:23:07 +00:00
Sebastian Brzezinka
1fa3b4f72d llvm_nvme_fuzz: enable running llvm nvmf test in parallel
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Change-Id: Iad129c1bc62116a93701a5f68c78351f01a4c878
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16249
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-04-13 21:23:07 +00:00
Sebastian Brzezinka
4f7ab50650 llvm_vfio_fuzz: start fuzzer tests in parallel
With corpus files persistent between fuzzer weekend run it may be
better to start all test for fraction of time instead of different
test every week.

Remove `poll_groups_mask` from config, this patch run every test on
single core and since then there is no need to specify another mask.

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Change-Id: I4448724801bdf1a3c496f829fd168b840c2efa67
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15384
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: Michal Berger <michal.berger@intel.com>
2023-04-13 21:23:07 +00:00
Jaylyn Ren
6b6101c1e7 spdk_top: fix the cpu usage display issue in thread tab
Fix the issue that the cpu usage in thread tab shows empty when the CPUMASK does not start from zero.

Signed-off-by: Jaylyn Ren <jaylyn.ren@arm.com>
Change-Id: Ifd22feefd22a5dd0f87b20ff6c47bd196eb1a39a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17289
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-04-13 12:19:37 +00:00
Krzysztof Karas
ed1b4c926c bdev: delete UUID generation from ephemeral bdevs
Ensure no ephemeral bdev will generate its own UUID,
unless this value has been specified via RPC.
Generation is now being done by the bdev layer itself.

Change-Id: I11efe819a28a137b738959a96a7bdf8c79cfaf64
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17109
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-04-13 12:12:58 +00:00
Krzysztof Karas
1db41324f7 bdev/raid: add RPC option to provide UUID
Make sure UUID can be passed to raid bdev type during
its creation.

Change-Id: I5fa9ca2d18d435fa882e1cb388b2e1918d821540
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17136
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2023-04-13 12:12:58 +00:00
Krzysztof Karas
91ea8102b6 bdev/error: add option to provide UUID for error bdev
Make sure UUID can be passed to error bdev type during
its creation.

Change-Id: I80b9c1b938a464c0cc8c61f871ae2044d8e09dfd
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17107
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
2023-04-13 12:12:58 +00:00
Krzysztof Karas
11dc297c1b bdev: always generate UUIDs
Make sure UUID is present for every bdev, even ephemeral ones.
Furthermore, this change removes assumption that bdev UUID
may remain empty.

Change-Id: I924c1ba9dedfe88a05044bb1073f28085735b1c1
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17106
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2023-04-13 12:12:58 +00:00
Sebastian Brzezinka
0cd5af7143 fuzz/llvm: add common.sh for llvm fuzzers
`common.sh` - add common function to start fuzzers in
parallel and quick sequential run

add `get_testn` - get number of test to run in parallel

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Change-Id: I7c70b5221887c29b495a1632545877ca7cca0945
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16323
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>
2023-04-13 12:09:53 +00:00
Sebastian Brzezinka
c019eb4d67 llvm_vfio_fuzz: handle thread create failure
In case of `pthread_create` or `spdk_thread_create` failed stop
spdk app with `-1` error code

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Change-Id: Id5d0f6716917f42e06fbda7db9285deb320e309a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16338
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-04-13 12:09:53 +00:00
Jim Harris
943806efab init: rewrite subsystem_sort
Commit aaba5d introduced a build warning with some
compilers. While fixing it, I realized the function was
difficult to immediately understand. So in addition to fixing
the build warning, I also made the following changes:

* Improved names for local variables
* Use TAILQ_INIT for local TAILQ instead of TAILQ_HEAD_INITIALIZER.
* Add comments explaining more clearly what the nested loops are
  doing.
* Use TAILQ_SWAP instead of a FOREACH + REMOVE + INSERT.

Fixes: aaba5d ("subsystem: Gather list changed conditions.")
Fixes issue #2978.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic8740b5706537938d62a0acfac62625b2424b85f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17496
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Mike Gerdts <mgerdts@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2023-04-13 04:58:05 +00:00
Jacek Kalwas
de2609a241 env_dpdk: put rte_rcu on DPDK_LIB_LIST unconditionally
rte_rcu is available on all versions of DPDK supported by SPDK. It is
also required by quite a few DPDK libraries. So just include
it always, it's a small library so let's not try to over-complicate by
trying to figure out exactly when it's needed.

This change fixes linking issue when crypto enabled (and vhost not).

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Ibdd6acb5a25c401b462022bbd94bd380690640d0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17514
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-04-12 16:54:05 +00:00
Jacek Kalwas
13a2c5589c bdev: fix return value of bdev_io_get_max_buf_len
Fixed function is used to determine if it is possible to get iobuf
from the pool. To make sure that buf size alignment requirement is
satisifed value returned shall include alignment value but subtracted
by one.

e.g.
transaction size length = 64k
buffer alignment = 1 byte (no alignment requirement)
metadata length = 0

Without the fix the function returned 64k + 1, now it returns 64k
which is correct behavior and allows to proceed with further command
processing (if max buffer size limit is set to 64k only).

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I09104ad21b3652ba1aa5c3805a04b1c6549d04ac
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17513
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2023-04-12 16:54:05 +00:00
Karol Latecki
9754119ac9 test/vfio-user: reduce spdk_tgt memory allocation
Limit spdk_tgt app to 512MB of memory. This should
be sufficient for tests in this suite provided we
also reduce the size of created malloc bdevs.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Iaaba1e13899d37232f7acf842b7deed05935f78f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17365
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jaroslaw Chachulski <jaroslawx.chachulski@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-04-12 16:48:13 +00:00
Karol Latecki
22fa84f77a test/vhost: increase memory in virtio tests
Increase the memory for spdk processes using
"-s" option. When built with additional options
(like --with-ocf) processes have more memory
requirements.

See:
https://review.spdk.io/gerrit/c/spdk/spdk/+/17265
https://github.com/spdk/spdk/issues/2951
for details.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ia4fc37787861e2aef28392eaddf389f27bdf7200
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17371
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-04-12 16:48:13 +00:00
Krzysztof Karas
7d5f0ade61 spdk_top: move core_busy_period and core_idle_period
Move these two variables below check for core_num boundary.
This ensures core_num's value can be used as index for g_cores_info
array.

Change-Id: I118a4b3a3ec61c9ccd818f3f3bd2ff013d2d7b14
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17175
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-04-12 16:45:03 +00:00
Krzysztof Karas
6d7b690584 bdevperf: avoid writing outside "out" array boundary
Currently variables "i" and "k" in config_filename_next()
function may increase at the same speed. When repeating
"for" loop at line 1862 both "i" and "k" are being incremented:
 + i by the for loop,
 + k by the "out[k++]" instruction.
This means that there may be a case, where for loop ends with
"i < BDEVPERF_CONFIG_MAX_FILENAME" condition, as value of "i"
is equal to BDEVPERF_CONFIG_MAX_FILENAME, and at the same time
value of "k" is also equal to BDEVPERF_CONFIG_MAX_FILENAME,
because after writing to out[BDEVPERF_CONFIG_MAX_FILENAME - 1]
element, we increment it one last time.
This results in writing "0" value at line 1873 to memory outside
"out" array boundary.
To amend this problem, compare k against
BDEVPERF_CONFIG_MAX_FILENAME, insted of i.

Change-Id: Ia45778c1f267d2b9dcd676cd9b6c662d09f6f94e
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17176
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-04-12 16:44:42 +00:00
Michal Berger
982a1bb7ed test/vhost: Make sure $disk_map exists
Also, simplify the way how it's read. As a benefit, this gets rid of
the xargs complaining about a NUL being sent out to its input which
was quite verbose.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Iaeb09298c2255404273bb3fc6910bc6b93c2d7eb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16892
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-04-12 16:44:21 +00:00
Michal Berger
47c2ee6435 test/vhost: Remove cpuset limit enforced upon vhost cpus
This limit didn't do much in a first place. It was creating separate
cgroup with mem nodes already set to 0-1 nodes - in practice these are
all the NUMA nodes available for mem allocation by the very default.
Regarding cpus, vhost is already limited by its own cpumask's affinity
hence there's no need to enforce this limit via a dedicated cgroup.
Lastly, this was not taking into consideration the fact that other
processes may still be scheduled on the vhost cpus as the cgroups
they belong to were not modified in any way (like in case of the
scheduler tests for instance). That said, the amount of jitter coming
from these 3rd party processes would not have much bearing on vhost
anyway - the only processes that could be more noisy are QEMU's but
each VM instance is already put into a separate cgroup (see
test/vhost/common.sh).

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I1de24bfc9e24f8f6391207e579cc599ea5c82094
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16890
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2023-04-12 16:44:21 +00:00
Michal Berger
98d98ecb57 test/vhost: Switch from msdos to gpt
Disks used under the vhost benchmarks can be > 2TB so the msdos pt
is not very suitable here. Use something more robust like gpt.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I3e98bcb655c2f55a515f4000b0668b26d71c8fca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16889
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2023-04-12 16:44:21 +00:00
Michal Berger
905c4dcf6f test/vhost: Make sure all TCP ports allocated for QEMU are available
This may become problematic in case of bigger number of VMs. In
particular, it was noticed that the vnc port may overlap with ssh's
X forwarding ports (starting at 6010). To make sure QEMU does not
fail while attempting to bind to already existing port, we first
check if target port is in use.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I525aa2a1cc52c6aa1d8d4ade8924ad684fe8af50
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16337
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
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>
2023-04-12 16:44:21 +00:00
Michal Berger
ce6550a935 test/vhost: Add VM's id to fio config's description
Since we are sending fio configuration to potentially dozens of
VMs, proper description allows to identify final results on per-VM
basis - this is helpful during debugging.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Ifc38d9cb60879f8b7f6e178f23e3f451a73765f0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15895
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2023-04-12 16:44:21 +00:00
Michal Berger
c1d2bdfeb3 test/vhost: Add perf collection support
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I059658c477be4122e7b04f33a796f732746b7c90
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15603
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-04-12 16:44:21 +00:00
Michal Berger
7c764edf85 test/vhost: Gather IRQ stats from the VM
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I4351d812b9b9da127b6daf46b0f44ce237e33ee9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15460
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-04-12 16:44:21 +00:00
Michal Berger
f8a085a2d5 test/vhost: Add helper functions for extracting IRQ data
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: If75aeca0c44667ef02b72f2e4a9141da4057d291
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15459
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
2023-04-12 16:44:21 +00:00
Ben Walker
78df9be449 nvmf/tcp: Wait for PDUs to release when closing a qpair
In the presence of hardware offload (for data digest) we may not be
able to immediately release all PDUs to free a connection. Add a
state to wait for them to finish.

Fixes #2862

Change-Id: I5ecbdad394c0296af6f5c2310d7867dd9de154cb
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16637
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-04-10 17:58:48 +00:00
Marcin Spiewak
8247bd4041 configure: added --max-lcores option to ./configure
This patch adds support for --max-lcores configuration
option to ./configure script. This option can be
used to change value of DPDK's RTE_MAX_LCORE
(which is by default set to 128 for x86 architecture).
If specified, DPDK will be configured to use
the value provided by the user instead of
the default one. The option can be useful
in systems where number of physical CPUs is
larger than 128.
When RTE_MAX_LCORE is increased, it is possible
to specify cores with identifiers larger than
128 in the SPDK's CPU mask.
If the option is not specifed, DPDK will use
default value of RTE_MAX_LCORE.
--max-lcores range is [1..1024]
Example usage:
./configure --max-lcores=256
./configure --max-lcores=16

Change-Id: I47d321ba394c9acf27eaa91619aeaad28db6de34
Signed-off-by: Marcin Spiewak <marcin.spiewak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17453
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Community-CI: Mellanox Build Bot
2023-04-10 17:58:20 +00:00
Marcin Spiewak
b3a5763436 app: use --lcores to map ids greater than 128
Fixes #2812

This patch adds	support	for '--lcores <map_list>'
parameter in spdk.
This parameter allow mapping of the lcores
to CPU IDs, if the system contains CPUs with IDs
greater	or equal to 128 (RTE_MAX_LCORE). Such CPUs
can not be directly included in core mask
specified in '-m <mask>' parameter, as the dpdk
rejects cores if IDs are greater than 127.
The only way to	use them in spdk is to map lcore
to CPU using --lcores parameters specified
in command line.
--lcores and -m parameters are mutually
exclusive. Please use only one of them.
Examples:
build/bin/nvmf_tgt --lcores 0@130
build/bin/nvmf_tgt --lcores 0@150,1@151
build/bin/nvmf_tgt --lcores "(5-7)@(10-12)"
build/bin/nvmf_tgt --lcores "(5-7)@(136,138,140)"

Change-Id: Ia92be4499c8daaa936b1a4357d52ae303d6f3eb1
Signed-off-by: Marcin Spiewak <marcin.spiewak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17403
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2023-04-10 17:58:20 +00:00
Marcin Spiewak
cc54140080 env: added support for lcore map
This patch adds support for lcore mapping list, which
is needed by spdk if someone wants to use CPUs with IDs
greater than RTE_MAX_LCORE (128). For such CPUs it
is impossible to include them in the core mask (passed
to dpdk as '-c <mask>') as the dpdk doesn't allow
IDs greater than RTE_MAX_LCORE. Therefore they
must be mapped to lower lcore values using
'--lcores <maping_list>' passed to dpdk

Change-Id: If68f15cef2bca9e42a3457bf35477793b58ec53d
Signed-off-by: Marcin Spiewak <marcin.spiewak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17399
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-04-10 17:58:20 +00:00
Jim Harris
b1a2319686 nvmf: retry QID check if duplicate detected
A host will consider a QID as reusable once it disconnects
from the target.  But our target does not immediately
free the QID's bit from the ctrlr->qpair_mask - it waits
until after a message is sent to the ctrlr's thread.

So this opens up a small window where the host makes
a valid connection with a recently free QID, but the
target rejects it.

When this happens, we will now start a 100us poller, and
recheck again.  This will give those messages time to
execute in this case, and avoid unnecessarily rejecting
the CONNECT command.

Tested with local patch that injects 10us delay before
clearing bit in qpair_mask, along with fused_ordering
test that allocates and frees qpair in quick succession.
Also tested with unit tests added in this patch.

Fixes issue #2955.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I850b895c29d86be9c5070a0e6126657e7a0578fe
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17362
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-04-07 17:47:13 +00:00
yidong0635
aaba5d9c9e subsystem: Gather list changed conditions.
Just remove the duplicated Code and make the
Conditions for g_subsystems list to subsystems_list
together.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I011b550b83d32580bfd25130dab9e44bcbdc1daf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13753
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>
2023-04-07 17:35:08 +00:00
Karol Latecki
4bf72c9921 doc: add NVMe-oF TCP CVL 23.01 performance report link
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I9e6fe094bfb139a7030ed625e9dcd0e6320e4289
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17488
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <sebastian.brzezinka@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-04-07 16:32:52 +00:00
Alexey Marchuk
9c636a02f9 accel/dpdk_cryptodev: Remove queued_cry_ops
If we were not able to submit all configured
crypto ops, then we can just release crypto_ops
and mbuf object of these crypto ops and save
the actual number of submitted operation in
the accel task. Once all submitted operations
complete, poller will call
accel_dpdk_cryptodev_process_task func to submit
cyrpto operations for reamining data blocks.
If no crypto ops were submitted then the task
will be palced in the channel's queued_tasks
and poller will try to resubmit the task.
That in theory should increase performance
since we attempted to resubmit queued ops
with burst size==1 which is not efficient

Fixes issue #2907

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: I4d17e8ed1ad5383848e4d09c46009c6cb2834360
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16784
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-04-06 23:30:49 +00:00
Alexey Marchuk
8f4d98bb40 accel/dpdk_cryptodev: Fix sgl init with offset
When accel task is processed is processed in
several iterations (submit part of cryops, wait
for completion and submit next part of cryops),
sgl is initialized with offset to exclude previously
processed blocks. However there is a bug since
spdk_iov_sgl_init doesn't advance iovs, as result
when we do sgl->iov->iov_len - sgl->iov_offset,
we may get unsigned int underflow.
Fix is init sgl with 0 offset and then advance it
with offset.
Modified unit test and added an assert in code to
verify this fix.

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: Ib53ff30f0c90d521f2cf6b3ec847b0d06869c2b5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17456
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-04-06 23:30:49 +00:00
Alexey Marchuk
a6545ae311 test/blockdev: Use regualr RPC socket for mlx5 config
When RPC server is used for configuration, rpc_cmd
function waits 15 seconds to read all replies. If
mlx5 dpdk driver is used on slow machines or in
container, RPC framework_start_init may take more
than 15 seconds to execute. As result, rpc_cmd
exits earlier and output of some comamnds
remains in the pipe. Next call of rpc_cmd may
read wrong data, that leads to malformed json
config. To avoid this problem, redirect RPCs to
a regualr rpc socket.

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: Ibfcf56bb0a7f84f69394846d83746c91a4024b9e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16389
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2023-04-06 23:30:23 +00:00
Jim Harris
db6297b501 env_dpdk: omit huge-related options when --no-huge specified
If user passes --no-huge as part of env_context, do
not add other huge-related options to the EAL command
line.  Instead emit an error message and return failure, if
any of them were specified explicitly.

Fixes c833f6aa ("env_dpdk: unlink hugepages if shm_id is not specified")
Fixes issue #2973.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7aa49e4af5f3c333fa1e7dec4e3f5b4b92e7d414
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17483
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2023-04-06 21:32:03 +00:00
Shuhei Matsumoto
c2e288a625 iscsi: Return if conn->sock is NULL when updating connection params
iSCSI connection closes its socket when it is terminated. After the
socket is closed, the connection cannot access to it. However, the iSCSI
fuzz test terminated a connection while processing a text command. The
connection aborted the text command and the corresponding completion
callback accessed the closed socket. This unexpected access caused a
NULL pointer access.

Add a check if conn->sock is not NULL to iscsi_conn_params_update()
to avoid such NULL pointer access. The return type of the most iSCSI
library functions are void. Here, it is enough not to return 0. Hence,
use -ENXIO simply to indicate there is no available socket.

Fixes the issue #2958

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I2c1f58a63ee0a40561a17f81d4b4264061f411f6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17353
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michal Berger <michal.berger@intel.com>
2023-04-06 21:30:38 +00:00
Mike Gerdts
712ab983df blob: set rc to -EINVAL when esnap len too long
When bs_create_blob() is creating the internal xattr for the esnap ID,
it errors out if the ID is too long. This error path neglected to set
the return value. It now returns -EINVAL in this case.

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: I6d756da47f41fb554cd6782add63378e81735118
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17292
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2023-04-06 21:30:03 +00:00