Commit Graph

5983 Commits

Author SHA1 Message Date
Konrad Sztyber
aa1d039836 nvmf: zero-copy enable flag in transport opts
It makes it possible for the user to specify whether a transport should
try to use zero-copy to execute requests when possible.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I40a92b0d7a6707f4c9292795f380846acb227200
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10780
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-01-06 18:53:42 +00:00
Krzysztof Karas
39b7e10fd4 hw_hotplug.sh: fix the incorrect path to log.txt file
This test fails due to incorrect path to log.txt file needed
to detect start of hotplug application.

The change that introduced the bug:
Change-Id: Ia14507a282796ad28f067c086b9112ae6463b654

This change corrects the file path.

Change-Id: I5d43c47044f46100fa4ca7b845973c427cae237c
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10976
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-01-06 18:52:31 +00:00
Yifan Bian
89f253dd20 test/llvm_nvme_fuzz: add DELETE I/O COMPLETION QUEUE and DELETE I/O SUBMISSION QUEUE command test cases
Change-Id: Idf20d03077ea24d347170ada955dda6d92efce49
Signed-off-by: Yifan Bian <yifan.bian@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10984
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-01-06 18:52:05 +00:00
Changpeng Liu
2a6c2c289c nvmf: support static CNTLID
SPDK NVMf subsystem supports dynamic controller model, for
transports other fabrics, users should use static controller
model.

Change-Id: I364ea61a71b04d51932fd9e0e16f401a383ff67c
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10149
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-01-06 01:20:32 +00:00
Michal Berger
e0482c503e autopackage: Move extra RPM tests to nightly
This is done to save some time in per-patch testing

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I777e30ed90a9cd02ec12c0fd0c19a5616c491f6a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8637
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2022-01-05 09:24:59 +00:00
Michal Berger
f3b3c5bd84 test/common: Don't exit from within the killprocess()
This breaks the flow of EXIT traps that use this function together
with errexit. Consider:

set -e
trap 'killprocess $pid_not_found; nvmftestfini' EXIT
...

if killprocess() suddenly exits the remaining parts of the trap won't
be executed.

Also, if the process is not found, allow killprocess() to return
success - if it's gone then the main goal of the function is already
achieved. If the process terminated abruptly errexit should pick that
up regardless.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I93c00c2a2da5457affb2ed2b5bf0ebae9c4bf291
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10853
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.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>
2022-01-05 09:24:22 +00:00
Michal Berger
89df50bc2d scripts/core-collector: Don't limit core dump collection
We should gather the core regardless of the RLIMIT_CORE setting.
Also, don't limit number of parallel executions of the collector
in case more than 2 processes crashed (unlikely to happen anyway,
but just in case make sure we cover it). Lastly, wait a bit longer
for the potential cores.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ic7de8f8000676122282469b729f45b235ab6f9ca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10852
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>
2022-01-05 09:24:22 +00:00
Michal Berger
5d49965bb9 test/scheduler: Ignore failures while removing dummy cgroups
Upon removal, there's a small chance that new threads would jump into
these cgroups AFTER we read the list of PIDs to migrate. In such a
case, there may be some processes left preventing us from finally
removing the cgroup. Since we can't fully control that without
continuously reading the list, simply ignore it.

Fixes issue #2298

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I0d50b975742a8b15edd25c6b4e51ab337b017eaa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10872
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-01-05 09:23:57 +00:00
wanghailiangx
da7c73016e test/nvmf: distinguish between two nvmf_fio cases
When we find the corresponding nvmf_fio cases in the log,
we won't be confused.

