Commit Graph

8565 Commits

Author SHA1 Message Date
Changpeng Liu
c25e9b2437 scsi: add persistent reserve in command with report capabilities support
Change-Id: I676c385ffd51c0ad2c606f948f21beb031ef4c95
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/436095
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>
2019-05-30 21:42:36 +00:00
Changpeng Liu
fecac0d871 scsi: fix SCSI reservation typos
Change-Id: Ibbc5c95fddc3d39b7d9222fa203bc29e1cf44cf6
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456285
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>
2019-05-30 21:42:36 +00:00
Ziye Yang
804ca3e995 nvme/tcp: change the name of max_r2t to maxr2t
Purpose: Make the variable definition consistent
with the same variable in the target side.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ibc4ff92b6346f0a1ad803dcb79d041289f5648b2
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455807
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-30 21:38:02 +00:00
paul luse
8a43cd27e6 test/autotest: update how config options are set in autotest
NOTE: pulling the vbdevcompress change into its own patch...

While enabling reduce testing in autotest a few issues were found
in autotest in that some options were being set based on the existence
of a header without checking the test flag, if one existed. Then at
the end of adding options, specific test flags were checked for 0 and
the configure updated to --without.  So, to make this easier to read,
the options are organized in sections and where there is a header
dependency as well as a test flag, both are chcekced at the same time.

Change-Id: I8cdc6914906500bbac63528eb541e2b235feb797
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455137
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-30 17:56:54 +00:00
paul luse
831a2c5d1e bdev/compress: change inflight val to min required by QAT
QAT driver will not load with anything less than 128, may need to
adjust after performance testing.

Change-Id: I4949e6d97e7ed997d14b907dac00cc288dcc331b
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456069
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>
2019-05-30 17:56:54 +00:00
paul luse
9fb414e2af bdev/compress: add missing .gitignore file for UT binary
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Id0e7707f61a920f5de08c860f5a533b73afc611a
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455274
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>
2019-05-30 17:56:54 +00:00
paul luse
112a8b682d bdev/compress: fix issue with freeing mbufs in compress error path
mbufs are freed with a single call to the first mbuf in the chain
unless we hit an error before we chain them. So free them correctly
when chained and loop through the array one at a time and free them
that way if not.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I80ebb86bc2147b42db89d24f8e985cacf7d4bceb
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455019
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>
2019-05-30 17:56:54 +00:00
Ziye Yang
bc1495b0f0 blobfs: fix the semphore usage issue in spdk_file_read
We need to move sub_reads++ statement earlier. Otherwise if
the read fails, the sem_wait(&channel->sem) call number
is not correct.

Change-Id: I05281a74bef78e4f80ce8d202b47849d1e6c2009
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453788
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>
2019-05-30 17:56:16 +00:00
orden smith
68eda44030 vmd: Initial SPDK VMD baseline code
Signed-off-by: Orden Smith <orden.e.smith@intel.com>
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Change-Id: I4a3c4d1ca8d0b18201edf99a67a3d75ca7ab8153
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449499
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-05-30 17:32:43 +00:00
Darek Stojaczyk
4de4b78b28 build: make dpdk depend on ipsec
DPDK 19.05+ can build a single test app with -lIPSec_MB,
so we need to make sure ipsec is built beforehand.

Change-Id: I6f28936f79558af24e20dc702a6f4e75c507043d
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455915
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-30 14:38:51 +00:00
Darek Stojaczyk
9399b20431 dpdkbuild: specify ldflags
In DPDK 19.05 there's a new test app which we obviously
don't need to build, but we have no way not to, as it's
built together with a library that we do need.

That app may try to link with crypto and compress PMDs,
which require IPSec and ISA-L respectively. If those were
not installed on the system, the linking would fail. We
fix it by providing DPDK with extra -L/path/to/[...]

Change-Id: I652efb669d10d2d03d0f643ce539404c1f0e38c4
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455825
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>
2019-05-30 14:38:51 +00:00
Wojciech Malikowski
9d4152ff11 lib/ftl: Use single iovec during metadata read
Change-Id: Iaf89dcd67e9cfc23fb75a4f227a0095c94398806
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450741
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2019-05-30 13:09:00 +00:00
JinYu
f42f853cd0 unit/nvme: add ctrlr init delay unit test
Add the unit test of the nvme ctrlr init delay to increase
the code coverage.

