Commit Graph

19279 Commits

Author SHA1 Message Date
Shuhei Matsumoto
f91ba919c5 test/bdevio: Replace spdk_bdev_get_by_name() by spdk_bdev_open_ext()
spdk_bdev_get_by_name() is also not safe and bdevio_construct_target()
calls spdk_bdev_open_ext(). Hence, by adding a extra abstraction, remove
spdk_bdev_get_by_name() call.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I6f4cbe82a02ff1affb215c7e2d8681d76d1afb96
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16535
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-31 10:30:52 +00:00
Shuhei Matsumoto
d9cea478b2 test/bdevio: Replace spdk_bdev_first/next_leaf() by spdk_for_each_bdev()
At the previous refactoring, most use cases for spdk_bdev_first/next()
were replaced by spdk_for_each_bdev(). However, test/bdevio was not
changed because this was a test tool. Finally, replace
spdk_bdev_first_leaf() and spdk_bdev_next_leaf() by spdk_for_each_bdev()
for test/bdevio in this patch.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Ie62e7d2438b877e903af7882181564f8b7407c4d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16534
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-31 10:30:52 +00:00
Nathan Claudel
669069da0f lvol: fix jsonrpc error code sign in create_lvstore
`vbdev_lvs_create` returns negative errnos. The sign was flipped here.

Change-Id: I57e0813c2ecd10695395273a1c4ea750ef00b930
Signed-off-by: Nathan Claudel <nathan.claudel@kalrayinc.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15273
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-30 16:57:14 +00:00
Jim Harris
9e4875c398 bdev_nvme: remove duplicated line from bdev_mdns_client.c
Reported-by: Alexey Marchuk <alexey.marchuk@nvidia.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I075d909304d01f94ffbe150dac1109bf809f3436
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16275
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Boris Glimcher <Boris.Glimcher@emc.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-30 16:30:01 +00:00
plestk
96dca1676b nvmf: Fix new line at the end of log message
Signed-off-by: plestk <plestringant@kalray.eu>
Change-Id: I24c59d0d5b7a889e03d77a40b14ac95f6fe42afe
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16102
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2023-01-30 16:29:49 +00:00
Jim Harris
dba35d8e44 nvme/perf: include config.h to get SPDK_CONFIG_URING
perf has support for io_uring when SPDK_CONFIG_URING
is set, but we have to include config.h to get it.

Fixes problem with perf -R option not working, even
when user specified --with-uring.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I403ae755349e702c39dba332c5fb335d171f0d02
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16584
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>
2023-01-30 16:29:35 +00:00
Karol Latecki
a86fa6d1a4 scripts/perf: replace spaces for BMC's sensor names
Replace spaces with undescores for each sensor name
to avoid dealing with filenames with spaces later.

Change-Id: I2115cc14a15a53a7d92a7dae5cb6d1bfa7fb4402
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15352
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jaroslaw Chachulski <jaroslawx.chachulski@intel.com>
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-30 16:29:19 +00:00
Michal Berger
533039a235 autobuild: Make autobuild test suite more granular
Split each test into its own function. Oncoming patches will expand
on this approach.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I61f3a8847ae65a25504acdf22301757d35c0408d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15722
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2023-01-30 16:29:09 +00:00
Michal Berger
92109c88d7 autobuild: Move make_install test into a separate function
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Ife9e941b8afb3d33155e336b06c82b52bb4ac292
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15721
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
2023-01-30 16:29:09 +00:00
Michal Berger
1995571dba autobuild_common: Use absolute paths
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Ib559eb30decc21af58617cac3c81382b6f57d2c6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15523
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-30 16:29:09 +00:00
Michal Berger
fa030043df autotest: Make UT coverage setup independent from autotest.sh
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Idacba4abc5a33492e2de06522c446fd68230ea6b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15080
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2023-01-30 16:29:09 +00:00
Michal Berger
4eb8f5b4d1 autobuild: Move autobuild.sh's functions to a separate source file
This will allow for these routines to be used by the external
entities, allowing for more granular approach.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Ibb753a4900ef927b82e50b7c8af2780d8ff695ec
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15522
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
2023-01-30 16:29:09 +00:00
John Levon
6b206e3110 nvmf: sanity check passthru handlers
These routines can only handle a single buffer; double check that is the
case, and fail if not.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: I136482c27c73655887c49405f747b8ed073f7b69
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16198
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@nvidia.com>
2023-01-30 16:28:35 +00:00
John Levon
9b7c2bf544 nvmf: use req->iov consistently in unit tests
Use req->iov as needed, to make it easier to remove req->data later.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: I3084254ec44cfc4e11f8beccc61c895232daf272
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16197
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@nvidia.com>
2023-01-30 16:28:35 +00:00
John Levon
e1413e9197 nvmf/rdma: use req->iov consistently
Use req->iov as needed, to make it easier to remove req->data later.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: Ie625f374e846f7e6afd6a5d143a5174d27d419b4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16256
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@nvidia.com>
2023-01-30 16:28:35 +00:00
John Levon
fd05a2ff47 nvmf/tcp: use req->iov consistently
Use req->iov as needed, to make it easier to remove req->data later.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: I4095e3c4089b730db123705d0168cd409375cc43
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16196
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-30 16:28:35 +00:00
John Levon
c0ddb423e0 nvmf/vfio-user: use req->iov consistently
Use req->iov as needed, to make it easier to remove req->data later.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: Id23c4ef8018d6a7aad42c3d5054fa9addcf16f0a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16195
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-30 16:28:35 +00:00
John Levon
49c0d28ab1 nvmf: drop req->data usage in ctrlr.c
Refer to req->iov instead of req->data. As the queue connection code
already presumes a single data buffer, add some sanity checking for
this.

