Commit Graph

13201 Commits

Author SHA1 Message Date
Shuhei Matsumoto
58da62239e lib/nvmf: Add nvmf_ctrlr_async_event_ana_change_notice() to notice ANA change
The new function () will be used in the following patches.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I788cfb38d75c3f1f64e1754912b776a80f0f1be8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4007
Community-CI: Mellanox Build Bot
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-04 08:14:18 +00:00
Tomasz Zawadzki
ccdbd2ed51 nvme/cuse: fix nblocks and block_size in rw path
nblocks is zero based, so read path was missing the increment.

NVMe device that cuse represents can be of any block_size,
so rather than hardcoding 512 - actually verify it.
Both paths didn't request enough of a buffer from cuse.

Reported-by: Niklas Cassel
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I228dc2572bc94ecbcb913e950d912a7ab5be9434
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4037
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>
2020-09-04 08:13:56 +00:00
Tomasz Zawadzki
ef3f0d97ab nvme/cuse: refactor read/write to pass cuse_device and block_size
This patch does not alter functionality, just moves
around where cuse_device and block_size is determined.

Next patch will fix both paths.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I5a827b5b4ab080b2aa0f76f5cdcbcb177b38b474
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4036
Community-CI: Mellanox Build Bot
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>
2020-09-04 08:13:56 +00:00
Tomasz Zawadzki
3a8c976aef dpdk: update submodule to DPDK 20.08
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I6e0de8a0b2ece373aa3338c8e9d48389aa4c5a46
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3865
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>
2020-09-04 08:13:48 +00:00
Tomasz Zawadzki
cff7c8f1f7 test/vhost: workaround issue #1583 by specifying --vq-count
DPDK patch d0fcc38f5
"vhost: improve device readiness notifications"
introduced changes that need to be workedaround when
updating to DPDK 20.08.

This shall be removed after appropriate fix is created
for DPDK.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I2f0b4ef4692ba8d9fbb7d1966332def593d1dc34
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4001
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>
2020-09-04 08:13:48 +00:00
Changpeng Liu
d653a65eaf vhost: restart session after KICK socket message
Change-Id: I13fbfcde617a963503a479769374cf8dba5fa278
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4024
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-04 08:13:48 +00:00
Changpeng Liu
7b16ba29fa virtio: use correct number of entries field
Socket message VHOST_USER_SET_VRING_ENABLE will use number of
vring entries as input parameter to indicate the vring is
enabled or not, previously the flag in vhost-user library
wasn't checked before commit d0fcc38f5
"vhost: improve device readiness notifications", so here
we also use correct filed set in SPDK.

Fix issue #1583.

Change-Id: If5ac8a4ba31bdecbb5a64b736346c99e4be0f4b6
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3989
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-04 08:13:48 +00:00
Alexey Marchuk
fe87dcadb7 mk: Remove the content of build/lib in "clean" target
Leaving old libraries leads to incorrectly generated libspdk.so -
e.g. when we configure spdk using --with-uring and after that
using --without-uring then libspdk_bdev_uring.so will remain in
build/lib and will become part of spdk.so built using --without-uring

Change-Id: If482e9cf323b58f3f588b7c3bdb629425ae0ceeb
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3986
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-03 07:43:38 +00:00
Karol Latecki
103147241b test/nvme_perf: add p90 latency to gathered metrics
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ic642b7cc7a26a086dbd6da783caf5ca19a5cd95d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4011
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-03 07:43:35 +00:00
Michal Berger
2dcb0569de pkgdep/git: [QAT] Replace linux/cryptohash.h with crypto/sha.h
The former was dropped and merged with crypto/sha.h in kernel 5.8.

Change-Id: I9005592feacc71c9a0e80f06b5de2d65a6bc06d9
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4030
Community-CI: Mellanox Build Bot
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>
2020-09-03 07:43:30 +00:00
Michal Berger
d2cbb15c40 scripts/common: Don't cache pci vendor,device ids separately
On its own these values don't uniquely identify a particular pci
device, hence there's no much point in storing them like so.

Change-Id: Icc5cfec28fcccae6cd935dff03fe3ef01826edc4
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3950
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-02 14:43:02 +00:00
Michal Berger
904ac49f4c scripts/setup: Configure binding of the controllers in parallel
There are some devices for which nvme driver takes a long time to
finalize the unbind stage. With that in mind, each device would
add up a significant amount of time needed for setup.sh to complete.