Change-Id: I0d31055fafc1ad13682496163e15de0a5f1e90e3
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455344
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: Changpeng Liu <changpeng.liu@intel.com>
2019-05-30 06:13:26 +00:00
Ziye Yang
a731731792 blobfs: Add trace for file metadata operation.
The purpose of is patch is to track whether there is
req allocation failure for those file metadata related
operation in order to find the bug.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I171a5b7fca214675fb1356ca650a01eeb20b4c8c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454829
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: Changpeng Liu <changpeng.liu@intel.com>
2019-05-30 06:09:58 +00:00
Shuhei Matsumoto
9e68223c81 dif: Merge _dif_sgl_advance and _dif_sgl_fast_forward
_dif_sgl_fast_forward covers _dif_sgl_advance. Hence this patch
merges two into _dif_sgl_fast_forward and renames it to
_dif_sgl_advance.

Change-Id: I4949f3028b08cec8df8c9037c983d840d0a1eaaa
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456184
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-30 04:16:34 +00:00
Shuhei Matsumoto
efa4259f82 dif: Fix a few wrong comments
Change-Id: I905c6b78b3e79aed7408274f93fd856df2068840
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455903
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-30 04:16:34 +00:00
Tomasz Kulasek
843ca21287 scripts/fio.py: fix sysfs delay
After iSCSI login sysfs is not updated immediately, but when session is
initialized. It can take a while and causes that sometimes scripts
cannot write to sysfs.

Change-Id: Ie4fa512704f022041bb3d9ab02dbb4210ddd04a0
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454890
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-05-30 04:08:37 +00:00
Ben Walker
74da904316 test/vhost: Eliminate SPDK_ISCSI_VHOST_TEST_DIR
Use rootdir instead

Change-Id: I3b9902dba511608f59b075b1186cb73cec87e5ee
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454798
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-05-30 04:07:46 +00:00
Ben Walker
e422bf69bb test/vhost: Replace SPDK_BUILD_DIR with rootdir
rootdir is the pattern used in the other tests

Change-Id: Idaedf8a3d9aeed54a9113a38986f29fa04355d9a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454797
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-05-30 04:07:46 +00:00
Ben Walker
8be1517d74 test/vhost: Eliminate BASE_DIR from common.sh
Trying to use rootdir and testdir throughout

Change-Id: I0a5026e5aa8c65b7d9eddef47c4822c3efce8d1a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454795
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-30 04:07:46 +00:00
Ben Walker
ad15da1317 test/vhost: Clean up data outside of repository after tests
The vhost tests create some temporary files as they run outside
of the SPDK repostiroy. Clean these up.

Change-Id: Ic964fc6672b8a4ea088ace1b11c712eb70f7be08
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454933
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>
2019-05-30 04:07:46 +00:00
Ben Walker
6de97c1a91 test/vhost: Add calls to vhosttestinit and vhosttestfini
Change-Id: I0b564a6931b91f5226ad6a6909c5285f5cb76a71
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454944
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-05-30 04:07:46 +00:00
yidong0635
0a48fd0601 vm_setup:install right packages on ubuntu for SoftRoCE
Ubuntu18 integrates librxe to rdma-core, libibverbs-dev no longer ships infiniband/driver.h.
Don't compile librxe on ubuntu18, install package rdma-core instead. ubuntu16 keeps the old
method. Otherwise, there's no NIC can be found for SoftRoCE failed.

Change-Id: Ib639b96a4229c79f2b27fda7b981d7a805f808cb
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455336
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>
2019-05-29 21:31:36 +00:00
Darek Stojaczyk
fd50b50738 doc/blob: correct some typos
Change-Id: I0f64ff359c9ddb3e84c5b11c49c85da9be26acdf
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455756
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-05-29 21:29:57 +00:00
Tomasz Zawadzki
04f7575bc4 test/bdevio: test functions now execute test calls directly
Before simplifying test suite execution it was needed
to loop around function actually running the tests.

So the test functions now can directly contain whatever
that was doing, without intermidiate function between.

Change-Id: Ic4b648d8d26d6be7a3bf1efb1b1ee3f2615ee5fa
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455672
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-29 21:29:28 +00:00
Changpeng Liu
2b09903c2c scsi: add persistent reservation in with read reservations support
Change-Id: I5345207a6331889182324ae3231bb62c84b69d69
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/436094
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: Paul Luse <paul.e.luse@intel.com>
2019-05-29 20:57:37 +00:00
Changpeng Liu
4e9e220e7c scsi: add persistent reservation in command with read keys action support
Change-Id: Ia8e4ad31e84a1a97c83d4f49680bb7090ee4e041
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/436093
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>
2019-05-29 20:57:37 +00:00
Wojciech Malikowski
a6edaa9600 scripts/setup: Added binding VMD devices
To bind VMD device it need to be specified
in PCI_WHITELIST.

