Commit Graph

17059 Commits

Author SHA1 Message Date
Yifan Bian
8ba73f5649 test/llvm_nvme_fuzz: add DIRECTIVE SEND and DIRECTIVE RECEIVE command test cases
Change-Id: I270db69c8dda29d3ab0368d259515782898583db
Signed-off-by: Yifan Bian <yifan.bian@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11725
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-02-28 11:07:28 +00:00
Jim Harris
12d522515f nvme: simplify spdk_nvme_transport_id_populate_trstring
Note that this also works around a false positive in
gcc-11 of type -Wstringop-overread.

Fixes issue #2391.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ib5301b9ef9fa3ead2a1a2318655533a8cfba03fe
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11709
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: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-02-28 11:07:05 +00:00
Alexey Marchuk
adde7ea533 doc/nvmf: Update nvmf_create_transport example
Some users refer to this document as an example of
"gold" RDMA configuration. But some parameters of
RDMA transport are not optimal for good performance,
e.g. `-c 0` disables in-capsule data, that reduces
IOPS of write operations with small payload; `-m 4`
allows to have only 4 qpairs per controller, that
doesn't allow to have more than 4 IO qpairs.
This patch sets several parameters which are default
for RDMA.

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reported-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: I118bb032eaf7f38e981d06ee312b36c7f0c8322a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11454
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-02-28 11:06:32 +00:00
Jim Harris
84bec316c2 bdev/nvme: add additional DEBUGLOGs for discovery
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iba16c5f3273fe2335b847b6bd396e45aa97da7c9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11734
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.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>
2022-02-28 11:06:16 +00:00
Jim Harris
bcb75753dc bdev/nvme: add DISCOVERY_DEBUGLOG/ERRLOG
These macros are used to prefix the following to
any discovery-related DEBUGLOG or ERRLOG:

Discovery[127.0.0.1:8009]

Inside the brackets are the traddr and trsvcid of
the discovery service associated with that message.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ib1991a13f550bb8c9aaf1194a56b218cbd71c96c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11733
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 <smatsumoto@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-02-28 11:06:16 +00:00
Jim Harris
9614dca9f9 bdev/nvme: save the trid of the discovery service
This is useful for adding trid details to discovery
related log messages in a later patch.

Future patches will update this trid if the
current discovery ctrlr fails and we need to fail
over to a different path to the discovery subsystem.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I51712bab2d891ae9c683f8716b4228741f64e7db
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11732
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.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>
2022-02-28 11:06:16 +00:00
Jim Harris
a0690464dd bdev/nvme: allocate discovery_entry_ctx for discovery subsystems
For now, just allocate entries and put them on a new TAILQ on
the discovery_ctx.  Future patches will use these to try
to reattach to the discovery subsystem if the current discovery
ctrlr fails.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3cd841df2260bbe8a497bbbf36dea4a1081f25c0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11731
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-02-28 11:06:16 +00:00
Jim Harris
21aa2ba37e bdev/nvme: move discovery_attach_cb up in file
It will be referenced in a second location in
an upcoming patch, so move its definition now to
reduce the size of that patch and avoid a forward
declaration.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iae12cc613190c03f0d48d71475df98384f8e47c7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11730
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-02-28 11:06:16 +00:00
Jim Harris
d98c37495a test: add explicit listener for discovery subsystem
Ensures compliance now that we've deprecated being
able to connect to any listener without adding it to
the discovery subsystem first.

