Commit Graph

19402 Commits

Author SHA1 Message Date
Alexey Marchuk
61fbb000fe module/accel: Add accel_dpdk_cryptodev
The new module replaces functionality in vbdev_crypto.
This module is bdev agnostic, so some inernal parts
were reworked.

io_channel: contains a qp of every configured DPDK PMD
crypto key: for mlx5_pci we register a key on each available
device since keys are bound to Protection Domain.

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: If1845cb87eadacbb921c593ba82207a97f2209a3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14859
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2023-01-11 09:16:59 +00:00
Alexey Marchuk
f5d1a924a1 accel/dpdk_cryptodev: start with copy of vbdev_crypto
This patch is just a copy of vbdev_crypto.c and the
corresponding UT file. It makes it easier to review
the next patch which adds accel operations

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: Ib88b45d573b011b1acb35da9bf4dab922d8fb183
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16182
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-11 09:16:59 +00:00
Alexey Marchuk
2608d129d0 accel: Add crypto operation support
Add functions to submit encrypt/decrypt operations
Add RPCS to register and dump crypto keys
Software accel module uses isa-l_crypto AEX_XTS
functionality

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: Iecf0e9913edf11ab85171d0fa467a2a62dfff984
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14858
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <qun.wan@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2023-01-11 09:16:59 +00:00
Krzysztof Smolinski
d68159b618 raid5f: io metadata support
Signed-off-by: Krzysztof Smolinski <krzysztof.smolinski@intel.com>
Change-Id: I7760b2acc315970fbe1a99412dbd9a858ed17d0c
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15130
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-11 09:08:52 +00:00
Krzysztof Smolinski
ba46000561 concat: io metadata support
Signed-off-by: Krzysztof Smolinski <krzysztof.smolinski@intel.com>
Change-Id: I4909e8096dbfbeb8bc2f689ab694baf07c76af21
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15129
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
2023-01-11 09:08:52 +00:00
Krzysztof Smolinski
a289f081dd raid0: io metadata support
Signed-off-by: Krzysztof Smolinski <krzysztof.smolinski@intel.com>
Change-Id: Ia2519cd2726f82328cde3d5db2eb323d2a975219
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15128
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
2023-01-11 09:08:52 +00:00
Krzysztof Smolinski
8f424ed8f6 raid1: io metadata support
Signed-off-by: Krzysztof Smolinski <krzysztof.smolinski@intel.com>
Change-Id: I53a57f85d94110365492d457715f8a8bc1194628
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15127
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
2023-01-11 09:08:52 +00:00
Krzysztof Smolinski
357c038ce0 module/raid: io metadata support
* generic metadata support for raid modules
* raid is not created when metadata formats for base bdevs differ

Signed-off-by: Krzysztof Smolinski <krzysztof.smolinski@intel.com>
Change-Id: Ifaf9cfc4f2472c3820da1070deda758c5334edb2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13549
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-11 09:08:52 +00:00
Karol Latecki
33833272ea test/pkgdep: add avahi packages
Skip CentOS8 and Rocky8 as packages are
not available in default system repositories.

Change-Id: I4e957444aec1745872f5d6cc1cd9bdec792ac400
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15986
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Boris Glimcher <Boris.Glimcher@emc.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: <qun.wan@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2023-01-10 13:16:00 +00:00
Sebastian Brzezinka
f80009632f nvmf/vfio_user: cast numdw to uint32_t
Use uint32_t to avoid overflow when left shift by 16 places

This patch fix issue #2858

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Change-Id: I07f4328674ae7bd7525792ca1e424e85a932c87f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16180
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2023-01-10 13:14:09 +00:00
GangCao
58396fb135 lib/bdev: check valid pointer before calling free
Change-Id: I4fbf2d86119d4bacafccb6fdf6a67c7ef66c865c
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16175
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2023-01-10 13:14:01 +00:00
Mike Gerdts
5d41f22d24 bdev: spdk_bdev_module_init_done with async init
spdk_bdev_module_init() must only be called if the module sets
async_init to true. This patch fixes the doc string to match the
implementation and adds an assert() to catch API usage errors early.

