Commit Graph

14356 Commits

Author SHA1 Message Date
Nick Connolly
7d3b2c137a unittest/bdev: initialize mutex for portability
For correct behaviour, pthread_mutex must be initialized before use
and destroyed when finished. Add mutex initialization and destroy
calls to io_valid_test.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Idbbf857f3103ba15ab851ed16ce9f4e2bc99f7dd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6218
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-02-05 13:55:04 +00:00
Karol Latecki
00afb74669 test/vm_setup: fix LTS release checkout
We don't typically "describe" our releases and it seems
that last LTS (20.01.2) was described by accident,
so this script worked. Fix it for 21.01 LTS.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I2e64380299cd1a4aeaf21f324890d9257efdaea3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6244
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-02-05 13:47:12 +00:00
Jin Yu
b924daec88 virtio_blk: add segment number and segment size flags
Our userspace driver already supports the SIZE_MAX
and SEG_MAX features so add these two flags in supported
features.

Change-Id: Ibcbe423dbc1e2e8a31a53b34650c59243d35ba04
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6232
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-02-05 13:46:45 +00:00
Nick Connolly
6ff30cefe9 test/nvme_pcie: initialize mutex for portability
For correct behaviour, pthread_mutex must be initialized before use
and destroyed before the memory is zeroed. Add mutex initialization
and destroy calls to test_nvme_pcie_hotplug_monitor.

Tested with a pthreads library that contains debugging code to
check the mutex state.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Ifd770a85627a11e2b2c6643f798f796bab10b6cb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6153
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Community-CI: Mellanox Build Bot
2021-02-05 13:46:23 +00:00
Ziye Yang
48b2ac7a13 sock/posix: fix the zero copy enabling in initiator.
When zero copy is enabled in initiator, there could
be the case that a socket connection does not belong
to a polling group, i.e, the application does not use
socket polling  group. Then we should actively call
_sock_check_zcopy in posix_sock_flush function when zero
copy policy is enabled.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Idceaa7557eb265daa878db40c922494c3de35ea8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5423
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
2021-02-05 13:45:15 +00:00
sunshihao520
b1687cd456 lib:env_dpdk fix the enum rte_kernel_driver definition deference between dpdk 19.11 and 20.11
In dpdk 19.11, rte_kernel_driver is the old version, add version check before use the members.
Signed-off-by: sunshihao <sunshihao@huawei.com>
Change-Id: Ic1db37cc0760c7d03692fd2cdcbb6ff1e41f872d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6252
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-02-05 13:45:00 +00:00
paul luse
0e73e10da8 lib/idxd: add a condition to sim workaround
Developer convenience - make this based on a specific version.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I228b8aff6e8957cad5e8c1fae5615b113e16cfb5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5950
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2021-02-05 13:42:32 +00:00
paul luse
6edaae0fb8 module/accel/idxd: stop submitting queued tasks as DSA batches
This was experimental code.  Besides being simpler it makes perf
analysis easier and gives complete control of whether batching
is used to the application.  The framework will now not use
DSA batches for internal operations.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ic3139c40371dad64c3bc77818f0ad3f8c31d9af6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5849
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2021-02-05 13:42:32 +00:00
paul luse
9623a0402b idxd: perf optimization, remove reg read
In the completion handler there's no need to do an MMIO read
unless the completion record indicates there's an error.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ic4850d803a23413f9813da30ac6f1b611804f1b5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5847
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-02-05 13:42:32 +00:00
paul luse
8a1a845053 idxd: simplification in re-balancing channels
For flow control reasons we have to resize the bit arrays we
use to manage flow as channels come and go.  However since
channels are assigned to devices, until the channel count
reaches the device count there's no sharing so no resize of
the array is needed. So, when we use a device for the first
time there's no need to run through the rest of the channels
and re-balance.

Same thing is done on destruction. The code to free idxd
specific resources was moved from the rebalance function to
the idxd put channel function which is a much more logical
place for it as well.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ib4df163286906f413dd6429dc6833af7b68e208c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5846
Community-CI: Broadcom CI
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-02-05 13:42:32 +00:00
paul luse
15c0e78042 lib/idxd: change config #0 to something more sane
Config #1 remains what is shown as an example in the spec. Change
config #0 to just have 1 work group and 1 work queue all backed
by 4 engines.  As the majority of initial use cases will not be
implementing separate priorities and/or different back end
targets (mem, pmem, etc) having just 1 group and work queue makes
the most sense as it allows the silicon to decide which engine to
use.

