Commit Graph

17076 Commits

Author SHA1 Message Date
Yuriy Umanets
f48130c97e lib/env_dpdk: Fixed using rte_compress_isal
When using --with-dpdk=dpdk/install option, we need to check if the
librte_compress_isal was built in DPDK before adding it to the list
of libs. rte_compress_isal is not built by DPDK if libisal is not
installed in the system.

Signed-off-by: Yuriy Umanets <yumanets@nvidia.com>
Change-Id: Iceb4ebb8cee81aa4254e0a878653c8a8dd50cac6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11618
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2022-03-02 08:39:04 +00:00
Yuriy Umanets
f1980244c0 configure: Fixes with IPSec_mb used by DPDK
- In case that --with-dpdk=dpdk/install option is used, we need to link
  with the proper IPSec_mb libs the DPDK was built with rather than using
  the default location of IPSec_mb submodule located inside the SPDK dir.
- Check with pkg-config if we need to link with IPSec_mb. Find the proper
  IPSec_mb library path for DPDK specified with --with-dpdk=dpdk/install
  option.
- Use the same behavior for plain --with-dpdk.

Signed-off-by: Yuriy Umanets <yumanets@nvidia.com>
Change-Id: Iea56d20d20556d63cb7ffb5ce2ca78f2244796e1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11617
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2022-03-02 08:39:04 +00:00
Yuriy Umanets
3e3fbf919f configure: Checking if libbsd is used by DPDK
- DPDK may or may not decide to use libbsd. SPDK needs to find this out
  and add -lbsd to the list of libraries to prevent linking issues in
  case that --with-dpdk=dpdk/install option is used.
- Use pkg-config for proper detection if the libbsd is in use.

Signed-off-by: Yuriy Umanets <yumanets@nvidia.com>
Change-Id: Ie3de0363fefb9b7337394b00adc862839834f164
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11616
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2022-03-02 08:39:04 +00:00
Yuriy Umanets
7b04eb72d2 configure: Fixes for multi-arch distros
- When using --with-dpdk=dpdk/install option we have to take into
  account multi-arch distros (Ubuntu) that keep the libraries in
  locations like dpdk/install/lib/x86_64-linux-gnu.
- Handle arch differences and library paths between gcc -dumpmachine
  and clang -dumpmachine.
- If possible, use pkg-config to handle --with-dpdk=dpdk/install
  properly and request libraries path and cflags using correct
  pkg-config library location.

Signed-off-by: Yuriy Umanets <yumanets@nvidia.com>
Change-Id: I0b8b746742aab8ed4af7d96dfb540fa2cf02e27c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11615
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2022-03-02 08:39:04 +00:00
Rafal Stefanowski
c39647df83 bdev/ocf: Improve OCF mpools
- Reduce the size of initial memory needed by OCF.
  Number of allocator buffers equal to 16383 is tested to work
  on 24 caches running IO of io_size=512 and io_depth=512, which
  should be more than enough for any real life scenario.
  This reduces initial OCF memory usage from 726 MiB to 392 MiB.
- Fix string handling for the name of the mempool.

Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
Change-Id: I40063ab1897c479c25904ae4096c5dae3351f73b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10843
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-03-02 08:34:39 +00:00
John Levon
2089c410ca nvmf/vfio-user: support interrupt mode
To fully support interrupt mode for the vfio-user transport, we need to
arrange to wake up in one of two conditions:

 - we receive a vfio-user message on the socket

 - a client writes to one of our BARs

In response, we can process any pending vfio-user messages, as well as
poll the actual queue pairs.

As there is no way for a client-mapped BAR write to cause us to wake up,
interrupt mode can only work when mappable BAR0 is disabled. In that
case, each BAR write becomes a vfio-user message, and can thus be
handled by registering the libvfio-user socket fd with SPDK.

For the poll group poller, we enable interrupt mode for it during the
vfio-user ->poll_group_create() callback; this only works in the case
that no other transports without interrupt mode support are sharing that
poll group.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: Ic784d01078b2006edb27892fc0613f934eca930b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10722
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>
Community-CI: Mellanox Build Bot
2022-03-02 08:34:23 +00:00
Tomasz Zawadzki
b514849ca1 lib/vhost: move vhost_user init thread tracking
Keep track of g_vhost_user_init_thread, local to the
rte_vhost_user.c.

