Commit Graph

19402 Commits

Author SHA1 Message Date
Michal Berger
b0107e8cf6 scripts/get-pmr: Use pci_bus_cache[@]
There's no point to depend on the nvme driver here, just fetch nvme
devices directly from the pci bus.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: If0300a538c24802287bb7c1bb2e2cba66943043f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16775
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-02-24 12:52:04 +00:00
Michal Berger
843606d7c6 scripts/get-pmr: Adjust BAR2 lookup
Under latest QEMU, BAR2 is exclusively dedicated to CMB, so
reflect that.

Also, add paranoid check for the header type to make sure we
use proper offsets along the way.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I75ecfa5bf03861aedfc7bd064cbad60522b8bf0e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16774
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-02-24 12:52:04 +00:00
Slawomir Ptak
d254a3b924 bdevperf: Random map for picking I/O offsets
Added a random map feature (-D command line option),
which enables offset tracking of every I/O
for random read, random write and random rw mix,
to make sure every offset is accessed the same
number of times.

Change-Id: I5a0a23718b9f0a94ca094f86175c036b3230fb8b
Signed-off-by: Slawomir Ptak <slawomir.ptak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16865
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
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>
2023-02-24 12:51:45 +00:00
Karol Latecki
d78b5f77ef doc: SPDK NVMe Bdev 23.01 Performance Report
Add doc section with URL to 23.01 SPDK NVMe Bdev report.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I8db849aa30b1609fe3f8c69bdca30a9f5776dac1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16843
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Michal Berger <michal.berger@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
2023-02-24 12:46:52 +00:00
Karol Latecki
3e5cefb511 doc: add Vhost 23.01 performance report link
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ia3bcbbe3de0df59a2502f84bea8822a47eb4641c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16842
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
2023-02-24 12:46:52 +00:00
Ankit Kumar
82c61e0678 lib/nvme: 0 based numd for reservation report
Fix for number of dwords which is 0 based as per spec.
Use bitwise operators instead of division and modulus.

Change-Id: Ib315bf9394ef599317f41429742e7b8054069549
Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16814
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>
2023-02-24 12:46:40 +00:00
Ziv Hirsch
a67da4e64c thread: use spdk_thread_get_app_thread instead of _spdk_get_app_thread
Signed-off-by: Ziv Hirsch <zivhirsch13@gmail.com>
Change-Id: I68754dcd9c87e9f9a595f134de345d42e7d09e70
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16783
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>
2023-02-24 12:46:27 +00:00
Slawomir Ptak
652db802f1 bdevperf: Outstanding requests array size check
Change-Id: I7bbdff40b23c3d28ae9483690d427f3c4639b651
Signed-off-by: Slawomir Ptak <slawomir.ptak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16877
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-02-23 13:36:01 +00:00
Artur Paszkiewicz
5867f4da7c scripts: add a ledctl wrapper script for NPEM
It is possible to use ledctl utility to control the state of LEDs in
systems supporting NPEM, even when the NVMe devices are controlled by
SPDK. However, in this case it is necessary to determine the slot device
number because the block device is unavailable. This script takes care
of that, based on nvme bdev name, and invokes ledctl with correct
parameters.

Change-Id: Ib92cd5ca27b8353a62917eed06e1b6ddf119cf49
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16811
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-02-23 08:33:57 +00:00
Panfil, Wojciech
1eb06bd600 malloc_bdev: Add physical block size optional argument
In the past, we didn't use the distinction between logical block size
and physical block size. Now it's possible to optionally set the
physical block size to be different then logical block size. It's useful
for NVMe 512e Advanced Format tests.

Change-Id: I1b596da471031ee90dafc6ba6276cebf769b5ea2
Signed-off-by: Panfil, Wojciech <wojciech.panfil@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16793
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-02-22 12:59:10 +00:00
Panfil, Wojciech
7f50da15bc null_bdev: Add physical block size optional argument
In the past we didn't use the distinction between logical block size and physical block
size in null bdev. Now we can optionally set the physical block size to
be different then logical block size. It's useful for testing NVMe 512e
Advanced Format scenarios.