This patch was tested with a temporary change that
removes the default discovery listener.  It is
possible that future test changes could again
depend on this deprecated behavior, but at least
now all existing tests will explicitly create the
discovery listener, making it more likely that
new tests will copy the correct behavior.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I936d3d124e22a56548ea43c73ca8197c22ec0f66
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11541
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: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-02-28 11:06:16 +00:00
Jim Harris
9b04bd8d5c bdev_nvme: rename discovery_ctrlr_ctx to discovery_entry_ctx
This name better describes the purpose of this structure.
Currently it is used to represent discovery log page entries
for NVM subsystems found by the discovery service.  Upcoming
patches will also use this structure to represent discovery
log page entries for the discovery subsystem.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I84996c9968200c50c32427f0233cb707cdc2d54c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11547
Community-CI: Mellanox Build Bot
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: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-02-28 11:06:16 +00:00
Jim Harris
fd0f154f47 nvmf: add discovery subsystem entries to discovery log page
When generating the discovery log page, add entries for
the discovery subsystem, skipping the listener associated
with the command generating the log page.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id6a14a7d5cdce483f8f3c2eff1b4ededd40bc029
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11542
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-02-28 11:06:16 +00:00
Jim Harris
09240a1c3c bdev/nvme: don't connect to discovered discovery subsystems
For now, if the discovery service finds a discovery subsystem,
don't connect to it.  Support for nested discovery controllers
will be coming soon, but for now we need to make sure we don't
try to connect to a discovery subsystem as if it was an NVM
subsystem.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I00234718b0e39eda6e1cb1b1150a4fadcf6d8b11
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11546
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-02-28 11:06:16 +00:00
Jim Harris
06ef6757a9 rpc.py: add 'discovery' nqn shortcut for nvmf listener RPCs
Now that users need to explicitly add a listener for the discovery
subsystem, make that a bit easier when using rpc.py.  Instead of
having to type out nqn.2014-08.org.nvmexpress.discovery, allow
user to just specify 'discovery' as the NQN and rpc.py will
convert it to the discovery NQN before sending the RPC.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I4854d4f072f1758fdd6b37a4c3685e2a2d015caa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11540
Community-CI: Mellanox Build Bot
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: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-02-28 11:06:16 +00:00
Jim Harris
25bc221cee nvmf: deprecate automatic discovery listener
Currently we accept connections to the discovery
subsystem on any listener that has been added to
any subsystem (not just the discovery subsystem).

This is not proper behavior, especially for TCP.  TCP
defines port 8009 (not 4420) as the discovery port,
so the current behavior means that if NVM subsystems
are listening on port 4420, then the discovery
subsystem by default is listening there too.

For now, continue to allow connections, but print
a warning message when someone connects to the
discovery subsystem on a listener trid that wasn't
previously added.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I734bc49d1a21b2edfb675aef4b8551e2d0ccd4d7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11539
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-02-28 11:06:16 +00:00
Evgeniy Kochetov
5c80b1e5ab nvme/rdma: Limit max_sges by command capsule size
According to NVMe over Fabrics spec number of SGLs supported by the
controller is reported in MSDBD. But it is also implicitly limited by
command capsule size (IOCCSZ) since SGL are passed in capsule.

This patch adjusts max_sges to capsule size if required. Adjustment to
MSDBD is also moved to transport layer because it is fabrics specific
parameter and is not valid for PCIe transport.

Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: I44918eb949345c61242ca50a524d21d04b6ac058
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11669
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-02-25 08:18:32 +00:00
Dong Yi
742d818e29 blobstore: Defer to memcpy after all xattr mallocs are finished.
This confirms that the error path can return more efficient
without memcpy such as xattr->name.

Signed-off-by: Dong Yi <dongx.yi@intel.com>
Change-Id: Ic2ed28121ed76eda9d7b24ed6c4c95b0588817de
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11654
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2022-02-25 08:18:17 +00:00
Rui Chang
0270fc322f nvmf/vfio-user: Fix abort request bug
One simple fix for nvmf_vfio_user_qpair_abort_request().
Current implementation mixed up request of abort cmd and the request
to abort, which cause problems.

Signed-off-by: Rui Chang <rui.chang@arm.com>
Change-Id: Ia0db9aa738e372789fc502ef877fd1c841c0a2e3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11711
Reviewed-by: John Levon <levon@movementarian.org>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-02-25 08:17:45 +00:00
Konrad Sztyber
06fdd44c5d mk/fio: link shared sanitizers for clang builds
By default, clang uses static sanitizer libraries, which means that the
executable needs to have them linked in.  Since we don't control how the
fio binary is compiled, we need to use the shared libraries.

This patch fixes ubsan, but there are still some issues with clang's
address sanitizer.  It seems as if the address sanitizer ignored
some/all of the suppression rules, but in the interest of fixing the
ubsan build, this will be fixed by a separate patch at a later time.

Fixes #2367

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I416a410214826b4ef8c25eeeef95272ef1742d7e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11662
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Jun Wen <junx.wen@intel.com>
2022-02-25 08:17:23 +00:00
Konrad Sztyber
24d34ac75c test/common: single fio exec function for both bdev/nvme
The two functions running fio with different plugins (bdev, nvme) are
identical except for loading different plugins, so it makes sense to
extract the common code to a separate function.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I151668bbefe18f3cacc82ae98b081e662a5fe231
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11661
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
2022-02-25 08:17:23 +00:00
Shuhei Matsumoto
ecdbaa2310 bdev/nvme: Call spdk_free() to the object allocated by spdk_malloc()
This is a bug fix. free() was called to the object allocated by
spdk_malloc().

