Commit Graph

17059 Commits

Author SHA1 Message Date
paul luse
21c84e363d idxd: fix bug with cancelling a batch
The new batching code needs to call the cb_fn for each of the
elements of the batch when a batch that hasn't been submitted
yet needs to be cancelled (due to an error in building it).

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I6f94b27dd7c64f756193ec3532de98b644b41d7e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11212
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-01-28 08:08:55 +00:00
paul luse
d5e63730ae idxd: fix busy handling
In several functions. Busy handling also maans paying attention
to the rc when submitting a batch and not clearing chan->batch
unless the call was a success.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ic45b10ade2ebdcd845dc33e54dd9c93068ceb98c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11221
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-01-28 08:08:55 +00:00
Tomasz Zawadzki
234a9ad9e2 CHANGELOG: add missing entries
This patch add entries that should be here,
based on changes in public headers and RPC.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I144ea9a5b66ba136abe29dc0f6c003b93fd059bc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11316
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-01-28 08:08:08 +00:00
Tomasz Zawadzki
405306358f CHANGELOG: fix typos and order of entries
Fix typos, formatting and order of entries.
No new entry is added in this patch.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I69a5ed01eb0d80449b4dae770aeaa70ff86a3be7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11315
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-01-28 08:08:08 +00:00
Changpeng Liu
82a95325ce nvmf/vfio-user: break bar0 access into 2 functions
With the new added property access API, we can send a internal
property access request to NVMf library, and we can use
it to reset controller.

Change-Id: Iee8b1146d9eb31bc98a9b297e5c635e43e6fdb12
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10952
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: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-01-27 20:55:16 +00:00
Changpeng Liu
d1c2027d01 nvmf/vfio-user: add NVMe live migration support finally
VFIO in QEMU uses region 9 as the PCI passthrough devices' migration channel.

The format of the region 9 migration region is as follows:
 ------------------------------------------------------------------
|vfio_device_migration_info|    data section                      |
 ------------------------------------------------------------------
QEMU will access vfio_device_migration_info to controll the migration
process.

For SPDK vfio-user target, we also implement the BAR9 via libvfio-user,
and we also define the NVMe device specific migration data stored in
data section of BAR9.  QEMU doesn't care about the format in data section,
it will help us to gather the NVMe specific migration data in source VM and
then restore the migration date to data section of BAR9 in destination VM.

The core idea to implement live migration will following the device state
change which is controlled by QEMU.  First QEMU will try to STOP the device
in the source VM, and set the destination VM to RESUME state, SPDK will save
NVMe devic state data structure to BAR9 in the source VM once the subsystem
is paused, then QEMU will read BAR9 in source VM and restore the content of
BAR9 in destination VM, finally in the destination VM, we will restore the
NVMe device state include BARs/PCI CFG/queue pairs in the destination VM.

Change-Id: I42e38f28c3ff59831be63290038b50d199d06658
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7617
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: Thanos Makatos <thanos.makatos@nutanix.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-01-27 20:55:16 +00:00
Tomasz Zawadzki
7d97822f17 vagrant: preallocate nvme images by default
Added preallocation option for raw NVMe disk images.
It matches qemu-img option for raw images.

By default raw images are created with "off" option,
resulting in increased size of the disk image as it is used.

Using "falloc" option preallocates the full size of the disk,
but does not write zeroes to it, compared to "full" option.

This will make sure that in CI, a device used during test
is never exhaused due to lack of host space.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ie1c30909dc87552a6d6c385d0ad80905ce68ff9d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11243
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: Jim Harris <james.r.harris@intel.com>
2022-01-27 19:36:38 +00:00
paul luse
057fdedbff idxd: zero out descriptor before use
To avoid re-use of descriptors that may have fields set that are
reserved by the one being used now.  For example:

If a batch desc is being built and was previously used by a copy
we need to clear out the dst_addr field or things will explode
as this is a reserved field for a batch.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I6ba50b76589e38a276683291f5ec2970c80e8aa8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11308
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-01-27 19:00:22 +00:00
Evgeniy Kochetov
08f9b40113 bdev/nvme: Fix namespace comparison
This patch aligns namespace comparison with Linux kernel
implementation:
- UUID is optional and may be NULL
- command set (CSI) should be the same

Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: I8f889989f24cd51b104057217f87eb303b30fa68
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11312
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2022-01-27 18:53:41 +00:00
Alexey Marchuk
29d94b7f01 nvmf: Stop all listeners when destroying transport
When subsystem is destroyed, it removes its listeners,
however transport level listeners remain active.
This patch removes all transport listerners when
the transport is being destroyed.

Fixes issue 2353/

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: Ica7bcb0052b626aa62d0da9049bb8f216027dc49
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11307
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-01-27 15:11:58 +00:00
Tomasz Zawadzki
c708e6dfdb test/dpdk: enable kmods on FreeBSD for upstream DPDK tests
To compile contigmem and nic_uio in DPDK the `enable_kmods`
flag has to be enabled in meson. This is required for FreeBSD.

This is done in dpdkbuild/Makefile for the submodule,
but is needed in build_native_dpdk() for upstream DPDK tests.

While here, removed comment in autotest_common.sh that refered
to patch that was already upstreamed to DPDK. See:
https://review.spdk.io/gerrit/c/spdk/dpdk/+/2534

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I2ee17ed5b62291881e64b687c642a81993e03e36
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11238
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: Michal Berger <michallinuxstuff@gmail.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-01-27 11:03:37 +00:00
Tomasz Zawadzki
d1637d783a build/dpdk: disable unused libraries from DPDK submodule
Most DPDK libraries are not required for SPDK.
Those can be disabled for submodule.
Starting with patch https://review.spdk.io/gerrit/c/spdk/dpdk/+/10540
it is possible to not compile a lot of the DPDK libs.

This reduces the build time for DPDK submodule.

Historically it was done on DPDK submodule side:
https://review.spdk.io/gerrit/c/spdk/dpdk/+/2578

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I4510baf2773fe15835e705bad42cf3ba9f35c418
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10506
Reviewed-by: Konrad Sztyber <konrad.sztyber@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-01-27 09:33:26 +00:00
Nick Connolly
968371131e ut/nvme_ctrlr: initialize mutex for portability
For correct behaviour, pthread_mutex must be initialized before use
and destroyed afterwards. An already initialized mutex should not
be re-initialized.

Add calls to nvme_ctrlr_construct where nvme_ctrlr_destruct is
called without a matching construct.

Add missing calls to mutex_init and mutex_destroy as required.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I9753fa7fbd77402f23a08a66f4b489a5c229487a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11298
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: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Mellanox Build Bot
2022-01-27 08:15:26 +00:00
Karol Latecki
6f77ddee15 autobuild.sh: apply crypto patch when building with mainline DPDK
Apply https://review.spdk.io/gerrit/c/spdk/dpdk/+/11139 patch
to accomadate QAT SYM and ASYM VFs when running crypto
functional tests.

This replaces DPDK v21.08 patches, as v21.08 is no longer
supported.

Change-Id: Ic11de9de1f96288f6b2ff504a1d262e41ad66063
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11204
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-26 19:17:03 +00:00
Tomasz Zawadzki
c733cd682f scripts/common: set special name to test partitions
SPDK test script can fail during any point of the
execution. To keep using the same devices
between test runs in CI, those devices have to
be cleaned between runs.

To select device for tests or to clean before tests,
the partition table and lack of mount points is used.
SPDK GPT partitions were always considered not in use.
Meanwhile Linux GPT were not, even if lacking a mount
point.

Some of the SPDK tests create Linux GPT partitions,
which might remain after a test run.

Linux GPT partitions created during tests now contain
"SPDK_TEST" as part of their partition name.
This allows marking such block devices as 'not in use',
to be cleaned and used in further SPDK test.

fixes #2345

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I0098776239da9b0c5dcc748625485284e4863525
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11220
Reviewed-by: Michal Berger <michallinuxstuff@gmail.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-01-26 19:07:43 +00:00
Jim Harris
25abd532e2 Revert "build/dpdk: allow SPDK static builds on DPDK shared libs"
This reverts commit 241d06070a.