Change-Id: If37372d287b0ac70142234a4e29208a38d027fbd
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10680
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-01-05 09:23:24 +00:00
Maciej Wawryk
8dafa5632a test/nvme: add timeout to bdevperf perform_tests
By default, this timeout waiting for response is set to 60 seconds,
we want to wait a bit longer than defined RUNTIME value.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I6f91da6c3996967271dda7c49320a2b8573bc49f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10169
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-01-05 09:22:50 +00:00
Yifan Bian
dd6a8a80df test/llvm_nvme_fuzz: add CREATE I/O SUBMISSION QUEUE command test case
Change-Id: I4353543acf8662b14f35d36b30b2eb1fad88a871
Signed-off-by: Yifan Bian <yifan.bian@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10970
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-01-05 08:49:15 +00:00
Yifan Bian
0ac16751a5 test/llvm_nvme_fuzz: add CREATE I/O COMPLETION QUEUE command test case
Change-Id: Id5c6e81c2691942380450f2ebabdf818494f76a2
Signed-off-by: Yifan Bian <yifan.bian@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10953
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-01-05 02:40:31 +00:00
Changpeng Liu
c7f33deaae test/llvm_nvme_fuzz: don't use NVME_OPC_FABRIC for ADMIN fuzz tests
When doing ADMIN fuzz tests, the NVME_OPC_FABRIC is special for
fabric transports, so here we pick up a different one.

Change-Id: I00376c08eb9eabdb109656d631615eeb37c9d09c
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10847
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-01-05 02:39:04 +00:00
Mao Jiang
dc1386e686 nvme/overhead: add vfio_user transport support
Change-Id: Ib696c7787151e4898b63f57749bd134333e94a23
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10413
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2022-01-04 07:53:00 +00:00
junwenx
f9c496b8e2 test/vfio_user: Restart vm, check if memory region register/unregister failed
Signed-off-by: Jun Wen <junx.wen@intel.com>
Change-Id: Ib18e8c3971da53f91de5352eaa476b4acd0ce4db
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10377
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-12-31 10:10:24 +00:00
Mao Jiang
a0d255ac02 test/vfio_user: Build vfio-user test directory
Add test script for launching VMs with vfio-user transport,
this test script not active until vfio-user capable qemu available,
new flag SPDK_TEST_VFIOUSER_QEMU will decide case whether to run.

Change-Id: I9b885cec797fe3bb28860f1ec436c31a6fa2f131
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10096
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-12-31 10:10:24 +00:00
Bianyfan
5d5b293387 test/llvm_nvme_fuzz: add ABORT command test case
Change-Id: Ibfdb75771abc20ecf0c436314d26c1791cf0a518
Signed-off-by: Yifan Bian <yifan.bian@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10922
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-12-31 09:21:50 +00:00
Alexey Marchuk
3c4a68cafc nvme: Do not create IO qpair during ctrlr initialization
If nvme ctrlr is resetting or initializing, free_io_qids
bitmap is already freed or not created yet. In that case
an attempt to create IO qpair leads to segmentation fault.

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I6a97bf81d5a568db20d23b3f88cf01e994ba42e3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10827
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuheimatsumoto@gmail.com>
2021-12-27 08:43:03 +00:00
Alexey Marchuk
eb09178a59 nvme/rdma: Correct qpair disconnect process
In current implementation RDMA qpair is destroyed right after
disconnect. That is not graceful qpair shutdown process since
there can be requests submitted to HW and we may receive
completions for already destroyed/freed qpair.

To avoid this, only disconnect qpair in ctrlr_disconnect_qpair
transport callback, all other resources will be released in
ctrlr_delete_io_qpair cb.

This patch is useful when nvme poll groups are used since in
that case we use shared CQ, if the disconnected qpair has WRs
submitted to HW then qpair's destruction will be deferred to
poll group.

When nvme poll groups are not used, this patch doesn't change
anything, in that case destruction flow is still ungraceful.
However since CQ is destroyed immediately after qpair,
we shouldn't receive any requests which point to released
resources. A correct solution for non-poll group case
requires async diconnect API which may lead to significant
rework.

