Commit Graph

18835 Commits

Author SHA1 Message Date
Thanos Makatos
50a4875255 nvmf/vfio-user: ensure migration data are generated in stop-and-copy state
Currently we initialize pending_bytes only in pre-copy state. This is
pointless since we don't generate any migration data at this state, so
if the vfio-user client reads migration data it will be garbage. Even
worse, we don't re-initialize pending_bytes in stop-and-copy state, so
if the vfio-user client reads the entire migration data in pre-copy state
then there will be nothing left to read in the stop-and-copy state,
which is where we actually produce the migration data. This results in
corruption of the controller's state (e.g. queues).

This patch ensures that migration data are available in the
stop-and-copy state, by setting pending_bytes accordingly only in that
state.

Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Change-Id: I0b215e64cd1f58f254e1079f06402d196f984099
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11718
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-07-11 07:38:04 +00:00
Thanos Makatos
db73e999e9 nvmf/vfio-user: migration: don't ignore unsupported ranges
The read_data, write_data, and data_written migration callbacks assume
that the migration data are accessed in one go. Until this is fixed,
with this patch we ensure we don't ignore unsupported ranges.

Change-Id: I640415858b8c374ffc9e487cd20f5130e0be9305
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11717
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-07-11 07:38:04 +00:00
Artur Paszkiewicz
310836b9af ftl: configuration structure and utils
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: I5364e09e0e501443ac6e99df5d814cc5fac397e8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13290
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-11 07:23:58 +00:00
Artur Paszkiewicz
293cdc484b ftl: management framework
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: I8261863e80a53a37183b0148d4a08fa97e208dda
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13289
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>
Community-CI: Mellanox Build Bot
2022-07-11 07:23:58 +00:00
Artur Paszkiewicz
5140958837 ftl: utils
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: I3476a7b11e3078da519beb39fd5f49b8e838a238
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13409
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@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-07-11 07:23:58 +00:00
Artur Paszkiewicz
769984a925 ftl: core structure
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: I5360b43348c8eb7bdfcbc394bb1ac83768dec49f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13408
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: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-07-11 07:23:58 +00:00
Wojciech Malikowski
81dca28884 ftl: remove deprecated ftl library
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Change-Id: I3ebb05be3f1b9864b238cb74f469b4fdf573cd0d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11120
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-07-11 07:23:58 +00:00
Yifan Bian
f656eed6e0 bdev/rbd: add warning message for bdev_rbd_create without specifying -c
This patch will print warning message to help customer use
rpc command bdev_rbd_create correctly.

Fix issue #2189

Change-Id: I734516bef4c5471249dda6463d81be670d975566
Signed-off-by: Yifan Bian <yifan.bian@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13555
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-07 07:02:26 +00:00
Jim Harris
1318b3e434 build: add -mno-avx512f to x86_64 builds
valgrind doesn't support AVX-512, and latest compilers
will use newfangled instructions to do simple
integer-to-fp conversions which then break valgrind.

The only place where we would really use or need
AVX-512 is in ISA-L, so disabling those instructions
in SPDK is fine.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I48f3dd4f1b5813485a92c81d01e513c950ada205

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13554
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-07-06 17:22:52 +00:00
Alexey Marchuk
0098e63676 license: Rename the directory
Rename the directory to "licenses" to avoid
name conflicts on the case-insensitive file system
like Windows and MacOS

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: I090d7d026c8669517876bdee38d486589645d5b1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13551
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-07-05 16:43:14 +00:00
Konrad Sztyber
9e03923b95 rpc: fix zerocopy_threshold in sock_impl_set_options
This shouldn't be an on/off option, but should expect an integer value
specyfing the number of bytes.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I888af3253ad619a6c5f86e6d35454dafe8fc09a0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13540
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2022-07-05 07:11:28 +00:00
Greg Inozemtsev
421368c04f configure: Fix vfio-user dependency check
Use the same method for checking for vfio-user dependencies as
the rest of the script (compiler invocation).  Do not depend
on headers being present in a specific location as long as
they are usable.

Change-Id: Iad14a72de7fd89f2cff2838e94bcbaad6b3f329d
Signed-off-by: Greg Inozemtsev <greg@enfabrica.net>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13493
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-07-05 07:11:14 +00:00
Jaroslaw Chachulski
400aadf83f scripts/vagrant: Add ubuntu 22.04 lts support.
Add support for ubuntu 22.04 lts.

