Commit Graph

19612 Commits

Author SHA1 Message Date
Jaylyn Ren
770f7abca2 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-05-09 17:58:11 +08:00
Krzysztof Karas
c2213b4de5 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-05-09 17:58:11 +08:00
Krzysztof Karas
8540f3b107 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-05-09 17:58:11 +08:00
Krzysztof Karas
ba77879e01 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-05-09 17:58:11 +08:00
Krzysztof Karas
c64d7ad06f 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-05-09 17:58:11 +08:00
Sebastian Brzezinka
9241c7fa35 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-05-09 17:58:11 +08:00
Sebastian Brzezinka
15dbc97499 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-05-09 17:58:11 +08:00
Jim Harris
9c10093483 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-05-09 17:58:11 +08:00
Jacek Kalwas
30d24bae73 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-05-09 17:58:11 +08:00
Jacek Kalwas
88fbbb6bbc 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-05-09 17:58:11 +08:00
Karol Latecki
c33f4c90ea 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-05-09 17:58:11 +08:00
Karol Latecki
d1f070e6bc 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-05-09 17:58:11 +08:00
Krzysztof Karas
ba95566de9 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-05-09 17:58:11 +08:00
Krzysztof Karas
0c4c32a928 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-05-09 17:58:11 +08:00
Michal Berger
182ed72f35 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-05-09 17:58:11 +08:00
Michal Berger
276a5f1d45 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-05-09 17:58:11 +08:00
Michal Berger
5f7409c89b 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-05-09 17:58:11 +08:00
Michal Berger
196978565e 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-05-09 17:58:11 +08:00
Michal Berger
8c5a2c051d 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-05-09 17:58:11 +08:00
Michal Berger
f53c728225 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-05-09 17:58:11 +08:00
Michal Berger
3ef1c1cd9f 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-05-09 17:58:11 +08:00
Michal Berger
360190f9e2 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-05-09 17:58:11 +08:00
Ben Walker
43e68a8b1f 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-05-09 17:58:11 +08:00
Marcin Spiewak
ceb3747451 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-05-09 17:58:11 +08:00
Marcin Spiewak
a4463cbc64 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-05-09 17:58:11 +08:00
Marcin Spiewak
63ee5362e2 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-05-09 17:58:11 +08:00
Jim Harris
c12d468d02 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-05-09 17:58:11 +08:00
yidong0635
92a3903478 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-05-09 17:58:11 +08:00
Karol Latecki
c0ff46030b 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-05-09 17:58:11 +08:00
Alexey Marchuk
6f8d92e512 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-05-09 17:58:11 +08:00
Alexey Marchuk
15e8ab0579 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-05-09 17:58:11 +08:00
Alexey Marchuk
fb4acf18e3 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-05-09 17:58:11 +08:00
Jim Harris
8192d7c568 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-05-09 17:58:11 +08:00
Shuhei Matsumoto
f918384212 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-05-09 17:58:11 +08:00
Mike Gerdts
a6aa4df1ce 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-05-09 17:58:11 +08:00
Mike Gerdts
c615a90094 blob_bdev: fix doc for spdk_bs_bdev_claim
The documentation for spdk_bs_bdev_claim() errantly referred to
spdk_bdev_create_bs_dev_ro() when it should refer to
spdk_bdev_create_bs_dev(). This has been corrected.

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: I1b19bedb93aa553e6cc319ebba64e62f2b80d2c1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17291
Community-CI: Mellanox Build Bot
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-05-09 17:58:11 +08:00
Michal Berger
f32fd879ff test/common: Merge pkgdep/dnf into pkgdep/yum
There's no point in keeping these separate as dnf-aware distros
also support yum and there are no plans to drop it anytime soon.
In fact, since the actual list of packages between dnf and yum
was different, the centos7 was not provisioned to the full extent.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Ieec6796bf457d37b2618a1c2756d281f4af0c5b4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16931
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-05-09 17:58:11 +08:00
Michal Berger
9fbed5468d test/common: Rename vm_setup.sh to autotest_setup.sh
The new name puts more emphasis on what is the main designation of
the script as it does not really touch anything VM-related.

The vm_setup.sh is preserved as a symlink available for a transition
period.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I968a52cc069706f4c5e1b8a871988809e701a3fe
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16928
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
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-05-09 17:58:11 +08:00
Michal Berger
d43cd2a215 test/common: Simplify README
Most of the information gathered there is outdated and generic and
falls out of scope of what vm_setup.sh/pkgdep is actually doing.
Simply mention the main purpose of the script, leaving actual
configuration to the user.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I126515dea019e7f1cd76c8be1339aea080d2a2b0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16927
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-05-09 17:58:11 +08:00
Michal Berger
65849fd5e9 pkgpdep: Remove unsupported pieces
We no longer support ubuntu's Xenial and Bionic flavors so they can
be removed.