There is a bug when Soft Roce is used - we may receive
a completion with "normal" status when qpair is already
disconnected and all nvme requests are aborted. Added
a workaround for it.

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I0680d9ef9aaa8737d7a6d1454cd70a384bb8efac
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10327
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuheimatsumoto@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-12-23 08:44:40 +00:00
Konrad Sztyber
b6fba11db7 test/nvmf: set max adminq size in abort test
Set the maximum admin queue size to 256 to make sure it can hold the
number of admin requests required by the abort application.

This patch fixes the following error and actually allows the test to
start:

ctrlr.c: 720:_nvmf_ctrlr_connect: *ERROR*: Invalid SQSIZE for admin queue 135 (min 1, max 127)

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I4042481ffb2792381ef2e4ad295be067a610bd7e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10771
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-12-23 08:41:41 +00:00
Maciej Wawryk
257d06f7bc test/openstack: restart whole devstack before tests
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I126039482b5c9e3caba6565b067c747203dea476
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10822
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2021-12-23 08:36:21 +00:00
Changpeng Liu
0bc229b314 test/llvm_nvme_fuzz: add IDENTIFY command test case
Also name the fuzzer test case with `fuzz_admin` prefix
for ADMIN commands.

Change-Id: I6e5eeb71a5f795fee8afba034f3ad436220e3c20
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10815
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.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>
2021-12-23 08:35:54 +00:00
Changpeng Liu
7bb78fb95b test/llvm_nvme_fuzz: print '-D' usage menu
Fix #2286.

Change-Id: Iadf7b58618ee94bc95bea705b4549ed199599149
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10814
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
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>
2021-12-23 08:35:54 +00:00
Michal Berger
977a53573f test/scheduler: Use separete cgroup for the tests
Two cgroups are created prior running the scheduler tests:
  - /cpuset/spdk
  - /cpuset/all

/cpuset/spdk is the cgroup dedicated for the tests, i.e., the SPDK
processes executed along the way. The resources consist of the cpus
that are initially picked up by isolate_cores.sh.

/cpuset/all is the "dummy" cgroup that holds most of the remaining
processes that run on the target system - "most" since not every
process (especially kernel threads) can be migrated between cgroups.
This cgroup's resources include all the online cpus except those
selected for the /cpuset/spdk.

This should allow for lowering the noise on the target SPDK's cpus
and make sure that load on each cpu is generated exclusively by the
SPDK.

Fixes issue #1950

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ic45149f55052ff03bead0b9bea086f95c87ea75d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10584
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-12-23 08:33:15 +00:00
Michal Berger
1fd9dccf78 test/scheduler: Add cgroups routines
These functions are meant to help in isolating processes to make sure
SPDK is exclusively run on the dedicated cpus.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ie7575ce4ef68c48f6f63dbedace34f23fdb8441c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10583
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-12-23 08:33:15 +00:00
GangCao
10f32b9f19 lib/blob: do not assume realloc(NULL, 0) returns a not-NULL value
There is situation that num_extent_pages is zero and original pointer is
also NULL, the realloc() could return a Not NULL pointer.

Related UT has been added and updated.
1) In the default allocation (num_clusters == 0), the extent_pages is not allocated as expected.
2) In the thin provisioning allocation (num_clusters != 0), the extent_pages will be allocated if extent_table is used.

More related information as below:

The crux of the problem is that according to POSIX:

realloc: "If ptr is NULL, then the call is equivalent to malloc(size)"
malloc: "If size is 0, then malloc returns either NULL or a unique pointer value that can later be successfully passed to free"

blobstore was relying on realloc(NULL, 0) always return a unique pointer value, and not NULL.  This is not portable behavior.

Change-Id: Ibc28d9696f15a3c0e2aa6bb2371dc23576c28954
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10470
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-12-20 18:14:06 +00:00
Ben Walker
fca4262987 nvme: Remove nvme_ns_update
In the one place this was called, we can call nvme_ns_construct
instead. There's no harm in re-fetching the identify pages.