Also, having multiple work queues spreads out the available
entires such that if we're not using all of the work queues then
we're not using all of the resources.  As channels are created
they are assigned the next available device.  As a channel is
assigned a device that is already in use it will round robin
work queues.  If then, for example, we have 16 devices then only
the first work queue will ever be used for the first 16 threads
which seems and if there are even just 2 work queues per device
it would take 32 threads to use all of the resources at the
device.

By haing just one work queue per device we always have the max
number of work queue entries available regardless of how many threads
are being used.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ie15ff6bdea12525fe3bfc769613084ddd2de50bf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5845
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-02-05 13:42:32 +00:00
paul luse
f17e67059e examples/accel_perf: rework how batching is done
Previous version just used batching for initial queue depth loading
as an example of how to batch. This version adds a new param -b that
allows the caller to either disable or set a specific batch value
for use during the entire run.  For example Q depth 128 with a batch of
64 will always send IO in batches of 64 so in effect once the Q depth
has been met the tool will wait until the Q depth has dropped enough
to send another 64.  This will allow for a more accurate measurement
of batching performance vs sending IO one at a time.

Also added clarrifying note on usage the Q depth is per core, not
spread over all cores.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ieb1df5f668ae9c7b37b0d789fceab1138044a5e6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5489
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
2021-02-05 13:42:32 +00:00
Michal Berger
e7ab45baf7 check_format: Include all potential bash scripts from the repo
Checking only the .sh suffix was omitting ./configure and potentially
other bash scripts which don't necessarily have to include said suffix
in their name.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I6196559e8875de46f80d9c8426577a1a79b5996d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6026
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@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>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-02-04 16:11:20 +00:00
Michal Berger
bb0f78a278 configure: Make code compliant with shellcheck
Make sure to at least cover directives check_format.sh is looking
for.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I51750c9c8ee627de4dbab8e0e4933eb39e84c527
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6025
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2021-02-04 16:11:20 +00:00
Michal Berger
5ccabc8f27 configure: Fix Bash style syntax to be compliant with shfmt
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I7858a32bb3186df89844407cfc55c8c76b1dddd4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6024
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2021-02-04 16:11:20 +00:00
Michal Berger
238251a10b sync_dev_uevents: Break from the loop if kernel seqnum matches mdev's
Change-Id: I68b1edf48eb7b243647b3e980d989c580015f812
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4710
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>
2021-02-04 16:10:49 +00:00
wanghailiangx
0b6f2e236d example/nvme/plugin: set bs 4160 for Extended Data LBA
The original value of bs is 4096, we can rewrite it in another script.
When spdk_nvme_ns_supports_extended_lba(ns) is 1, we need to
test with an integer multiple value of extended_sector_size, such as 4160.

Change-Id: I8257bee4f741f62597bb2bb645ee9c59cf57bf33
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6018
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-02-04 08:45:01 +00:00
Nick Connolly
9e422bd76a test/blob: Use CFLAGS when checking CUnit version
If the CUnit include files are located through CFLAGS rather being
in one of the system include directories, then the version test will
fail and blob.c unit tests will be skipped. Specify CFLAGS as part of
the CC command.

If the version check fails, clean won't be run to remove any left over
artifacts. This can occur if CUnit is being built externally and gets
cleaned before SPDK. Add an extra definition (ALL_DIRS) to control
compilation, so that clean will always be run.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I6099fceb14cfc6473a6b8feed746d2b44b8d291a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6054
Community-CI: Broadcom CI
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>
2021-02-04 08:44:30 +00:00
Nick Connolly
2a0c2a2dcc configure: Adjust platform tests for portability
Explicitly test sys_host against "Linux" which is clearly the intent
and matches the behaviour described in the comments.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Ic79d32b5d58bf556847849817e6bd72f70363335
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6055
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@mellanox.com>
2021-02-04 08:44:13 +00:00
Richael Zhuang
568915b6e4 sock: update sock_map_release comment
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: Icfeb9254f386fb5da6a5bde88b164bd0933f8889
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6070
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2021-02-04 08:43:31 +00:00
Karol Latecki
738cdf143f scripts/pkgdep.sh: install pyelftools for DPDK
Recent builds with mainline DPDK failed due to missing
python dependency "elftools". This patch adds it to
our system provisioning scripts.