Signed-off-by: Jaroslaw Chachulski <jaroslawx.chachulski@intel.com>
Change-Id: I6f598bbf1961c8266620acb69a388e94ed794d8f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12988
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-05 07:10:56 +00:00
Michal Berger
e8863cb76b configure: Allow to define custom libdir location
This is done mainly to align the final location with the one listed
in the .pc files created for each lib.

Signed-off-by: Michal Berger <michallinuxstuff@gmail.com>
Change-Id: I99d6875c9e26f8202723dd6d73bd865b6478bcf9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12978
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: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-07-04 07:25:39 +00:00
Jaroslaw Chachulski
642f8b3da5 scripts/rpc: remove default values from bdev functions
Removing default options from parser command to prevent overwrite by
argparse the defaults defined in the .c files.

Signed-off-by: Jaroslaw Chachulski <jaroslawx.chachulski@intel.com>
Change-Id: I39026e0866f2a9aecda6588bb3f91ed87676ddd1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13461
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-07-04 07:23:26 +00:00
Jaroslaw Chachulski
cd79f1a210 scripts/rpc: remove default value from bdev_ocf_create
Removing default options from parser command to prevent overwrite by
argparse the defaults defined in the .c files.

Signed-off-by: Jaroslaw Chachulski <jaroslawx.chachulski@intel.com>
Change-Id: I9c1ba26e2b867b91fd5f7cd91edbff1844f08c79
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12979
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2022-07-04 07:23:26 +00:00
Jaroslaw Chachulski
ba81cb169e scripts/rpc: remove default values from bdev_split_create and
nvmf_get_subsystems functions

Removing default options from parser command to prevent overwrite by
argparse the defaults defined in the .c files.

Signed-off-by: Jaroslaw Chachulski <jaroslawx.chachulski@intel.com>
Change-Id: Ibce4122aed1f6c4e22b6286f52f4295a4cc13e0c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13497
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.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-07-04 07:23:26 +00:00
Jaroslaw Chachulski
169bab1f1a scripts/rpc: remove default value from iscsi functions
Removing default options from parser command to prevent overwrite by
argparse the defaults defined in the .c files.

Signed-off-by: Jaroslaw Chachulski <jaroslawx.chachulski@intel.com>
Change-Id: I11ef4947324dfba796fc16da566c0b8a1e606a00
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12922
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-07-04 07:23:26 +00:00
Jaroslaw Chachulski
9518bbc260 scripts/rpc: remove default value from nvmf_create_subsystem function
Removing default options from parser command to prevent overwrite by
argparse the defaults defined in the .c files.

Signed-off-by: Jaroslaw Chachulski <jaroslawx.chachulski@intel.com>
Change-Id: I3e009139e10bbd2c9aa94e88ffdeb3a6570c4110
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12911
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2022-07-04 07:23:26 +00:00
Jaroslaw Chachulski
16772e6de3 scripts/rpc: remove default value from bdev_nvme_send_cmd function
Removing default options from parser command to prevent overwrite by
argparse the defaults defined in the .c files.

Signed-off-by: Jaroslaw Chachulski <jaroslawx.chachulski@intel.com>
Change-Id: I8db8ab436e15a313f8141ada14c5b60f2545266d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12894
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2022-07-04 07:23:26 +00:00
Konrad Sztyber
0e25e2a6e2 bdev/compress: make lb_size optional in bdev_compress_create
Treat it as zero if the user doesn't provide it.  This will make it
consistent with other RPCs and the behavior of that command in
scripts/rpc.py.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ic5505f853bc203fb1144ba3f1f44c736563a3677
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13529
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-07-04 07:23:26 +00:00
Jim Harris
a6704e454c nvme: put rdma req in nvme_rdma_req_complete
All of the callers immediately put the req right
after the nvme_rdma_req_complete call, so just move
the put into that function instead.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic370cf689850924e0c902a6071af8b3a7ed58c0b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13527
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-07-04 07:23:13 +00:00
Jim Harris
e415bf0033 nvme: add cmd/cpl printing for rdma errors
This follows similar logic in the pcie and tcp
completion paths, including omitting error
messages when aborting aers by adding a print_on_error
parameter to the completion function.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id558d0af2cdd705dfb60abb842bd567a0949ccce
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13525
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-07-04 07:23:13 +00:00
Jim Harris
05dce1ee78 nvme: don't try to enable intel log pages on fabrics ctrlrs
By default, the SPDK nvmf target reports vid==INTEL,
which results in the SPDK nvme driver trying to enable
Intel vendor-specific log page.  Fix this by trying to
enable those log pages only for PCIE transport
controllers.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I78ebf365d4fa6295d1f610697266c3ead765988d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13524
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-07-04 07:23:13 +00:00
Jim Harris
988ce2ecaa nvme: use assert for INTEL_VID check on log pages
We can only get to this code path if the controller
has vid==INTEL, so make that more clear by changing
the check to an assert.