Fixes #2352.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I40b81446cc1c02f18a0b986fb5f0a7a6e31de466
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11293
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@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-01-26 18:15:27 +00:00
Tomasz Zawadzki
a2dedf06bb dpdk: submodule update to disable DPDK apps
This patch includes update from DPDK fork:
https://review.spdk.io/gerrit/c/spdk/dpdk/+/11239

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ia564b77f634012d2c7c5b8bcdf851b8dc82724f8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11282
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2022-01-26 15:45:43 +00:00
Tomasz Zawadzki
241d06070a build/dpdk: allow SPDK static builds on DPDK shared libs
DPDK could be compiled as shared libraries by specifying
`--default-library=shared`. This is the default in packaged DPDK.

Building SPDK statically did not work with such DPDK builds,
since we always assumed the same type for both.

This patch makes detects the type of builds separately and
allows for any combination.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I40b81446cc1c02f18a0b986fb5f0a7a6e31de467
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6491
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-01-26 08:19:06 +00:00
Tomasz Zawadzki
b8a51a937e test/common: move all LIB paths to autotest_common.sh
The common file is sourced in all test scripts, so it
is ideal place to put all library paths.

It will make changes to those paths simpler in next patch.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ic37148e6be669f296e8561d6554e735132941413
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6685
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>
2022-01-26 08:19:06 +00:00
Ben Walker
097ccf06a9 idxd: Correctly propagate the callback when converting a 1 sized batch
to a single command

Change-Id: Ic0ca65b7399f3cbc4153327d83de7db69de48709
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11209
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@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-01-26 08:12:44 +00:00
Ben Walker
0267f8a977 examples/idxd: Deal with queued tasks during drain
If a task is on the resubmit list, make sure to clear it out during the
drain phase or the queue depth will never go to 0.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I859a03d76865d404ce43e38cfb34c27ca436e537
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11208
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-01-26 08:12:44 +00:00
Shuhei Matsumoto
fc48cf8681 nvme_rdma: Check only if Soft RoCE receive normal completion after disconnect
We saw this unexpected behavior by the current SPDK master.
Add the check to clarify this behavior occurs only when we use
Soft RoCE.

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I3a5eaa9064a0601c65139e7868898545926d0dbf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11225
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>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
2022-01-26 08:09:15 +00:00
Shuhei Matsumoto
c8f986c7ee Revert "nvme/rdma: Correct qpair disconnect process"
This reverts commit eb09178a59.

Reason for revert:

This caused a degradation for adminq.
For adminq, ctrlr_delete_io_qpair() is not called until ctrlr is destructed.
So necessary delete operations are not done for adminq.

Reverting the patch is practical for now.

Change-Id: Ib55ff81dfe97ee1e2c83876912e851c61f20e354
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10878
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-01-26 08:09:15 +00:00
Shuhei Matsumoto
194dc9e2f9 Revert "nvme_rdma: Continue even if we receive a normal WC when qpair is disconnected"
This reverts commit b9518a5540.

Reason for revert: Fix a degradation for adminq

Change-Id: I0e2c5e48a5ca34171fa98fa68216da4354b5d262
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10879
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2022-01-26 08:09:15 +00:00
Changpeng Liu
646fb03fb8 nvmf/vfio-user: add helper function to parse migration region data
When doing live migration the migration BAR region is bytes stream
data, so here we use the helper function to save current controller
state into the stream in source VM and load it as internl data
structure from steam in destination VM.

We will remove the `unused` attrubute in next patch.

Change-Id: Ib44adb351c697b50b9220ce6943cc017137a6064
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10336
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-01-26 00:37:29 +00:00
Changpeng Liu
d73d43a9cf nvmf/vfio-user: don't set ACTIVE state for ADMIN queue pair
When doing live migration, the destination VM will construct
ADMIN queue pair at the beginning, but the controller isn't
in READY state, we should not poll the ADMIN queue pair right
now.  This is fine for normal controllers, normal controllers
will set ADMIN queue pair state in CC callback.

