Commit Graph

13486 Commits

Author SHA1 Message Date
Tomasz Zawadzki
c8c73af940 lib/blob: add clearing extents to persist path
This looks like a major omission on persist path.
Especially visible for cases where blobstore was not
reloaded between blob creations/deletion.

Added writing out zeroes to md_pages that contained
truncated extents (resized down).
After zeroes are writen out, md_pages for those extents
are released. In case of blob deletion, extents are
resized down to 0 so all extent pages are released.

Fixes #1590

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I9a2a1190e3f1f3b5d1bb806191c1fe4d27df7780
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4051
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>
2020-09-09 07:19:57 +00:00
Alexey Marchuk
e9b9510a86 nvmf/rdma/tcp: Use spdk_env_get_core_count to estimate cache size
Usage of spdk_thread_get_count is wrong since there might be many
threads allocated by other modules. Transport buffers are used by
transport poll groups, their number is equal to the number of cores.

Change-Id: I4bc748e93c3b204bf3b3ec73f17257b927a7f428
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3882
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-09-09 07:19:50 +00:00
Alexey Marchuk
903fdb752b nvmf/transport: Use mempool_get_bulk to feel pg cache
When we try to evenly divide transport buffers between poll grouos,
e.g. when we run spdk_tgt on 8 cores, set num_shared_buffers=32768
and pg buf_cache_size=4096, the last pg can't retrieve enough
buffers to fill cache. In my case if only got 4040 buffers out of
4096. Missing 56 buffers were cached by previous poll groups.
That occurred due to mempool has per lcore cache of 512 elements
and when it becomes empty, the cache is refilled. It seems that
each poll group cached extra 8 buffers.
The issue doesn't occur when we use mempool_get_bulk.

Change-Id: I866d58aa03986a3cffe27402b12f9a2519097f83
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3881
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>
2020-09-09 07:19:50 +00:00
Michal Berger
b80667550f scripts/setup remove flakiness from tests
This removes all the sleeps called after setup.sh reset. These
sleeps were meant to wait for devices given tests depend on.

Change-Id: Ibb86c9f6f8d5f1b05d165e84d9019530af84f9ea
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4035
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-09 07:19:43 +00:00
Michal Berger
6182bff272 pkgdep/common: Fix liburing's .so lookup
liburing.so is a link to actual lib created under /lib, not
/usr/lib{,64}.

Instead of checking hardcoded paths, simply check the ld cache.

Change-Id: I65954490d0b79e17de791d8045a1758cbbb381f5
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4020
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-09-09 07:19:36 +00:00
Michal Berger
97ab0917e7 pgkdep/rhel: Disable liburing on Centos7|RHEL7
Change-Id: I9986004a2573af239286eef2fb6f67662f2598d5
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4019
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-09 07:19:36 +00:00
Michal Berger
8ef9f7b2af pkgdep/rhel: Add ELRepo, Ceph repos for Centos, RHEL
ELRepo's elrepo-testing holds missing btrfs packages.

On Centos, system repos provide centos-release-ceph-* packages which
install necessary Ceph repositories to provide ceph package.

Also, group these repos into single array and install them in one
bulk. Use yum-config-manager to enable EPEL's|ELRepo's repos instead
of mixing it with unnecessary install step.

Change-Id: I3ba9c6f713ac7e28c7f1ba1e4482d2f2839eeb6a
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4018
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-09 07:19:36 +00:00
Jim Harris
2431578990 nvme: increase size of uevent buffer to 1MB
In production environments, there could be large numbers
of uevents other than nvme hotplug events.  We want to
ensure we never lose an nvme uevent due to ENOBUFS
(i.e. overflow).  So allocate a bigger receive buffer
for the netlink socket to ensure we never lose any events.
We only allocate one netlink socket per SPDK application,
so the extra memory consumption is not really a concern.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I663fbb093516a01a8980a1517245f92d8c76f7aa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4070
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-08 07:49:32 +00:00
Jin Yu
ba773a54c7 nvme: fix keep alive issues in host side
There are two bugs:
1, When the target response 0, it means target does't
support keep alive.
2, Change the interval time to us so when the keep alive
timeout is 1ms then the interval is 500us.

Fix github issue: #1565