Change-Id: I91292ff9650bdc7edd5588a05837b671dcac1922
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10102
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-12-20 08:49:41 +00:00
Michal Berger
b9cac1d4e7 test/nvmf: Group all non-uring-dependent tests together
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I3ba8bfc650103ed19090d6be969d38ed01ef2e9d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10175
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2021-12-20 08:46:13 +00:00
Michal Berger
1fdfb7e332 test/dd: Simple tests utilizing uring RPCs
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: If9c5d0071d30b3a5ac40ea5085dbf564b98cb667
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9947
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
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>
2021-12-20 08:46:13 +00:00
Michal Berger
bf815486fc pkgdep/git: Patch for the ice driver targeting latest linux kernel
These changes are needed for the 5.15.x kernel that's currently being
shipped with fedora35.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I7e79bff77a93f81bd93376b84f4ef7f7230cc322
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10610
Reviewed-by: Karol Latecki <karol.latecki@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>
2021-12-20 08:45:00 +00:00
Krzysztof Karas
0c15ca6a84 pkgdep/git: bump up the version of nvme-cli
Bump up the version of nvme-cli to 1.15.

Change-Id: I1ed024bfd70027f947962ec76dfaf94c1660957f
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9912
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-12-20 08:42:30 +00:00
Peng Lian
4c1757ffb9 nvmf: update discovery log when removing hostnqn
In NVMF Revision spec 1.1a, discovery log should be updated
when removing hostnqn of subsystem.

Update unit test to check the discovery log when removing
hostnqn and destroying subsystem.

Signed-off-by: Peng Lian <peng.lian@smartx.com>
Change-Id: I51c597a2493295a677a7aa68e4f13a887f7e1140
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10668
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-12-16 08:52:20 +00:00
Michal Berger
17a662f9fe test/json_config: Simplify events check
Consider multiple nvme devices loaded to subsystem prior running
the checks.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ie4ce8be6ec22c26c1d46ded42ded468b92d6cc57
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7868
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: John Kariuki <John.K.Kariuki@intel.com>
2021-12-16 08:49:53 +00:00
Anil Veerabhadrappa
68f0c6160a ut/fc : fix fc_ls_ut compilation failure
This regression was introduced when 'accept' was removed from
spdk_nvmf_transport_ops structure.

Signed-off-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Change-Id: I5d880791db258a97a1861dbd841e97a7c068ce12
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10676
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-12-16 08:43:39 +00:00
Jim Harris
050565e5ab test/nvmf: fuzz nvmf target using LLVM's libFuzzer
LLVM provides libFuzzer which does coverage-guided
fuzzing of a library or application under test.  For
SPDK, we can use this as a new and better way to
generate random commands to the SPDK nvmf target.

By default, libFuzzer provides the main() and your
source file just provides the function called by
LLVM for each iteration of random data.  But this
doesn't really work for SPDK since we need to start
the app framework and the nvmf target.  So we
specify -fsanitizer=fuzzer-no-link, explicitly
specify the location of the fuzzer_no_main library
and then call LLVMFuzzerRunDriver to start the
fuzzing process once we are ready.

Since this is all coverage-guided, we invoke the
fuzzer inside the nvmf target application.  So this
patch creates a new target application called
'llvm_nvme_fuzz'. One core is needed to run the
nvmf target, then we spawn a pthread to run the
fuzzer against it.

Currently there are two fuzzers defined.  Fuzzer 0
does random testing of admin commands.  Fuzzer 1
is focused solely on GET_LOG_PAGE and fuzzes a
smaller subset of the bytes in the spdk_nvme_cmd.

Additional fuzzers can be added in the future for
other commands, testing I/O queues, data payloads,
etc.

You do need to specify CC and CXX when running
configure, as well as specify the location of the
special clang_rt.fuzz_no_main library. The path of
that library is dependent on your clang version and
architecture. If using clang-12 on x86_64 platform,
it will look like:

