Commit Graph

19279 Commits

Author SHA1 Message Date
Konrad Sztyber
f955f93c3a CHANGELOG: add note about accel operation chaining
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I94fff69cddc6ebe88ed2f88610778ee9ccc77ef6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16437
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-24 18:19:13 +00:00
John Levon
f77387cce8 nvmf/transport: fix spdk_nvmf_request_free_buffers()
This routine was neglecting to reset ->iovcnt, leading to havoc when the
request was re-used.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: Ifd4ac47b95edd517ce5df731c682697bf51da819
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16273
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-24 18:18:49 +00:00
Ben Walker
b11407d04c nvmf/tcp: Use an spdk_sock_flush instead of an spdk_sock_write
For IC_RESP and C2H_TERM_REQ, use the regular async write path but add
an additional flush. The flush operation reports errors, so we may at
some point attempt to handle busy conditions by blocking. However, for
now this doesn't do that because previously the writev call didn't
either.

Change-Id: I4d05e19ac6dd781be7c96005549abdb52511b8c1
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15213
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-24 18:18:33 +00:00
Ben Walker
ac9dbf7912 sock: Allow flushing even if the socket is in a poll group
If we call flush, we want to flush regardless of whether there is a poll
group.

Change-Id: I88680105d999a909f3f1fe75be9caff31a8555ff
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16420
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-24 18:18:33 +00:00
Michal Rozegnal
3408399172 sma: added tweak mode in sma crypto
AES-XTS requires providing tweak. By definition tweak (128bits)
represents logical position of the data being encrypted or decrypted,
typically for nvme it is LBA.
Various implementations of AES-XTS can treat that requirment
in different way, because AES-XTS specification doesn't define
how exactly tweak look like and how exactly LBA is transformed
into tweak  For example:
 - Tweak[127:0] = {1’b0, ~LBA[62:0], LBA[63:0]}
 - Tweak[127:0] = {LBA[127:0] + 1}
 - Tweak[127:0] = {LBA[63:0] + 1, 64'b0}

So there's a need of specifying mode of tweak

Signed-off-by: Michal Rozegnal <michal.rozegnal@intel.com>
Change-Id: I92edc71f5f4dfeb0d08a34b73424675321e4740e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16058
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: Ben Walker <benjamin.walker@intel.com>
2023-01-24 18:16:29 +00:00
Tomasz Zawadzki
b82f1987b9 dpdk: update submodule with pci_scan_one() fix
This patch moves DPDK submodule by one commit:
(e89c0845a6) bus/pci: free remaining devices during cleanup

Fixes #2877

Change-Id: Ib77aeaf3688a2503f40a09ef96f0fcffb1cb1a5c
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16448
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-01-24 18:15:42 +00:00
Jim Harris
3a39d90b03 bdev_gpt: add new SPDK partition type for off-by-one fix
The gpt bdev module has an off-by-one error.  When it
calculates the size of the partition, it simply does
"end - start", when really it should be "end - start + 1".

We cannot just fix it by changing the math here, any
consumers of the partition may have put down metadata
on the partition based on the old size.

So instead add a new SPDK partition type.  SPDK will keep
the existing off-by-one behavior when it finds the old
partition type, but will use the correct math when finding
the new partition type.

Fixes issue #2801.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I48eb48c781f1968b59e52b4477ca45e9c81eac11
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16298
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Mike Gerdts <mgerdts@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-24 17:19:35 +00:00
Yifan Bian
40e8ee2a48 test/ublk: add basic tests for verifying ublk
Signed-off-by: Yifan Bian <yifan.bian@intel.com>
Co-authored-by: Xiaodong Liu <xiaodong.liu@intel.com>
Change-Id: I3416b904e61b673ab622e5ff70099c97d0f7765c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16081
Reviewed-by: Michal Berger <michal.berger@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-01-24 17:09:34 +00:00
Jim Harris
c80a57cad3 ublk: fix device queue shutdown processing
When a queue has finished processing on its polling
thread, it sends a message to the app thread signaling
that it is done.  Then when the app thread gets
messages from all of the queues for that device, it can
proceed with tearing the device down.

But if there are still ctrl_ring commands in progress,
it needs to wait.  Previously it would register a
poller that would retry the same function if it
found commands in progress.  But the problem is that
it did not differentiate the function getting called
as a direct message from the polling thread vs. retried
via the poller on the app thread.  This could result
in lost messages.

So fix it to always increment the queues_closed
counter (renamed from q_deinit_num), and then
only check for ctrl ring commands in progress after
we received all of the queue closed messages.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I0ea23ebc69acb29d5ab7e1d86ddbe74b9973e225
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16405
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
2023-01-24 17:09:34 +00:00
Jim Harris
57c27f02d5 ublk: remove extra pthreads from ctrl uring processing
We make a few changes here to enable this:

1) Set IORING_SETUP_SQPOLL on the control ring.
   Otherwise when UBLK_START_DEV is submitted it
   will be processed in the context of the system
   call itself, resulting the kernel block layer
   submitting reads to the new device which blocks
   the thread - meaning the system call may never
   return.