Change-Id: I75707ab0e4e639209a9c50ef326492fae213044d
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4077
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-08 07:46:40 +00:00
yidong0635
744448260b test/nvmf: Remove duplicated code target second port.
This is already defined in nvmf common file. so remove it.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I40b003c8361fe889e9ed6a2add9878e362b5e966
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4056
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
2020-09-07 09:29:49 +00:00
Shuhei Matsumoto
f1c4238322 lib/nvmf: Factor out internal of rpc_nvmf_subsystem_get_controllers() to reuse
Factor out the internal of rpc_nvmf_subsystem_get_controllers() into
a function rpc_nvmf_subsystem_query() to use it for the upcoming RPC,
nvmf_subsystem_get_qpairs.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibe62bcfadf6b33ef26c018a3667f280b6fcd8fdf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4049
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-07 09:29:37 +00:00
Shuhei Matsumoto
98145aa6b1 lib/nvmf: Replace raw number 0xffffffff by SPDK_NVME_GLOBAL_NS_TAG
For nsid, use SPDK_NVME_GLOBAL_NS_TAG rather than raw number
0xffffffff wherever possible.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I23e989786263172e13bab40c011cf58beb06fabf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4055
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-07 09:29:37 +00:00
Seth Howell
1b249c38ad lib/nvmf: modify add_ns rpc to roll back changes in failure.
This can happen and we should make a best effort to return
the subsystem to a coherent state when it does.

maybe fixes: issue #1416

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ic3d0376984733e6664295305be82fca678c515b3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3437
Community-CI: Broadcom CI
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-07 09:29:25 +00:00
Seth Howell
1e337a1eb2 nvmf/subsystem: New path when we fail to change the subsystem state.
This can happen and we should be prepared for it.

Maybe fixes: issue #1416

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I77f48dbcabf702f88df56ad7e866bbcb830fc239
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3393
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: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-07 09:29:25 +00:00
Vitaliy Mysak
d8190d0288 lib/env_dpdk: replace printf() and fprintf(stderr,) usage
And modify test/env/vtophys to resolve linking errors.

SPDK_PRINTF() and SPDK_ERRLOG() use spdk_log() procedure which is
customizable and redirectable, so it is preffered over printf()

In case of test/env/vtophys/ program,
we have to make it an app first to avoid linking errors.

Change-Id: Id806ec3bb235745316063bbdf6b5a15a9d5dc2d9
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1944
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-07 09:28:39 +00:00
Darek Stojaczyk
494dc66ddb mk: don't link env if not needed
Some SPDK apps were linked with env even though they
didn't use it.

Top-level makefiles can now specify SPDK_NO_LINK_ENV=1.

Change-Id: I057baa5b620f20d829185025dc2e8efdcfa03fac
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3417
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-09-07 09:28:39 +00:00
Michal Berger
3fdfea7bac config/pkgdep: Allow for sourcing OS-based routines
vm_setup.sh currently depends on package managers to determine which
SPDK dependencies must be installed, however, this may cause issues on
systems which provide more than one package manager, e.g., dnf and
yum. Due to that fact, some packages were missing since they were
bound to a specific package manager instead of the distribution, case
and point, nbd. Also, some OS-dependent steps had to be duplicated,
like repo refresh on Centos8, since either of the managers could be
in use.

To address the above, allow for souring of OS-based routines to
overwrite defaults set based on given package manager.

Change-Id: I0d8d88dea4521e9c76b187c69743e4e09aa724e6
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4017
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>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-09-07 09:28:25 +00:00
Michal Berger
f2d958973a pkgdep/yum: Attempt to install wget prior installing nbd rpm
Change-Id: I907ae092d0d46ec6fea89ad24660f6ac6b555c2a
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4016
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-09-07 09:28:25 +00:00
Michal Berger
8a0d613e6f pkgdep/dnf: Refresh repo on Centos8
The d09acccf changed the order in which dnf, yum managers are picked
up, however, the refresh step was not moved to dnf which actually is
by default shipped with Centos8. Simply add the missing step.

Change-Id: I6f845d794b79ff01d4abfff098b0b29a9c489189
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4015
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-09-07 09:28:25 +00:00
Michal Berger
f1896c3d1c pkgdep/yum: Add missing call to sudo
Change-Id: I7d8b0a457f51ca1214009c758e25c44ab2d6755c
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4014
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-09-07 09:28:25 +00:00
Alexey Marchuk
f7b4dd3492 pkgdep: Add a workaround for Centos7.x aarch64
There are 2 issues:
1. building of ninja fails with missed skbuild dependency.
This dependency can be installed with scikit-build module
2. The build of ninja wheel fails due to cmake version. E.g. centos 7.6
uses cmake 2.8 and cmake 3.x can be installed as another package.
It is needed to create a soft link to cmake3 with `cmake` name so
that cmake3 is used instead of cmake 2.8