Change-Id: I677345de028c8f7597ecf81ff9b9b855867bbf01
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16133
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: Shuhei Matsumoto <smatsumoto@nvidia.com>
2023-01-10 13:13:17 +00:00
Mike Gerdts
e70d2adc73 lvol: log when an lvstore is unloaded due to hotplug
This adds a log message indicating that an lvstore is being unloaded due
to its base device being hot removed.

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: Ic80c19888edad4bb5ca613a23440aef01de8c6a2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14966
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-01-10 13:12:41 +00:00
Mike Gerdts
dda952809b lvol: avoid premature reference to blob
As an lvstore is being loaded, blobs are itereated with
spdk_bs_iter_next(), which opens a blob, calls lvol_next_lvol(), then
closes the blob.  Since the blob struct that is passed to
load_next_lvol() is only transiently opened, it should not be stored
with the lvol.

A short while later, the lvstore opens each lvol by calling
spdk_lvol_open() from _vbdev_lvs_examine_cb(). At that time, the lvstore
holds the open reference and only then is it safe to keep a reference to
the blob.

Change-Id: I309227b23b59058a58167a9dac35af5fabc29d98
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14965
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-01-10 13:12:41 +00:00
Michal Berger
6d8f483383 scripts/core-collector: Add coredump_filter map to .json
This is done to make clear what data is included with the core dump.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I67f7da7f342354df4688147eaf56283b33ba2863
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15996
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2023-01-10 13:12:21 +00:00
Michal Berger
9545f9ac49 scripts: Ignore RLIMIT_CORE while writing out core dumps
As stated in the core(5) the RLIMIT_CORE is not enforced when kernel
is piping core to the collector, hence it will be written out even
when it's set to 0. Instead of playing nice and checking the validity
of RLIMIT_CORE, simply ignore it and apply our own limit (2GB).

This is done for convenience and to make sure that any changes to the
way how given distro applies limits (see fedora37) to the processes
doesn't affect our core collection.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Iab8757f548f2a4f0f4b27b4ce66b0a4a84ed2579
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15994
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-10 13:12:21 +00:00
Shuhei Matsumoto
f287da5cb0 bdev: Fix the bug that counters for copy command were not reset
Fix the bug that counters for copy command, bytes_copied, num_copy_ops,
and copy_latency_ticks were not reset via bdev_reset_io_stat() function.

Reported-by: Richael Zhuang <richael.zhuang@arm.com>
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Ia7ad415d051a010e515c21fcb5c73f8835c37f78
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16185
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2023-01-10 13:12:05 +00:00
Shuhei Matsumoto
075b0d1736 doc/jsonrpc: Add transport_tos for bdev_nvme_set_options RPC
Recently the transport_tos option was added but doc/jsonrpc was not
updated.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I27d98767cfe5fa0a8cf66738f1037aa14eccf589
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16170
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-10 13:12:05 +00:00
Shuhei Matsumoto
e33ae4a6d5 bdev/nvme: Count number of NVMe errors per type or code
Error counters for NVMe error was added in the generic bdev layer but
we want to know more detailed information for some use cases.

Add NVMe error counters per type and per code as module specific
statistics.

For status codes, the first idea was to have different named member
for each status code value. However, it was bad and too hard to test,
review, and maintain.

Instead, we have just two dimensional uint32_t arrays, and increment
one of these uint32_t values based on the status code type and status
code. Then, when dump the JSON, we use spdk_nvme_cpl_get_status_string()
and spdk_nvme_cpl_get_status_type_string().

This idea has one potential downside. This idea consumes 4 (types) *
256 (codes) * 4 (counter) = 4KB per NVMe bdev. We can make this smarter
if memory allocation is a problem. Hence we add an option
nvme_error_stat to enable this feature only if the user requests.

Additionally, the string returned by spdk_nvme_cpl_get_status_string()
or spdk_nvme_cpl_get_status_type_string() has uppercases, spaces, and
hyphens. These should not be included in JSON strings. Hence, convert
these via spdk_strcpy_replace().

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I07b07621e777bdf6556b95054abbbb65e5f9ea3e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15370
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2023-01-10 13:12:05 +00:00
Shuhei Matsumoto
d6e57b5389 util: Add spdk_strcpy_replace() to replace substrings
spdk_nvme_cpl_get_status_string() returns a string which contains upper
cases, spaces, and hyphens. To use the returned string for JSON RPC, we
have to convert it to a string which contains only lowercases and
underscores.