We also need to fix vfio_user.c as a result to correctly set ->iovcnt.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: Ib1e4ef3885200ffc5194f00b4e3fe20ab1934fd7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16194
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-30 16:28:35 +00:00
John Levon
ecc80dfcfb util: add spdk_iov_xfer_*() API
Add a new API for incremental copying in or out of an iovec, and replace
current code to use the new API.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: I088b784aef821310699478989e61411952066c18
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16193
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2023-01-30 16:28:35 +00:00
Jim Harris
833992d09c doc: nvme-cuse is no longer experimental
This has been actively supported for several years
now, but this part of the documentation was never
updated to reflect that.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iad69552ecd37a01ca6d281a0169d527c59c233b3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16582
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-30 08:13:01 +00:00
Jim Harris
6dc9dbe5ca env_dpdk: don't call remove_rte_dev from secondary proc
During secondary process shutdown, when nvme device
would get detached, it would trigger env_dpdk to
send rte_eal_hotplug_remove event for the corresponding
BDF.  But this isn't valid from a secondary process -
we can only attach/detach from the primary process.

Usually this would just result in a bunch of annoying
print messages as the secondary and primary process
sent rte messages between each other.  But occasionally
one of the response messages from the primary process
could arrive just as the secondary process was going
through rte_eal_cleanup.  The message would get
kicked to the DPDK intr thread, we would do bus_cleanup
which frees all of the PCI state, and then the message
would execute on the intr thread causing seg faults,
use-after-free or some other violation.

It's possible some kind of cleanup should be
implemented in DPDK, but for now, let's just not
induce incorrect behavior from SPDK, and don't send
the hotplug_remove messages from a secondary
process.

Fixes issue #2651.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16553
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-27 08:46:05 +00:00
Jim Harris
cf64422ad7 bdev: call unregister callback on correct thread
We should always called the unregister callback on
the same thread that spdk_bdev_unregister() was
originally called.  So save the thread pointer and
use an spdk_thread_send_msg() to make sure it gets
called on the correct thread when the unregister
finishes.

Also add unit test that reproduces the original
issue.

Fixes issue #2883.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16554
Reviewed-by: Mike Gerdts <mgerdts@nvidia.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-27 08:45:28 +00:00
Liu Xiaodong
651c558d0e doc: describe ublk target in user guide
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Change-Id: I0de47e21a34d7766c4addd6f751098b03d8a4a9e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16245
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>
2023-01-26 20:59:22 +00:00
Krzysztof Karas
6c0da14649 DPDK: use -Ddisable_apps option
Reduce build time and size by passing -Ddisable_apps.
This option will be used instead of pushing a backport
to DPDK fork that would manually disable app building.

Tested on DPDK 22.07 and DPDK 22.11.1.