2) Save the cmd_op in each sqe, along with the
   spdk_ublk_dev pointer.
3) Add a poller to poll the ctrl ring.  The poller
   can get the ublk and cmd_op from the cqe to
   know which ctrl operation completed and take
   next steps as necessary.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia0e51a4ff74781c85967c54969fbfc67a0d3f115
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16404
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2023-01-24 17:09:34 +00:00
Mike Gerdts
a5a75f343f dpdk/crypto: fix build after NO_COMPAT_IMB_API_053
The version of make found in Rocky 8.7 (make-4.2.1-11.el8.x86_64) fails
in the dpdkbuild directory with:

  $ make clean
  Makefile:64: *** invalid syntax in conditional.  Stop.

This removes the # symbol, allowing builds to work again.

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: I0b9ac05d6670615c2a3642c7a833ac64774b9fef
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16440
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-24 16:01:50 +00:00
buzagg
be299bf533 bdev_nvme: Support multipath across all discovery contexts.
This is required when volume is attached via different storage boxes
for example while migrating it.

Signed-off-by: Gili Buzaglo <gili.buzaglo@kioxia.com>
Change-Id: I680c781ae5de078972d6aef547804d60fff3c643
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16407
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-24 15:26:28 +00:00
Kamuda, Szymon
cb2f0a2cf5 nvmf: pause/resume polling for the target
There is a way to pause/resume spdk pollers, however there is no way
to achieve that using public API for the given target which has
a hook behaving similar to pollers. Exposing such functionality can
be used for pausing and restoring target pollers during
reset, e.g. new commands should not be fetched to assure
that all internal resources can be cleared/reinitialized safety.
Pausing target poller during the reset will assure that, without
need for destroying transport or adding condition statements in IO path.

Similar use case might be hitless upgrade. Depending on implementation
there might be need that no new command can be submitted when
secondary processes are being switched to upgraded versions.
Pausing target pollers should be useful in this case.

Signed-off-by: Kamuda Szymon <szymon.kamuda@intel.com>
Change-Id: I419816552c710c43e02197ebcc20a967fb23b3bd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15911
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-01-24 14:49:24 +00:00
Tomasz Zawadzki
3359bf34d6 so_ver: increase all major versions
To allow SO_MINOR updates on LTS for the whole year it is supported,
the major version for all components needs to be increased.
This is to prevent scenario where two versions exists with matching
versions, but conflicting ABI.
Ex. Next SPDK release adds an API call increasing the minor version,
then LTS needs just a subset of those additions.

Increasing major so version after LTS, allows the future releases
to update versions as needed. Yet allowing LTS to increase minor
version separately.

Disabled test for increasing SO version without ABI change, as
that is goal of this patch. This check shall be removed with SPDK 23.05
release.
Looks like this was left over from prior LTS, to avoid that
make sure it is only skipped when running against v23.01.x as latest
release.

This patch:
- increases SO_VER by 1 for all components
- resets SO_MINOR to 0 for all components
- removes suppressions for ABI tests


Short reference to how the versions were changed:
MAX=$(git grep "SO_VER := " | cut -d" " -f 3 | sort -ubnr | head -1)
for((i=$MAX;i>0;i-=1)); do find . -name "Makefile" -exec \
	sed -i -e "s/SO_VER := $i\$/SO_VER := $(($i+1))/g" {} +;  done