Fixes #1770

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I9e3879d9bddd64bb0f7be81120e5fadebefa9eb8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6103
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-02-04 08:43:05 +00:00
Rafal Stefanowski
34584d2598 doc/bdev: Update OCF needed memory formula
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
Change-Id: I2f4ee4cd942a69a35004dc83f8c428d7c1604906
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6105
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-02-04 08:42:45 +00:00
Ziye Yang
d4c412720f test/nvmf: Add the digest test in multipath.sh
Since this script is only running tcp transport,
so we can enable the header and data digest configuration
when running nvme connect option.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I9954af0fc9798cc565c2a439ecba1707d3629e83
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6119
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-02-04 08:42:33 +00:00
paul luse
d959e41c80 LICENSE: add info about submodules
Make it clear that each submodule carries its own license.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I2e467df995429f3a87140288b8a8488eccb48139
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6123
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
2021-02-04 08:42:09 +00:00
Nick Connolly
7f293c58a5 test/iscsi: initialize mutex for portability
For correct behaviour, pthread_mutex must be initialized before use.
Add static initialization to a couple of structures containing a mutex.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I7049824bb292135dbebab201083a1858597f94d1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6124
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-02-04 08:41:56 +00:00
Mao Jiang
6b3ec9683e nvme/rdma: Fix rdma ctrlr creating qpair memory leak
Change-Id: Ie94cacac0b8dcf90b0243e8d568bb728dc7d3045
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6126
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2021-02-04 08:41:33 +00:00
Tomasz Zawadzki
a8104d66d9 test/check_so_deps: move checking Makefile and .so to run_test
Moved the test to a separate function so it runs under run_test.
This will make sure the logs print out "START TEST" and additionally
that time taken will be tracked separately.

It might have been misleading to include results of this test
right after confirm_abi_deps. This could lead to belive that it
was output of confirm_abi_deps. See snippet:

************************************
START TEST confirm_abi_deps
************************************
* Running confirm_abi_deps against spdk_abi_latest
Processed 60 objects.

real	0m3.970s
user	0m3.220s
sys	0m0.600s
************************************
END TEST confirm_abi_deps
************************************
---------------------------------------------------------------------
there was a dependency mismatch in the library nvme
The makefile lists: 'log sock util rdma vfio_user'
readelf outputs   : 'log rdma sock util'
---------------------------------------------------------------------
shared object test failed


Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ie0768b8a9c7390f51d35b2e879f66854a4da2226
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6143
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <dongx.yi@intel.com>
2021-02-04 08:40:38 +00:00
Allen Zhu
306ad7ff17 nvme/perf: Add missing key (ns) of Transport ID in perf help
NVMe namespace ID (i.e., ns) is a key of Transport ID, which is
supported by perf, but it's missed in the help. In addtion, a
note is added to specify multiple '-r' parameters can be used
to test multiple disks/targets.

Signed-off-by: Allen Zhu <allenz@mellanox.com>
Change-Id: Icf55e6213a63d97396bdc7022e4c0d09c67aab9a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6141
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-02-04 08:39:51 +00:00
Richael Zhuang
c0a3cf7b88 sock: add enable_quickack and enable_placement_id when writing json config
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: If67dcb6bf7b9742d2c96481057b472e31e87e87d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6144
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-02-04 08:39:33 +00:00
Matthew King
b56f1ef5e4 Cleanup: Fix boolean arg in fio plugin.
In fio, bools are represented as ints.  They have to be read into int entries
in the options struct, or memory corruption may occur.
Also provided a default to bring it more in line with existing fio code.

Signed-off-by: Matthew King <matthew.king@xilinx.com>
Change-Id: Ib718653d6597a287bf8ff96d2fb864e46295751d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6147
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
2021-02-04 08:38:55 +00:00
Nick Connolly
ed1dcc1c50 unittest/nvme: initialize mutex for portability
For correct behaviour, pthread_mutex must be initialized before use
and destroyed before the memory is zeroed. Add mutex initialization
and destroy calls to test_nvme_init_controllers.

