Commit Graph

19402 Commits

Author SHA1 Message Date
Tomasz Zawadzki
b5fbd04968 env_dpdk: add rte_compat to DPDK 22.11 header
Copies of headers for DPDK PCI API were created before the
actual DPDK 22.11 release. The rte_bus_pci.h was
modified slightly with addition of rte_compat.h
include.

Please see relevant DPDK patch:
(1094dd9)cleanup compat header inclusions

This patch only makes the two align.

Change-Id: Ieb0397c6cf2d9027cf600bd0e064863b3782b846
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15855
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Michal Berger <michal.berger@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-12-15 08:41:05 +00:00
Konrad Sztyber
17395e315f sock/ssl: call SSL_shutdown() prior to closing fd
OpenSSL's docs state that SSL_shutdown() should be called prior to
closing an fd to notify the peer that we want to terminate the
connection.  Otherwise, the peer might see the connection as being
terminated abruptly and might report unexpected EOF errors. We've even
seen those errors in our test scripts:

*ERROR*: spdk_sock_recv() failed, errno 107: Transport endpoint is not connected

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I111a0cc3ced13dbf3e6d18d004bbec6cac96576c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15824
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2022-12-15 08:37:49 +00:00
Yue-Zhu
e189949f38 app: enable configurable msg_mempool_size for reactor
This patch adds "--msg-mempool-size" option for spdk app to allow
reactors' msg_mempool_size being configurable via commond line.
We tested the rbd_bdev performance for Ceph CTX sharing with high RBD volume count via bdevperf.
When testing with 256 volumes and limited Ceph CTX (e.g., 2 Ceph ctx for 256 volumes,
which are created though bdev_rbd_register_cluster),
error message "the *ERROR*: msg could not be allocated error message"
keeps showing and the bdev_perf program hangs.
We found the issue from the limited msg_mempool_size size, which is hardcoded
by SPDK_DEFAULT_MSG_MEMPOOL_SIZE in thread.h.
Therefore, we enable the "--msg-mempool-size" option to allow configurable msg_mempool_size.

Signed-off-by: Yue-Zhu <yue.zhu@ibm.com>
Change-Id: I54db7fd46247b2f18112bb994ecce6f4b7e5bf9c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15552
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
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>
Community-CI: Mellanox Build Bot
2022-12-14 08:04:55 +00:00
Karol Latecki
3a3802438d spdkcli: print bdev size if it's 0 bytes
Print "0 bytes" in case reported number of
blocks is for some reason "0" instead of
returning awkward empty string.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ifd8bb0a7b389ebee8af324bfa21afbe5595632a5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15906
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-12-14 08:03:37 +00:00
Michal Berger
d0e6ba0a3c test/nvmf: Manually remove cpu lock files
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Idcace2a8f7d47b9d508089b8171f1121fd819c82
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15905
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.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-12-14 08:03:25 +00:00
Michal Berger
4f857ce593 scripts/setup: Stop checking for broken uio_pci_generic driver
This check was put in place as a workaround for some specific kernel
builds which were mainly shipped under centos8. Since we already
dropped centos8 in the CI and replaced it with rocky8 (where kernel
is actually stable) there's no value in maintaining that anymore.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Idd39b5bae888a991d7d628a19bc18acac6570f81
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15819
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2022-12-14 08:03:17 +00:00
Michal Berger
eab0c6649d test/nvmf: Make sure ctrl is fully released
There may be some timing issue where attempt to rebind the ctrl from
vfio_pci driver back to nvme, right after issuing the
bdev_nvme_detach_controller() call, fails as the vfio_pci might have
not fully released the device yet.

To mitigate, simply kill the application (as it's not needed anymore
at at point) before starting the kernel_target test - this should give
enough time for the device to be properly released.