Change-Id: Ib3713af9a4d0ce7fd322170b4d87100cfc91a103
Signed-off-by: Panfil, Wojciech <wojciech.panfil@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16792
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-02-22 12:59:10 +00:00
Michal Berger
a3f9583a82 common/config: Remove unused pieces
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Ie762e0ba64cb3626031dc0f14e3ee949557ce263
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16880
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-02-22 08:11:33 +00:00
Michal Berger
c1cab017a6 pkgdep/git: Remove install_{,ref}spdk()
These were used only for the sake of installing ref repos which the
check_so_deps tests were dependent on. This task has been moved
entirely to spdk-abi, hence they are not needed anymore.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I78f00a3cc701cbebbd451b0e720091c8bad27c5f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16879
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-02-22 08:11:33 +00:00
Michal Berger
ea91da8d2d pkgdep: Install git at the default /usr/local/bin dir
There's no point in keeping track of the extra path and pollute the
global bash profiles with it. Just put the target binary under the
/usr/local/bin which most distros, including centos7 keep in their
$PATH.

Also, drop the proxyconf mention as we are not using it anymore.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I2a531fb140aea4c87ad8c3f053a39d262d2d02ae
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16853
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
2023-02-22 08:10:36 +00:00
Kamil Godzwon
4dcb94480b autobuild: patch DPDK with "hash: fix GFNI implementation build with GCC12"
This affects CYP systems where the cpus do indeed
support these instructions.

Apply this patch, when building SPDK with external DPDK
(versions <23.03.0)

Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: I9aded9014c6887e9c0f838b28cef5a0e9c42eda5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16829
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-02-22 08:09:53 +00:00
Slawomir Ptak
24f6172ac8 rpc: fix new line formatting
Signed-off-by: Slawomir Ptak <slawomir.ptak@intel.com>
Change-Id: I2ab213f6ab1751895b9bef138cc4cbd4892ea29e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16719
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-02-22 08:09:41 +00:00
Konrad Sztyber
0093da08a8 log: make macro parameters lowercase
The majority of the code uses lowercase macro parameters, so we should
be consistent and keep them all lowercase.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I6b69cd177dc8e39eab012fa77721ba0535c5cdba
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13575
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-02-22 08:09:26 +00:00
Karol Latecki
bdf1bf407e autotest: remove spdk_top from coverage
Exclude spdk_top files from code coverage
statistics.

We have no way of running and testing spdk_top
in autotest.sh at the moment. Let's excude it
from generated code coverage stats for now.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I596a00544e07ccfee521167281b1fd55d43af02d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16438
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-02-21 13:13:28 +00:00
Konrad Sztyber
0473a78165 accel: clear out domain/step_cb pointers in encrypt/decrypt
They  aren't cleared before a task is submitted and might store pointers
from a previous operation.  This can lead to issues if the previous
operation was using memory domains and we submit the task to a module
also supporting memory domains.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Icafb924c2e936ee6a83d921ae48e953b98f00841
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16848
Community-CI: Mellanox Build Bot
Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-02-21 13:13:10 +00:00
Lukas Stockner
3c5a8ddc41 bdev/rbd: fix double-free when failing to initialize cluster
When bdev_rados_cluster_init encounters an error, it shuts down the cluster
before returning, but since the pointer is still set, bdev_rbd_free will
attempt to shut it down again, which causes a crash.
Therefore, set the pointer to NULL after the first shutdown to indicate
that the cluster object does not exist anymore.

Change-Id: Ie403471e8aba881cb6380e74bd1a4ca8d67cbc68
Signed-off-by: Lukas Stockner <lstockner@genesiscloud.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16203
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2023-02-21 08:33:52 +00:00
Artur Paszkiewicz
a5d5ab27d1 examples/accel/perf: add support for xor
Change-Id: I0a9216945f5877af80d911b46f988a440e855fd4
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16395
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-02-21 08:33:18 +00:00
Artur Paszkiewicz
b41efae2c6 accel: add support for xor
Change-Id: I3c7461a7abfc64402929c0bb24f8458814d9c706
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16394
Community-CI: Mellanox Build Bot
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-02-21 08:33:18 +00:00
Karol Latecki
1ae6a83aa5 doc/distributions: don't mention Fedora version
Don't mention specific Fedora version. We'd have
to constantly keep updating this every time Fedora
gets an update.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ibb9093d106554a8d244b75ae83f627a093f729b9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16660
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michal Berger <michal.berger@intel.com>
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-02-20 10:53:42 +00:00
Krzysztof Karas
634ac768ba config: detect uuid_generate_sha1() function definition
Some systems (like FreeBSD and Centos 7) do not have this
method in their system libraries.
To let bdev UUIDs be generated with SHA1, detect if this
symbol is present. Otherwise, define a new symbol that
indicates a need to use internal implementation of
uuid_generate_sha1() method.

