Commit Graph

5054 Commits

Author SHA1 Message Date
Daniel Verkamp
7cb8df7a4e version: SPDK v18.04.2-pre
Change-Id: I581c5f4f01560ba9fa28945699cf4137c7d84140
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/416428
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-22 17:28:34 +00:00
Daniel Verkamp
727a80b328 SPDK 18.04.1
Change-Id: I5526837b75bb21f9c5d7fdd4363763f6ebfa0a2b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/414070
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-06 22:17:48 +00:00
Andrey Kuzmin
94f3053de3 Fix fio_plugin build for FIO_IOOPS_VERSION >= 24.
Fio commit d3b07186b1d4c7c1d9adc1306407458ce41ad048 changed return
type of the ioengine->queue method to a new enumeration type
fio_q_status. Add preprocessor checks to ensure SPDK fio_plugin builds
successfully with both current and earlier fio ioengine API version.

This is a cherry-pick of commit 4e51a274de from master.

Change-Id: Ie7b696c9c410fa5b85d0487bbf99e8e5f1f4a886
Signed-off-by: Andrey Kuzmin <andrey.v.kuzmin@gmail.com>
Reviewed-on: https://review.gerrithub.io/413749
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-on: https://review.gerrithub.io/414057
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-06 19:36:37 +00:00
Dariusz Stojaczyk
16c8d766b5 event/app: fix setting "single-file-segments"
This got broken in 93cb4a31 [1]

[1] 93cb4a31: event/app: Refactor initialization of app environment
in spdk_app_start()

This is a cherry pick of commit f8387acaa5 from master.

Change-Id: Id146ab10a0011d5f87efe1243f9bd689201b576b
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/413168
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/414060
2018-06-06 19:36:23 +00:00
Dariusz Stojaczyk
494c365eca virtio: merge contiguous memory regions
Although contiguous, memory regions may appear as separate
/proc/self/maps entries.

This patch brings support for DPDK 18.05.

This is a cherry pick of commit b5ad869cc1 from master.

Change-Id: I3029ac8b702e98133eb035f0b0cc3dd26656253a
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/413167
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/414059
2018-06-06 19:36:23 +00:00
Dariusz Stojaczyk
e110a0d1e6 env/dpdk: add support for DPDK 18.05 dynamic memory allocation
This brings DPDK 18.05 support and introduces
dynamic hugepage memory allocation.

The following is now possible:
    ./spdk_tgt -s 32
    rpc.py construct_malloc_bdev 128 512

or even:
    ./spdk_tgt -s 0

Note that if no -s param is given, DPDK will still
allocate all available hugepage memory.

This has been tested with DPDK 18.05-rc6.

Fixes #281

This is a cherry-pick of commit b6fce1912d from master.

Change-Id: I04e23cfcd8c0af913ed402a310fd596bc25d685c
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/410540
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/412868
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-05-30 00:07:04 +00:00
Jim Harris
5f59d919a4 blob: don't try to claim cluster 0 in recovery code
Thin provisioned blobs mark unallocated clusters with
cluster ID 0.  During recovery from a dirty shutdown,
we must not try to claim cluster 0 - we should ignore
them instead.

Fixes issue #291.

This is a cherry-pick of commit e8ddb060f8 from master.

Change-Id: I83083bba3a2468d68874b485f1fc1e302e46fbd4
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Reviewed-on: https://review.gerrithub.io/410065
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-on: https://review.gerrithub.io/410699
2018-05-09 20:52:11 +00:00
Daniel Verkamp
f1b747f50f version: SPDK v18.04.1-pre
Change-Id: I42efa8e09c5b3bb38c1126b782b1fdc19b5de2d1
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/410069
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-05-07 16:49:34 +00:00
Daniel Verkamp
9eb54cae6a SPDK 18.04
Change-Id: I67ad1bb09b77834bb35a56b2d6982cf10d59152f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/409339
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-27 23:11:35 +00:00
Daniel Verkamp
b8edc465e2 nvme: check Optional Asynchronous Events Supported
In addition to checking for the required version, also use the OAES bits
to determine which features to request.