For our convenience, add a new API spdk_strcpy_replace() to replace
all occurrences of the search string with the replacement string.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I3ca9774d0bfb2d0bb7bd7412bc671e6f69104b7d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16054
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-10 13:12:05 +00:00
GangCao
60fd5c554d examples/bdevperf: check the successful status before dereferencing the pointer
Issue here is that the status could be negative due to NULL pointer and in the
callback, the status is not checked before dereferencing the pointer which is
NULL here.

Change-Id: I7240fa91d1a640556e1f27b8295921c7dd1fb57f
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16176
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Mellanox Build Bot
2023-01-10 13:11:18 +00:00
Kamil Godzwon
6665722214 lib/vmd: fix build with clang 15
Used (void) on cmd and removed increment to fix
clang 15 werror.
vmd.c:368:11: error: variable 'cmd' set but not used [-Werror,-Wunused-but-set-variable]
          uint16_t cmd = dev->header->zero.command;
                   ^
1 error generated.

Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: I4e383ac41b46d13df0210bf90f11f6130290f243
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16127
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2023-01-10 13:10:00 +00:00
Tomasz Zawadzki
d33042fb11 env_dpdk: do not use rte_version_release()
Patch below started checking development version of DPDK
using rte_version_release():
(32e6ffb) env_dpdk: add support for DPDK main branch for 23.03

rte_version_release() is present starting with DPDK 21.11,
so it broke earlier versions like DPDK 20.11 packaged on Fedora 35.

SPDK supports only last two DPDK LTS versions, which does not include DPDK 20.11.
Yet there is no need to break older versions unnecessarily.

Another aspect is that rte_version_release() is marked as experimental,
so it could change in the future. Only using stable rte_version(),
helps with forwards compatibility too.

Change-Id: Id17d643a12dcfc03c2d4688d1bc5030dc339f428
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reported-by: Michal Berger <michal.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16017
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michal Berger <michal.berger@intel.com>
2023-01-10 13:09:18 +00:00
Kamil Godzwon
db9b46a22c dpdk: update submodule with clang15 build fixes
Submodule update is needed due to the compiling
issues under Fedora37 with clang 15. They are
related to unused variables in the code. To solve
these, backports two patches from DPDK 22.11

(b41e574)service: fix build with clang 15

(6546b60)vhost: fix build with clang 15

Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: I0b25034786caa2f5670f3cfb64401de08214a896
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16041
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2023-01-10 13:09:03 +00:00
Kamil Godzwon
bd2778ee42 pkgdep/dnf: install tc tool from iproute-tc package
Fedora37 has iproute version 5.18.0 in the
repository which does not include "tc" in it.
This tool in newer versions of iproute is in a
separate package "iproute-tc" and is not installed
by default.

"tc" is used in ADQ tests for e.g. creating traffic
classes or filters.

Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: I9456d80de1b23a66c508f466dfb93f9b86d4c9e4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16126
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-10 13:08:38 +00:00
Michal Berger
8d7abaf5e2 scripts/get-pmr: Update comment, remove unused vars
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I275853e5c3695912cb1eb4d81f99d4dc4ce26d91
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14821
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-10 13:04:01 +00:00
Michal Berger
29756d4c69 scripts/get-pmr: Return failure if neither CMB/PMR buf is found
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I7d7b12ee7c5b081bda52659706e9aed8cefbd5a4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14820
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-10 13:04:01 +00:00
Xin Yang
4978c4fe32 test/sma: enable vfio_user when running SMA tests
- The test "sma_vfiouser_qemu" by SMA requires
  "--with-vfio-user" to be enabled

Signed-off-by: Xin Yang <xin.yang@arm.com>
Change-Id: I866cb99ae5519c12a4be44c5fcfee8fd8b4442a7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15979
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Yibo Cai <yibo.cai@arm.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-09 14:49:48 +00:00
Changpeng Liu
48fb1771ef test/vfio_user: remove unnecessary VFIO_QEMU_BIN default value
The QEMU binary is configured in the CI configuration file, so
we don't need to set it in the script now.

Change-Id: I6d0f4092f7a15bda5718f60c9a3b42f7127a9807
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15913
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-09 14:49:35 +00:00
wanghailiangx
84f50bebd3 test/ftl: add cases line to cover RPC bdev_ftl_get_stats
Change-Id: Iddbbf3ce11053a1ac82dc2636e340a0284fc0dcf
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15697
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-09 14:49:25 +00:00
Richael Zhuang
070d61f2d6 nvme: add API to get outstanding reqs number
Added spdk_nvme_qpair_get_num_outstanding_reqs to get the number
of outstanding reqs for a specific qpair.