CC=clang-12 CXX=clang++-12 ./configure --with-fuzzer= \
  /usr/lib/llvm-12/lib/clang/12.0.0/lib/linux/libclang_rt.fuzzer_no_main-x86_64.a

Then just do the following to demonstrate the fuzzer
tool.

make
test/nvmf/target/llvm_nvme_fuzz.sh --time=60 --fuzzer=0

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iee0997501893ac284a3947a1db7a155c5ceb7849
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10038
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-12-15 04:32:05 +00:00
Changpeng Liu
723adbaf32 UT/vfio-user: fix clang-12 compilation error
Add missed STUBs.

Change-Id: I20989bf4ea66720d62f8ecc9668bb8f74e459666
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10638
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-12-15 04:32:05 +00:00
Karol Latecki
654aa4b975 test/blobfs: update rocksdb version
Use one of the recent branches for rocksdb. This allows
to build with less -Wno-error options. Adjust C flags
for more recent GCC versions.

Change-Id: Icf176d909a92195da2ae744a53e0cb53530b4573
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10628
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-12-14 13:23:30 +00:00
Jacek Kalwas
43022da379 nvmf: remove accept poller from generic layer
Not every transport requires accept poller - transport specific
layer can have its own policy and way of handling new connection.
APIs to notify generic layer are already in place
 - spdk_nvmf_poll_group_add
 - spdk_nvmf_tgt_new_qpair

Having accept poller removed should simplify interrupt mode impl
in transport specific layer.

Fixes issue #1876

Change-Id: Ia6cac0c2da67a298e88956734c50fb6e6b7521f1
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7268
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-12-14 13:18:33 +00:00
Krzysztof Karas
bace05499a logs: create a log level flag in abort and hotplug applications
Bloated log files appear during some tests
(nvmf_phy_autotest, during nvmf_abort test fot example),
what makes parsing them inconvenient. This change aims
to disable logs that cause this issue by adding a new flag
for SPDK target and disabling notice level logging completely
(using --silence-noticelog proved insufficient).

Fixes: #2149

Change-Id: Ibbad92d87d90fe73c23d6027e0ff8ec49b0393c2
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10311
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>
2021-12-14 09:12:01 +00:00
Michal Berger
ce2a2aed0b pkgdep/git: Encode whitespace in the ice driver's URL
Latest curl versions started to treat such URLs as invalid. See:
https://github.com/curl/curl/pull/7073

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ic5ab34a566f89f411ec40cbcb8de57a8d2f3ea88
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10607
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-12-14 09:09:38 +00:00
Mao Jiang
6fbaa11534 nvme/deallocated_value: add vfio-user transport support
Change-Id: I1a87d9245ba8a4f4e01d510cae4a318fa3323ca2
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10257
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-12-14 09:09:18 +00:00
Jim Harris
59f3cdacb1 nvmf: don't always update discovery log when adding hosts
If a subsystem has no listeners, then there is no need
to update the discovery log when adding a host, or setting
a subsystem to allow all hosts.

This eliminates some unnecessary discovery log update
notifications, especially when setting 'allow any hosts'
on a subsystem immediately after it is created (and before
it has any listeners).

Update unit test to check the adding a host to a
subsystem without listeners does not rev the genctr.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I63dab5df564269e574bb925890088f52063aa378
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10546
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-12-10 17:32:18 +00:00
Jim Harris
3867f83dea test/nvmf: add local var for hostnqn string
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia967512bfcc5d7b1df15b6f6b5c132f21d601dce
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10563
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-12-10 17:32:18 +00:00
Jim Harris
9ac2cf7ff0 nvmf: don't update discovery log on subsystem create/delete
The discovery log isn't updated when a subsystem is created
or deleted, it's only updated when a listener for a
subsystem is added or removed.

So remove the nvmf_update_discovery_log() in the subsystem
create and delete paths. They just generate extra AER
completions that potentially cause the host to do unneeded
work.