Hence

  free(): invalid pointer: 0x00002000146ece00

was printed.

This was found during multipath testing.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Icf6aa6dcdda728fef91b3acad7a1f1ee219c27af
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11710
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-02-24 14:56:03 +00:00
Shuhei Matsumoto
7594030409 nvme: Set dnr to zero for abort_reqs() including a fix of degradation
The patch

nvme: Set dnr to zero for nvme_qpair_abort_reqs()
1b3172f726

did the change stated in the title.

However,

Revert "nvme/rdma: Correct qpair disconnect process"
c8f986c7ee

destroyed it for RDMA transport.

Additionally, we had still set DNR to 1 in nvme_qpair_init().

This patch fixes both.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Iee60ac24aa7e04cce0f394014c9d9afc9d2b56ec
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11644
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-02-24 14:56:03 +00:00
Weiguo Li
e685574f76 iscsi: fix a memory leak in error handling
When function returned from the error handling the mempool on
'sess' was not released which lead to a memory leak.

Fixes issue #2393.

Signed-off-by: Weiguo Li <liwg06@foxmail.com>
Change-Id: Ida3651e9369fb5c4948969480d398a723b2cb6a2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11714
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
2022-02-24 14:55:16 +00:00
Weiguo Li
30af49f77d nvmf: avoid a null dereference before null check
We do the null check for 'fc_req', but already dereferenced it
before the check. Swap their position to avoid null dereference.

Fixes issue #2395.

Signed-off-by: Weiguo Li <liwg06@foxmail.com>
Change-Id: I33b9e6b51b54f6ada9c072cf7ab0acda2622472f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11721
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
2022-02-24 08:31:28 +00:00
John Levon
5f27092835 thread: add spdk_thread_exec_msg()
A common pattern is:

	if (foo->thread == spdk_get_thread())
		cb(arg);
	else
		spdk_thread_send_msg(foo->thread, cb, arg);

for cases where it's important the callback runs on a particular thread,
but it doesn't matter if it's synchronous or asynchronous.

Add a new API to support this pattern, and convert over the current
instances.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: Idfbf77c02c9321c52e07181ffd8b0c437e1ab335
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11503
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-02-23 10:06:49 +00:00
Changpeng Liu
b0f02769f9 nvme/fio_plugin: call spdk_env_fini() when exiting the process
spdk_fio_cleanup() is called per-thread basis, and spdk_env_fini()
is called multiple times when running with `numjobs` greater than 1.

Fix issue #2366.

Change-Id: I39ec379d71eeba1ca14ba42a93b819220ee1f307
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11443
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
2022-02-23 10:05:25 +00:00
John Levon
594a3a8ec7 nvmf/vfio-user: add interrupt mode support to accept poller
We can ask libvfio-user for the listening socket fd, and register that
for SPDK interrupt handling.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: I8d0ba7a86403f2d0170b9359480f1fefc1036557
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10721
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-02-23 10:05:15 +00:00
John Levon
8a1ad5a20f nvmf/vfio-user: correct accept poller lifetime
The accept poller only needs to run when vfu_attach_ctx() makes sense:
in other words, when we don't have a controller created.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: Icef4e6184c9ae6d7951d015530a05132c4ba6994
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10720
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-02-23 10:05:15 +00:00
John Levon
e334bba989 nvmf/vfio-user: make accept poller per-endpoint
Now vfio-user owns its the accept poller itself, there's no reason to
loop across all endpoints: instead, the lifetime of the accept poller is
better matched by creating it in the ->listen() transport callback.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: Ia92e29b1cee263f1461f640cfdd27cdb674848fb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10719
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-02-23 10:05:15 +00:00
John Levon
5e37316308 nvmf: pass poll group to transport during create
For the benefit of forthcoming vfio-user changes, register the poll
group poller prior to calling the transport create callback, and pass in
a pointer to the poll group itself.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: Idbc24126c9d46f8162e4ded07c5a0ecf074fc7dd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10718
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: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2022-02-23 10:05:15 +00:00
Karol Latecki
8c32f0d32f doc: add SPDK Vhost 22.01 performance report link
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ib594ecd991d25717413a66ed033aa9f7c183ffb3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11680
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>
2022-02-23 10:03:44 +00:00
Dong Yi
be74ac158c event/app_rpc: Fix segmenation fault for scheduler is NULL.
Json writes this scheduler name using pointer, but it sometimes be null.
This case it exists, so add check for it.