Change-Id: I94df5550315567f6dbd72d354f733fe5126c5930
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15929
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-26 20:23:16 +00:00
Krzysztof Karas
eb5b45cb64 dpdkbuild/Makefile: move sed-ing disabled libs and drivers
Currently those are being sed-ed as a part of the meson setup
command, which elongates that line to over 300 characters.

To reduce size of that command, move sed-ing out to
variables and use only those as part of meson setup
command.

Change-Id: I5f8900d43b8d1f929a68d0e3a3ded962a6f8d1e2
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16533
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-26 20:23:16 +00:00
Tomasz Zawadzki
62876270a9 CHANGELOG: added missing entries for SPDK 23.01
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I92258ad0e6b4994275cac956b27af6186925f1dc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16549
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>
2023-01-26 17:33:59 +00:00
Liu Xiaodong
b2b1e8d76a ublk: turn ublk_start_disk in async
Since ublk_start_disk internally runs ublk_ctrl_cmd
asynchorously, the result should be returned after the
whole process of ublk_start_disk is completed.
Add a callback into ublk_start_disk parameter, and change
rpc_ublk_start_disk to send response in callback.

Change-Id: Icc0d9e8cb81f2b67bf99fdead423bfe8159714bc
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16500
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-26 17:22:04 +00:00
Liu Xiaodong
0d01a22b67 ublk: fix error case in ublk_finish_start
Use ublk_close_dev_done to release obtained resource
after UBLK_CMD_ADD_DEV is executed in the ublk device
start process.
Rename ublk_delete_dev to ublk_free_dev,
and ublk_close_dev_done to ublk_delete_dev

Also using the correct way -- io_uring_queue_exit()
to release uring in ublk instead of just closing uring fd.

Change-Id: I46a1ddea162adeb6dfe8c9b45082ed2f93f4b309
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16460
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>
2023-01-26 17:22:04 +00:00
Liu Xiaodong
4c0a39b1d4 ublk: fix error case in ublk_start_disk
Obtained resource can be directly released in error
handling of ublk_start_disk.
Fix the improper usage of _ublk_try_close_dev to release
resource in ublk_start_disk.

Change-Id: I291bbfb179b9df4deb8f3d346b2d660e6d17fdc1
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16459
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: Ben Walker <benjamin.walker@intel.com>
2023-01-26 17:22:04 +00:00
Tomasz Zawadzki
a1aede0998 CHANGELOG: fix typos and order of entries for SPDK 23.01
Fix typos, formatting and order of entries.
Added more appropriate sections for existing entries.

No new entry is added or removed in this patch.

Change-Id: I78a86a155a87b32bb9bdae61ce527c60a96b192e
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16531
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-26 15:16:19 +00:00
Tomasz Zawadzki
0f575d16dd deprecation: fix formating and reference to log
Made sure that all tags matching the deprecation logs
are level 4 header.

Added missing vtune tag.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I96f1e608f33a8bd32c8757c4d2ca93c5f2efc214
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16508
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: Xiaodong Liu <xiaodong.liu@intel.com>
2023-01-26 15:16:19 +00:00
Tomasz Zawadzki
32908cbfc8 deprecation: remove Open CAS Framework
Support OCF is now winding down and will not see further updates.

Change-Id: Ica2026d3a9ad13daf677fcce2b7974eb333971fc
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16392
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>
2023-01-26 15:16:19 +00:00
Tomasz Zawadzki
23196506da deprecation: Remove support for PMDK
Support for PMDK is winding down, see:
https://pmem.io/blog/2022/11/update-on-pmdk-and-our-long-term-support-strategy/

Change-Id: I8999a31137aa372e757472cfb7d4bf4edf9d2fb6
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16393
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-26 15:16:19 +00:00
Karol Latecki
9eaf49b27a scripts/nvmf_perf: fix return value
get_nvme_devices() returns wrong list for
configuring Kernel initiator.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I622d66fb3cfd3eb0b287b64a9e5203dcaff4a649
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16523
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: <sebastian.brzezinka@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-26 09:39:16 +00:00
Krzysztof Karas
2013094ce3 sw_hotplug: revert "sw_hotplug: avoid hotplug timeouts"
This reverts commit 95aa1a7337,
which introduced a race between timeout command
and reading its subprocess PID.