Note that if a subsystem is deleted with active listeners,
the subsystem delete path will remove each of the listeners
before deleting the subsystem itself.  So the discovery log
will still get updated when those listeners are removed.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id01bbfa3b24d3e1279a614a2fd60be41387a03b1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10545
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-12-10 17:32:18 +00:00
Karol Latecki
17cd6c3488 test/nvmf: increase malloc size in filesystem test
btrfs.tools v5.15.1 in Fedora 35 complains about target
device being too small to create a filesystem.
Let's increase the bdev size to this test.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Iedf59328b91516693c88af8c5d47dde849394337
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10614
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-12-10 09:18:26 +00:00
paul luse
fbb24d0ebe lib/accel: remove batching from the framework and plug-in modules
Batching will be made available for DSA specifically through the new
idxd_perf tool.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ic51d9ad3692074805b1ffa705cea8be35737c778
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9846
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-12-08 16:35:40 +00:00
Shuhei Matsumoto
215518069a bdev/nvme: nvme_ctrlr_create() gets prchk_flags from nvme_async_probe_ctx
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id3deca8e0aba23299347a6aee6f0f44ee683556e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10555
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-12-08 08:31:24 +00:00
Shuhei Matsumoto
696ad465d7 bdev/nvme: Remove the failover_in_progress flag from struct nvme_ctrlr
The failover_in_progress flag is used to decide the return value of
bdev_nvme_failover().

bdev_nvme_delete() calls bdev_nvme_failover() with remove=true to remove
nvme_ctrlr->active_path_id. However bdev_nvme_failover() returns zero
if nvme_ctrlr->failover_in_progress is true. bdev_nvme_failover() may
return zero even if it does not remove nvme_ctrlr->active_path_id.

The following will be better.

bdev_nvme_failover() returns -EBUSY if nvme_ctrlr->resetting is true,
and the caller repeats calling bdev_nvme_failover() until the target trid
becomes alternative path or bdev_nvme_failover() returns zero.

To do that, the failover_in_progress flag is not necessary any more.

Removing the failover_in_progress will also simplify the following
patches to unify ctrlr reset and failover.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I57ab944beb1d06ea4def144c81c69705860de35f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10441
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-12-08 08:31:24 +00:00
Shuhei Matsumoto
7cc66c0ab1 bdev/nvme: Check if ns can be shared when configuring multipath
We had not checked the bit 0 of the Namespace Multipath I/O and
Namespace Sharing Capabilities (NMIC) field in the Identify Namespace
data structure.

If the bit 0 of the NMIC is zero, it is likely that namespaces are not
identical.

We should check if the value of the NMIC first, and do it in this patch.

Additionally, it is not usual if the bit 0 of the CMIC and the bit 0 of
the NMIC do not match. So in unit tests rename the parameter multi_ctrlr
by multipath for ut_attach_ctrlr() and use it for the value of the NMIC.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6aa7cbcc99be2507dbf18930f7b585a9ea7d0f90
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10380
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-12-08 08:31:24 +00:00
Shuhei Matsumoto
8afa746b4d bdev/nvme: Use new APIs in a reset ctrlr sequence
Replace the spdk_nvme_ctrlr_reset_async() and spdk_nvme_reset_poll_async()
calls by the spdk_nvme_ctrlr_disconnect(), spdk_nvme_ctrlr_reconnect_async(),
and spdk_nvme_ctrlr_reconnect_poll_async() calls in a reset ctrlr
sequence.

spdk_nvme_ctrlr_disconnect() can fail if ctrlr is already resetting or
removed. But both cases are not possible. reset is controlled and the callback
to the hot remove is called when the ctrlr is hot removed. So we assume
spdk_nvme_ctrlr_disconnect() always succeed.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1299e198597b2a2110f80b9a868e2dae015682ee
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10092
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-12-08 08:31:24 +00:00