Change-Id: I3a3617d1b413af7f5af487b2eb6f3fe33f58a95e
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16413
Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
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-02-17 12:53:05 +00:00
Sebastian Brzezinka
8d85ce85b9 llvm_vfio_fuzz: detach io ctrlr in new thread
Undetached poller cause  timeout when `spdk_thread_exit` has
been called and detaching it in same thread make poller to stuck
on `spdk_nvme_detach_async`.

`spdk_nvme_detach_async` call `nvme_pcie_ctrlr_delete_io_qpair`
which is synchronous making it to wait for response indefinitly.

Fixes #2798.

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Change-Id: Id500841f9c8fd9847e64805864cb136c74b003f1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15650
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-02-17 12:52:59 +00:00
Michal Berger
26c2f987f6 test/setup: Use hw_sector_size to convert size to sectors
The {logical,physical}_block_size may actually differ (physical can
be bigger than logical) so always use the smallest available unit -
the hw_sector_size is an actual alias to logical_block_size and it's
also clearly indicating what unit sgdisk is working with.

In case the physical_block_size differs, the resulted partitions may
have different size than expected. For instance, under nvme with
512/4096 layout, the partitions were ending up 128MB in size instead
of 1GB causing the dmsetup to fail (as it expects to join partitions
1GB in size each).

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Ib6d3afd3471af2c2e9a5ced17004dd9c565708c8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16551
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>
2023-02-17 10:16:35 +00:00
Michal Berger
b25f630467 test/setup: Add some overhead to min_disk_size
Under CI's phy systems, there are nvme namespace devices which are
== 2GB in size. This require some overhead as the test creates two
partitions 1GB each + the partition table.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I9d0a5bbbd2cb61bc98bf1a1569229c156dfaac70
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16777
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>
2023-02-17 10:16:35 +00:00
Michal Rozegnal
d6c42f87e8 sma: updated tweak modes names
According to some suggestions updated tweak mode names
to make them more self-commenting

Signed-off-by: Michal Rozegnal <michal.rozegnal@intel.com>
Change-Id: Icde75e997ddddde2a7b711c6fba8a7f0928867dc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16504
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2023-02-17 10:16:17 +00:00
Artur Paszkiewicz
31ce6cd8a3 module/raid: check strip size against device block size
Change-Id: I7a8d0b8f89aa8e075632faa8eac19a26a9110e57
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14872
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-02-17 10:15:18 +00:00
Artur Paszkiewicz
19572e5b20 util/uuid: use libc uuid functions on freebsd
Remove libuuid usage on FreeBSD and add dedicated implementation of
spdk_uuid API using functions from the standard library.

Fixes: #2878
Change-Id: Ie49ccb2842acad6064bffd789e4f64b7365b6e5c
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16558
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-02-17 10:15:18 +00:00
Jacek Kalwas
96073478de nvmf: introduce async transport create
An example of async operation which can be handled on specific
transport layer could be creation of spdk thread followed by
a poller registration.

This change also aligns with transport destroy which is already
async operation.

Current transport create function is marked deprecated and is meant
for transports supporting sync create only to maintain backward
compatibility. Async version supports both create operations.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I1f5a477819e58f30983d26f81a1416bed1279ecf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16463
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-02-16 16:45:08 +00:00
Konrad Sztyber
461321cc26 test/multipath: don't wait for bdevperf to finish
After multipath tests are finished we were waiting up to 40s for
bdevperf to finish.  It doesn't test anything, besided the fact that we
can do IOs for 40s after changing to an optimized path.  To reduce test
time, simply kill bdevperf immediately after multipath tests are done.