Change-Id: I55d75a7363ac63bd26db76594e70e8b17b3e5830
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15916
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-09 14:49:11 +00:00
Richael Zhuang
41bf6280e9 nvme: add num_outstanding_reqs in spdk_nvme_qpair
Added num_outstanding_reqs in struct spdk_nvme_qpair to record outstanding
req number in each qpair. This can be used by multipath to select I/O
path.

Increment num_outstaning_reqs when req is removed from free_req queue and
decrement it when req is put back in free_req queue.

Change-Id: I31148fc7d0a9a85bec4c56d1f6e3047b021c2f48
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15875
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-09 14:49:11 +00:00
Richael Zhuang
2ebbeba7d9 bdev_nvme: remove io_outstanding from nvme_io_path
Revert commit:61b8122dc51 to remove io_outstanding in nvme_io_path,
because it's decided to use num_outstanding_reqs in spdk_nvme_qpair
instead.

Change-Id: Ib3afc6e93d4cb426bb46986faf575737312da6b6
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15977
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: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-09 14:49:11 +00:00
GangCao
7e0a9a84e7 lib/vhost: use the TAILQ_FOREACH_SAFE instead
Change-Id: I09c6aa75e6d268d224dec6367212d16fedf41676
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16174
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2023-01-09 12:44:06 +00:00
Krishna Kanth Reddy
d093a9fb85 bdev_xnvme: Remove duplicate invocation of bdev_xnvme_destruct
Fix for the issue 2803.
Reporting an error when deleting xnvme bdev.

bdev_xnvme_destruct gets invoked from the fn_table->destruct prior to
the xnvme_bdev_unregister_cb while deleting the xnvme bdev.

Hence removed the duplicate invocation of bdev_xnvme_destruct in
the function xnvme_bdev_unregister_cb.

Additionally, fixed the hang issue when the bdev_xnvme_delete
gets called multiple times for a xnvme bdev.

Signed-off-by: Krishna Kanth Reddy <krish.reddy@samsung.com>
Change-Id: Ie36a84987ace20d324b7a139ca67fd60bf46e25b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16144
Reviewed-by: Ye Chen <yex.chen@intel.com>
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>
Community-CI: Mellanox Build Bot
2023-01-09 12:43:49 +00:00
Alexey Marchuk
415fa16403 util: Add spdk_memset_s
bdev_crypto uses memset() to zero secrets passed
by the user (cleanup/error path) which is not safe -
compiler may detect that the buffer being zeroed
is not accessed any more and may "optimize" (drop)
zerofying.

C11 standard introduces memset_s which guarantess to
change the buffer content, but this function is optional,
gcc may not support it. As alternative, add not optimal
from performance point of view default implementation.

Add unit test to math_ut.c to avoid creating new .c file
for 1 simple test

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: I11c7d15610df02e4a3761a88c85f6f8c54fb4b0a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16038
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2023-01-09 12:43:35 +00:00
Mike Gerdts
ad6ece23d0 blob: blob_open_opts_copy macro uses wrong type
The FIELD_OK macro in blob_open_opts_copy() should consider offsets in
struct spdk_blob_open_opts, not struct spdk_blob_opts.

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: I62e22acbe7dfb994453a379c92f78b7e9bc7fc13
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14962
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-09 12:41:30 +00:00
Mike Gerdts
f4dc558245 blob: log blob ID as hex
Blob IDs are sequentially assigned starting at 0x100000000.  When
debugging with a small number of blob IDs, it is much more intuitive to
see blob ID 0x100000000 rather than blob ID 4294967296.

In commit 76a577b082 a similar change was
made to blobcli.

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: Ic5321a83b57cf8c9f8df48cd424a926b6fec4ba8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14963
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-09 12:41:21 +00:00
Krzysztof Smolinski
69038a944d test/raid1: unit tests implementation
Implementation of basic unit tests for raid1 module.