Change-Id: Idb07e4175cca5609904876bd17d912b50bc6b62a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/409352
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-04-27 23:11:20 +00:00
Daniel Verkamp
87ec451b07 Revert "nvmf: disconnect other connections if admin qpair disconnects."
This seems to be causing a new intermittent test failure with a call
stack that looks like:

 # nvme disconnect -n nqn.2016-06.io.spdk:cnode1
 transport.c:175:23: runtime error: member access within misaligned
 address 0x000000004321 for type 'const struct spdk_nvmf_transport_ops',
 which requires 8 byte alignment
 0x000000004321: note: pointer points here
 <memory cannot be printed>
 #0 0x4e014b in spdk_nvmf_transport_qpair_fini
 #1 0x4f14fe in nvmf_qpair_fini
 #2 0x502a95 in _spdk_reactor_msg_passed

This reverts commit adfa9f6dc7.

Change-Id: I4bab9d8b5294e241c960683df14acbf457bf3391
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/409251
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-27 16:38:46 +00:00
Daniel Verkamp
145b2f7bd3 changelog: add bdev QoS and iSCSI VPP support
Also tweak some wording and add other minor feature additions.

Change-Id: I37f4c97c260e55c62b112b72fb47a316772da3f7
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/409223
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-04-26 23:56:38 +00:00
GangCao
409353a23e bdev/qos: No operation for zero QoS setting on not enabled bdev
In below case that bdev is not QoS iops rate limiting enabled,
just report an error and return.

set_bdev_qos_limit_iops Malloc0 0

Change-Id: I1514dfd80f417a94d8c5147d7c4e891fc91a29fd
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/409243
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-04-26 23:40:05 +00:00
Tomasz Kulasek
5557a572f5 blobstore: fix payload offset incrementation on operation split
On operation split, payload pointer should be incremented by the number
of bytes, not by op_length which indicates the number of pages.

Change-Id: I5d40b6ff7f39b599fe8c8072ee7879848a6af848
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/409201
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-26 20:28:28 +00:00
Tomasz Zawadzki
5bafc240e5 test/iscsi: utilize network namespaces in iSCSI tests
Network namespaces are used to assure that kernel
is not routing packets within host stack,
but they go through veth interfaces.

This patch serves as a base for future VPP test changes,
where namespaces are used as well.

Change-Id: Ic7b82b0a0837bca2e16774fde244348a691fe056
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/405641
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-04-26 17:10:36 +00:00
Ziye Yang
adfa9f6dc7 nvmf: disconnect other connections if admin qpair disconnects.
Also this patch make each io qpair recycled by its own thread.

Change-Id: I386e411f5d4cee4629054e4cce8d1f4401ec49c8
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/407743
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-04-26 17:04:09 +00:00
GangCao
2f94b4d4e3 bdev/qos: free the QoS channel when disabling
The related QoS channel resource needs to be freed
after disabling the QoS through the RPC call.

Change-Id: If757b5febdb909367c9b940de6e6b5e9528c0103
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/409125
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-26 16:41:18 +00:00
Tomasz Zawadzki
882558f7e8 blobstore: do not produce error when requesting number of clones
One of intended uses of spdk_blob_get_clones() is to retrive
number of clones from a snapshot. This is done by passing
NULL pointer for destination array.

In this case SPDK_ERRLOG is superfluous, as ENOMEM should
be handled appropriately by called.
Example of correct usage producing this error log is in vbdev_lvol.c
vbdev_lvol_dump_info_json().

Change-Id: I032ca12af01caddf6f540e39d49c2adba40a6ff1
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/409164
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-04-26 16:40:50 +00:00
John Kariuki
abeba45533 scripts/pkgdep: add suse packages
Updated script to install SUSE packages.
Testing was done on SUSE Linux Enterprise Server 12 SP3