Remove unit test that calls
nvme_ctrlr_construct_intel_support_log_page_list()
for a controller that is not VID==INTEL - this is
no longer valid.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3b58451bc95992bf641e7452f0ac4c2bac9fe31c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13523
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-07-04 07:23:13 +00:00
Jim Harris
4a24f581d6 nvme: add cmd/cpl printing for tcp errors
This follows similar logic in the pcie completion
path, including omitting error messages when aborting
aers by adding a print_on_error parameter to the
completion function.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I96df72280bb8fcbee3847fdc27f38e14a1bf3251
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13522
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-07-04 07:23:13 +00:00
Jim Harris
21d15cb043 nvme: cache values in nvme_tcp_req_complete
nvme_tcp_req_complete_safe caches values on
the request, so that we can free the request *before*
completing it.  This allows the recently completed
req to get reused in full queue depth workloads, if
the callback function submits a new I/O.

So do this nvme_tcp_req_complete as well, to make
all of the completion paths identical.  The paths
that were calling nvme_tcp_req_complete previously
are all non-fast-path, so the extra overhead is
not important.

This allows us to call nvme_tcp_req_complete from
nvme_tcp_req_complete_safe to reduce code duplication,
so do that in this patch as well.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I876cea5ea20aba8ccc57d179e63546a463a87b35
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13521
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-07-04 07:23:13 +00:00
Jim Harris
d1179a5801 nvme: put req in nvme_tcp_req_complete
All callers of nvme_tcp_req_complete call
nvme_tcp_req_put immediately afterwards, so move
this call into nvme_tcp_req_complete.

This will help enable some improvements in later
patches.

Note that nvme_tcp_req_complete_safe has this same
functionality open coded right now, but that will
get changed in the next patch.  It calls
nvme_tcp_req_put immediately after the TAILQ_REMOVE,
so do that in nvme_tcp_req_complete as well.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I368122bc49a7f0772e3011e5427e3c43618380eb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13520
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-07-04 07:23:13 +00:00
Changpeng Liu
0989766060 test/deallocated_value: shutdown controllers before the quit
The test tool doesn't shutdown controllers when exiting the
process, so here we shutdown the controllers, also fix the
exceptions when no active Namespaces in controller.

Change-Id: I21cbdb1e7bdf37a06f66b917a2bb9bd94e06b444
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13495
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-07-01 09:29:52 +00:00
Shuhei Matsumoto
4be6d30438 nvme: Add ctrlr_abort_queued_aborts() into qpair_abort_all_queued_reqs()
nvme_qpair_abort_all_queued_reqs() aborts error injections, queued
requests, aborting queued requests, and outstanding requests. (Aborting
outstanding requests depends on transports.) However, it did not abort
queued aborts.

Include nvme_ctrlr_abort_queued_aborts() into
nvme_qpair_abort_all_queued_reqs() to do really the name of the
function indicates.

nvme_ctrlr_abort_queued_aborts() has been called in a few cases, but
we do not care duplication.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I19102cc6603a72ce5c398a7947cb4d606b692991
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12849
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Vasuki Manikarnike <vasuki.manikarnike@hpe.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
2022-06-30 07:51:23 +00:00
Boris Glimcher
7104c8332d sock: Add ktls and tls_version to spdk_sock_opts
See https://docs.kernel.org/networking/tls-offload.html
See https://www.openssl.org/docs/man3.0/man3/SSL_set_options.html

Change-Id: I2fb433cbc34061cb03e1591bb0b47063fcafc68c
Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13071
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>
2022-06-30 07:44:26 +00:00
Tomasz Zawadzki
a83dc0546f dpdk: update submodule with fixes from latest DPDK
Few recent additions from latest DPDK repo, are now
included in the submodule. They won't be necessary
starting with DPDK 22.07.