There's no need to check the status of the perform_tests RPC, as we also
check bdevperf's exit status, so we're bound to catch errors anyway.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I73fee92c8bd65d780659332de7ddb5f68c5f14d1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16665
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-02-16 10:09:54 +00:00
Konrad Sztyber
41b9487d2a test/multipath: quote any paths using {root,test}dir
It fixes the test when the repository is in a directory with spaces in
its name, e.g. "/foo/bar baz/spdk".

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I07e8ce8eac50e0222c85f9ceb6088d69e02592f9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16770
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2023-02-16 10:09:54 +00:00
Konrad Sztyber
ec14a7b6e3 test/multipath: print bdevperf logs on failure
This should help debugging issue #2865.  Additionally, moved the trap
code to a separate function, as it was getting too large.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ieb4881cdfed4e5d88e38859fa0807b673a87913b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16664
Reviewed-by: Michal Berger <michal.berger@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-02-16 10:09:54 +00:00
Konrad Sztyber
55f9479333 bdev: remove spdk_bdev_ext_io_opts from spdk_bdev_io
The spdk_bdev_ext_io_opts structure is used to pass extra options when
submitting a bdev IO request, without having to modify/add functions to
handle new options.  Additionally, the structure has a size field to
allow adding new fields without breaking the ABI (and thus having to
bump up the major version of a library).

It is also a part of spdk_bdev_io and there are several reasons for
removing it from that structure:

  1. The size field only makes sense in structures that are passed
     through pointers.  And spdk_bdev_ext_io_opts is indeed passed as a
     pointer to spdk_bdev_{readv,writev}_blocks_ext(), however it is
     also embedded in spdk_bdev_io (internal.ext_opts_copy), which is
     also part of the API.  It means that each time a new field is added
     to spdk_bdev_ext_io_opts, the size of spdk_bdev_io will also
     change, so we will need to bump the major version of libspdk_bdev
     anyway, thus making spdk_bdev_ext_io_opts.size useless.
  2. The size field also makes internal.ext_opts cumbersome to use, as
     each time one of its fields is accessed, we need to check the size.
     Currently the code doesn't do that, because all of the existing
     spdk_bdev_ext_io_opts fields were present when this structure was
     initially introduced, but we'd need to do check the size before
     accessing any new fields.
  3. spdk_bdev_ext_io_opts has a metadata field, while spdk_bdev_io
     already has u.bdev.md_buf, which means that we store the same thing
     in several different places in spdk_bdev_io (u.bdev.md_buf,
     u.bdev.ext_opts->metadata, internal.ext_opts->metadata).

Therefore, this patch removes all references to spdk_bdev_ext_io_opts
from spdk_bdev_io and replaces them with fields (memory_domain,
memory_domain_ctx) that were missing in spdk_bdev_io.  Unfortunately,
this change breaks the API and requires changes in bdev modules that
supported spdk_bdev_io.u.bdev.ext_opts.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I49b7524eb84d1d4d7f12b7ab025fec36da1ee01f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16773
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-02-16 10:09:35 +00:00
Konrad Sztyber
c30dfbc2d7 rpc: rename name -> key_name in accel_crypto_key_destroy
That's what the library expects.

Fixes #2904.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I6d636f7effa2c9f22ff7a189ca7a569ae500eff4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16767
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>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-02-16 00:03:29 +00:00
Michal Berger
93b572f246 autorun_post: Adjust .check_call() arguments
Don't set std{out,err} to a PIPE to make sure a child process
(lcov and/or genhtml) doesn't block indefinitely as per subprocess
doc:

  "Note: Do not use stdout=PIPE or stderr=PIPE with this function.
   The child process will block if it generates enough output to a
   pipe to fill up the OS pipe buffer as the pipes are not being
   read from."

The above scenario may happen even when genhtml is not failing,
but still reporting warnings to stderr.

To avoid that, keep std{out,err} connected to the active tty - this
way we also won't miss any warnings lcov, genhtml might report.

Also, drop the shell=True - there's simply no need to execute lcov,
genhtml under an extra sh process.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I01372c2d7d8b70c90639419859fa76ad2b7ebd5c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16772
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2023-02-15 10:39:37 +00:00
Konrad Sztyber
db8c911e5a rpc: replace underscores only in option names
To be backwards compatible, we allow users to pass options with both the
underscores and hyphens, e.g. `bdev_get_bdevs --timeout-us 100` and
`bdev_get_bdevs --timeout_us 100` are equivalent.  However, python's
argparse allows users to pass option values after equals sign and we would
also replace any underscores in those values (e.g. `bdev_get_bdevs
--name=bdev_null0` would become `bdev_get_bdevs --name=bdev-null0`).
This patch fixes that.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I82d3adb39167ff5e20451e8ab7de7bb50edb670e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16334
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-02-15 10:39:22 +00:00
Ankit Kumar
9a1457ff1e lib/nvme: Add support for IO management commands
TP4146 introduced support for two new IO commands,
IO management receive and send.

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Change-Id: Iaf37310b84e278df043dcf71a0c2ef912c2fca8e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16520
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-02-15 10:37:56 +00:00
Ankit Kumar
cc7736c968 include/nvme_spec.h: add changes for fdp log pages
TP4146 added support for 4 new log pages.
These are FDP configurations, reclaim unit handle usage,
FDP statistics and FDP events.