swupd, Clearlinux's package manager, is also no longer supported.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I526a89f4d3b3078949f235e46f8bb3a39b2a24b6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16926
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
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-05-09 17:58:11 +08:00
Michal Berger
860c5f1f75 test/common: vm_setup.sh cleanup
Some minor code shuffle + removal of the autorun-spdk.conf creation.
Creating this config has little sense as some of these flags cannot
be used together anyway - it basically serves as a dump of all
supported flags which we usually are having a hard time to keep up
to date. That said, autotest_common.sh (and get_config_params())
gives a better view as to what flags are actually supported and
how they are used in practice.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Ib223ec90be58e68ecab69176d213c353df530498
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16925
Reviewed-by: Ben Walker <benjamin.walker@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>
2023-05-09 17:58:11 +08:00
Tomasz Zawadzki
67d8b8d505 deprecation: add the md to documentation Makefile
Originally deprecation.md was pulled verbatim to
the built documentation. This resulted in very
weird paths on the spdk.io:
https://spdk.io/doc/md__home_sys_sgsw_oss_spdk_github_io_spdk_deprecation.html#deprecation

Use the way that changelog does it, by copying
the file and adding appropriate section links.

Now only the Doxygen version will contain the
section links. Meanwhile deprecation.md in
project root will not. This improves readability.

Change-Id: Ic5c1caf7603b847b3c7445bde76e277ba1ccb740
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16574
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-05-09 17:58:11 +08:00
Swapnil Ingle
5a2d23c5f1 nvmf/vfio_user: move cq_is_full() closer to caller
Move cq_is_full() closer to its caller post_completion() and along with
fixing comments.

Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Change-Id: I93262d1805f0f9f075c6946ed97cd3006ffba130
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16415
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: Ben Walker <benjamin.walker@intel.com>
2023-05-09 17:58:11 +08:00
Tim Zhang
ce7b461b7f bdev_nvme: add hdgst and ddgst in nvme_ctrlr_config_json
this add output when execute save_config function

Signed-off-by: Tim Zhang <hgmz371@gmail.com>
Change-Id: Ib465dc424beb691e86425878588bb732574fc9b4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16097
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-05-09 17:58:11 +08:00
KanKuo
53c4b67c54 UT/vhost/vhost.c:add the test of spdk_blk_construct
Signed-off-by: KanKuo <kuox.kan@intel.com>
Change-Id: Ib5b132020845c3f3e961b65590c100ad4f1567c3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15873
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-05-09 17:58:11 +08:00
KanKuo
eb6a2d872d UT/bdev/bdev.c:add bdev_compare test
Signed-off-by: Kuo Kan <kuox.kan@intel.com>
Change-Id: Ib3d33cefc78f543e157ea552ee88f0514e305054
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15795
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-05-09 17:58:11 +08:00
Michal Berger
225b3b96ff test/nvmf: Reload irdma driver only when e810 test was requested
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I313d65b01c9214a6bde5775488fb32c70cefa4d6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15357
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-05-09 17:58:11 +08:00
Michal Berger
5e244e25f0 scripts/vagrant: Replace lsb_release with os-release check
lsb_release is not shipped under latest fedora distros, hence failing
this check. Use /etc/os-release instead.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Id74095ff5dd5d43f7a97e4c5d026ac13da26d815
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15107
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>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
2023-05-09 17:58:11 +08:00
Michal Berger
3b2eb02bc9 scripts/bash-completion: Adjustments for older Bash versions
Older versions of Bash don't handle -v option in array context very
well. Also, some of the compopt options are missing in older versions
so make sure stderr stays silent.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I81989940e8b25e2dbeed91f97fed5aa65e7df656
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14130
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>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
2023-05-09 17:58:11 +08:00
Michal Berger
49543bca68 scripts/bash-completion: Extract all rpc methods
Currently we extract these methods from rpc.py's --help or from
rpc_get_methods() in case there's a SPDK application running
in the background. This, however, results in a list missing some
basic methods that rpc_get_methods() simply doesn't include, e.g.
save_subsystem_config().

To make sure we always have a complete list use both, --help and
the rpc_get_methods() together.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Ie73917b74860cac13056bea9babc7f7b57e39b3a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14115
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2023-05-09 17:58:11 +08:00