Change-Id: If19c47941278e4df9c6157024bba8b76c90695c6
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Signed-off-by: Orden Smith <orden.e.smith@intel.com>
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455635
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-29 20:35:11 +00:00
Wojciech Malikowski
ae18ad68ea lib/env_dpdk: Added VMD PCI driver object
This patch add support for VMD driver object.
New PCI device ID for VMD device was added.

Change-Id: I47bd8772a15ad370a14b7cc9460a177c91e6dd6a
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Signed-off-by: Orden Smith <orden.e.smith@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455545
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-29 20:35:11 +00:00
Jim Harris
7dcd9c8d37 nvme/perf: adjust column width based on name length
Now that we print the addr/nqn for fabrics controllers,
adjust the column width in the output so that it prints
the full information for fabrics, but keeping a smaller
width when it is only PCIE controllers.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456079
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-05-29 20:27:10 +00:00
Jim Harris
71400dd3ee nvme/perf: show transport id instead of serial number
The serial number doesn't provide much value - but the
transport id can sometimes be helpful though to correlate
performance of different devices to their PCI BDF.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456078
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-05-29 20:27:10 +00:00
Jim Harris
96f0e3f889 nvme/perf: create helper function to build names
These are the names displayed in the output.  Some
upcoming patches will modify these names, so making
this a common function now will reduce the work
later.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456077
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-05-29 20:27:10 +00:00
Jim Harris
f0dd2b789e nvme: add spdk_nvme_ctrlr_get_transport_id()
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie32a1bb144c239b923b5cbb9e608a7dfc9c05208

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456076
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-05-29 20:27:10 +00:00
Darek Stojaczyk
9d405e65b6 test/iscsi: reenable QoS test
The QoS test no longer sets arbitrary QoS limits and
can no longer run into cases where disk is not able to
even reach that limit. We can reenable it for per-patch
testing now.

Change-Id: If05b1306c38889840c071a165b00c44295610950
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454670
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-05-29 20:21:19 +00:00
Darek Stojaczyk
a1e4e7279e test/qos: get rid of check_qos_works_well()
check_qos_works_well() has been split into two separate
functions: run_fio() and verify_qos_limits().

Change-Id: I8c112ab93aed9f16d80c9a0a3f61280c44bf6539
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451888
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-05-29 20:21:19 +00:00
Darek Stojaczyk
22364ca8f7 test/qos: set qos limits to a % of the maximum disk performance
We used to set an arbitrary qos limit which in some
cases happened to be higher than the actual disk
capabilities. Even though we had an explicit check
for that and we skipped the entire qos test suite
if the device was too slow, the disk performance could
vary and be just enough to pass that initial check,
but then slow down and fail in the middle of the test
suite. If the bdev maxes out at 21MB/s on one run, it
may just as well do 19MB/s on another. That is exactly
the case causing intermittent failures on our CI.

We fix it by removing the arbitrary qos limit and
setting it to a % of the maximum disk performance
instead. This lets us e.g. remove the code for skipping
the entire test suite when the disk is too slow. We
definitely don't want to skip any tests.

Change-Id: I6de8a183c00bab64484b4ddb12df1dedfbed23f8
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451887
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-05-29 20:21:19 +00:00
Andrey Kuzmin
992ffd8071 bdev: drop extra assert on nomem io completion.
Addresses the issue https://github.com/spdk/spdk/issues/805.

Change-Id: I7b1cf9d8de0689a987b7a90c925b04076856f34f
Signed-off-by: Andrey Kuzmin <akuzmin@jetstreamsoft.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455985
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-05-29 02:41:27 +00:00
JinYu
11047d5b23 nvme: add vfio driver parse event
In Fedora release 28, plug in nvme device and run setup.sh,
the uevent is like this:
UDEV  [1060.112118] add      /devices/virtual/vfio/81 (vfio)
ACTION=add
DEVNAME=/dev/vfio/81
DEVPATH=/devices/virtual/vfio/81
MAJOR=509
MINOR=1
SEQNUM=8544
SUBSYSTEM=vfio
USEC_INITIALIZED=1060111894