Change-Id: I53910d8d73b233d3f3a9059ab10938477c5db57b
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4062
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-07 09:28:09 +00:00
Michal Berger
342c08d0b0 scripts/setup: Define fallback driver for each device type
Most distros ship these drivers as modules, however, some, like
clearlinux, have them compiled directly in the kernel (e.g. nvme).

In case modalias lookup fails, have a fallback prepared just in case.

Change-Id: Ib9da8ff69edbb0c4ce427aa089fa7d04b399a20b
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4047
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-07 09:27:55 +00:00
Michal Berger
d6c499f3ee scripts/setup: Fix check for mounted devices
The previous approach didn't take into the account systems where root
partition is representend in a virtual form of /dev/root (see
clearlinux). In case the device was bound to virtio this would fool
setup.sh into thinking nothing is mounted and proceed with unbinding
the entire rootfs.

Fix this by checking the maj:min numbers of the device instead of its
name against the mountinfo list.

Change-Id: I0feb2584869f6bb72df3e9a4e619620240cfce3b
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4046
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@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>
2020-09-07 09:27:55 +00:00
Michal Berger
44775a8062 scripts/setup: Add env switch for block dev sync
Make sure that setup.sh waits for block devices during the tests.
This is to make sure that the underlying controllers are ready to
be talked to and minimize the amount of their flakiness.

Change-Id: Id09445de7ac7ccf4c9f679ee2b6c4bdd14c89733
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4029
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-07 09:27:42 +00:00
Michal Berger
0897e4dbfe scripts/setup: Keep track of the driver given device is bound to
Change-Id: I4c3a54d017f2ed26ce1fa5afb539063f73fadbc1
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4031
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-07 09:27:42 +00:00
Michal Berger
4f1701f60f scripts: Add tool for keeping uevents in sync
This script tries to be smart by mainly looking up all the kernel
events caught over the netlink. This is done in order to mitigate the
amount of flakiness test scripts may suffer from while waiting for
given device to pop up. This mainly concerns nvme devices when they
are moved back from user space - the time from when the ctrl is bound
to the driver until the block subsystem finally gets the device can be
substantial (even > 2s). Consider:

  $ setup.sh reset; sleep 10s

  vs

  $ setup.sh reset; sync_dev_uevents.sh block/disk nvme0n1

Where the latter could recover some of the seconds back:

  $ time { ./scripts/setup.sh reset; ./scripts/sync_dev_uevents.sh block/disk nvme0n1 ; }
0000:82:00.0 (8086 0953): uio_pci_generic -> nvme
0000:00:04.0 (8086 0e20): uio_pci_generic -> ioatdma
0000:80:04.0 (8086 0e20): uio_pci_generic -> ioatdma
0000:00:04.1 (8086 0e21): uio_pci_generic -> ioatdma
0000:80:04.1 (8086 0e21): uio_pci_generic -> ioatdma
0000:00:04.2 (8086 0e22): uio_pci_generic -> ioatdma
0000:80:04.2 (8086 0e22): uio_pci_generic -> ioatdma
0000:00:04.3 (8086 0e23): uio_pci_generic -> ioatdma
0000:80:04.3 (8086 0e23): uio_pci_generic -> ioatdma
0000:00:04.4 (8086 0e24): uio_pci_generic -> ioatdma
0000:80:04.4 (8086 0e24): uio_pci_generic -> ioatdma
0000:00:04.5 (8086 0e25): uio_pci_generic -> ioatdma
0000:80:04.5 (8086 0e25): uio_pci_generic -> ioatdma
0000:00:04.6 (8086 0e26): uio_pci_generic -> ioatdma
0000:80:04.6 (8086 0e26): uio_pci_generic -> ioatdma
0000:00:04.7 (8086 0e27): uio_pci_generic -> ioatdma
0000:80:04.7 (8086 0e27): uio_pci_generic -> ioatdma
* Found nvme0n1

real    0m2.427s
user    0m0.465s
sys     0m0.408s