Change-Id: I4450449f8bd3fa5a71a11e5ea445dce360a4ec06
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16510
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-26 08:08:41 +00:00
Liu Xiaodong
827a01135c ublk: fix the memory release of ublk_io
Add function named ublk_ios_fini() to release memories
allocated in ublk_ios_init().
Fix the incorrect memory release for the failure inside
ublk_ios_init() by ublk_ios_fini().
Also move the memory release of ublk_io into function
ublk_delete_dev() instead of ublk_close_dev_done(). This
will be used by next patch.

Change-Id: I5c3fc31a4d7114e17fb86fc6facc8cccea27d6e7
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16442
Reviewed-by: Konrad Sztyber <konrad.sztyber@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>
2023-01-26 02:41:06 +00:00
Karol Latecki
d9687a60ab scripts/nvmf_perf: set CQ entires for SPDK transport layer
Allow adjusting number of CQ entries for SPDK
transport layer.

When testing with RDMA iWARP protocol it is
neccessary to adjust the number of CQ entries
manually as iWARP does not support CQ resize.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I03c1a3f20fa64a90995428e693c57b48b0a06bcb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16509
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-26 00:48:44 +00:00
Karol Latecki
acc2fcd8b9 scripts/nvmf_perf: do not overwrite extra_params
Do not overwrite extra_params when io_uring fio
engine is selected; append number of poll queues
to params list instead.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I5609e3ad4009df74bc2b02b5c5407548d1d69f3b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16507
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-26 00:48:44 +00:00
Jim Harris
ee31bc9d19 test/ublk: add parameter for num devices
test/ublk/ublk.sh 256

will now create 256 ublk devices, to try to test
the ctrlr_cmd queueing logic when the ctrl uring
runs out of sqes.

It's actually difficult to induce the condition,
since the kernel SQPOLL thread can usually keep
up with the SPDK process submitting the control
commands.  The best way to induce it is by
*not* stopping the disks at the end of a test
with a lot of disks, and letting ublk_destroy_target
stop all of them at once.  Even then, with the
ublk logging enabled, even that extra delay for
each commands opcode is enough to help the
SQPOLL thread to keep up.  Commenting out the
first UBLK_DEBUGLOG in ublk_ctrl_cmd() does help
it run out of sqes, at least in my setup.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8f7a6ca29fd69613d44a89adc7e60563b274d155
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16458
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-25 10:52:36 +00:00
Jim Harris
93f09b1627 ublk: add UBLK_DEBUG macro
This will help with debugging more complex
ublk configurations - needed especially knowing
that ublk kernel driver is still a bit flaky.

Create a new LOG flag "ublk_io" for the existing
per-IO debug logs, and use the existing "ublk"
flag for ctrl-related debug logs.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic019c1e837b04dbf5d210c46a98cfbed732278a0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16457
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-25 10:52:36 +00:00
Jim Harris
b48730d95f ublk: queue ublk when there are no ctrl sqes available
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I55a5a5111aa334807e22c9c622e33c69f0405a39
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16456
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-25 10:52:36 +00:00
Jim Harris
2db4a55381 ublk: sort cmd_op case statements in ublk_ctrl_cmd
Sort the case statements by the normal order in which
the commands are submitted.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I203a70045cd48d30d1229c754ddb57e7e31460af
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16455
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-25 10:52:36 +00:00
Jim Harris
525dcf4935 ublk: add ublk->next_state_fn
Instead of having the poller check the last
ctrl_cmd_op to determine which function to call,
just have ublk_ctrl_cmd store that function pointer
in the ublk itself.  This keeps all of the
cmd_op-specific logic in one place rather than
splitting it between the submit and poller
functions.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I59f333d38a0d89cc4c50082177ff818135bcad37
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16454
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-25 10:52:36 +00:00
Jim Harris
5b81c4bb9f ublk: remove some unneeded breakout functions
Some functions such as ublk_start_kernel,
ublk_stop_kernel and _ublk_start_disk were only
calling ublk_ctrl_cmd.  Just call ublk_ctrl_cmd
directly and avoid the extra function indirections.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic7d211b9b730af816f7747e031bdaef865ece433
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16453
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-25 10:52:36 +00:00
Jim Harris
4fd4f6367f ublk: remove ublk_ctrl_cmd args parameter
We don't need this parameter - it is simpler to
just determine the argument data (if any) in the
function itself based on the opcode.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic8df8f9ec569c10ebb565efc7268fba1d50bcdf5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16452
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-25 10:52:36 +00:00
Liu Xiaodong
cde0c555ab ublk: close queue based on queue's io info
Every queue should be closed based on only its own
I/O information, not the whole device.
Remove function ublk_is_ready_to_stop().