Change-Id: I8eafadd2e2e0fb7b2c1a6c885a22c7e5dc61d6a5
Signed-off-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-on: https://review.gerrithub.io/408891
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-04-26 16:35:22 +00:00
Daniel Verkamp
e6acab9930 vhost: fix build with DPDK 17.02 and older
__rte_always_inline was added in DPDK 17.05; replace the single use with
a regular 'inline' to restore compatibility with older DPDK versions.

Change-Id: Ia8a0f729cc4c39a9aaab0700f3c827a9766d1dd0
Fixes: e30595fbe3 ("rte_vhost: introduce safe API for GPA translation")
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/409077
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-25 22:27:02 +00:00
Changpeng Liu
f0f3a48f40 nvme: set AER configuration bits based on NVMe version
Change-Id: Ia2fd4d31560c9117b167cbf12d2749c303e4cb8c
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/408772
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-25 22:24:29 +00:00
Jim Harris
396bedd09f Update DPDK submodule to pull in contigmem revert.
Upstream DPDK changes to the FreeBSD contigmem driver
have broken SPDK FreeBSD support.  The DPDK changes
are not buggy themselves, but they break 2MB mmap
alignment which SPDK depends on.  So this patch is
reverted for now in our DPDK submodule until we
can get a better patch submitted upstream.

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

Reviewed-on: https://review.gerrithub.io/409048
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-04-25 20:33:58 +00:00
Ziye Yang
9df6188781 iscsi_initiator: Make the disconnect in async mode.
Change-Id: I06335ea1c552afba4025eb0c52abdd3488b02262
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/407236
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-04-25 20:20:34 +00:00
GangCao
804ebf9985 bdev/qos: set the enabled flag through the RPC method
Change-Id: I4a86ba226870eef67a30634c9f5ad592eb41cd52
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/408937
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-04-25 17:52:19 +00:00
Pawel Wodkowski
629405ddfe nbd: fix JSON config dump
We need to use arrays here.

Change-Id: Ibca72f9780b057fd4349ee0d4daa1322779efc88
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/409026
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-25 17:38:02 +00:00
Dariusz Stojaczyk
d69ccc823a rpc.py: remove references of "debug" trace flag
It has been removed long ago.
Also enabled "log" traces for log_ut, so that
SPDK_LOG_LOG messages are now displayed.

Fixes #284

Change-Id: I815f2a3301524540201adf060e3114143c258c4b
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/408945
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-25 17:31:28 +00:00
Maciej Szwed
ee3213da3e doc: changelog update
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ia2d0c596725c5df239f0e01ac9f10e5b65b02764
Reviewed-on: https://review.gerrithub.io/408825
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-25 17:25:49 +00:00
Dariusz Stojaczyk
addd386d81 doc/virtio: mention 2MB hugepage support
Also updated the CHANGELOG.

Change-Id: I9040505f689aab51fc26ab47d5a10438e35f9fc4
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/408830
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-25 17:25:49 +00:00
Dariusz Stojaczyk
30f369f703 doc/virtio: add Virtio Block doc
I decided to use 'Virtio Block' as the title. Virtio
spec uses the same name alongside SCSI.

```
5 Device Types
[...]
 5.2 Block Device
 5.6 SCSI Host Device
```

Also added a CHANGELOG note.

Change-Id: Ie2eabd053213da776c78a8d938a621b42e6d5558
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/408829
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-25 17:25:49 +00:00
Daniel Verkamp
130307862b vhost/nvme: fix doorbell buffer size calculation
The existing code was using sizeof() on a calculation that already
returned the right size, so this would originally just memset() 4 bytes
instead of the whole region.

The spec requires the doorbell buffer to be exactly one physical memory
page, and our controller emulation chooses MPS so that only 4096-byte
pages are supported, so just zero out the page and drop the calculation
entirely.

Change-Id: I71db1bebf0a4d5dbe55fd411786e19a8d6802c20
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/408730
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-25 02:38:30 +00:00
Daniel Verkamp
d2b764f4d7 vhost/nvme: return proper status for QID errors
If the user requests an invalid QID or CQID in Create I/O Completion
Queue or Create I/O Submission Queue, we need to return an error of
Invalid Queue Identifier as indicated by the spec.