To mitigate such a scenario, make sure the controllers are unbound
in a parallel fashion.

Examples taken from the system with 19 nvmes on board:

[root@supermicro4 spdk]# time ./scripts/setup.sh &>/dev/null

real    0m36.250s
user    0m1.024s
sys     0m1.990s

[root@supermicro4 spdk]# time ./scripts/setup.sh &>/dev/null

real    0m4.848s
user    0m0.867s
sys     0m17.605s

Also, take note that this is currently done only for the nvme
devices since other, i.e., ioatdma, seem to trigger a BUG in the
kernel when unbound in parallel. Some details here:

  https://bugzilla.kernel.org/show_bug.cgi?id=209041

Change-Id: Icaeb2b2ecb306f149587bc5da73743b1519bc5d6
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3893
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-02 14:43:02 +00:00
Michal Berger
5ea549466e scripts/setup: Commonize the driver binding and BDF verification|status
Change-Id: I8c8f4297891a027c3f4c650bba915d0786f46a47
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3892
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-02 07:38:48 +00:00
Michal Berger
85501619b4 scripts/setup: Use modalias to verify the bdf's driver
Change-Id: I52afb29b69f758b4cbebf4866099e430953ed681
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3891
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-02 07:38:48 +00:00
Michal Berger
69ae10f785 scripts/setup: Unify block name lookup
Change-Id: Icde3b528d37f6c9a2d8a2fd9f3548f3ee75ceff0
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3890
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-02 07:38:48 +00:00
Michal Berger
51b5fa8579 scripts/setup: Group all devices into respective arrays
This is a first patch from a series attempting to merge similar
routines used throughout setup.sh.

Change-Id: I4c71b88f7556b0e9e2f65a37b8175914022486a4
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3889
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-02 07:38:48 +00:00
Seth Howell
58216dd07e lib/nvme: fix mem leak in req submit.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: If64c06177605a8f57d87ba22b86fe58ddebd6f7a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3921
Community-CI: Mellanox Build Bot
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: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-09-02 07:38:38 +00:00
GangCao
4803dc36fc Blobfs: add an assert for the memory allocation
Change-Id: Ie9c75206b61242c71ce6f4f408bbdd44f9633077
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3998
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-02 07:38:23 +00:00
Alexey Marchuk
3aaf8e0a0b nvmf: Stop pg poller when all qpairs are destroyed
We stopped the poller to early, so we were not able to
reap all completions on ibv CQ, so RDMA qpair was not freed.
This patch stops the poller when all references to poll group
are released (all qpairs are destroyed)

Fixes #1578

Change-Id: I15c1697db13aef9da7567c7312476306c3ee1d62
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3962
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-01 07:51:45 +00:00
JimboLuCN
dd3d5800b0 script/rpc: fix bdev_set_qos_limit's usage error
Signed-off-by: JimboLuCN <jimbolucn@gmail.com>
Change-Id: I67db5c7ef81ae77edefcc5ecf058826d3be8d2e8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3981
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-01 07:51:38 +00:00
Ziye Yang
03aa8995e9 lib/sock: Fix the coredump issue in sock_map_realese
When tested on Linux 5.8 kernel and configure spdk
with debug mode (--enable-debug), and test SPDK NVMe-oF
tcp transport, and we see the coredump in sock_map_release
with the following statements:
	assert(entry->ref > 0);

After debug, I can confirm that the placement_id value got
from the following function (sock->net_impl->get_placement_id)
changes.
It means that: When the sock is added into the poll group
(spdk_sock_group_add_sock), we get the placement_id (named as
Value(begin)); and when the sock is removed from the poll group
(spdk_sock_group_remove_sock), we get the plaemednt_id on
the same sock (named as Vaule(end)). I found that
Value(begin) ! = Value(end).