Change-Id: I0db36f75a463fb7476ee62323f9ed0c74c2451dc
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10621
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-26 00:37:29 +00:00
Changpeng Liu
95dd90039f nvmf: add save/restore a controller in runtime
When doing live migration, there are some spdk_nvmf_ctrlr internal
data structures need to be saved/restored.

Change-Id: Ie39482e8c49765c36fc3700fbac4ce47ef306f29
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10058
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-01-26 00:37:29 +00:00
Changpeng Liu
13f7510f1a nvmf/ctrlr: save AER commands ID
When doing live migration we need to restore the AER commands
in the destination VM, so here to provide an API to save
these CIDs and the transport layer can save the value.

After migration in destination VM, we should allocate
new AER requests based on CIDs in vfio-user.

Change-Id: I5881f833bbfacb0f030a2b135b4dd47726240378
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10040
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
2022-01-26 00:37:29 +00:00
Michal Berger
61dadf29d1 scripts/spdk-gpt: Fix path lookup of the target device
Signed-off-by: Michal Berger <michallinuxstuff@gmail.com>
Change-Id: I5e1cdb75b8b4421b2a38fe315f75e11d8ea5de23
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11110
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: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-01-25 08:13:40 +00:00
shuochen0311
b635d19a26 aio: add aio bdev rescan feature
Signed-off-by: shuochen0311 <shuo.chen@databricks.com>
Change-Id: I7f2788640a56d1e1bc8b7b311622628e8a6be56e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11084
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-01-25 08:13:28 +00:00
GangCao
765cf74d07 lib/nvme: only active process to operate the unmap operation
Fix issue: #2320

Only the primary process will do the unmap bar operation as for
the map bar operation.

The DevHandle is process specific and the issue here is the
secondary process's function pointer of DevHandle is not properly
set.

Change-Id: I95dddc76c6ce4be8775b6aaf54699002baffd3b9
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11216
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: Jim Harris <james.r.harris@intel.com>
2022-01-24 20:12:51 +00:00
Michal Berger
e0e544bc9c rpmbuild: Change to $rootdir prior running the rpmbuild
This step was accidently removed by 47ee30d3e3.

Fixes issue #2332.

Signed-off-by: Michal Berger <michallinuxstuff@gmail.com>
Change-Id: I7ad9490715567b9a3a4c48ce67f3b038956654cd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11174
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-01-21 15:58:51 +00:00
Tomasz Zawadzki
edd27df26d version: SPDK 22.05 pre
This is first commit that should go into latest SPDK
after the code freeze for SPDK 22.01.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I7bdef87170716cd7358577d0aa66b64eff2f5a55
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11184
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>
2022-01-21 08:12:20 +00:00
Krzysztof Karas
8f4c7cc33a spdk_top: fix warning on build
During make operation warning -Walloc-size-larger-than
is seen. The cause is the type of threads_count variable,
which can store value up to MAX_SIZE threshold. The value
of the variable is then divided by 8 and multiplied by 32,
what exceeds the MAX_SIZE limit.

To fix the problem I changed value of threads_count to uint16_t.
Its maximum value is closer to that of hard coded limit of threads
RPC_MAX_THREADS than size_t.

Change-Id: I7c76db21c328166c074d564d9c1d6d29ae8a07da
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11177
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@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-01-21 07:49:23 +00:00
John Kariuki
b7e4940952 scripts/nvmf_perf: enable idxd in nvmf_tgt
Add configuration options to enable using IDXD
for data digest during NVMe-oF performance testing.

Change-Id: I54d443c35c67e0331e3d6ec4aecb577fc7f544c7
Signed-off-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10282
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2022-01-21 07:24:57 +00:00
paul luse
8a6c8ba9ae idxd: updates to WQ config routine to match updated spec
Using the latest DSA we aren't supposed to (a) touch WQ space that
we aren't configuring and (b) touch WQ config fields that we are
configuring even if we are configuring that WQ.  So, this patch
will read in initial values of only the number of desired WQs
and update them accordingly before updating the HW.