UDEV  [1060.122089] bind     /devices/pci0000:d7/0000:d7:00.0/0000:d8:00.0 (pci)
ACTION=bind
DEVPATH=/devices/pci0000:d7/0000:d7:00.0/0000:d8:00.0
DRIVER=vfio-pci
ID_MODEL_FROM_DATABASE=PCIe Data Center SSD (DC P3700 SSD [2.5" SFF])
ID_PCI_CLASS_FROM_DATABASE=Mass storage controller
ID_PCI_INTERFACE_FROM_DATABASE=NVM Express
ID_PCI_SUBCLASS_FROM_DATABASE=Non-Volatile memory controller
ID_VENDOR_FROM_DATABASE=Intel Corporation
MODALIAS=pci:v00008086d00000953sv00008086sd00003703bc01sc08i02
PCI_CLASS=10802
PCI_ID=8086:0953
PCI_SLOT_NAME=0000:d8:00.0
PCI_SUBSYS_ID=8086:3703
SEQNUM=8545
SUBSYSTEM=pci
USEC_INITIALIZED=1060121805

Have tested several kernel versions such as v3.10, v4.10, v4.15, v4.19.
 We didn't see an event which is like this:
ACTION=add
DRIVER=vfio-pci

Change-Id: I7299a2fb4d634edaa6bab3412ee8f363f66aae6f
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452053
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-05-29 02:36:41 +00:00
lorneli
493fb55e4c bdev: add _spdk_bdev_io_do_submit function
Move actual submission code to _spdk_bdev_io_do_submit, used by
both normal submission path and QoS path.

Previous patch(review.gerrithub.io/c/442127) adds the missing
bdev_io->internal.in_submit_request flag to QoS submission path.
But QoS submission path doesn't handle nomem_io yet.

This patch makes QoS submission path handle nomem_io in the same way
as the normal path and extracts actual submission code into do_submit
function, so that further modification of the submission logic will
apply to both paths automatically.

Change-Id: I41fa88d239c3a2bd9783d812826e32e7c887818d
Signed-off-by: lorneli <lorneli@163.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455252
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-05-28 18:08:26 +00:00
Jim Harris
6ee44c694e rpc: rename RPC get_rpc_methods to rpc_get_methods
Make the old name a deprecated alias.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453033
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-05-27 12:52:53 +00:00
Ben Walker
683099e3b0 test/vhost: Add vhosttestinit and vhosttestfini functions
These are used when running test scripts in iso mode at
your desk.

Change-Id: I1876771d8a94c9db57636c143f7bf9d6f98bd3aa
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453441
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-27 12:52:28 +00:00
Tomasz Zawadzki
6a8d00949b test/bdevio: setup separate suites for each target
With this patch each target has separate suite,
tests are ran just once for all setup suites.

Suite init/fini functions were added that move
current g_current_io_target ahead for next suite.

Results what works for particular bdev are of more use
rather than combination for all bdevs.
This will come useful when we want to perform RPC for only
select targets.

In case of CUnit library error, application is stopped without
returning number of failures. This is because at that point
its numbers are not reliable.

Change-Id: Ie82b6e33374841bf829da09a16a401fddd1fd81c
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455199
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-27 07:48:16 +00:00
Jim Harris
cdd089a8c5 blobfs: don't flush a partial buffer with no sync pending
We flush a cache buffer once it's filled.  When the write
for that cache buffer has completed, we look to see if
there's more data to flush.  Currently if there's *any*
more data to flush, we will flush it, even if it's not
a full buffer.

That can hurt performance though.  Ideally we only want
to flush a partial buffer if there's been an explicit
sync operation that requires that partial buffer to be
flushed.  Otherwise we will end up writing the partial
buffer to disk, and then come back and write that data
again later when the buffer is full.

Add a new unit test to test for this condition.  This
patch breaks one of the existing unit tests which was
designed specifically around a RocksDB failure condition.
Change that file_length unit test to now write exactly
one CACHE_BUFFER, which still tests the general logic
making sure that we don't confuse the amount of data
flushed with the value written to the file's length
xattr.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455698
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-05-27 06:45:41 +00:00
Jim Harris
e967dcd245 blobfs: ensure length xattr is written even if all data is flushed
Data can get implicitly flushed as cache buffers are filled.  But
the length xattr is only written in response to a sync or close
operation.  So we cannot just look at the amount of data flushed,
and ignore the sync operation if all of the data written has been
flushed - we still need to write the length xattr.

This also adds a unit test which reproduces the original problem.

Fixes issue #297.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455692
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-05-27 06:45:41 +00:00
Vitaliy Mysak
fec9d4146b ocf: accept optional base in bottom adapter
Interpret volume->open() options as our vbdev_ocf_base struct.
This is used during metadata probe procedure, when there is no
  vbdev configurations created, so we need to pass base structure
  as option.

This patch is a prepartion for persistant metadata support,
  and it does not change current behavior.

Change-Id: I0b7435df1692d8b3028931c6c9fc50d2d84b2557
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455415
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-05-24 23:55:04 +00:00
Pawel Kaminski
4f31e10705 test/vhost: windows scsi compliance test.
We don't provide windows executable for this test.

Change-Id: Iedaafba06662f776c102528f8073b6c3d56bb323
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450406
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-05-24 23:47:36 +00:00
Darek Stojaczyk
7a1c568598 Revert "SCSI: Stop I/O flooding to hot-removing LUN from iSCSI target"
Hotremoving a bdev exposed as a vhost-scsi LUN which
has an allocated io_channel is broken now. By detaching
LUNs from their SCSI devices at the start of LUN
hotremoval, we can end up with the LUN's descriptor
completely leaked.

Upon hotremove, each LUN fires a hotremove_cb to the
upper layer (iscsi/vhost) and starts a poller to
periodically check if lun->io_channel has been closed
already. While iSCSI allocates and frees io_channels
for particular LUNs separately using
spdk_scsi_lun_allocate_io_channel(), vhost allocates
and frees io_channels for the entire SCSI device using
spdk_scsi_dev_free_io_channels(), as it knows there's
only one LUN per SCSI device.

Since LUNs are removed from SCSI devices at the start
of LUN hotremoval, the spdk_scsi_dev_free_io_channels()
is not able to close the io_channel of the child LUN.
That LUN is no longer referenced there, and the function
returns immediately without any error.

By reverting this patch, we practically defer removing
LUN from SCSI device until the bdev descriptor is closed,
that is, until that spdk_scsi_dev_free_io_channels()
and the subsequent spdk_scsi_dev_destruct() in vhost
is called.

Historically, spdk_scsi_lun_free_io_channel() was
introduced after vhost-scsi already supported hotremove,
so before we can introduce a change like this one we
have to refactor vhost to use the new APIs first.

This reverts commit 497997bc60.

Change-Id: I58a9988a22694f5b5b927173098ac8218270462e
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455371
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-05-24 23:46:53 +00:00
Seth Howell
f40d245180 autotest_common.sh: move exporting flag values to the top of the file.
Recently, we moved the check for running an installed version of DPDK
above the point where we export the SPDK_* test flags. This resulted in
SPDK_RUN_INSTALLED_DPDK being undefined when trying to check fi we
should run against an installed DPDK. This just caused autotest_common
to print an error message every time it was loaded. I don't think that
it actually caused any errant behavior but this gets rid of the error
message. It's also probably a good idea to keep these definitions as
close to the top of the file as possible.

Change-Id: I5aadbe5c925ecf1ac92926b75c8c043aab73b36b
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455456
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-05-24 23:43:37 +00:00
Kozlowski Mateusz
c2868aeb57 lib/ftl: improved padding during shutdown
Padding requests are issued in multiple batches at the same time
when shutdown occurs. This allows for faster removal.

Change-Id: Iea40d2418bedbd7cf3c6865e5eb8f85871db13cd
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454578
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-24 23:29:22 +00:00
Claire J. In
658d118c06 lib/ftl: consider 3D TLC NAND read unit size
For the latest TLC NAND, one write buffer unit (rwb batch)
needs to be spread over three PUs instead of being allocated
to a single PU for better sequential read performance
since the optimal write size(ws_opt) of 3D TLC NAND is
3 times bigger than the optimal read size(rs_opt).

I added num_interleave_units in 'struct spdk_ftl_conf'
to configure the number of interleaving units per ws_opt.
If num_interleave_units is set as 1, the whole of the ws_opt
blocks are placed sequentially around each PU.
If num_interleave_units is set as N, the 1/N of the ws_opt
blocks are staggered. So consecutively numbered blocks
are separated by ws_opt / num_interleave_units.

The sequential read performance is improved from 1.9GiB/s
up to 2.97GiB/S with this patch on our system. No performance
degradation is observed on sequential writes or
4KB random reads/writes.

Please refer to the Trello card for more details.
https://trello.com/c/Osol93ZU

Change-Id: I371e72067b278ef43c3ac87a3d9ce9010d3fcb15
Signed-off-by: Claire J. In <claire.in@circuitblvd.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450976
Reviewed-by: Young Tack Jin <youngtack.jin@circuitblvd.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-24 23:29:22 +00:00