Change-Id: I7467aa04da9e374bb596731f4e4174967d44cffb
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/408767
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-25 02:38:30 +00:00
Daniel Verkamp
0368077d70 test/vhost: convert vhost-nvme stubs to DEFINE_STUB
Change-Id: I182e3fd47c28468184d1a60dec3d114df2d5e5ae
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/408763
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-25 02:38:30 +00:00
Daniel Verkamp
a32ba31665 vhost/nvme: remove cmd and cqe magic numbers
Replace the hard-coded 64 and 16 constants, which are the size of the
submission queue entry and completion queue entry, with equivalent
sizeof expressions.

Change-Id: I5a9d8fc1ab98276312445f0699aae3d86beee705
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/408762
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-25 02:38:30 +00:00
Daniel Verkamp
80e7107811 vhost/nvme: replace asserts() with error checks
These assert() calls were all checking guest-provided data; it should
not be possible for a guest to trigger an assert(), so replace them with
actual runtime error checks (which won't get removed in release builds).

Change-Id: I0692dae0e8f6157fc04e88a3ed8087cce9367fe2
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/408761
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-04-25 02:38:30 +00:00
Seth Howell
9acb995ede test/common: Don't override autorun-spdk.conf
Change-Id: I1b75ffaccdf909ce1ce11f4464efdd539a7754a7
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/408410
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-24 21:53:51 +00:00
Andrey Kuzmin
d5a9fca816 Make iteration over I/O types safe against further type additions.
Change-Id: If4ec9fe2f49f68ef7a7434cd2b4a0c55979ac869
Signed-off-by: Andrey Kuzmin <andrey.v.kuzmin@gmail.com>
Reviewed-on: https://review.gerrithub.io/408706
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-04-24 21:53:25 +00:00
Dariusz Stojaczyk
c769e03fd7 doc/virtio: remove Virtio-SCSI references from lib/virtio doc
Also removed Virtio-SCSI 1GB hugepage limitation.

Change-Id: Ife200cb7671e2c6366fbfcc679aa67bbc1c30457
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/408828
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-24 21:48:30 +00:00
Pawel Wodkowski
5b424282c1 nbd: add JSON config dump
Change-Id: Ib3c97c6d9152a3f61a56d640c875151bdab40278
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/408320
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-24 21:46:42 +00:00
zkhatami88
a77cd3f75c env: add malloc variants with DMA/shareable flags
This will allow environment abstraction layers to provide different
types of memory depending on whether it needs to be DMA-able and/or
shared across multi-process boundaries.  For the DPDK environment, the
flags can be ignored, since rte_malloc() supports both DMA-able and
shared memory.

Change-Id: I5ee894337dd9d6e24418848c0a35f131184383c8
Signed-off-by: zkhatami88 <z.khatami88@gmail.com>
Reviewed-on: https://review.gerrithub.io/402334
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-24 21:38:16 +00:00
Daniel Verkamp
f9d52c9ebd lvol: add destroy_lvol_bdev RPC method
This is the first step toward fixing the behavior of the lvol bdev
module so that it handles spdk_bdev_unregister() correctly.

Currently, when an lvol bdev is unregistered, this causes the associated
lvol to be deleted; this isn't the desired behavior, since
spdk_bdev_unregister() is just meant to drop the currently-exposed bdev,
as in a hot-unplug event, not destroy the backing storage.

The current implementation of the new destroy_lvol_bdev method still
calls into the exsting (broken) spdk_bdev_unregister() path, but this at
least lets us fix the existing delete_bdev RPC callers that really
intended to destroy the lvol.

The next step is to make vbdev_lvol_destroy() call spdk_lvol_destroy()
instead of unregistering the bdev, which will require cleanup in the
generic lvol layer to remove the close_only flag.

Change-Id: Ic4cb51305d31f6d7366a82ba7bf7b19ebbcd3e9c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/408084
Tested-by: SPDK Automated Test System <sys_sgsw@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>
2018-04-24 21:33:56 +00:00
Changpeng Liu
c2b66a83bc vhost-nvme: reserve a bigger enough opcode to avoid conflict with QEMU
Currently QEMU vhost-nvme driver hasn't been pushed to QEMU community,
for vhost-user socket messages, QEMU can pick the opcode at any time,
QEMU 2.12 already picked 27-30 for other driver, for the purpose to
mitigate rebase work in future, while here, we reserve a bigger value
so that it will not conflict with QEMU for very long time.

Change-Id: Ic404bb14330c4acc484aa9c86983030803a31e77
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/408771
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-24 16:41:40 +00:00
Daniel Verkamp
b7060cb21a bdev/gpt: allocate buffer with correct alignment
Use spdk_bdev_get_buf_align() to determine the necessary memory
alignment for I/O buffers for the base bdev.

Change-Id: I6000c5b1117329d1a4618b19b6c6f3b919b7555a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/408753
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-24 16:19:04 +00:00
Daniel Verkamp
5ac6129908 env_dpdk: fix build with DPDK 16.07
DPDK commit 9df1ae8a888d ("eal: rename and move PCI resource structure")
introduced the new struct rte_mem_resource name; before that point, the
equivalent type was struct rte_pci_resource.

Since this is an easy fix, we can go ahead and patch around it; however,
users are highly recommended to use newer DPDK releases.

Change-Id: I27637136fa932f10032f5f76248da07120fa02a9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/408743
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-04-24 16:04:54 +00:00
Daniel Verkamp
5d5e402810 vhost/nvme: remove unnecessary vva casts
Now that spdk_vhost_gpa_to_vva() is used in place of
rte_vhost_gpa_to_vva(), we can directly use the void * return value
instead of casting it via uintptr_t.

Change-Id: Ie063439def1eeeebc7a949ff67f14a80bfce6cd7
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/408760
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-24 16:02:58 +00:00
Daniel Verkamp
54f59263eb vhost/scsi: handle spdk_vhost_gpa_to_vva() failure
One call to spdk_vhost_gpa_to_vva() was missing a return code check.

Change-Id: I3581ade98f7fbf72419f8216718a17de50bac4b7
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/408759
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-24 16:02:58 +00:00
GangCao
9c7d842cc4 bdev/qos: update the RPC method to make 0 iops mean unlimited
Unlimited I/O per second is equivalent to disabling QoS.

Change-Id: I03a489dd18b5d1a9a42f7853248911e97b7a211e
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/408291
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-04-23 23:23:42 +00:00
Dariusz Stojaczyk
0587e970e5 bdev/gpt: fix gpt scan for block sizes > 32KB
32KB spdk_bdev_read was failing straight away
on bdevs with block size bigger than that.

Change-Id: I83efe4284a3b82b83db0f678abb134c5daa36a84
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/383499
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-23 20:58:38 +00:00
Changpeng Liu
d08a33f5a3 test/vhost-blk: enable read only test for vhost-blk
The QEMU vhost-user-blk-pci host driver will not negotiate
VIRTIO_BLK_F_RO feature bit by default, users must append
`config-ro=true` to enable it if the backend device can
support read only feature.

Fix the issue #254.

Change-Id: I17dcc1b80bde094dd4873221b681d0c4049abb39
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/408266
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2018-04-23 20:40:26 +00:00
Changpeng Liu
a8884c5b7d vhost-lib: add virtio configuration protocol feature bit
QEMU added a protocol feature bit to indicate the slave
target can support GET/SET config messages, while here,
add it to SPDK vhost target so that it can work with
QEMU 2.12.

Change-Id: I41a813ef23fba4d3fdf7bb3e3617a9feb4209509
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/408416
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-04-23 20:38:39 +00:00
Jim Harris
60622c61f9 CHANGELOG.md: document DPDK CVE-2018-1059 fixes
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I748be6adeb83cfa99f4359db68acdec7ea5ab523

Reviewed-on: https://review.gerrithub.io/408736
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-04-23 20:30:20 +00:00