Fixes issue #2384

Signed-off-by: Dong Yi <dongx.yi@intel.com>
Change-Id: I7c989c72cfbd53ea6b02d86457b29440484e5a37
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11677
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-02-23 02:34:41 +00:00
Karol Latecki
21284e6c74 doc: add SPDK NVMe-oF TCP 22.01 performance report link
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I2c30da5203328d1162eb90ad2fa1d66f04342cac
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11679
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <tomasz.rochumski@intel.com>
Reviewed-by: Michal Berger <michallinuxstuff@gmail.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2022-02-22 10:52:24 +00:00
Alexey Marchuk
b5b752792f bdev/aio: Correct error message when IO fails
structure io_event defined in aio_abi.h has
res member with type __s64 which is typically
mapped to long long int.
When we print error message, res member can be
treated as an error code.

In the following error message:
	failed to complete aio: requested len is 4096, but
	completed len is 18446744073709551611
the last digit in int representation is -5 which is -EIO

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reported-by: Anil <aniruddha080699@gmail.com>
Change-Id: I33b98d2118bbc9cace2d9da7cf9cd9bd06d784e6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11453
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-02-22 09:03:51 +00:00
Karol Latecki
e5d35ad166 test/skipped_tests: enable ZNS tests
Remove tests from "skipped" list once CI support
is enabled.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I07b157eca1b29acccc4d8ac328251d9f9f3885cc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10560
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: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
2022-02-22 09:03:03 +00:00
Michal Berger
a9614bf6e7 test/scheduler: Create unique list of existing cgroups prior moving them
Since multiple processes may belong to the same cgroup, this will
make sure we don't call move_cgroup_procs() against single cgroup
multiple times.

Signed-off-by: Michal Berger <michallinuxstuff@gmail.com>
Change-Id: I64d12e5ac8e9c628ff7556b566f2090c965ab35a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11671
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>
2022-02-22 09:01:43 +00:00
Michal Berger
f8f9b01d97 test/scheduler: Skip process if reading from /proc/pid/cgroup fails
This may happen when given process terminates right after we checked
for existance of the pid/cgroup but before we attempt to read the
file. When read fails, simply skip that process and continue.

Fixes issue #2381

Signed-off-by: Michal Berger <michallinuxstuff@gmail.com>
Change-Id: Ic859444769d1bfe18cf02bdd23cbef56407289a7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11670
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: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-02-22 09:01:43 +00:00
Yifan Bian
0957856db3 test/llvm_nvme_fuzz: add SECURITY SEND and SECURITY RECEIVE command test cases
Change-Id: I36a9815d26d5c92ca27869c0abe02080ee324255
Signed-off-by: Yifan Bian <yifan.bian@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11516
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: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-02-22 09:01:16 +00:00
Karol Latecki
ba7fd26ca5 pkgdep/git: don't skip nvme-cli installation
Don't skip nvme-cli installation in case previous
installation is detected. This avoids the need to
manually remove previous version installation and
makes it less likely to overlook that nvme-cli was
not upgraded.

Also updating an out-of-date comment in this
function.

Change-Id: I8c6a457ea5ab2eb2f7d48de4721af82d8de7733e
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11480
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>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-02-22 09:01:06 +00:00
Changpeng Liu
945a2e7b76 nvmf/vfio-user: restore queue pair state and CQ reference count in destination VM
The above values were added with shared CQ feature, and they
are left when restore the CQs in destination VM.

Change-Id: Ib1f28dad833da31e571eb2e2f0b5c81f0bf05a3b
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11419
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-02-21 01:48:02 +00:00
Changpeng Liu
903dd88c22 nvmf/vfio-user: save/restore CSTS register when doing live migration
The CSTS register in source VM was left to migrate.

Fix #2362.

Change-Id: Ieef028578d2897b27a6ff594b16801462eb1b75e
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11418
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-02-21 01:48:02 +00:00
Jim Harris
c833f6aa3e env_dpdk: unlink hugepages if shm_id is not specified
The only release to not unlink hugepages after mmaping
them is for multiprocess.  But if shm_id is not
specified, then we aren't using multiprocess.  This
ensures that all hugepages get released when the
process exits, even if there is memory in those
hugepages that was not freed during process shutdown.