Tested with a pthreads library that contains debugging code to
check the mutex state.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I9a0509bee176940e1aa46bd5de4c6ad396b787e1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6152
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-02-04 08:38:44 +00:00
Nick Connolly
b6748a41eb test/nvme_ctrlr_ocssd_cmd: initialize mutex
For correct behaviour, pthread_mutex must be initialized before use
and destroyed afterwards. Add mutex initialization to
DECLARE_AND_CONSTRUCT_CTRLR and add DECONSTRUCT_CTRLR
to cleanup afterwards.

Tested with a pthreads library that contains debugging code to
check the mutex state.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Ifefec17b44ac01769fd9d041119fa093b4e9d8b2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6155
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-02-04 08:38:27 +00:00
Nick Connolly
05aaac9c14 test/nvme_ctrlr_cmd: initialize mutex
For correct behaviour, pthread_mutex must be initialized before use
and destroyed afterwards. Add mutex initialization to
DECLARE_AND_CONSTRUCT_CTRLR and add DECONSTRUCT_CTRLR
to cleanup afterwards.

Tested with a pthreads library that contains debugging code to
check the mutex state.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Id1d62e6f76548bd8e259d4d9c4d453a3218b0b1c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6159
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-02-04 08:38:12 +00:00
Nick Connolly
b34fb47d8c test/nvme_ctrlr: initialize mutex for portability
For correct behaviour, pthread_mutex must be initialized before use
and destroyed afterwards. An already initialized mutex should not
be re-initialized.

Remove the call to mutex_init from setup_qpairs since it will be done
in nvme_ctrlr_construct.

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

Add missing calls to mutex_init and mutex_destroy as required.

Tested with a pthreads library that contains debugging code to
check the mutex state.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I0ee97a70d67157668cd8921fbee03d976d4d607d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6161
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-02-04 08:37:59 +00:00
Ziye Yang
74b2916c4a nvme/rdma: Only wait for the RDMA event if spdk_rdma_qp_disconnect return 0
If rdma_qp_disconnect is not correctly sent out, we will not wait
for the event.

Change-Id: I99701e421dc93909d481ccf35e9bfd8004e60da8
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6163
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <dongx.yi@intel.com>
2021-02-04 08:37:38 +00:00
Alexey Marchuk
8015386885 sock/posix: Enable zero copy send
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: Ic21e7ba1b090b4d24ef8ae0c1b0a9c5b1909da3b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6193
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: Ben Walker <benjamin.walker@intel.com>
2021-02-04 08:36:50 +00:00
Alexey Marchuk
2ae4adc342 sock/posix: Add sock to pending list on zcopy event
In NVMF TCP initiator when zero copy is disabled,
all requests are completed when we receive EPOLLIN event
for socket, add socket to pending_recv list and call socket's
callback which calls qpair_process_completions. As part of
completions processing on NVME level we receive the number
of completions and resubmit the same number of queued requests.

When zero copy is enabled, some transport requests can be
completed when we receive and process EPOLLERR event, it
happens out of qpair_process_completions context. So part
of requests can be completed, transport level contains
free requests but NVME layer don't have info about it
until it calls qpair_process_completions. And there is
a chance that on posix level when we poll sockets we
receive only EPOLLERR flag without EPOLLIN. In this
case we can complete several requests but don't call
qpair_process_completion so we don't resubmit queued
requests. It may lead to a hang in the end of test run
when there are no mo requests to be completed on transport
level (no EPOLLIN event) and we receive EPOLERR only,
so we can't resubmit queured requests.

This patch fixes this problem, it add a socket to
group's pending_recv list if we received EPOLERR
event and completed at least 1 socket request.
So socket's callback can be called even without
EPOLLIN event.