(4d8bdd8)malloc: fix ASan handling for unmapped memory
Related to #2455

(c08a752)drivers/crypto: fix warnings for OpenSSL version

(2f51bc9)eal/freebsd: fix use of newer cpuset macros
Fixes #2567

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I5dd80aac74be52131e859009fd38396cb4161c11
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13484
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2022-06-29 17:54:16 +00:00
Changpeng Liu
7003bd0de3 nvmf/vfio-user: take endpoint as input parameter in quiesce_done
QEMU may exit due to some exceptions which mean the socket
connection may be disconnected at any time, so for asynchronous
callbacks especially the subsystem pause/resume callbacks, they
all run in asynchronous way, the controller pointer may become
invalid before the callbacks are called.

Fix #2530.

Change-Id: I6d73597d75761e28844e83bfee7f8a446d85fa49
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12831
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-06-29 07:10:05 +00:00
Krzysztof Karas
5fd83ebd94 openstack: change transport type to tcp
Since we ended support for soft-roce, openstack
tests, have been failing. The cause is lack of
RDMA capable NICs in the setup. We do not need
to change the physical setup to add new NICs,
so we are changing the transport type to TCP.

Change-Id: I9dce0a4f1dc6dc51e22ba61a8c8a23f4178fde84
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13447
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: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-06-29 07:09:48 +00:00
GangCao
48ce2c978e Bdev: remove the QD poller at the time of Bdev unregister
Fix issue: #2561

The issue here is that in the bdev_set_qd_sampling_period RPC
command, the QD sampling period has been set. Then later the
related Desc is closed and in the bdev_close() function the
QD sampling period is reset to 0.

A new QD desc is added as the QD sampling period update could
be handled properly.

Meanwhile, a new QD Poll In Progress flag is also added so as
to indicate there are ongoing events of QD sampling and the
Bdev unregister will be handled in the proper way.

Related test case and unit test also updated for this change.

Change-Id: Iac86c2c6447fe338c7480cf468897fc8f41f8741
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13016
Tested-by: SPDK CI Jenkins <sys_sgci@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
2022-06-28 18:13:02 +00:00
yupeng
c7db171c01 blobstore: add test script for blobstore grow
It launches the bdev_svc app, creates an lvstore,
then grows it twice. In the first grow, the lvstore has
no logical volume. In the second grow, the lvstore has
a logical volume.

Signed-off-by: Peng Yu <yupeng0921@gmail.com>
Change-Id: I21a7d3f1d2e6a6fe72e42f89023a8588391d2aba
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12320
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-06-28 17:55:43 +00:00
yupeng
4c59c6ac53 blobstore: add RPC for growing blobstore
Add num_md_pages_per_cluster_ratio parameter to bdev_lvol_create_lvstore.
Add bdev_lvol_grow_lvstore rpc.

Signed-off-by: Peng Yu <yupeng0921@gmail.com>
Change-Id: I43a129efbc1a08f9d0df027e80f63ab1393163a2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9734
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-06-28 17:55:43 +00:00
yupeng
1f0b8df7b0 blobstore: implement spdk_bs_grow and bdev_lvol_grow_lvstore RPC
The bdev_lvol_grow_lvstore will grow the lvstore size if the undering
bdev size is increased. It invokes spdk_bs_grow internally. The
spdk_bs_grow will extend the used_clusters bitmap. If there is no
enough space resereved for the used_clusters bitmap, the api will
fail. The reserved space was calculated according to the num_md_pages
at blobstore creating time.

Signed-off-by: Peng Yu <yupeng0921@gmail.com>
Change-Id: If6e8c0794dbe4eaa7042acf5031de58138ce7bca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9730
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>
2022-06-28 17:55:43 +00:00
yupeng
88833020eb blobstore: reserve space for growing blobstore
Reserve space for used_cluster bitmap. The reserved space is calculated
according to the num_md_pages. The reserved space would be used when
the blobstore is extended in the future.
Add the num_md_pages_per_cluster_ratio parameter to the
bdev_lvol_create_lvstore API. Then calculate the num_md_pages
according to the num_md_pages_per_cluster_ratio and bdev total size, then
pass the num_md_pages to the blobstore.