find . -name "Makefile" -exec \
	sed -i -e "s/SO_MINOR := .*/SO_MINOR := 0/g" {} +

Change-Id: I3e5681802c0a5ac6d7d652a18896997cd07cc8bf
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16419
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-24 08:37:21 +00:00
Michal Berger
ab7607e127 rpmbuild: Try to initialize submodules prior running the build
In case someone clones bare SPDK repo and attempts to execute the
RPM build, it will fail due to missing submodules. Since it's cheap,
just make sure submodules are in place before the build starts.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I910949ae5fc5ef19c40f4abfc6f39ebb3fe8929a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16307
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
2023-01-24 08:36:35 +00:00
Michal Berger
8edf134a99 rpmbuild: Pick proper arch for the final RPM location
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I7a0ca2e155c37d93c89bc61ff0da52cc30af572e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16310
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
2023-01-24 08:36:35 +00:00
Michal Berger
45b83b9743 test/nvmf: Don't attempt to load ib_ucm
This driver was removed from the mainline kernel over 3 years
ago, hence there is no much point in keeping it around.
Currently, this attempt simply spams build log with info
that we failed to load said driver.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I8bc65f652f6476a9cdf4fa4849ee03d8d547402c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16325
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-24 08:36:35 +00:00
Michal Berger
daa9779cf6 pkgdep/git: Bump QAT driver to latest available version
Also, drop parallel build as it's not a good fit for QAT's make
structure - its recursive nature ends up failing on ocassion
where some *.a libs cannot be found by targets that depend on
it (one such pitfall is libosal.a built for the kernel space).

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I8c773c234d80fcfcad2c0991e3f5202dfb1d2018
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16318
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
2023-01-24 08:36:35 +00:00
Michal Berger
81fb0a4ee9 pkgdep/git: Bump ICE and iRDMA drivers to latest available version
This is done in order to align our requirements with the 6.x kernel
that we already support under the CI (as part of the fedora37 build).

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I88ff07a0de49c0f9ff90caf54b2690c90ef108b9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16308
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-24 08:36:35 +00:00
Krzysztof Karas
8b5545854b test: add CPU core lock tests
Add a script with functional tests for
CPU core locking mechanism.

Change-Id: I041b31f04b6cfb0ba26a7d172c83686646d8386e
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15465
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-23 20:42:29 +00:00
Shuhei Matsumoto
139940d6c1 bdev/rpc: Fix race condition for per channel bdev_get_iostat
With per channel stats called on thread A,
spdk_bdev_for_each_channel calls
spdk_for_each_channel which immediately sends
a message to thread B.
If thread B has no workload, it may execute the
message relatively fast trying to write stats to
json_write_ctx.
As result, we may have 2 scenarious:
1. json_write_ctx is still not initialized on
thread A, so thread B dereferences a NULL pointer.
1. json_write_ctx is initialized but thread A writes
response header while thread B writes stats - it leads
to corrupted json response.

To fix this race condition, initialize json_write_ctx
before iterating bdevs/channels

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Reported-by: Or Gerlitz <ogerlitz@nvidia.com>
Change-Id: I5dae37f1f527437528fc8a8e9c6066f69687dec9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16366
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-23 17:48:55 +00:00
Shuhei Matsumoto
db3869d1b2 bdev/rpc: Factor out start RPC response of bdev_get_iostat
This is a preparation for the next patch to fix the race condition of
per channel mode.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I9eaefc527ccf82011af39b8261f5b3cc12983bda
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16365
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-23 17:48:55 +00:00
Jim Harris
69d4ec0708 ublk: break ublk_start_disk into two parts
For now, we will still execute the two parts
consecutively and synchronously.  Follow-up patches
will do the second part asynchronously, after the
ublk cmds associated with the first part have
completed.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I814d885a8a113c3367207d11ae09dd536eb63460
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16403
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-23 17:48:10 +00:00
Jim Harris
5f1b5f18ae ublk: change where new dev's ublk file gets opened
Upcoming patches will submit ctrl cmds and wait for
them to complete asynchronously.  So we will want to
first send the ADD_DEV and SET_PARAMS commands, wait
for them to complete, and only then open the ublk
device file.