Also updates a few vars to use shorter local variables consistently.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I7641cdfc5ccc839e37a1d46d760248799a8fce1f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10981
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-01-20 21:42:48 +00:00
paul luse
af6d280247 idxd: disable the idxd device on shutdown
Required by spec.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ib13ca2d7ab7045a87ddc483dc1f70e649b3b9294
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10982
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
2022-01-20 21:42:39 +00:00
paul luse
c501d2b37c idxd: fix issue w/multiple WQ config
Found via inspection during spec review of latest HW. We were using the
wrong stride for the WQCFG regsiter when configuring but it just so
happened to be the right value for the current DSA version.  We were
mixing up the size of the WQCFG register with the stride value used to
configure the next WQCFG regsiter as they are not contiguous in HW, we
need to read another capabilities bit to determine the address of the
next wqcfg to configure..

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I14d1ff95e0131fd30121aa955bfbc8c8fb3fc512
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10968
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-01-20 21:39:56 +00:00
paul luse
026f003154 idxd: update structures based on latest public DSA spec
Compliant with both current and next gen DSA.

Note: some fields in gencap were mapped incorrectly
previously, but this did not impact the SPDK driver
because the only times those values (max_xfer_shift
and max_batch_shift) were used were in asserts.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I9648184670f661166136e7898d0d8c7e07d8c746
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10966
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-01-20 21:39:56 +00:00
Krzysztof Karas
30ea7ecc6f bdev/nvme: implement additional dtrace probes
Add more dtrace probes to help with identifying issues
in production.

Change-Id: I8fb621a15c5e33ae94d75b4fc31135e2635dcfce
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10561
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-20 21:12:56 +00:00
Karol Latecki
03beec4466 autobuild.sh: export CC when building with custom DPDK
When buliding with build_native_dpdk() CC is not set
which causes "compiler" to be set to gcc and gcc-specific
cflags options are used.
Meson build however is not aware of this (as CC variable
is not set) and uses whatever compiler is default in the OS.
In case of doing the build of freebsd this results in
trying to do a clang build with gcc options, which of course
fails.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I72a5919410502786c5d44fe31ce231c023df9acd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11182
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>
2022-01-20 20:46:46 +00:00
Shuhei Matsumoto
45777e1b24 CHANGELOG: Add description for multipath and I/O error resiliency
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I686b85d2dd52c83428a0eee81aa4c8648e274230
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11129
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-01-20 20:43:26 +00:00
Tomasz Zawadzki
025d10c547 dpdk: update submodule to DPDK 21.11
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ia96e566ef622d05aa83072fcb60d891fe39ebaf9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11181
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-01-20 20:08:12 +00:00
Tomasz Zawadzki
c2bd95ee54 vbdev_compress: reduce MAX_NUM_QP
This is a workaround for #2338.

Ideally the fix should remove this define and use number of cores
from the application.

With large number of QAT devices following error can be obsered:
compdev_isal_create():
ISA-L library version used: 2.30.0
vbdev_compress.c: 358:vbdev_init_compress_drivers: *NOTICE*: created virtual PMD compress_isal
EAL: memzone_reserve_aligned_thread_unsafe(): Number of requested memzone segments exceeds RTE_MAX_MEMZONE
RING: Cannot reserve memory
isal_comp_pmd_qp_setup(): Failed to create unique name for isal compression device
vbdev_compress.c: 268:create_compress_dev: *NOTICE*: FYI failed to setup a queue pair on compressdev 48 with error 4294967295 so limiting to 84 qpairs

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I689ab6bda991e3864da9f4135f57849e3c0c3986
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11179
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: Ben Walker <benjamin.walker@intel.com>
2022-01-20 20:08:12 +00:00
Tomasz Zawadzki
ca89b502aa vbdev_crypto: skip handling QAT_ASYM devices
Historically only QAT_SYM devices for crypto
were supported. The DPDK submodule explicitly
disabled its compilation.
For details please see:
https://review.spdk.io/gerrit/c/spdk/dpdk/+/9217