As a precaution, make setup.sh to retry the probe attempt in case it
fails.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Ifc4f4c18a90605154bf33b078575c8b41129f1f3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15767
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2022-12-14 08:03:17 +00:00
Alexey Marchuk
784b9d4874 isa-l_crypto: Add submodule
Add a new config option CONFIG_ISAL_CRYPTO which
is set if both isa-l and isa-l-crypto are enabled.
This config option will be used in next patch to
enable SW crypto operations in accel fw

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: I9cf6b754fb3888e21c05aa20bade21cf90d5d090
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14857
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: <qun.wan@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-12-14 08:02:55 +00:00
Alexey Marchuk
e58885f949 bdevperf: Limit queue depth for verify job with big IO
By design verify payload, uses a bit array to find
an offset of IO request. The bit array's size is
calculated as bdev_num_blocks / (io_size/block_size),
if bdev is small, queue depth requested by the user
might be bigger than the bit array size and in that
case bdevperf won't find a free bit for IO request
offset.

To fix that issue, limit queue_depth of such bdevs
by "size_in_ios" value

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: I3117f5af7ae3ea18219c25982f33db936dd24c0b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15777
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>
2022-12-14 08:02:55 +00:00
Alexey Marchuk
893aaacccb bdevperf: Check current_queue_depth when job starts draining
During debug of some issue, it was found that
current_queue_depth might be 0 when job timer expires,
in that case we won't trigger the job end flow and
bdevperf may hang.

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: Ia49ce6905d329f3ef40216c277bf095782ac9b2d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15776
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-12-14 08:02:55 +00:00
Michal Berger
483d34ad03 bdev/bdevperf: Fix spdk_bdev_channel_get_histogram() arguments
Don't pass bdev argument as it was completely removed from the
function via:

https://review.spdk.io/gerrit/c/spdk/spdk/+/15837

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Icbc1265a516e9fd21820b2f433ced4d4522b46b9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15893
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-12-13 11:51:25 +00:00
Krzysztof Karas
9ebb3561c4 docs/spdk_top: add a note about scheduler pop-up
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: Ief1fd397bc82c83c34b0e7609632172115c716f7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8686
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-12-13 09:26:29 +00:00
Krzysztof Karas
20a3f67524 spdk_top: add scheduler pop-up details window
Adds global scheduler pop-up details window displaying current
scheduler name, scheduler period and governor name.

Modify help window to include newly added scheduler pop-up.

Mofdify parameter "string" of print_left() function to take
const char* instead of char* - the string is not modified
in that function.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: Icc0bdf55f716e5eed71a472f2c77c47ee2fc1b3d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6459
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-12-13 09:26:29 +00:00
GangCao
5ba9f929a6 examples/nvmf: explicitly set the initial value for local variables
Change-Id: Id1638718328d911a4d19aeb00ae9a0d7c650262e
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15872
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: wanghailiang <hailiangx.e.wang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-12-13 09:26:18 +00:00
GangCao
36e5133453 lib/vhost: explicitly set the initial value for local variable
Change-Id: Ic86ea3c5c5e8ed57be87afd6947ab7192c283f03
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15878
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: wanghailiang <hailiangx.e.wang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-12-13 09:26:06 +00:00
Richael Zhuang
045c781d47 bdevperf: use SPDK_SEC_TO_USEC for unit conversion
Use SPDK_SEC_TO_USEC instead of '1000 * 1000' or '1000000' for
unit conversion.

Change-Id: Ie9fb016b51ef3346ec640297941408f6c643b9b8
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15784
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-12-13 09:24:53 +00:00
Richael Zhuang
723dd06eb8 bdevperf: support latency info in bdevperf output
Get latency info from bdev histogram and print latency info in
bdevperf output.
print min/max/average latency info by default;
print summarized histogram info if run bdevperf with '-l';
print detailed histogram info if run bdevperf with '-ll'.

Change-Id: I3261574a12c038acde81a58727e9942c0f8c57b2
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14640
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-12-13 09:24:53 +00:00
Konrad Sztyber
a1fb441c84 app: fix argument order in deprecation summary
The description was swapped with removal release, causing the logs to
look like this:

foo_bar: deprecation 'v23.05' scheduled for removal in foo.bar hit 1 times

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I422a35c5ec20c8a817bed0dd5d565dfc53ef6dc9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15874
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Mike Gerdts <mgerdts@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2022-12-13 09:17:14 +00:00
Konrad Sztyber
a3ec812b09 mk: replace [[ command with /dev/null redirection
make uses /bin/sh as its shell and some distributions set it to shells
that don't support [[ command (e.g. ubuntu and dash).  This causes the
check to fail with the following error:

/bin/sh: 1: [[: not found

So, replaced the [[ command with a redirection to /dev/null, which
should work on all shells.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Idcae094e8faa3da6faac16754bb0484bd91363d8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15852
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Mike Gerdts <mgerdts@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2022-12-13 09:17:04 +00:00
Richael Zhuang
36f8f8da27 bdev: remove bdev parameter
Remove bdev parameter from spdk_bdev_channel_get_histogram since
it's not used.

Change-Id: I89f0b142cc6f80ecf39811976995f738e4cfecdb
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15837
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Mike Gerdts <mgerdts@nvidia.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Mellanox Build Bot
2022-12-12 09:42:03 +00:00
Jun Zeng
86431df168 lib/env_dpdk: Add support for vfio-vf-token parameter
The kernel vfio_pci driver module introduced vf_token checking
mechanism since kernel version 5.7, and has been supported by
DPDK. So add support for it to deal with the scenario of VF.

Signed-off-by: Jun Zeng <jun1.zeng@intel.com>
Change-Id: Ie9700fa395327da4e847c6213167284c148a64e3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14424
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>
2022-12-12 09:41:25 +00:00
John Levon
dda78a882f nvmf/vfio-user: fix _free_ctrlr()
In _free_ctrlr(), ->endpoint can never be NULL, and the code was
self-contradictory; assume it's not NULL.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: I81a449123ca05f64460380dc3a8ad8af2143d166
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15831
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-12-12 09:26:34 +00:00
John Levon
05edb4d69b nvmf/vfio-user: correct log message
Use standard "sqid" naming for a log message.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: Icca8415cd17272ca7bd82667721c4131dd1df7f1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15828
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-12-12 09:26:34 +00:00
Konrad Sztyber
0db7a0dc7f vhost: add (set|get)_coalescing to virtio_blk transport
This fixes the behavior of spdk_vhost_(set|get)_coalescing() on
non-vhost-user devices.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ia17cd4c0ed4bad262090e05f83727c1516c21f92
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15772
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-12-12 09:26:22 +00:00
Konrad Sztyber
25d55f48c1 vhost: add (set|get)_coalescing to backend interface
The current code for setting/getting coalescing setting only works with
vhost-user devices, while users can create virtio-blk devices with
non-vhost-user transport.  Calling spdk_vhost_(set|get)coalescing() on
such device results in a segfault.

So, spdk_vhost_dev_backend interface is extended with methods to
set / get coalescing parameters.  In the following patch, the virtio_blk
interface will be also extended with similar callbacks allowing us to
pipe coalescing settings to the appropriate transport.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ide5d5f633b17dcdbedb4b7804d5e45bf41373eca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15771
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-12-12 09:26:22 +00:00
Konrad Sztyber
a64acd100c nvmf: return error on invalid req length for copy commands
Both the length of a request and the number of ranges to copy are
controlled by the user, so we should check them and return an error
instead of asserting that they're correct.

This fixes the `test/nvmf/target/fabrics_fuzz.sh` test.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I3481c4bb1f2c7676df81f41dfc95ef063924222e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15805
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2022-12-09 08:16:50 +00:00
Konrad Sztyber
38a8db4784 mk: suppress broken pipe errors
Replaced grep with a [[ command to get rid of errors like this:

collect2: fatal error: ld terminated with signal 13 [Broken pipe]

during the build.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I03d0f3966882faabfff52ad01e132e837fe94433
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15820
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-12-09 08:16:33 +00:00
Michal Berger
3f912cf0e9 misc: Fix spelling mistakes
Found with misspell-fixer.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: If062df0189d92e4fb2da3f055fb981909780dc04
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15207
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-12-09 08:16:18 +00:00
Tomasz Zawadzki
acd2cc94e7 configure: handle lib64 for DPDK libdir
When building with DPDK provided via --with-dpdk=/path/to/dpdk
we need to guess the --libdir that was used when compiling DPDK.

This is not a problem with system installed DPDK, as appropriate
PKG_CONFIG_PATH for pkgconfig is already known. So it is possible
to retrieve --libdir.

Rather than just keeping it hardcoded to just 'lib', add second
popular one 'lib64'.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ic041289b326fb67f4f6fb5d5114c873ea513389e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15713
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-12-08 15:01:06 +00:00
Tomasz Zawadzki
c9b4654bd4 configure: use check_dir for FC and uring
check_dir verifies if the directory exists,
if not then exits the script printing an error.

Replaced two instances where same steps were done
explicitly.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I1179bdea0630ecb1cf2f5d4cde076308145006fb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15712
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-12-08 15:01:06 +00:00
Michal Berger
1f59abaebf scripts/setup: Use driver_override to bind devices
Using new_id attribute is global in scope, meaning that depending
on the kernel's setup seen prior running setup.sh, single write
to it may re-bind ALL matching devices. This doesn't play well
with our PCI_{ALLOWED,BLOCKED} options as they can't be enforced
in such a case. Consider the following example:

  > modprobe -r nvme # all nvme ctrls are detached from the kernel
  > echo 0xdead 0xbeef >/sys/bus/pci/drivers/uio_pci_generic/new_id

  # setup.sh-wise

  > modprobe -r nvme
  > PCI_BLOCKED=some:dead:beef.bdf setup.sh
  # PCI_BLOCKED device still ends up bound to userspace driver.

After this single write, ALL matching devices will end up bound to
uio_pci_generic. To avoid this, we should override preferred driver
on per-bdf basis.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Ic4613e33321303b92b47ce3f4d7e1f29ecca3036
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13813
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-12-08 14:16:40 +00:00
Krzysztof Karas
2011067f34 iscsi_tgt/fuzz.sh: change overlappling CPU masks
recently introduced: 0af934b38c
by default disallows multiple SPDK applications
from running on overlapping CPU masks.

This test was overlooked during initial adjustment
of CPU masks in our scripts. This patch aims to remedy
that issue.

Change-Id: I7e4a7f6a53119a97a138b191e4511d94c351ff9b
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15456
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-12-08 14:16:00 +00:00
Alexey Marchuk
0ab4de566b pkgdep/debian: Install python3-dev
This package is required to install grpcio:

./scripts/pkgdep.sh --developer-tools
...
  Could not find <Python.h>. This could mean the following:
    * You're on Ubuntu and haven't run `apt-get install python3-dev`.
    * You're on RHEL/Fedora and haven't run `yum install python3-devel` or
      `dnf install python3-devel` (make sure you also have redhat-rpm-config
      installed)
    * You're on Mac OS X and the usual Python framework was somehow corrupted
      (check your environment variables or try re-installing?)
    * You're on Windows and your Python installation was somehow corrupted
      (check your environment variables or try re-installing?)

  ----------------------------------------
  ERROR: Failed building wheel for grpcio
Failed to build grpcio

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: I1a9d6154de9ab86ba8062b53ba56002e226daa94
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15751
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: <qun.wan@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-12-08 14:15:52 +00:00
Mike Gerdts
9d06166f5b nvme: annotate and log existing deprecation
Use the deprecation API to annotate and log the deprecation of
spdk_nvme_ctrlr_prepare_for_reset() using the tag
"nvme_ctrlr_prepare_for_reset".

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: I98fd840aa9acc028a49bb47daf4ab7e88f1eb818
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15756
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-12-08 12:59:32 +00:00
Michal Berger
5121b9a2fd scripts/qat_setup: Remove VFs' pci id from the target bind driver
Do this before the attempt to bind these devices is made. This is to
make sure script works on subsequent runs.

Scripts itself executes the qat_service which disables potential VFs
of the target PF. In case VFs were previously bound to one of the
uio drivers (via new_id) the next write to that attr will fail not
rebinding the devices again. To avoid that, remove the VFs' id first
and then attempt to bind them to the uio driver.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I4818a2e3e663a4136084ce4bbb85ccfcfde1ae42
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15427
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-12-08 12:56:56 +00:00
wanghailiangx
3bdb00199a doc/bdev: add ` to show discolored fonts
Change-Id: I3aa28661b111d9721e2762967f18d874d5219ee6
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15325
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-12-08 12:56:38 +00:00
Jim Harris
af8d147328 iscsi: only define srandomdev when arc4random not available
srandomdev is *only* used to emulate arc4random, so only
bother defining it on Linux when it's needed.  This avoids
unused errors on newer distros packaging glibc versions
that now defined arc4random.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I6e64a697d9633709cedd0198f75cf094d514562d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15814
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-12-08 12:56:30 +00:00
Kamil Godzwon
2be0335489 scripts/run_vhost_test: fix shellcheck SC2294 warning
The warning appeared during Fedora 37 VM image testing

Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I2ceff22d08614fec0c27b9931d71753f57cf99bd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15794
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-12-08 12:56:18 +00:00
Kamil Godzwon
bdc222cc27 vagrant/create_vbox: add fedora37
Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: Ibaff2db31f17e91a380922eb74dbcb3cc5578d43
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15790
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-12-08 12:56:18 +00:00
Kamil Godzwon
94d03c66b6 pkgdep/git: do not use install_refspdk for newer fedora images
As we are using spdk-abi repo to compare SO files, we do not
need newer images to prepare serialized spdk releases inside VM.

For release tests (22.01, 22.09), let's use the older images,
e.g. Fedora 35

Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: Ief8f2b1a25e642f3cbe9e3038ba39e634cbf0c5e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15788
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-12-08 12:56:18 +00:00
Kamil Godzwon
985d64688e configure: change the default ocf path
Change ocf default path to the rootdir relative one.
When --with-ocf flag is used in the configure,
being out of the spdk repository, the ocf path is
incorrectly set. Depends on the actual directory where
the configure is run.

The path should point to main spdk repo directory
regardless of where the configure is run from.

Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: I6db3dd965ef9d119bb9e2f68ab3bd19c11b17a86
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15022
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: wanghailiang <hailiangx.e.wang@intel.com>
Reviewed-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-12-08 12:56:08 +00:00
John Kariuki
1d4628efc9 lib/idxd: change max idxd completions processed
This patch fixes issue # 2809, by changing the max
completions processed per poll. A new parameter called
IDXD_MAX_COMPLETIONS is used to set maximum completions
processed per poll to 128 because we observed performance
degradation on a system with 16 NVMe SSDs at a queue depth
of 64 per SSD. When using DSA to compute the data digest,
the target application can issue upto 1024(16x64) request
to compute data digest concurrently to DSA. Limiting the
maximum completions processed per poll to 32 using
DESC_PER_BATCH cause up to 43% IOPS degradation.
Use IDXD_MAX_COMPLETIONS to control the number of
completions proccessed per poll in spdk_idxd_process_event
based on your workload. For example, if your application
is issuing 1000s of concurrent request to DSA you might
want to set IDXD_MAX_COMPLETIONS to a value higher than
128.

Change-Id: I2a1db993283a83a20266f40dac851728d63e6127
Signed-off-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15801
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-12-08 12:55:58 +00:00
paul luse
7e55f977ff test/reduce: fix missing mem free call and add test call to UT script
fixes #2808

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I546fa29713ccc7daf242e41f2311690a5cf68773
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15753
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>
2022-12-08 12:55:27 +00:00
paul luse
19e2dc3853 configure: rename --with-reduce --with-vbdev-compress
This is in prep for adding a new compressDev accel_fw
module that will contain all of the DPDK compressDev specifics
on it, the vbdev will make calls to the accel_fw instead.

As the accel_fw has SW based compression, we want the configure
option to apply to building the vbdev module but not the accel_sw
software implementation or the upcoming compressdev module.

Renamed to "compress" as reduce is a term specific to the vbdev
implementation of the compression to be provided by the accel_fw
and thus the same reason why we leave the test flag called REDUCE
because it's controlling tests for the reduce library as well as
the vbdev module that is using reduce.  The flag does not apply
to the SW implementation of compression.

This does not affect upcoming accel_fw compressdev module, that
will have its own configure option.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: If8ed3e48e1e3dabcaad1cd161289e78122cd9d58
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15179
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>
2022-12-08 12:55:27 +00:00
paul luse
0b7138e97f lib/idxd: use physical address for IAA aecs table
Per specification.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ic93349c7d3ed50fa6e502e39db0347141804d4c4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15673
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-12-08 12:55:27 +00:00
Mike Gerdts
6580f654fc lvol: remove unused lvs->destruct
While lvs->destruct is set in a few places, it is never read. Since it
is not used, it is removed.

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: Iee21e92c9049d143fca13930b4b5f328f9ec38f0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15716
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>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2022-12-08 12:55:07 +00:00
Evgeniy Kochetov
b7bfa50468 blob: Use bdev copy command in CoW flow if supported
Copy-on-write happens when cluster is written for the first time for
thin provisioned volume. Currently it is implemented as two separate
requests to underlying bdev: read of the whole cluster to bounce
buffer and then write of this buffer to the new location on the same
underlying bdev.

This patch improves copy-on-write flow by utilizing copy command of
underlying bdev if it is supported. In this case we have just one
request to bdev and don't need the bounce buffer.

Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: I92552e0f18f7a41820d589e7bb1e86160c69183f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14351
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2022-12-08 12:54:54 +00:00
Evgeniy Kochetov
9e843fdbd1 blob: Add translate_lba operation
New `translate_lba` operation allows to translate blob lba to lba on
the underlying bdev. It recurses down the whole chain of bs_dev's. The
operation may fail to do the translation when blob lba is not backed
by the real bdev. For example, when we eventually hit zeroes device in
the chain.

This operation is used in the next commit to get source LBA for copy
operation.

Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: I89c2d03d1982d66b9137a3a3653a98c361984fab
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14528
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: Aleksey Marchuk <alexeymar@nvidia.com>
2022-12-08 12:54:54 +00:00
Shuhei Matsumoto
1c57fa1a95 nvme_rdma: Rename poll_group_set_cq() by qpair_set_poller()
In the following patches, nvme_rdma_poll_group_set_cq() will
touch not only CQ but also SRQ and receive WR objects.

All these resources are of a poller.

Hence for clarification, rename nvme_rdma_poll_group_set_cq()
by nvme_rdma_qpair_set_poller().

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Ic59ba5a45833e39b1b2647c000c8b953f1031d6b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14910
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2022-12-08 12:54:40 +00:00
Shuhei Matsumoto
e22dcc075a nvme_rdma: Factor out reset failed sends/recvs operation
Factor out reset failed recvs operation into a helper function
nvme_rdma_reset_failed_recvs(). This will make the following
patches simpler.

For send operation, this change is not required yet, but in future
we may support something like shared SQ. Hence, we do this change
for send operation too.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Signed-off-by: Denis Nagorny <denisn@nvidia.com>
Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: Ib44acebe63e97e5a60ea6fa701b49278c7f44b45
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14171
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2022-12-08 12:54:40 +00:00