Updated the identify example file accordingly.

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Change-Id: I5a20b728605257774d72bc184b50bc5008e142ea
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16518
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-02-15 10:37:56 +00:00
Ankit Kumar
1f600d381d include/nvme_spec.h: set and get features changes for fdp
TP4146 added support for 2 new set/get features.
Add changes for those (FDP and FDP events).

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Change-Id: I778da0a9aba9eca0c2d70b6b193494edf2e8bd43
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16519
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-02-15 10:37:56 +00:00
Ankit Kumar
4095963599 include/nvme_spec.h: update cdata and error status codes
1. Update cdata structure to indicate FDP support.
2. Add missing error status codes for base spec and
   the ones added by TP4146 (FDP).

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Change-Id: Id6f467d54a047e959ce3fc4d2197c23bf39ea059
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16517
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-02-15 10:37:56 +00:00
Ankit Kumar
790b1cdcae include/nvme_spec.h: update identify directive return parameter
TP4146 introduced the support of data placement directive.
Update the required data structures.

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Change-Id: I2ebd0430c5ae1109c76db944e907a3bd21ddccc2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16516
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-02-15 10:37:56 +00:00
Ankit Kumar
7bbeb80a31 nvme: support 64 LBA formats for NVM and ZNS command set
Format LBA size (FLBAS) is updated to have:
Bit 3:0 as least significant 4 bits for format index
Bit 6:5 as most significant 2 bits for format index

NVMe format command fields are updated accordingly.

Add a new helper function to fetch the correct format index.
Update examples and unit test files accordingly.

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Change-Id: I2d6d9045b9d65ae91cb18843ca75b59cc27ed2f2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16515
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-02-15 10:37:56 +00:00
Konrad Sztyber
4970cd36df bdev: remove ch parameter from bdev_io_split()
It isn't used in this function and the callers always pass NULL.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I07baa13a25b1e4e0b8832a093a53250392b10f10
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16682
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2023-02-15 10:37:31 +00:00
Slawomir Ptak
43d3da2ee7 ut/nvmf/ctrlr: change consts to defines
Fix compile errors on older gcc versions (reproduced
on gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0).
The error is: initializer element is not constant.

Signed-off-by: Slawomir Ptak <slawomir.ptak@intel.com>
Change-Id: I3f56304649b141b6422d84257cdc386c5cb14cc4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16718
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>
2023-02-14 09:09:02 +00:00
wanghailiangx
de95290c1f autotest: unify style for test/ and ./test/
Although they are all correct. I suggest to unify, so it looks more normalized.

Change-Id: I61ee92b2ac9f2260851e0d7e28ebaea8783423f6
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15172
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michal Berger <michal.berger@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2023-02-14 09:07:09 +00:00
Mike Gerdts
58c75caaaa doc/bdev_module: clarify claim v2 types
This gets documentation in sync with the latest updates to bdev claims.

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: Id59cbf6ecd4c4b3ebeb4d053e430b2bc68c87d60
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16741
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-02-14 09:04:55 +00:00
Pawel Piatek
5d989b1edf autobuild: support for dpdk-stable repository
Branches other than "main" are kept in a separate repository
named "dpdk-stable".

Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: Icf38d2bbf7f9943a66f1ee1d6c033a77e3b2e481
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16433
Reviewed-by: Michal Berger <michal.berger@intel.com>
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-02-14 09:04:45 +00:00
MengjinWu
2db14b40ec nvme-tcp: nvme-tcp does not depend on lib/thread
Signed-off-by: MengjinWu <mengjin.wu@intel.com>
Change-Id: I44d5107292e5f335148ffccf1980741eb356d628
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16680
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-02-14 09:04:29 +00:00