So our solution is for a socket, we will get placement_id once,
then we can solve this issue.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ia1d0cf39247b53410260561aca5af38130cc0abb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3983
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-01 07:51:27 +00:00
Tomasz Zawadzki
49601c040f test/check_so_dep: skip rdma dependency if not configured with RDMA
Similar to internal vhost library, rdma lib should be ignored
if SPDK was not compiled using --with-rdma.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ic747f96f96182c04592bec44ff64ceafd11634f0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3963
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>
2020-09-01 07:51:19 +00:00
Michal Berger
e989faa936 scripts/pkgdep: [rhel] Add warning about working under RHEL system
Additionally, fall through potential yum failures to try and install
what's available in repos given system is using.

Change-Id: Icf7f5f3db1d72b67414c7d7e4badb8416a9d25b1
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3873
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>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-01 07:50:41 +00:00
Michal Berger
1338e698d1 scripts/pkgdep: [rhel] Configure EPEL repo prior installing any packages
For some RHEL releases, especially 8.x, EPEL repo is crucial in order
to install most of the package dependencies, hence we need to make
sure it's in use.

Change-Id: Iaaa1f901e6fffddb65b98fa98b21b9e77e59760f
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3872
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-01 07:50:41 +00:00
Michal Berger
f724f6b9c4 scripts/pgkdep: [rhel] Use python36
On rhel 8.x standard appstream and baseos repos don't provide python
package. Use python36 instead as it's available there.

Change-Id: I125aa3370bdb11f67f2774e00e70196df9680f13
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3871
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>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-01 07:50:41 +00:00
Michal Berger
d70ecbe935 scripts/pkgdep: [rhel] Don't use hard link for a python binary
This limitation may simply fail if /usr is part of a separate
mount|fs so softlink it instead.

Change-Id: I1e0387c2792c0bbd20d83e9739b3882a7cbbbf50
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3870
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-09-01 07:50:41 +00:00
Jim Harris
3fe748f728 blob: move bs_release_cluster
We will use it earlier in this file in a future patch.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I554f2073185d466bd0b4e98bdeec721f763c1b44
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3969
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>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-01 07:50:33 +00:00
Jim Harris
8ba7450e8c blob: simplify check for available cluster count
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I56a9ca114b84ded4ac23a9eaacadaa6df8f031cc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3968
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>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-01 07:50:33 +00:00
Jim Harris
f5b949d5fd blob: simplify free cluster counting in inflate path
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5716290476d4abdf8646a36206f07acb5b2dd4ec
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3967
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>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-01 07:50:33 +00:00
Jim Harris
2d87587fe5 blob: claim clusters inline during initialization
When claiming clusters as part of blobstore initialization
or recovery, just call spdk_bit_array_set directly rather
than going through the bs_claim_cluster function. We will
be modifying how runtime cluster allocation works so need
to separate the two use cases.  This code is very small so
inlining it has minimal code impact.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iaaa1c817e57b4a2eea62eb4683407364bac1fcc0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3966
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>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-01 07:50:33 +00:00
Jim Harris
b7d508f5e5 blob: use spdk_bit_array_load/store_mask functions
These functions were added during FTL development and
are more efficient than the roll-your-own implementations
blobstore had previously.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie09e5c305e6e171af0258e805f2aac3b88822b5e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3965
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>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-01 07:50:33 +00:00
Shuhei Matsumoto
70a2063998 lib/iscsi: Remove a DEBUG_LOG which shows error when target is not found
This DEBUG_LOG causes misunderstanding to us.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I7f538a796fa025fe79210b26225650bd11065511
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3938
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-31 15:22:44 +00:00
Shuhei Matsumoto
a6b43f82b4 test/iscsi_tgt: Test login redirection
Run two iSCSI target applications, the first application has a
public portal 10.0.0.1:3260 and the second application has a private
portal 10.0.0.3:3260.

Each application creates a target which has the corresponding portal
and a NULL bdev. The NULL bdev has the same configuration between
two applications.

By using NULL bdev, we do not have to worry about shared storage.

Then move between two portals by using temporary login redirection
function.

We tried to differentiate only TCP port but such idea did not work
with the popular iSCSI initiator, open-iscsi.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I578f3b57d738ade6da74a0ec3d7fbb140139669d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3440
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-31 15:22:44 +00:00
Shuhei Matsumoto
25359fb900 test/iscsi_tgt: Virtual network made of three interfaces using veth and bridge
To test iSCSI login redirection feature, we need multiple IP addresses
for target application. Furthermore, it is nice if multiple iSCSI
target applications run.