Signed-off-by: Peng Yu <yupeng0921@gmail.com>
Change-Id: I61a28a3c931227e0fd3e1ef6b145fc18a3657751
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9517
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>
2022-06-28 17:55:43 +00:00
Kamil Godzwon
72c4255e9d pkgdep: add bpftrace and bcc installation from source
Add bpftrace and bcc installation from source for
Fedora35 and higher due to issues with the multipath
test and bpftrace/bcc installed from OS repository.

Fixes #2519

Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: Ieedd544a8ac02d9071f0b76f6ddd7007f18f4570
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12920
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-06-28 12:02:05 +00:00
Kamil Godzwon
f546f28ea7 pkgdep/patches: remove qat patches
Remove QAT patches as they are no longer needed

Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: Ibfbe2087aac9431b0b7c8e2addeef555e407bf40
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12994
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
2022-06-28 07:07:20 +00:00
Karol Latecki
7493be1302 pkgdep/git: update QAT driver
Update QAT driver to latest version to enable building
the driver on gcc 12 / Fedora 36. Yasm is needed for
build process.

Change-Id: Ib133f22d0ee2bea5a82b6e7b0bfe408fa1523ce1
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12231
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-06-28 07:07:20 +00:00
Boris Glimcher
3419245933 configure: add --with-openssl=<dir> option
Users can now provide custom location for openssl lib.

Example:
    ./configure --with-openssl=../openssl-3.0.2
    LD_LIBRARY_PATH=../openssl-3.0.2 ./build/examples/hello_sock --help

Change-Id: I07b653ddef5e6333d4e7bf4c05144601eb4ee275
Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13470
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>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-06-28 07:05:56 +00:00
John Levon
022da3d276 nvmf/vfio-user: correct vfu_setup_log() usage
SPDK was previously incorrectly requesting log levels such as
LOG_NOTICE. Update libvfio-user so it is in fact supported, and check
that setting up the callback actually worked.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: I41c2a8cf683868c3c2e40470f78e1af3dba29de4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12839
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2022-06-28 07:05:27 +00:00
John Levon
554b3b3fe9 nvmf/vfio-user: refactor out ctrlr_start()
Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: I71563037c15ebe0b76cfa603deea7576bad5c73c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12836
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
2022-06-28 07:05:27 +00:00
John Levon
6066e62ee6 nvmf/vfio-user: allow multiple reactors
Update libvfio-user such that the SGL access APIs can be used
concurrently. We are guaranteed that the guest memory remains mappable
now that the vfio-user transport has implemented quiescence.

This is currently only really useful (for a single controller) in poll
mode, but shouldn't break interrupt mode, as we still ensure all a
controller's queues are on the same poll group in that case.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: I0988e731558e9bf63992026afc53abc66ec2a706
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12349
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2022-06-28 07:05:27 +00:00
Ben Walker
96d4bb6ac2 check_format: Re-enable naming convention check
This was temporarily disabled to work around a big style fix patch. It
can be enabled again now.

Change-Id: I9009d83798551545307cf5881bc1bbb87453e611
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13466
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-06-27 10:29:15 +00:00
Ben Walker
8dd1cd2104 check_format: For C files only, fix return type breaks
In SPDK, declarations have the return type on the same line. Definitions
have the return type on a separate line. Astyle has an option for
enforcing this. Unfortunately, it seems to have two bugs:

1) It doesn't work correctly at all on C++ files.
2) It often fails on functions that return enums, or long type names

Deal with 1) by adjusting the check_format.sh script to only tell astyle
to fix return type line breaks for C files and not C++. Deal with 2) by
adding a few typedefs to work around the problem.

Change-Id: Idf28281466cab8411ce252d5f02ab384166790c6
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13437
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>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-06-27 09:33:48 +00:00
Ben Walker
8620c9a0d1 check_format: Temporarily disable naming convention check
This check isn't smart enough to handle the next big formatting patch,
so disable it and then re-enable later.

Change-Id: I2d73598d6b7c43f9356562161ed116bc01361166
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13465
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>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-06-27 09:33:48 +00:00
Ben Walker
08477ef8d9 check_format: Split astyle call for C and C++
These are going to need different options in an upcoming patch.

Change-Id: I5d43f21887abefbae207b5cff23fafcfac4a33d7
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13464
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-06-27 09:33:48 +00:00