Change-Id: Ib91efc73742fb00b058d4f54976d27390489ddbf
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3655
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-09-07 09:27:42 +00:00
Michal Berger
1c8a890bff scripts/setup: Reorder the status's header
Change-Id: Ifeadc3fac3f5d09143dd13ef3d510de9cecffb8a
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4032
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-07 09:27:42 +00:00
Shuhei Matsumoto
aeb693ca07 bdev/gpt: Change ERRLOG to DEBUGLOG to show interleaved metadata is not supported
It is a good enhancement for the GPT vbdev module to support
interleaved metadata but interleaved metadata is not critical and
the priority is low.

However the following error log is always collected when there is
any bdev with interleaved metadata.

  vbdev_gpt.c: 552:vbdev_gpt_examine: *ERROR*: GPT module does not
    support block size 4224 for bdev Null0

This does not cause any failure but confuses user. Hence,  change
the corresponding print from ERRLOG to DEBUGLOG.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id58507cbdc830d2b139fb34faa29e08d73c16141
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4058
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
2020-09-04 15:12:48 +00:00
Shuhei Matsumoto
102ab66926 doc/nvmf: Fix the section "Using RPCs" not to use deprecated --max-qpairs-per-ctrlr
The section "Using RPCs" uses the parameter --max-qpairs-per-ctrlr
but it has been deprecated.

Use max_io_qpairs_per_ctrlr instead.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iee0646656e5201e0c7b2ee220ea93b674e07fce1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4057
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-04 15:12:48 +00:00
Ben Walker
4aa0bb676b nvme/pci: Check for command completions after deleting submission queue
After a submission queue is deleted, the device is supposed
to post completions for every command to the completion queue.
Previously, we never looked and completed all commands with
an ABORTED status. Instead, complete any commands in the
completion queue with the status the drive gave them.

Change-Id: If851a365d4f305cf4390454b6b26dd0f7c5b82ac
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3875
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-09-04 08:14:44 +00:00
Shuhei Matsumoto
68f1681771 lib/nvmf: Control I/O and some admin commands according to ANA state
For I/O commands, block them if ANA state is inaccessible, persistent
loss, or change.

For Identify command, clear capacity field (nuse) to 0 if ANA state
is inaccessible or persistent loss.

For Get Features command, block features, error recovery, write
atomicity normal, reservation notification mask, and reservation
persistence if ANA state is inaccessible, persistent loss, or change.

For Get Log Page command, error information page does not return
any data yet, and hence there is no change.

For Set Features command, if ANA state is inaccessible or change,
block the command if NSID is 0xFFFFFFFF or if feature is error recovery,
write atomicity normal, reservation notification mask, or reservation
persistence, or if ANA state is persistent loss, block the command.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I15dd593227e451aa2247c53da42b6acad1757907
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4043
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
Shuhei Matsumoto
4688f0819f lib/nvmf: Add ANA state to struct spdk_nvmf_subsystem_listener
Add ANA state to struct spdk_nvmf_subsystem_listener and initialize
it to optimized.

Then ctrlr->listener->ana_state is referred when creating ANA log page.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I978424e51d3f23ca72dee30192bc2693abfe203d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4012
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
Shuhei Matsumoto
5b27db6268 lib/nvmf: Check if I/O qpair is on the same listener as admin qpair
We will have ANA state per listener and per subsystem. On the other hand,
NVMe specification defines ANA state per controller.

However, it is possible that I/O qpair and admin qpair are different
listeners on a single controller.

Let's check if I/O qpair is on the same listener as admin qpair if
ANA reporting is enabled.

The case that I/O qpair is on a different listener from admin qpair
is not usual and so the purpose of this check is just to guard SPDK
from any unexpected behavior.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Idb8d255de7f998e45a59a120c2ed5803258873f4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4026
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
Shuhei Matsumoto
7bcff376ab lib/nvmf: Add subsystem_listener to struct spdk_nvmf_ctrlr
Find the subsystem listener whose trid matches req->port->trid when
creating a controller, and store it in the controller.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iea343b8d8ae827b554df2245b67aed113469c592
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4010
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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
Shuhei Matsumoto
e21de9a9cc lib/nvmf: Add trid to struct spdk_nvmf_qpair
Add trid to struct spdk_nvmf_qpair and initialize it at initialization.

admin_qpair->trid will be used to get the corresponding
subsystem_listener via nvmf_subsystem_find_listener() and add it to
struct spdk_nvmf_ctrlr in the next patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0d1a41aede60de88747eff16c7e04f63d0702596
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4009
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
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