Commit Graph

7295 Commits

Author SHA1 Message Date
Darek Stojaczyk
b0cacd460d vm_setup.sh: add iptables dependency
We started to use iptables in patch 21bd94275
(libsock: add functional tests) but never added
the package dependency.

Change-Id: I651f2545a11f546f8b47f9759fbaed3a141f0928
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443597 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447590
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-12 05:08:06 +00:00
Wojciech Malikowski
ecad1d2cbc lib/ftl: fix IO metadata pointer initialization
Change-Id: I2bad16b6649c279448a3c662ab7b035dbe0a4bfb
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443251 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447589
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-12 05:07:47 +00:00
Vitaliy Mysak
17660fa741 bdev/ocf: synchronize env_allocator creation
Make modyfication of global allocator index tread safe
  by using atomic operation

This patch also changes mempool size to be 2^n - 1
  which makes it more efficient

Change-Id: I5b7426f2feef31471d3a4e6c6d2c7f7474200d68
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442695 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447588
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-12 05:07:34 +00:00
Wojciech Malikowski
e13c1ffbc3 lib/ftl: Fix band's metadata inconsistency with L2P
Added check before write submission to indicate if
LBA was update in meantime. In such case don't set band's
metadata and rwb entry cache bit. Previous implementation
invalidates such address during write completion and could
cause that inconsistent lba map was stored into disk.

Change-Id: I4353d9f96c53132ca384aeca43caef8d11f07fa4
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/444403 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447582
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-12 05:07:21 +00:00
Vitaliy Mysak
0395d29bf4 scripts: vm_setup.sh fix OCF github repo path
Fix wrong url for git repo for OCF

This patch is connected to issue #670

Change-Id: I030889089a4b0433517dd909246a3bc16b67c71b
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/445249 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447581
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-12 05:07:08 +00:00
Seth Howell
792b36e898 test/rdma_ut: fix valgrind issue.
Recently, we started setting the list of RDMA wr in the parse_sgl
function. This meant that we started using a variable we hadn't before
which was uninitialized in the unit tests which caused a valgrind error.

Change-Id: I3f76ce1dcf95d1d41fe8b3f96e878859036a5031
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443791 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447450
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-03-08 22:00:07 +00:00
Liang Yan
6a2de254d6 test/spdkcli: update match file to cover larger volume NVMe SSD
The match file is hardcoded to $(FP)G. If using xxTB volume NVMe
SSD, this test case will fail. So using $(S) to cover larger
volume NVMe SSD.

Change-Id: Id046cadfbc5236cd8f480981fa337d2ee9a68bf4
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447130 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447472
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-03-08 20:56:45 +00:00
zkhatami88
a9533f4083 nvme: remaning changes related to nvme hooks
Change-Id: I07f3f403bef26a7c3e41b3c9f74e7ba4e378b2cc
Signed-off-by: zkhatami88 <z.khatami88@gmail.com>
Reviewed-on: https://review.gerrithub.io/c/443650 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447452
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>
2019-03-08 19:27:19 +00:00
Wojciech Malikowski
f882a577d4 lib/ftl: Fix band picking for write pointer
Removing band from "free list" is moved from FTL_BAND_STATE_OPENING
to FTL_BAND_STATE_PREP state's change actions.
This will fix race condition when one band is prepared (erased)
and write pointer is trying to get next active band.

Change-Id: I9e4fe9482a01ee732271736e4a0e6fcedf2582d8
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/445118 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447461
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>
2019-03-08 19:07:18 +00:00
Jim Harris
e22df3fbcf vhost: use mmap_size to check for 2MB hugepage multiple
Older versions of QEMU (<= 2.11) expose the VGA BIOS
hole (0xA0000-0xBFFFF) by specifying two separate memory
regions - one before and one after the hole.  This results
in the "size" not being a 2MB multiple.  But the underlying
memory is still mmaped at a 2MB multiple - so that's what
we should be checking to ensure the memory is hugepage backed.

Fixes #673.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I1644bb6d8a8fb1fd51a548ae7a17da061c18c669
Reviewed-on: https://review.gerrithub.io/c/445764 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447457
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-03-08 19:05:07 +00:00
Ziye Yang
d07cc7d35d event/subsystem: solve the subsystem init and destroy conflict
We have conflict to handle the NVMf subsystem shut
down. The situation is that:

If there is shutdown request (e.g., ctrlr+c),
we may have subsystem finalization and subsystem
initialization conflict (e.g., have NVMf subsystem fini and
intialization together), we will have coredump
issue like #682.