There is no need to track this in generic vhost layer.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I1fd22e196a3091284f5f9c3c0c7c70a0e18514cb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11075
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-03-02 08:29:52 +00:00
Tomasz Zawadzki
d7cd645c9f lib/vhost: move rest of vsession managment to rte_vhost_user
Remaining functions that manage or interact with vsessions
are now placed in rte_vhost_user.
Renamed the functions appropriately with vhost_user_* prefix.

While here g_dpdk_sem was made static, since rest of references
from vhost.c was removed.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ie9fbf5f08910c136711fb1dfab1b35a5488f0c25

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11025
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
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>
2022-03-02 08:29:52 +00:00
Tomasz Zawadzki
8ca52b6d7c lib/vhost: move changing vsession interrupt_mode to rte_vhost_user
This functionality is specific for rte_vhost,
so move it to appropriate file.
Renamed to include vhost_user_* prefix.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I9630902f52d4944d0d18a39dfbff05945ce2bdba
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11024
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-03-02 08:29:52 +00:00
Tomasz Zawadzki
c0b0cfb9f4 lib/vhost: move vhost_device_ops functions to rte_vhost_user
Functions defined by set of callbacks in vhost_device_ops,
are going to be only used by rte_vhost.
This patch moves those functions into the file, removing them
from vhost.c

g_vhost_user_dev_dirname and _stop_session() are no longer
referenced from vhost.c, so can be removed from vhost_internal.h.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I233206fae3ad5b4549172ac4bd2b036df9ac548b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11023
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-03-02 08:29:52 +00:00
Jim Harris
f45c98dd29 blobcli: use spdk_thread_send_msg when dumping blob
For thin provisioned blobs, an IO read to an unallocated
cluster completes inline, meaning that if the read
completion function issues another read, we can quickly
blow the stack.  So use spdk_thread_send_msg() to
issue the next read operation.

Fixes #2405.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I10a40b83bfc25fa6bbd8bc93b6fea36ac8ee83c6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11784
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-03-02 08:29:01 +00:00
Michal Berger
c32476bb36 test/nvmf: Use device name instead of driver's
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I741e781c606e25834d67acaa9b14dac02d06a8b1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9862
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2022-03-01 16:01:37 +00:00
Michal Berger
767197af1e test/nvmf: Define NET_TYPE
This variable is meant to be passed into the environment for the
test suite to determine what type of net devices should be used:

NET_TYPE=virt - use soft-RoCE for rdma and veth for TCP.
NET_TYPE=phy - look for supported NICs, fail if none are found.
NET_TYPE=phy-fallback - default. Try to look for supported NICs
                        but fallback to virt setup if none are
                        found.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ic89af65eeb7d8decb0be9127a983b76bea02b344
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9861
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2022-03-01 16:01:37 +00:00
Michal Berger
e8a5e965de test/nvmf: Refactor hw detection routines
Merge detection functions into a single one where all supported
devices are picked up and exposed in the environment. Be verbose
about what's been found for given tests.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I780c5e480c301dbb92092074f927a731ed2680b1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7849
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
2022-03-01 16:01:37 +00:00
Yifan Bian
27470646c5 nvmf/fc: call free() to the object allocated by calloc()
Change-Id: I694ea9d6e031f96ebe5498a0080d7a741454e227
Signed-off-by: Yifan Bian <yifan.bian@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11751
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: Changpeng Liu <changpeng.liu@intel.com>
2022-02-28 11:08:16 +00:00
Karol Latecki
fa3ea8aad6 doc: add SPDK NVME-oF RDMA 22.01 Performance Report link
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I8e498d554f571937a839beb54e0b444cffdc8ec6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11743
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2022-02-28 11:07:51 +00:00
Karol Latecki
5489035988 doc: add SPDK Bdev 22.01 Performance Report link
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I0c7b9b373d429b93b0899324b263aaa9ed41e3b3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11741
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2022-02-28 11:07:51 +00:00
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