So to prepare for that sequencing, move the open()
from _ublk_start_disk to ublk_start_disk.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I9fdf19ce9b51bd552faa917e1e842f9ddfb111a1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16402
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2023-01-23 17:48:10 +00:00
Jim Harris
f08743e9eb ublk: pass ublk pointer to ublk_ctrl_cmd()
We will put this pointer into the sqe.  It will
be useful when we start doing async completions
on the ctrl ring.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3bdb728eb1d3ed66a8ecd05df208e4f36e3fbe0b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16401
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2023-01-23 17:48:10 +00:00
Jim Harris
c62637c9e7 perf: zero the ns_entry buffer for aio/uring
Otherwise we get garbage in ns_entry->zipf.  If
this is not-NULL, we use it for zipf random
distribution and segfault since it's not-NULL but
also not valid.

So use calloc instead.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I0d13e21989b6f43e9f6f16736479395d1d6f0e77
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16362
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-23 17:48:10 +00:00
Sebastian Brzezinka
b75196ff0a host/multipath: increase wait time before attaching bpf probes
If probe attached before io switch to second port, previous port is
still present in trace log.

This patch fix issue #2865

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Change-Id: If45d07a737721c6754392b7db8cce426e6090bd1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16386
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-21 14:57:09 +00:00
Tomasz Zawadzki
fc62f804b9 version: SPDK 23.05 pre
This is first commit that should go into latest SPDK
after the code freeze for SPDK 23.01.

Change-Id: I3b34d1c33450474b777d988b8c9033a8ce87aa05
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16397
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-01-20 22:03:09 +00:00
Tomasz Zawadzki
dfa7f14bc4 blobstore: mark blobstore dirty on extent page write
When blobstore is shutdown unexpectedly the super block should
already be marked as dirty. Only when proper blobstore unload
happens, the super block is marked as clean.

Super block is not marked as dirty on blobstore load,
but on first action that starts to modify the metadata.
At this time it only happens through blob persist,
which is fine for creation/deletion of blobs or
their modification (resize/xattr).

It works for cluster allocation with extent_table disabled,
and when extent page needs to be allocated.

Yet it fails for cases when no new extent page is required.
It will result in not marking blobstore as dirty and
then fail when loading a particular blob due to mismatch
between used_clusters and contents of extent page.

To fix that, the blobstore is now marked dirty on a very first
extent page update since blobstore load.

Fixes #2830

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ied37ecf90d46e1bc51b22c323dce278a0fa88f72
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16179
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2023-01-20 18:58:34 +00:00
Krzysztof Karas
87c59b28a3 virtio_blk: add dump opts
Currently we do not have a way to dump opts
for virtio_blk transports. This patch introduces
necessary changes to let us save and load those
via JOSN config.

Change-Id: I7ee4f31062f3d4a264f322e66a67ba3d075f1d75
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15248
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2023-01-20 18:57:38 +00:00
Jim Harris
b9f7ba0d09 ublk: fix unused variable warning
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5b8ce0a4571872e6755c5fa0abbfa1a981dd411f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16400
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-20 18:47:09 +00:00
Tomasz Zawadzki
e72579a6b1 deprecation: VTune support
VTune support was already deprecated in patch below,
this one just formalizes that with SPDK 23.05 removal date.

(6b97cc)bdev, bdev_nvme: deprecate VTUNE support

Change-Id: I09f067a23453f994fa901aa3d82898257aa39a54
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16391
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-20 18:25:21 +00:00
Tomasz Zawadzki
d78f68454a intel-ipsec-mb: update submodule to v1.3
Change-Id: I5b6912b316a0aabac4a65f766b20ae1ef32973cf
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16360
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-20 18:25:21 +00:00
Tomasz Zawadzki
fe1f26de59 dpdk/crypto: define NO_COMPAT_IMB_API_053
intel-ipsec-mb added NO_COMPAT_IMB_API_053 to allow
for backwards compatiblity for certain enums.
See intel-ipsec-mb patch:
(53a8371)Document and use new compilation flag NO_COMPAT_IMB_API_053