Starting with DPDK 21.11 QAT_SYM and QAT_ASYM were
merged together, so it is no longer possible to
disable it QAT_ASYM as it was before.

As vbdev_crypto didn't make use of it,
this driver is now skipped in preparation for
update to DPDK 21.11.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib606a4b450cd224d96bc21a64384297b2182967c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11178
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-01-20 20:08:12 +00:00
Alexey Marchuk
11f0a6ec0f nvmf: Destroy subsystems before destroying poll groups
When nvmf_tgt application shuts down, it stops all
subsystems, than destroyes poll groups and than
destroyes nvmf_tgt. Part of nvmf_tgt destruction is
destruction of subsystems and this process may require
cross thread communication but since poll groups and
threads are already destroyed, we may get segfaults.

One possible solution is to change the order and destroy
nvmf_tgt before destroying poll groups but it doesn't
work since nvmf_tgt is registered as io_device and
poll groups have its channel, so it can't be destroyed
while poll groups exist.

This patch adds a new state to nvmf_tgt state machine
which destroys all subsystems before destroying poll
groups and nvmf_tgt. It guarantees that all threads
exist when subsystems are destroyed.

Also rename state NVMF_TGT_FINI_FREE_RESOURCES to
NVMF_TGT_FINI_DESTROY_TARGET, the new name better
reflects the purpose of this state.

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I08971d78cc9ad70d43cd43c346fd74d35c8bda60
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9668
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: Jim Harris <james.r.harris@intel.com>
2022-01-20 20:00:51 +00:00
Alexey Marchuk
478f652436 nvmf: Update controller desctruction process
There is a race condition between controller destruction and
subsystem state change, e.g. admin qpair may already be freed
when a namespace is added or removed. As result in function
poll_group_update_subsystem we may get heap-use-after-free error

Another problem is that some qpair's live time may exceed controller's
life time. To avoid it, start controller destruction process when the last
qpair finished the disconnect process (previously controller started
the descruction process before the last qpair starts to disconnect
and it could lead to raise conditions)

Fixes #2055

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: Ibc99b1d840e4796e1588cc217d65834bb556b909
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9995
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: Jim Harris <james.r.harris@intel.com>
2022-01-20 20:00:51 +00:00
Tomasz Zawadzki
c144d3669c lib/vhost: use contructor to initalize g_dpdk_sem
Using contructor/destructor to handle g_dpdk_sem will
help later in the series when splitting vhost fini
between vhost.c and virtio abstraction.

Otherwise multiple callbacks would be needed during vhost fini.
Ex. spdk_vhost_fini -> vhost_user_fini to stop the sessions ->
-> back to spdk_vhost_fini to remove vhost devices ->
-> vhost_user_fini to destroy the g_dpdk_sem

g_dpdk_sem will only be used from rte_vhost_user.c.
Until all references are moved, it is placed in vhost_internal.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I0505b906621f0eb0cb1226f96a3b6cf49f66778f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11055
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-01-20 19:09:20 +00:00
Tomasz Zawadzki
26dfb9a9fa lib/vhost: remove zeroing g_vhost_core_mask on vhost_fini
There is no need to zero out the g_vhost_core_mask on vhost_fini.

Removing it will help later in the series when splitting vhost fini
between vhost.c and virtio abstraction.

g_vhost_core_mask will only be used in vhost.c and any cpu_mask
shall be passed to virtio abstraction after going through
vhost_parse_core_mask. There is no need to make the
g_vhost_core_mask accessible for virtio transports.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ic936c2a8dd1bb6f93b6f6209ea48e3278b19b54e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11054
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-01-20 19:09:20 +00:00
Tomasz Zawadzki
d9d58ba318 lib/vhost: use spdk_vhost_dev_next() iterator
In later patches rte_vhost functions will be moved
to rte_vhost_user.c. To prepare for this,
iterator is used in place of accessing g_vhost_devices.

While here, followed the same style of iterating in
spdk_vhost_config_json().

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I1b73c00dfe1391f359421d044686e49a8c6c9176
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11022
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-01-20 19:09:20 +00:00