This patch creates such network virtually using veth device and
ether bridge but keeps compatibility even after this patch.

Create three veth interface pairs and one bridge. One pair is for
initiator and two pairs are for targets, and all pairs are
added to the same bridge.

Create two network namespaces for targets and add one pair to
the first namespace and add another pair to the second namespace.
Namespace is not created for initiator.

Necessary connectivity is tested using ping after creation.

iSCSI login redirection test code will follow.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If0ca7b4a7af652602f3d6a7ea5669a06ce41a5f1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3887
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
2020-08-31 15:22:44 +00:00
Karol Latecki
7ff4e2af79 bdev/null: make md_size inclusive for dif_type
When using --dif-type option --md-size should be
required as well.
Update & improve bdev_null_create rpc.py help
messages as well.

Change-Id: I6588a97aef6c8792bab7a41ece17c0461bb36844
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3949
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-08-31 07:47:48 +00:00
Michal Berger
7932bcd6b0 test/common: Fix typo in process_core()
Change-Id: If554ab52da8ec130628b819870dd98ffc2a7a68b
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3964
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-31 07:47:32 +00:00
Michal Berger
63ebdf5943 test/nvmf: Use NOT() for the negative multicontroller test
Change-Id: I5f631c854e0cb8440508dc24bcee033b481cf741
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3930
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-31 07:46:43 +00:00
Vitaliy Mysak
d267d0e874 lib/log: add RPC to toggle timestamps
Allow toggling log timestamps on and off by adding new RPC call.

Change-Id: I34c84bf89fae352ade266fbf7fd20594ff67bced
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2024
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-08-31 07:46:36 +00:00
Ziye Yang
cf99beb87e sock/posix: Fix the overflow issue of sendmsg_index
The type of sendmsg_idx is uint32_t, so the maximal
is 2^32 -1, so it could be overflow and get 0, so
we should fix it.

PS: I think that our code may have potential defect.
In my experiment, I try to init sendmsg_idx with 2^32 -1,
so the first req->internal.offset = 2^32 - 1.
But for the ee_info and ee_data in "struct sock_extended_err"
got from _sock_check_zcopy is all 0 in the target side.
So it means that the this req will never be completed.

With the increase of sendmsg_idx (the type is
uint32_t), sendmsg_idx will finally goto 2^32 - 1, so I
think it will still kick the issue I described.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ic9aaf629d73d5b7e2c81800a4f7f92c728adbc34
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3948
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-08-31 07:46:14 +00:00
Michal Berger
a79e33eb54 test/nvmf: [multicontroller] Run bdevperf tests without data verification
Change-Id: I8e5f6c286a640e0e8077cf08388a4b6c5af30169
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3929
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-28 22:00:50 +00:00
Karol Latecki
a8e5914833 perf/nvmf: remove pylin no-member error
Add an abstract method in Initiator class to get
rid of pylint "no-member" error.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I83ac1a498d55f6390a5b36038a9532121a9e5d0a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3922
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-08-28 07:30:36 +00:00
Karol Latecki
f252ff1f16 perf/nvmf: add option for TCP dif_insert_or_strip
Change-Id: Id5b6082f0ac87e76335f807d1758693d6813bf98
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3920
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-28 07:30:36 +00:00
Karol Latecki
66f42f3703 perf/nvmf: set protection information on null bdevs
Use --dif-type and --md-size option for bdev_null_create
rpc when creating null bdevs. Needed for DIF/DIX comparison
tests.

Change-Id: I15de25d498ff7c239cfca291e10aa16acb4f09eb
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3919
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
2020-08-28 07:30:36 +00:00
Karol Latecki
7049fe936f perf/nvmf: Allow using multiple nullblock devices
So far only single null block device was allowed in
the setup for the purpose of latency measurements.
Rename setting to "null_block_devices" and use an int,
rather than a bool, so that multiple null block
devices are created.

Change-Id: Id543cf3bfbc7d9c171f8605909e1971cabbdfcc7
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3900
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
2020-08-28 07:30:36 +00:00
Tomasz Zawadzki
cb6151c357 lib/log: fully remove log backtrace prints
Patch (922d90c8) removed backtrace printing.