If we interrupt the initialization of the subsystem,
following works should do:

1  Do not initilize the next subsystem.
2  Recycle the resources in each subsystem via the
spdk_subsystem_fini related function. And this patch will
do the general thing, but will not consider the detailed
interrupt policy in each subsystem.

Change-Id: I2438b4a2462acb05d8c8e06dfff3da3d388d4b70
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/446189 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447459
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>
2019-03-08 19:04:41 +00:00
Zhu Lingshan
6481d80514 scripts/pkgdep: update SUSE distros recognition
OpenSUSE releases (OpenSUSE Leap and Tumbleweed) now use
/etc/SUSE-brand than /etc/SuSE-release as SUSE identification.
According to this change, This commit intends to update
scripts/pkgdep so that it could install packages for OpenSUSE.

Tested on OpenSUSE Leap 15.0 and latest Tumblweed.

Change-Id: I878b6671753084ef718e1f7630a42520a72ea151
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446504 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447458
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>
2019-03-08 19:04:06 +00:00
Tomasz Kulasek
8befeab1b4 test/unit/app_ut: fix potential leak of memory
This patch fixes potential memory leak in spdk_app_parse_args() when
white or blacklist of devices is defined.

Change-Id: Ia586d77c67dbe6c664447f8431e1a7a30d624ae1
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/440982 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447456
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>
2019-03-08 19:03:31 +00:00
GangCao
d45c6e54ae QoS: enable rate limit when opening the bdev
There are some cases that virtual bdev open and close
the device and QoS will be disabled at the last close.
In this case, when a new bdev open operation comes again,
the QoS needs to be enabled again.

Change-Id: I792e610f4592bad1cac55c6c55261d4946c6b3e2
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442953 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447455
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>
2019-03-08 19:03:02 +00:00
Zahra Khatami
bf881b09a7 nvmf: remaning changes related to nvmf hooks
Change-Id: I6780fa43cebd9f48d1ae0ea6fbeb92a95c4dfa15
Signed-off-by: zkhatami88 <z.khatami88@gmail.com>
Reviewed-on: https://review.gerrithub.io/c/443653 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447454
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>
2019-03-08 19:01:57 +00:00
Liang Yan
1e0e636351 test:increase the json_config.sh shutdown app timeout value
In some situation, the script needs to try more times to kill
spdk_tgt. So increase the loop count.

Change-Id: I5c3596b0bae8ee965bb0b3532ba100dfd0aec82d
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/c/445436 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447453
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>
2019-03-08 19:01:36 +00:00
Seth Howell
0640d3fca5 RDMA: Remove the state_queues
Since we no longer rely on the state queues for draining qpairs, we can
get rid of most of them. We cn keep just a few, and since we don't ever
remove arbitrary elements, we can use stailqs to perform those
operations. Operations on Stailqs carry about half the overhead as
operations on tailqs