Signed-off-by: Krzysztof Smolinski <krzysztof.smolinski@intel.com>
Change-Id: Ide961b272cfd4997e51634dc6d298d9ab52d358a
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14437
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-09 12:39:19 +00:00
Krzysztof Smolinski
1ec4c2ee02 test/raid: move common tests code to separate file
Signed-off-by: Krzysztof Smolinski <krzysztof.smolinski@intel.com>
Change-Id: Ic668ce4e2bf041c0e1a3e0c683a0f40b3fd19c73
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15684
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-09 12:39:19 +00:00
Krzysztof Smolinski
985b7c1048 raid1: io path implementation
* read/write io path for raid1

Signed-off-by: Krzysztof Smolinski <krzysztof.smolinski@intel.com>
Change-Id: I1d0321725faf668f72c41d62ec0c6a15113f2b93
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13445
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-09 12:39:19 +00:00
Krzysztof Smolinski
208f21cdce raid1: module implementation
* added raid1 module functions
* raid1 logical volume can be created using standard SPDK RPC
* strip size parameter not supported by raid1

Signed-off-by: Krzysztof Smolinski <krzysztof.smolinski@intel.com>
Change-Id: Id3ee1ba0ec28540ca8eb67b04c3ff655a16b1f19
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13444
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2023-01-09 12:39:19 +00:00
Krzysztof Smolinski
ad94094fc5 module/raid: max degraded bdevs constraint changed
Attribute base_bdevs_max_degraded of raid_bdev_module struct is
replaced with more generic structure allowing implementation of
raid levels for which constraint is by number of operational
drives instead of maximum number of failed drives.

Signed-off-by: Krzysztof Smolinski <krzysztof.smolinski@intel.com>
Change-Id: Ie7079993d27d32118b865c3aabd92252a2807b94
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14411
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
2023-01-09 12:39:19 +00:00
Artur Paszkiewicz
4dd2a0d3c5 module/raid: enforce some operations on the app thread
All operations which affect the state of the raid bdev should be
performed on this thread.

Remove the thread pointer from struct raid_base_bdev_info because it is
no longer necessary.

Change-Id: I59678de7dff5c5388cb75449019ae765bdac1fbc
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14509
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: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
2023-01-09 12:39:19 +00:00
Artur Paszkiewicz
b2fc42eb67 test/bdev_raid: extended state checks
Use improved bdev_raid_get_bdevs RPC to verify more raid bdev
properties.

Change-Id: Ic2ca95324816642bbcc04237c6d481f2f4b7773c
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15309
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-09 12:39:19 +00:00
Konrad Sztyber
33b12a4411 util: add spdk_iovmove()
It's the same as spdk_iovcpy(), but the dst/src buffers can overlap.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I6daa0a846d7d1deac2c01d1a1be09171fa8bf796
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15747
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-09 12:37:37 +00:00
Konrad Sztyber
940be80363 accel: accel buffer allocation functions
The data buffers backed by these accel buffers aren't allocated
immediately, but only when they're necessary to execute a given
operation.  It allows users to append operations to a sequence, without
actually reserving large space for the data.  That way, if some of these
buffers aren't needed to execute a sequence, they won't be allocated.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ieeea8a011b40c7f2f33e9a6f03fe34264e9316f3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15746
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-09 12:37:37 +00:00
Konrad Sztyber
7b0f452b4f accel: add iobuf channel to accel channel
It will be used for allocating buffers from accel domain and
allocating bounce buffers to push/pull the data from memory domains for
modules that don't support memory domains.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Idbe4d2129d0aff87d9e517214e9f81e8470c5088
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15745
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-01-09 12:37:37 +00:00
Konrad Sztyber
d3ac42caa4 dma: add "virtual" accel memory domain
This domain is meant to represent data being transformed by accel
engine.  Users will be able to allocate buffers from that memory domain
and use them when appending operations to an accel sequence.

Since these buffers are only meant to be used as placeholders for actual
buffers, none of the push/pull/translate callbacks are implemented. To
access the data after it was transformed by accel, users should make
sure that the final command's destination buffer isn't allocated from
accel memory domain.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ia031c7b205e98792d0a93f01513101b86afa9faa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15744
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-01-09 12:37:37 +00:00
Konrad Sztyber
7b36fe5238 accel: add support for reversing a sequence
Reversing a sequence means that the order of its operations is reversed,
i.e. the first operation becomes last and vice versa.  It's especially
useful in read paths, as it makes it possible to build the sequence
during submission, then, once the data is read from storage, reverse the
sequence and execute it.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I93d617c1e6d251f8c59b94c50dc4300e51908096
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15636
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-09 12:37:37 +00:00