Make sure we don't enable both huge-unlink and
single-file-segments at the same time though, DPDK doesn't
support that.

Note that even when using multi-process, if hugepages
aren't released, they aren't really leaked.  DPDK will
clean them up next time the application runs.

Fixes issue #2267.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I017bd4f7ed9cf6aaa141879539b099fb48f357f4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10991
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: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-02-18 14:56:54 +00:00
Jim Harris
5d68b11865 bdev: move parts of _bdev_io_unset_bounce_buf()
Move some of this code into separate functions.  There
is no change in functionality here - this just helps
reduce the size and complexity of an upcoming patch.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I72243f17312e66bb6ef2168b9b78076c9eb2e6f3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11531
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-02-18 14:54:22 +00:00
Jim Harris
a91b4367ea bdev: move _bdev_io_set_bounce_buf
This helps reduce the size of a future patch.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: If5dc2607c91ccb172ee5a27d0a85a7cf6bf3d423
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11530
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-02-18 14:54:22 +00:00
Jun Wen
3b1578c8f7 test/vfio_user: Remove subsystem listener while VM is connected, issue #2246 autotest.
Signed-off-by: Jun Wen <junx.wen@intel.com>
Change-Id: Ib1af20bad7636ac9fda1b17786d15d02ca61fabb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11499
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: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-02-18 00:00:22 +00:00
Chunsong Feng
4f36a2a66b nvme/rdma: clear dif_enable when rdma_req is free
The dif_enable is not cleared in _nvmf_rdma_request_free. When the
rdma_req is used again, the dif_enable is true while
dif.dif_ctx->block_size is zero. As a result, an infinite loop occurs in
nvmf_rdma_fill_wr_sgl.

Fix issue: #2380

Signed-off-by: Chunsong Feng <fengchunsong@huawei.com>
Change-Id: Ic179855f7b257e39ed4a5f6705fbc9dea64210ae
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11646
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.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>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
2022-02-17 23:07:57 +00:00
Weiguo Li
8be59045ea thread: fix double unlock in spdk_io_device_register
Since there is a pthread_mutex_unlock() in normal condition, another
pthread_mutex_unlock() in the "tmp != NULL" branch should be removed,
otherwise will cause a double unlock.

Fixes issue #2378.

Signed-off-by: Weiguo Li <liwg06@foxmail.com>
Change-Id: I6c80a9527dd60e0b7c1d3c54b6da371b31118f02
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11642
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-02-17 17:10:31 +00:00
zgu3
af2bd57875 bdev/nvme/bdev_nvme_rpc.c: apply_firmware_complete: free bdev_io after each command finish
apply_firmware_complete bug fix: after each
firmware image download command finished,
apply_firmware_complete is called and issue the next
firmware image download command, and get another bdev_io.
After last command, apply_firmware_complete_reset
only release the last bdev_io, and all the ios in previous
commands are not release.
So after rpc_bdev_nvme_apply_firmware cycling,
the io pool will be used up and cause assert.

Signed-off-by: Gu, Zhimin <kookoo.gu@intel.com>
Change-Id: Icb1c722d85b1985521e5f25031ae70557b7ba84a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11586
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-02-17 17:10:21 +00:00
Karol Latecki
160af0934e scripts/nvmf_perf: add max_queue_depth param for transport layer
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I80e1fdb8b0a3b944ab6efdd21187cef07b685c29
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11271
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: Ben Walker <benjamin.walker@intel.com>
2022-02-17 17:08:49 +00:00
Mike Gerdts
d0149da224 blob: remove unused inline functions
bs_back_dev_lba_to_io_unit() and bs_num_pages_to_cluster_boundary() are
unused inline functions. The last consumer (by the earlier _spdk_* name)
was removed in commit 6609b776.

Change-Id: Ib1babfed8002fb44451b337aa0db66c15a6805d2
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11561
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2022-02-17 17:08:37 +00:00
Mike Gerdts
6c8dc25e13 blob: remove unused bs_sequence_to_batch_completion
bs_sequence_to_batch_completion has been unused since the removal of
other unused code in commit ba870c2e99.

Change-Id: Ifb60c65c1c68d1855b49eda4c57d99e983bca5ec
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11560
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2022-02-17 17:08:37 +00:00