Change-Id: I8f184e6269db853619a3581d387d97a795034798
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/445332 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447466
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>
2019-03-08 19:00:44 +00:00
Seth Howell
46dd96c2f0 rdma: update default number of shared buffers.
When the decision was made to uncouple the number of shared buffers from
the queue depth and allow the user to decide for themselves, the default
was also significantly lowered, which caused some issues when trying
torun performance tests (See https://github.com/spdk/spdk/issues/699).
While this is a user modifiable variable, it is still best to keep the
higher default value.

The original value was equivalent to max_queue_depth *
SPDK_NVMF_MAX_SGL_ENTRIES * 2 with the defaults for max_queue depth and
max_sgl_entries being 128 and 16 respectively. Hence 4096

fixes: 0b20f2e552

Change-Id: I809e97a10973093a2b485b85bca7160091166f70
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/446525 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447465
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>
2019-03-08 19:00:44 +00:00
Seth Howell
8529ceadfa rdma: adjust I/O unit based on device SGL support
For devices that support fewer SGE elements than our default values, we
need to adjust the I/O unit size so that we don't ever try to submit
more SGLs than we are allowed to.

Change-Id: I316d88459380f28009cc8a3d9357e9c67b08e871
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442776 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447464
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>
2019-03-08 19:00:44 +00:00
Seth Howell
6dcace0744 rdma: Fix misordered assert and decrement.
In the error path, we were first decrementing a variable and then
asserting that it must be >0. These operations should occur in the
opposite order.

Change-Id: I6cec544faf17bb75cbfca3d3a3c173dc5db14f99
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/446440 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447463
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>
2019-03-08 19:00:44 +00:00
Seth Howell
37ad7fd3b8 rdma: properly account num_outstanding_data_wr
This value was not being decremented when we got SEND completions for
write operations because we were using the recv send to indicate when we
had completed all writes associated with the request. I also erroneously
made the assumption that spdk_nvmf_rdma_request_parse_sgl would properly
reset this value to zero for all requests. However, for requests that
return SPDK_NVME_DATA_NONE rom spdk_nvmf_rdma_request_get_xfer, this
funxtion is skipped and the value is never reset. This can cause a
coherency issue on admin queues when we request multiple log files. When
the keep_alive request is resent, it can pick up an old rdma_req which
reports the wrong number of outstanding_wrs and it will permanently
increment the qpairs curr_send_depth.

This change decrements num_outstanding_data_wrs on writes, and also
resets that value when the request is freed to ensure that this problem
doesn't occur again.

Change-Id: I5866af97c946a0a58c30507499b43359fb6d0f64
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443811 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447462
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>
2019-03-08 19:00:44 +00:00
Sasha Kotchubievsky
a8dd54792c perf: Fix integer overflow
perf application can't generate IO for NVMe namespace with
 more than 4G size.

 Example of error:
 "Attached to NVMe over Fabrics controller at 1.1.75.1:1023:
 nqn.2016-06.io.spdk.r-dcs75:rd0
 WARNING: controller SPDK bdev Controller (SPDK000DEADBEAF00   ) ns 1 has
 invalid ns size 0 / block size 4096 for I/O size 4096
 WARNING: Some requested NVMe devices were skipped
 No valid NVMe controllers or AIO devices found"

 ns_size variable is uint32_t, spdk_nvme_ns_get_size function
 returns uint64_t. Result can exceed the maximum size of
 uint32_t and ns_size remains 0.

 The issue introduced by commit: f2462909

Change-Id: Idc6dd8688d5d6268bda1a1d6b06a611643af6155
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Reviewed-on: https://review.gerrithub.io/c/443996 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447451
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>
2019-03-08 18:56:27 +00:00
Pawel Wodkowski
14d4c7f06d test/ftl: use OCSSD instead first NVMe like
Change-Id: I175bebb68ea1752fda6fe80932cd27c30cf3dcff
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443737 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447183
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-03-08 09:49:13 +00:00
Pawel Wodkowski
5c50e8e1b5 autotest: blacklist OCSSD devices
Detect and blacklist OCSSD devices by unbinding the driver.

Change-Id: I7ba6cefd083a7d3ead6db27fa27a765f8ee52402
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442978 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447150
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-03-08 08:55:02 +00:00
Pawel Wodkowski
18b8ef97ac test/ftl: limit total IO size to 256M
On VM these tests takes ages.

Change-Id: Id4799e2d226e59b430e899983a6470080b5c37dc
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443795 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447149
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: Jim Harris <james.r.harris@intel.com>
2019-03-08 08:55:02 +00:00
Pawel Wodkowski
1bf4f98311 scripts/common.sh: use PCI blacklist and whitelist
iter_pci_dev_id abd iter_pci_dev_id functions should
not return BDF for devices that are not ment to be used
in tests.

Note that not all tests are ready for this change as they
discover functions on its own. Lets this changed in
separate patch.

Change-Id: I45a59ec121aa81e9f981acae7ec0379ff68e520a
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443767 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447148
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: Jim Harris <james.r.harris@intel.com>
2019-03-08 08:55:02 +00:00
Pawel Wodkowski
29ae45877a setup.sh: move pci_can_bind function to common.sh
Change-Id: I1c3ba13c39ef0d06d70e6e262bdc08c76a7614e0
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443766 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447147
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: Jim Harris <james.r.harris@intel.com>
2019-03-08 08:55:02 +00:00
Pawel Wodkowski
0168d9bc9d setup.sh: try harder to find out if driver is loaded
Change-Id: I098285ff42271a7577a260cd864c015b235833b5
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443765 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447146
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: Jim Harris <james.r.harris@intel.com>
2019-03-08 08:55:02 +00:00
Pawel Wodkowski
7eda85292a setup.sh: add PCI_BLACKLIST
Add PCI blacklist so we can skip only some devices.

Change-Id: I8600307dd53f32acb4dfeb3f57845e0b9d29fdb9
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442977 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447145
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: Jim Harris <james.r.harris@intel.com>
2019-03-08 08:55:02 +00:00
Pawel Wodkowski
b1be663bfb setup.sh: enhance output from setup, reset and status
Unify output of setup driver binding. Each line will print PCI BDF,
vendor and device id.

  $export PCI_BLACKLIST="0000:00:04.0 0000:00:04.1"
  $./scripts/setup.sh
  0000:0b:00.0 (8086 0953): nvme -> vfio-pci
  0000:00:04.1 (8086 0e20): Skipping un-whitelisted I/OAT device
  ...
  0000:00:04.1 (8086 0e21): Skipping un-whitelisted I/OAT device
  ...

Print log when desired driver is already bound:

  $./scripts/setup.sh
  0000:0b:00.0 (8086 0953): Already using the vfio-pci driver
  ...

'status' command prints vendor and device:

  ./scripts/setup.sh status
  ...
  NVMe devices
  BDF		Vendor	Device	NUMA	Driver		Device name
  0000:0b:00.0	8086	0953	0	vfio-pci		-

  I/OAT DMA
  BDF		Vendor	Device	NUMA	Driver
  0000:00:04.0	8086	0e20	0	ioatdma
  0000:80:04.0	8086	0e20	1	vfio-pci
  0000:00:04.1	8086	0e21	0	ioatdma
  0000:80:04.1	8086	0e21	1	vfio-pci
  0000:00:04.2	8086	0e22	0	vfio-pci
  0000:80:04.2	8086	0e22	1	vfio-pci
  ...

As we are here replace legacy Bash subshell invocation ` ` with $( ) in
some places.

Change-Id: I76b533c7580dadeb3d592c084778b8f9869c6d17
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443218 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447144
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: Jim Harris <james.r.harris@intel.com>
2019-03-08 08:55:02 +00:00
Pawel Wodkowski
d3dbb9c7cf setup.sh: remove usless '= "0"' part from if statements
Bash interprets everything after command as additional
function arguments. To not confuse user just remove this part
and replace by '!'.

Change-Id: I44228003a1f96324271e726df4f5033f3258523c
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442976 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447143
Tested-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-03-08 08:55:02 +00:00
Darek Stojaczyk
898bad7d0c autotest: introduce SPDK_RUN_FUNCTIONAL_TEST
Introduced a new variable to run functional tests.
It's enabled by default, and can be manually disabled
on systems where e.g. only unit tests are run.

SPDK_RUN_FUNCTIONAL_TEST is a supplement to SPDK_UNITTEST.
The two are completely independent - both can be enabled,
disabled, or run in any combination.

The new variable is prefixed SPDK_RUN_ as it aligns nicely
with SPDK_RUN_CHECK_FORMAT, SPDK_RUN_VALGRIND, and
SPDK_RUN_ASAN, all of which control how much is tested.
SPDK_UNITTEST should eventually follow the same pattern
as well.

This gives us 2 layers of configuration:
SPDK_TEST_* <- what is tested
SPDK_RUN_* <- how it is tested

The following would run UT+ASAN for FTL and BlobFS, without
running their functional tests:

```
SPDK_RUN_FUNCTIONAL_TEST=0
SPDK_RUN_ASAN=1
SPDK_TEST_UNITTEST=1
SPDK_TEST_FTL=1
SPDK_TEST_BLOBFS=1
```

Change-Id: I9e592fa41aa2df8e246eca2bb9161b6da6832130
Signed-off-by: Seth Howell <seth.howell@intel.com>
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442327 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447261
Tested-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-03-08 08:55:02 +00:00
Darek Stojaczyk
2f87aada01 version: 19.01.1-pre
Change-Id: I0741ecdf02461dbaf1b04d78ec0c67843c8c0f39
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443512
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-02-25 12:11:50 +00:00
Tomasz Zawadzki
e3e35a85ea SPDK 19.01
Change-Id: I819755deb35b3deca836e3cb22882de7bfc8b6a0
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442571
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@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-02-01 08:45:56 +00:00
Jim Harris
eca42c6609 CHANGELOG: add note on vhost vulnerability
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id47256ecfc5d774e7d8054423cda32a90f0c4f76

Reviewed-on: https://review.gerrithub.io/c/442929
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-02-01 08:42:28 +00:00
GangCao
ce75af2140 QoS: remove the limit on unmap kinds of I/O
Unmap, discard, write zeros will be sent down from
higher stack. Remove these IOs for the QoS limit.

Change-Id: Ieb3cc19f31c43f8ddf8f8d2fd338f442ef48b679
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442673
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Liang Yan <liang.z.yan@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-01-30 21:44:05 +00:00
Tomasz Zawadzki
4a6f45520c changelog: added missing items for 19.01
Change-Id: I1168ac5317ef1142f14e19156c4a8df0dbf9fb00
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442570
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-01-30 21:42:13 +00:00
Ben Walker
e1dd85a5b7 nvmf: Don't increment current_recv_depth for dummy RECV
When a connection goes to close and has no I/O outstanding,
the current_recv_depth was being decremented beyond 0 and rolling over.

If the poll group then finds a successful receive completion on the next
poll (for a command that arrived prior to starting the disconnect but
hadn't been processed yet), it would trip the max queue depth check
added recently and start another disconnect process. If only one command
arrives in this window, everything actually works out ok.

However, if there are two receive completions sitting in the completion
queue after the disconnect process is started, the first one does the
double disconnect and the second one does another disconnect which ends
up dereferencing a null pointer.

Since there is always a special reserved slot for the dummy recv, don't
do decrements or increments of the current_recv_depth for the dummy
recv. This allows the code to still enforce the actual max_queue_depth
on recvs without underflowing or overflowing the counter.

Change-Id: I56c95b2424e956a3b007b25c50cbf47262245b8f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442642
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-01-30 19:03:46 +00:00
zkhatami88
8e2f0cdb01 nvmf: Add mechanism to override nvmf pd/mr behavior
Change-Id: I8d3abfcd1934bbab5bf8dacae08e8a7f29992b93
Signed-off-by: zkhatami88 <z.khatami88@gmail.com>
Reviewed-on: https://review.gerrithub.io/c/433977
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Sasha Kotchubievsky <sashakot@mellanox.com>
2019-01-30 19:03:35 +00:00
Darek Stojaczyk
0c21aa1a0e jsonrpc.md: remove set_bdev_qos_limit_iops
The RPC was replaced by set_bdev_qos_limit, but jsonrpc.md
contained declarations of both.

Change-Id: Icd636199b8af93b545d636377926983e62d38d11
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442730
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: Ben Walker <benjamin.walker@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2019-01-30 17:58:10 +00:00
Darek Stojaczyk
63c64676bf CHANGELOG: add trace_record
Change-Id: I805259dca4e5242307a43ce5a9a8bde79d8769ba
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442729
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: Ben Walker <benjamin.walker@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2019-01-30 17:58:10 +00:00
Darek Stojaczyk
d555d6c2d0 configure: remove deprecated RAID options
Change-Id: Ibbb53fefad5fa117c9b630301fb50bc04c87c3ea
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442728
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-01-30 17:58:10 +00:00
Darek Stojaczyk
b52c6ea9d0 CHANGELOG: add deprecation-related notices
Change-Id: Ic5bc07145bc4c9723a41c2cc02d4f33d2efab42b
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442727
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-01-30 17:58:10 +00:00
Darek Stojaczyk
1d30b77ef7 CHANGELOG: all hugepages are now reserved dynamically
Change-Id: I8d6c3b4c7b1ff1e82782db05d5c14cddc06d1a6a
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442726
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-01-30 17:58:10 +00:00
Darek Stojaczyk
2c8c80f336 CHANGELOG: drop DPDK 16.07 support
Change-Id: I39910e37fc8a23ca57dcd393f2c3c21e89cb31b4
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442725
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-01-30 17:58:10 +00:00
Pawel Kaminski
ad0b3c974f spdkcli: Fix: find nvme ctrlr first when delete nvme
Fixes #581

Change-Id: I330c2ae3a38418679e88d1df280e6b8589ae4863
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/441138
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-01-30 10:38:47 +00:00
Pawel Kaminski
223810e95b spdkcli: Fix: catch exceptions for spdkcli commands.
Fixes: #582

Change-Id: Ief6f4a52f410ff3dc06c9c1551c2c6d464cac598
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442323
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-01-30 10:32:53 +00:00
Karol Latecki
6a427c7481 config_converter: fix incorrect indentation
Change-Id: I3c2e32e7385a23a5c0932bb42a38d2d1df8de3c9
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442694
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-01-30 08:44:20 +00:00
Darek Stojaczyk
a2e522a3c5 CHANGELOG: add DPDK 18.11
Change-Id: I3f7b2025f6ddb11dac5e23cc9c2b4df5c4cea860
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442631
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>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-01-30 08:37:00 +00:00
Darek Stojaczyk
a0999fd283 CHANGELOG: add multiple connections per vhost device
Change-Id: I13065d0e12bf96f9192cf9e8aa896c7f6dd51e2a
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442630
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>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-01-30 08:37:00 +00:00