Meanwhile starting with DPDK 22.07, qat crypto updated the required intel-ipsec-mb
and disabled OPENSSL_API_COMPAT. Resulting in redefinitions from aes.h.
Patch breaking it:
(3227bc7)crypto/qat: use intel-ipsec-mb for partial hash and AES

Only _after_ DPDK 22.11 it was fixed:
(2a21107) crypto/qat: fix build

This means that DPDK 22.07 and DPDK 22.11.1 does not work with latest intel-ipsec-mb.
It does not affect earlier versions of DPDK, nor intel-ipsec-mb.

Only for this case, if the DPDK fix is not present,
define NO_COMPAT_IMB_API_053.

Change-Id: Ibe2edc5c79ac09b5260eeb0f7d53b4dcb26bcaa5
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16359
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-20 18:25:21 +00:00
Krzysztof Karas
48b0c8dec0 dpdk: update submodule to version 22.11.1
Change-Id: Ie204c603e51efe4e2d4bb2efa00d130986a42685
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16371
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-20 18:25:21 +00:00
Tomasz Zawadzki
acdfc03590 blobstore: make blob_persist_check_dirty separate from persist
This patch makes marking blobstore as dirty, separate from
persist process. Adding a context strucutre and new single
callback once completed.

It is being as part of refactor to allow marking blobstore
dirty when writing out extent page - see #2830.

Change-Id: Ie2e9cc32860697e0e747939842ab04f48fbff49b
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16328
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-20 17:56:56 +00:00
Tomasz Zawadzki
3eb03cc7b6 blobstore: workaround for bs_cluster_to_lba() scan-build false positive
Patch https://review.spdk.io/gerrit/c/spdk/spdk/+/16328,
introduced a refactor for persist path. No functional change
should occur with it, but the code layout after compilation
(path length) might have changed.

It resulted in unrelated scan-build failure:
https://ci.spdk.io/results/autotest-per-patch/builds/95746/archive/scanbuild-vg-autotest/scan-build/report-d08e76.html#EndPath

Tried to replicate the issue without the above patch,
by increasing maxloop or -analyze-headers in scan-build.
Didn't result in any new failures in blobstore.

This seemed like a false positive, so it was verified:
https://review.spdk.io/gerrit/c/spdk/spdk/+/16333/

With no other options, an assert is added only to the
function where the false positive occured.

scan-build log for posterity:
blobstore.c:1062:58: warning: Division by zero [core.DivideZero]
                desc_extent_rle->extents[extent_idx].cluster_idx = lba /
lba_per_cluster;
                                                                   ~~~~^~~~~~~~~~~~~~~~~
blobstore.c:1079:58: warning: Division by zero [core.DivideZero]
                desc_extent_rle->extents[extent_idx].cluster_idx = lba /
lba_per_cluster;
                                                                   ~~~~^~~~~~~~~~~~~~~~~

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I9dd729fa13ce1c9bbcb91e4326658e2b4e326e6d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16335
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-20 17:56:56 +00:00
Konrad Sztyber
01608f1af2 accel: temporarily disable iobuf thread caches
The iobuf buffers are only used in accel when executing chained
operations.  Since none of the components in SPDK are using chaining
yet, there's little point in having per-thread iobuf caches, as they
only reduce the number of available buffers in other libraries.