Some of API was leftover in header files,
so this patch removes them.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ieb2069e707dee2a196f0cecc283064661a0ae9a9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3953
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>
2020-08-28 07:19:40 +00:00
yidong0635
b2c86b35db vhost/vhost_scsi: Fix coredump issue for non-scsi device.
Remove assert and add exit codes instead. That in non-debug mode, these
could lead coredump. We don't want the vhost target be crashed after
recieved  invalid commands.

fixes issue: #1575

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Ifef6d8f9c32150213bc2c80787e92d428d4c49c3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3951
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: JinYu <jin.yu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-28 07:19:27 +00:00
Michal Berger
83d830e745 test/blobfs: Call process_core() from rocksdb.sh test
rocksdb.sh is run independently from the autotest.sh as part of the
BlobFS-nightly-autotest job. In case a rogue file lands in the dir
where the results are stored, i.e., a core dump, CI may fail to fetch
the artifacts due to not sufficient permissions. To avoid that, make
sure cores are always processed as part of the test.

Also, adjust permissions across the entire $RESULTS_DIR, just for the
good measure.

Change-Id: I8df7799cc7ed7424950cc26250597a0e2d73bc9f
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3943
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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>
2020-08-28 07:19:09 +00:00
Vitaliy Mysak
ea2000cf56 event: disable cpumask check
cpumask can be changed by spdk_thread_set_cpumask()
during the time that event takes before it arrives
on _schedule_thread() function, which would make the
function assert(false), even though that is ~ok~.

Currently, that can happen right after thread is created
or between two successive calls to spdk_thread_set_cpumask().
But most importantly, it will constantly happen if we
introduce rescheduler.

This patch just disables the check for now.

Change-Id: Ie6dfe22d6eff2c908c367d1311436cc6769a6960
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3905
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>
2020-08-27 08:49:18 +00:00
Shuhei Matsumoto
767df1289a lib/iscsi: Increment StatSN when sending asynchronous logout request
Without this increment, the following warning messages were collected
when processing the corresponding logout request.

 iscsi.c:4426:iscsi_pdu_hdr_handle: *DEBUG*: opcode 6
* iscsi.c:4398:iscsi_update_cmdsn: *DEBUG*: StatSN(5) advanced
 iscsi.c:2519:iscsi_pdu_hdr_op_logout: *DEBUG*: reason=0, ITT=74000030, cid=0
 iscsi.c:2531:iscsi_pdu_hdr_op_logout: *DEBUG*: CmdSN=92, ExpStatSN=5, StatSN=4, ExpCmdSN=92, MaxCmdSN=155
* iscsi.c:2546:iscsi_pdu_hdr_op_logout: *DEBUG*: StatSN(5/4) might have dropped
 iscsi.c:4506:iscsi_pdu_payload_handle: *DEBUG*: opcode 6

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iee2677317dd8974abdb69141eed7fb5e538933ba
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3940
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
2020-08-27 08:37:00 +00:00
Shuhei Matsumoto
438fa38e4a lib/iscsi: Check if data comes really after processing logout request
When the PDU receive handler processes the header of the logout request PDU,
conn->is_logged_out is set to true.

However, if conn->is_logged_out is true, conn->pdu_recv_state is set to ERROR
before the PDU receive handler completes processing the logout request PDU.

Then if conn->pdu_recv_state is ERROR, conn->state is set to EXITING
after returning from the PDU receive handler.

Response PDUs are sent asynchronously now and may not be sent even after
returning from the PDU receive handler.

On the other hand, outside the PDU receive handler, the current connection
is closed if conn->state is EXITING.

Hence logout response PDU may not be sent to the initiator.

For the case that the initiator logs out and then reconnects when receiving
asynchronous logout request, missing logout response is critical
because initiator waits until receiving logout request and gets timeout.

This patch moves the check if PDU comes after logout to the place
just after getting a PDU header.

At the new location, data segment of the PDU is not received yet. But
logout request PDU does not have data segment and initiator will not
send additional PDU after sending logout request PDU, and by this patch,
iSCSI target will continue to stop receiving any new PDU after processing
logout request. Furthermore, even if there is any remaining data in the
kernel buffer, the kernel will discard or flush it when closing the socket.

Fixes issue #1571

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9554f4d54f3db80bf86abd6bffe81bac8c234531
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3928
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
2020-08-27 08:37:00 +00:00