Change-Id: Iec5a260f68d6f84c0af4c8e0b5380272049b1f5d
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16416
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>
2023-01-25 10:52:36 +00:00
Tomasz Zawadzki
2f8a723edf ublk: use count in ublk_io_xmit() in release builds
count was unused in release builds. Otherwise following
error is produced on clang build:

19:30:56  ublk.c:974:14: error: variable 'count' set but not used
[-Werror,-Wunused-but-set-variable]
19:30:56          int rc = 0, count = 0, tag;
19:30:56                      ^
19:30:56  1 error generated.

Change-Id: If7ca88de37ed6e40826e09b055355c07f67c8869
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16450
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
2023-01-25 10:01:03 +00:00
Shuhei Matsumoto
bbd3d96b85 nvme_rdma: Ignore response if its QP was already destroyed
This is a workaround but is necessary to fix the github issue #2874.
Due to some unknown reason, in nightly test with Intel e810 NICs
when a qpair is created with synchronous mode and connection errors
are detected, the qpair is destroyed even if requests for the qpair are
still inflight. Then, nvme_rdma_process_recv_completion() causes NULL
pointer acccess. To fix this NULL pointer access, change
nvme_rdma_process_recv_completion() to return immediately if rsp->rqpair
is NULL. Add a TODO comment to find a root cause and really fix the
issue.

One of the fixes for the issue #2874.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Ic810922f7ea1b32373b15f4e0cf7c2429659cbab
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16431
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-25 10:01:03 +00:00
Shuhei Matsumoto
9aabfb59d9 nvme_rdma: Fix null pointer access and memory leaks for rqpair->reqs and rsps
Supporting SRQ caused two kinds of memory leaks. Fix both in this patch.

1. rqpair->rsps was leaked and null pointer access occurred

An error was detected during the nightly nvmf_delete_subsystem test.
The NVMe perf tool crashed with SIGABRT.

The reason of the crash was

nvme_rdma.c:2504:2: runtime error: member access within null pointer of type 'struct nvme_rdma_rsps'

This was caused by clearing rqpair->rsps before freeing rqpair->rsps.
rqpair->rsps should have been held until rqpair->rsps is freed. However,
when we support SRQ, rqpair->rsps was cleared when releasing rqpair->poller
by mistake. rqpair->rsps should be cleared only if SRQ is enabled because
in this case rqpair uses rsps of rqpair->poller.

2. rqpair->reqs and rsps are leaked for admin qpair at controller reset

To avoid unnecessary alloc and free for rqpair->rsps when enabling SRQ,
nvme_rdma_create_reqs() and nvme_rdma_create_rsps() were moved to
nvme_rdma_connect_established().

On the other hand, nvme_rdma_free_reqs() and nvme_rdma_free_rsps() were
called by nvme_rdma_ctrlr_delete_io_qpair().

However, at controller reset, admin qpair was just disconnected and
reconnected. In this case, nvme_rdma_create_reqs() and
nvme_rdma_create_rsps() were called again without calling
nvme_rdma_free_reqs() and nvme_rdma_free_rsps().

Hence, memory leak occurred.

To fix the memory leak, move nvme_rdma_free_reqs() and nvme_rdma_free_rsps()
from nvme_rdma_ctrlr_delete_io_qpair() to nvme_rdma_qpair_destroy().

One of the fixes fot the issue #2874

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I167ba908cff73d7a0be2248affce4c54f233da51
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16384
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-25 10:01:03 +00:00
Krzysztof Karas
95aa1a7337 sw_hotplug: avoid hotplug timeouts
Avoid hotplug application timeouts on machines
with multiple NVMe drives by scaling app run time
to number of NVMe drives.
Furthermore, change the way we wait for hotplug
app initialization by using "perform_tests" RPC,
and termination by starting it via timeout command.

Second part of the series fixing #2201.

Fixes #2201

Change-Id: Id82c8e8f6b9e870a55c4f43a11c755982855deeb
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15965
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-25 08:57:55 +00:00