Fixes issue #1685

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I21d5c2fe6eb0787aab9531925a7f0e2fe18bafaa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6162
Community-CI: Broadcom CI
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-02-04 08:36:50 +00:00
Rui Chang
1293377629 lib/util: Fix valgrind error reported on ARM platform
Signed-off-by: Rui Chang <rui.chang@arm.com>
Change-Id: I244a1b0350b4426666e390781b500de65d250c09
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6214
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-02-04 08:35:59 +00:00
Krzysztof Karas
de7f290830 spdk_top: delete unused variable in show poller function
Deletes poller_counter variable as it is used only when constructing
ncurses window and always equal to 0.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: Ib837064e1bbbe59984802d3ec96cb4c46dcf8407
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6198
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>
2021-02-04 08:35:39 +00:00
Krzysztof Karas
0d85c5bba9 spdk_top: unify opening and closing pop-up details windows
Changes threads details pop-up and pollers pop-up to open with Enter key
and close with Esc key only. This is to avoid confusion in the future
as now those pop-ups can be opened and closed with both Enter and Esc
and and others can only be closed with Esc key.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I7e8c5a172346662a21f65c7193fc1cbd830fd1e7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6196
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>
2021-02-04 08:35:39 +00:00
Tomasz Zawadzki
e3d29a3012 lib/event: do not spawn a thread for each reactor
Those spdk threads were neither used nor tracked in event framework.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I1becee6390e172a10e08754703e018f7c44e30df
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6213
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-02-04 08:35:08 +00:00
Tomasz Zawadzki
ce9efeda3a lib/vhost: set g_vhost_core_mask to all cores rather than threads
spdk_vhost_init() relies on having a thread on each reactor.
Every vhost controller could be created on the same core and
even passing --cpumask when creating would not affect it.

This has happened before, see patch (7cc83b62).

This patch modifies the g_vhost_core_mask to match the actual
cores in use.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I42a07c5f99690bfa4ecd2a5b9b7b04d1aa7d2800
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6188
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-02-04 08:35:08 +00:00
Tomasz Zawadzki
b74363bcdf lib/vhost: force cpumask to be subset of application's CPU mask
Documentation for vhost target states that CPU mask must be a subset
of application CPU mask. This wasn't enforced right now and allowed
the cpumask on controller creation so long as at least single
CPU core overlapped with application's CPU mask.

This might have been misleading and covered up user configuration errors.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I03f959ec37efd0be9b98cff9c93c5f996b04af35
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6212
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-02-04 08:35:08 +00:00
Tomasz Zawadzki
daab1abc4f test/vhost: verify cpumask argument for controller creation
`--cpumask` argument for vhost controller creation was
untested. This patch specifies this argument and verifies output
under following conditions:
- no cpumask, resulting in it being equal to the app cpumask
- cpumask equal to app cpumask
- single core
- single non-main core
- two cores

It was motivated by recent changes to reactor code affecting
vhost without it being caught by CI. See commit 7cc83b62.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I92c603061619092007bc27a189d3d8787461a16f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6211
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-02-04 08:35:08 +00:00
Jim Harris
710838103b env_dpdk: add rte_ethdev dependency
As of DPDK main commit 682a6454 ("power: add ethdev
power management"), rte_power depends on rte_ethdev.
So add rte_ethdev library, but only on Linux since
that is the only place where we use rte_power.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ibc3473d6ec75c14a8c0c5517616950017cb2ea96
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6210
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
2021-02-04 08:34:30 +00:00
Karol Latecki
4dd1548be3 scripts/nvmf_perf: check "extra_params" key berofe accessing it
If config without this field was used then
script resulted in KeyError exception.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Icf0b270d28dcc6bf44b66c4b9ed583a6b3ef08b6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6204
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>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2021-02-04 08:33:43 +00:00
Karol Latecki
62c2c1c110 scripts/nvmf_perf: fix pylint E1111 error - assignment on no return
Fix assigning variables from functions which return nothing.

Change-Id: Ic54dc0d42e3339cda23970ed347ac6f7bf92e795
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6203
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2021-02-04 08:33:43 +00:00
Karol Latecki
6882e04563 scripts/nvmf_perf: fix pylint C0411 wrong import order
Standard lib modules first, then pip installed modules
and local modules last.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: If0159fad29bab5bef0b69aa803e3cea429cc5f25
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6202
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-02-04 08:33:43 +00:00
Ziye Yang
5206698e77 nvme/tcp: Add the implementation to get the optimal polling group
Add the real support in nvme tcp transport.

Change-Id: I2aa9b0284d6fe009925e67f602a055e787f77987
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5734
Community-CI: Broadcom CI
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-02-04 08:30:54 +00:00
Ziye Yang
e749b5d3ec nvme: Add the interface to get the optimal polling group
This patch is used to add spdk_nvme_poll_group_get_optimal
public API.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Iee34c89e0e1ff1f81167b18e198c144ca28f71de
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3311
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-02-04 08:30:54 +00:00