This change will be reverted once bdev layer and bdev modules are
updated to support chaining.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ibad19ea92f2218a8dec01e802a736cfdd357dfc6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16398
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-20 17:56:44 +00:00
Alexey Marchuk
8c8cd12e1d env_dpdk: Add function to iterate memory chunks in a pool
This allows to get start address and length of each
memory chunk in order to create app-specific
resources.
Since we don't want to expose rte structure in the
callback, we have to remap rte data types to SPDK.

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: I3865c4cfe532c6a99a5a3c6c983ded8b9a338de1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16324
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2023-01-20 17:56:34 +00:00
Michal Berger
ce37c9e65f test/nvmf: Verify perf's exit status
Since the perf application is run in the background the script would
not pick up its potential crash - the main condition itself was simply
checking if app is still running. Since there were occasions where
the failure was missed up until the cleanup stage, try to catch it
early on by verifying perf's exit status - hook it into NOT() as
the app is expected to fail by the test but we need to filter out
crash scenarios.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I9a9304616c0a4dba42467f65c1a2c770352f08ea
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16345
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-20 17:25:50 +00:00
Alexey Marchuk
52c86e21be accel/dpdk_cryptodev: Remove missed noticelog
This was added during debug/development and
was not deleted by accident.

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: I146748151623a3ea4808c7b5cc34085d30ca81b4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16388
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-20 15:40:03 +00:00
Karol Latecki
66aeb061c1 scripts/nvmf_perf: reduce number of ADQ tc entries
For each NIC reduce number of configured ADQ tc
entries. Use only these ports which are actually
associated with NIC's IP address instead of using
all port numbers in use by Target's subsystems.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I90934db594be0412b0fb7fb2b26684733df7711a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16379
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-20 11:36:35 +00:00
Karol Latecki
7abdd30dd5 scripts/nvmf_perf: add all ports to ADQ traffic class
Add all subsystem ports to created traffic class
instead of just one hardcoded port number.

Change-Id: I702948958213eb920e56db4593f26f0ce122a8c0
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15596
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jaroslaw Chachulski <jaroslawx.chachulski@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-20 11:36:35 +00:00
Karol Latecki
27285e2043 scripts/nvmf_perf: move adq_configure_tc
Move ADQ traffic classess configuration after
Target has been configured. ADQ TC configuration
will rely on information generated by configuring
the target (e.g. port numbers).

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I5f5c438525d742ceab473c28afdb68d39ff019b8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15595
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Jaroslaw Chachulski <jaroslawx.chachulski@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-20 11:36:35 +00:00
Karol Latecki
2b2dc8b32d scripts/nvmf_perf: update ADQ configuration steps
Initial ADQ configuration in script was created based
on "Nov 2020 ADQ with SPDK Configuration Guide".
Update using latest June 2022 guide version.

- Channel inline flow director configured using
  "devlink" for each TC separately instead of
  using ethtool setting
- Disable channel packet inspect optimize priv flag
- Enable busy poll private flags
- Run NIC IRQ affinity script again after creating
  TC's
- net.core.busy_poll and net.core.busy_read now both
  set to 1
- Set acceptor_poll_rate when creating transport layer

Change-Id: I05b2d0aa2ddd5fc249889fb5e5d6118963367b36
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15584
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jaroslaw Chachulski <jaroslawx.chachulski@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-20 11:36:35 +00:00
Tomasz Zawadzki
a7d79228d7 test/nvmf: remove silent skip of mDNS on RDMA
Any script or function called with run_test needs to
either execute or not be called at all.
Summary of all test executions is gathered based on that.

It would be possible to not catch that the test didn't execute.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib93d4ee9cccbcfa8506f9022f1a7cce97c0434f1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16347
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2023-01-20 10:27:48 +00:00
paul luse
0485fb4795 test/dpdk_compresdev: Add additional UT for mbuf splitting
The addition of mbuf splitting requires a few more unit tests.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I24309911d40aec14e7f7c504be276c7f79e3ef1d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16094
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-20 10:26:21 +00:00
paul luse
de8fb12866 test/unit: Add unit tests for dpdk compressdev module
Quite a few changes from the vbdev compress unit tests
mainly due to plumbing and structural changes from the
code under test now being an accel_fw module instead of
a bdev module.  Coverage of critical functions matches
what it was for the common code.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ia40c7a0ed72a427e71c00607d93e215e0265fcb1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16076
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-20 10:26:21 +00:00
paul luse
d570ad4972 test/unit/lib/accel/dpdk_compressdev.c: add starting point C file
The new compressdev unit tests will re-use quite a bit of code
from the old compress vbdev module so start this that so that the
next patch will be easier to review what's changed for as the
accel compressdev unit tests.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Id91bb8630213e6046a5b38f31227476a33eb0675
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16063
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-20 10:26:21 +00:00
paul luse
d6d0ef6c16 lib/accel: remove 2 lines of dead code
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I3c4b04109a4c2f8319408f2ba5b805db05626535
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16051
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-20 10:26:21 +00:00