Commit Graph

1813 Commits

Author SHA1 Message Date
Ziye Yang
d706fa417f nvmf,rdma: Remove spdk_nvmf_rdma_request_ack_completion
The sq_head handling is already done in
spdk_nvmf_rdma_request_send_completion, so do not need to
do again.

Change-Id: I527ff8adfcbdf43ac79794cb5c7777c0e8ef6973
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-09 15:04:14 -07:00
Daniel Verkamp
427e90fea3 event/app: don't set default shm_id to PID
The env layer already understands that shm_id < 0 means that
multi-process is not enabled.  Leave shm_id defaulted to -1 so that
other code can detect when it is not set.

Change-Id: Ifd1667598d55c216f95f13561dc2a550677db5f4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-08 16:35:34 -07:00
Daniel Verkamp
2f10ea11db env_dpdk: only set proc-type and base-virtaddr for multiprocess
These options are only necessary for applications that intend to be used
in a multi-process configuration.

Change-Id: I3e1fa0682611d92267d0ad1b3f2016dc926b96b6
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-08 16:35:34 -07:00
Daniel Verkamp
30a10e68a4 bdev: add delete_bdev RPC
Change-Id: Iac0298d5f10c937107a70287af4586a5c37e73bf
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-08 12:36:32 -07:00
Pawel Wodkowski
731edf84d8 autotest_common.sh: fix backtrace printing
Line number regex match all numbers starting from X eg:
10 will match 100 101 102... Fix this by adding space to regex.


Change-Id: Id594550618fea74a22f50033eac101439253a371
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
2017-03-08 12:36:24 -07:00
Pawel Wodkowski
96e5267baa vhost: free string RPC parameters
Change-Id: Ic5a31f1433ff585d4ca4d0851a5fcbba7092d5e8
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
2017-03-08 11:19:35 -07:00
GangCao
3a74e273fc app/nvmf_tgt: free the allocated memory for the listeners
Change-Id: Icfd6ed4e4a00b28ad882e1fde0652025581760f9
Signed-off-by: GangCao <gang.cao@intel.com>
2017-03-08 09:56:28 -07:00
Daniel Verkamp
ed61bf79fb nvmf: ensure there is room before claiming a bdev
Previously, if the maximum number of virtual namespaces had already been
reached, adding a bdev to a subsystem would claim it without actually
adding it to the ns_list array.

Change-Id: Iab68ad1a75748c0e88232240185695aac08d71d2
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-08 09:55:44 -07:00
Seth Howell
b1c2b3f546 test/vhost: skip vhost tests if vm image does not exist
Change-Id: I9cb039a1b4ca4f71cf75e880c1a560821b24772b
Signed-off-by: Seth Howell <seth.howell@intel.com>
2017-03-07 17:10:30 -07:00
Seth Howell
a97cc62bcb test/iscsi: skip calsoft tests if unavailable
Change-Id: I07f4ad418983a4b9693f7e5f1392a0b1721007d8
Signed-off-by: Seth Howell <seth.howell@intel.com>
2017-03-07 17:09:10 -07:00
Daniel Verkamp
c0a54a7606 vhost: make dpdk_vid_mapping and g_need_iovecs static
They are not used outside of their respective files.

Change-Id: I754834e7354caec877cd2fe193e56854e5a34e20
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-07 13:05:58 -07:00
GangCao
4cdd929b66 nvmf: introduce the global and per subsystem listen addresses
Change-Id: I276a71a3280c41b215a9cf4ca85247bd397a85e5
Signed-off-by: GangCao <gang.cao@intel.com>
2017-03-07 12:56:13 -07:00
Cunyin Chang
b865439deb iscsi: Fix the large IO failure procedure in iscsi layer
This patch fix the issue when large IO failed:
when we handle the read command which need split, we need make
sure all the subtasks to be handled if one of the subtask failed,
this will make sure the command have chance return back to initiator.

Change-Id: I0c01e1a34c6179fce37ab52c8121268b6ee31102
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2017-03-07 12:52:17 -07:00
Daniel Verkamp
3abfa7a610 test/vhost: add 'set -e' to spdk_vhost.sh
Make sure the automated test pool can catch any errors.

Change-Id: Icd1cb9f5501d5f18395b963453e6c3d5e58c48ee
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-07 12:44:23 -07:00
Daniel Verkamp
b55d837e7b nvme: only include x86intrin.h for x86 platforms
The actual uses of intrinsics are already guarded by feature-specific
ifdefs in nvme_pcie_copy_command(), but the header itself should also
only be included when it will actually be needed.

Change-Id: Ife65d6432b8dfd9d9db80fe4e385ab76491874c0
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-07 12:44:10 -07:00
Daniel Verkamp
ba74eaf49f CONFIG: add CONFIG_VHOST option (on by default)
Change-Id: Ic493e5d4ebbd45370ddf0086cfe9e924d444c72f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-07 12:43:51 -07:00
Daniel Verkamp
b58a5d73ef util: add SPDK_COUNTOF() array size macro
SPDK_COUNTOF works like sizeof, except it returns the number of elements
in an array instead of the number of bytes.

Change-Id: I38ff4dd3485ed9b630cc5660ff84851d0031911f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-07 12:43:42 -07:00
Daniel Verkamp
ba5081db23 examples/nvme/perf: set io_queue_size in NVMe probe
Since we know the queue depth that we will be using during the test,
request that as the queue size when attaching to NVMe controllers.

Reserve one extra queue entry above the expected queue depth since NVMe
queues must always have one entry free to distinguish between queue
empty and queue full cases.

Change-Id: I809982207edb4894148aec09b10c4e2de4a040d3
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-07 12:15:59 -07:00
Krzysztof Jakimiak
014ae832d7 vhost/test: change data verification method to md5
"meta" verification method in FIO is deprecated and is
suspected of producing false positives. MD5 checksums
are now used instead.

Change-Id: Id3a2b008837173f82e0eda48d96cd4a43e00531f
Signed-off-by: Krzysztof Jakimiak <krzysztof.jakimiak@intel.com>
2017-03-07 13:19:10 +01:00
Daniel Verkamp
4129b85f6f build: split Doxygen output to a separate log
Change-Id: Ifd5a5df7eb468886e72d887f4e29f8dc9723154d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-06 17:16:25 -07:00
Daniel Verkamp
88a7271315 nvmf: combine set_aer_callback and attach
Change-Id: Icb6aab97aa78862b19c1fa68fac2b7ac44feea90
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-06 17:15:31 -07:00
Daniel Verkamp
b592cf6cdf nvmf: move NVMe qpair allocation to direct.c
Change-Id: Ice167a5ec158e6e60c1c4b67bc7eeca80b262de2
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-06 17:15:31 -07:00
Daniel Verkamp
cc85d7ef68 nvmf: move io_channel allocation to virtual.c
Change-Id: Ibe0464a539b7545d7f911d6af13a1bd3f7bd3cd9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-06 17:15:31 -07:00
John Kariuki
8e632c0722 nvmf: Added infiniband/RDMA prerequisites and core assignment configuration
Update the NVMe-oF getting started guide.
Added the infiniband/RDMA verbs and RDMA NIC configuration.
Also added a configuration section for Core Assignment.

Change-Id: I6f98a2156ca5c6050fecfbfb9afa797492fbf16d
Signed-off-by: John Kariuki <John.K.Kariuki@intel.com>
2017-03-06 15:51:58 -07:00
Daniel Verkamp
cb0538aefb nvme: clamp io_queue_size to valid range
I/O queues must have at least 2 entries.

Change-Id: Ib11b08fab4b518501f8ce80d6b73d9e33c9777a6
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-06 15:30:04 -07:00
Jim Harris
37ccb50c50 nvme: allow for deletion of I/O qpairs during their completion context
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ibc6566e9248cd7004aa5d4374f32b519062ed6d9
2017-03-06 14:01:25 -07:00
Piotr Pelplinski
1dbf53eebf vhost: add a library and app for userspace vhost-scsi processing
This patch adds a library, application and test scripts for extending
SPDK to present virtio-scsi controllers to QEMU-based VMs and
process I/O submitted to devices attached to those controllers.
This functionality is dependent on QEMU patches to enable
vhost-scsi in userspace - those patches are currently working their
way through the QEMU mailing list, but temporary patches to enable
this functionality in QEMU will be made available shortly through the
SPDK github repository.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Krzysztof Jakimiak <krzysztof.jakimiak@intel.com>
Signed-off-by: Michal Kosciowski <michal.kosciowski@intel.com>
Signed-off-by: Karol Latecki <karolx.latecki@intel.com>
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>

Signed-off-by: Krzysztof Jakimiak <krzysztof.jakimiak@intel.com>
Change-Id: I138e4021f0ac4b1cd9a6e4041783cdf06e6f0efb
2017-03-06 12:44:35 -07:00
Jim Harris
16bbcb3f36 env: register PMDs on associated first probe
This avoids registering PMDs that are not used by a given
application.  For example, an app may wish to *not* use
ioat - in this case, ioat PMD would not be registered with
DPDK, and we would not waste time probing these devices
when probing other devices like NVMe.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: If378e40bde9057c7808603aa1918bcfe80fa0e9d
2017-03-06 12:44:34 -07:00
Daniel Verkamp
a8bfa65ff2 test/nvmf: move AER test to nightly builds only
Change-Id: I61e514936265fad90b7862e2335b80c33e13eb3f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-06 11:08:51 -07:00
Xiaofan Yang
de850e57cf test: Reduce one subsystem for nvmf/multiconnection nightly testing
Change-Id: I10155fb4e2042e1823408ba3c0295aa7e4c8b9a7
Signed-off-by: Xiaofan Yang <xiaofanx.yang@intel.com>
2017-03-03 17:08:50 -07:00
Daniel Verkamp
3139c76394 test/nvmf: handle 'nvme disconnect' non-0 return
Newer versions of nvme-cli return a non-zero status from the disconnect
command when it is successful.  Catch this in the test scripts so that
the tests don't consider this a failure.

Change-Id: I3abf4042ec8b0bc8aed5a4c36128ae73230aa190
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-03 16:53:59 -07:00
Daniel Verkamp
6a03451228 nvme/rdma: use spdk_malloc() for DMA data buffers
These allocations need to be from memory registered with the SPDK env
library to allow future work on automatic ibverbs memory registration.

Change-Id: I6ec6999ecd6d6bf6ba4ab159630f7d01f3d46154
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-03 10:23:20 -07:00
Daniel Verkamp
7f448daaa3 nvmf: remove SPDK_NVMF_REQUEST_EXEC_STATUS_RELEASE
It is no longer used now that AER handling holds the request until it is
triggerred.

Change-Id: I71a75e86f82bc06f677cf26defa701e60b9aa1bd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-03 10:22:11 -07:00
Daniel Verkamp
776facc69b nvmf: fail AER command if AERL is exceeded
Change-Id: I5955630fb069c1aab47f38b910366a30b1d3bac5
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-03 10:22:11 -07:00
Daniel Verkamp
b6c72d7b09 nvmf: move AER command handling to session.c
Change-Id: Ib2ffdc253df808547a43f7f8e52b8d4d53c09c96
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-03 10:22:11 -07:00
Cunyin Chang
6da9e1792a nvmf: move the virtual mode related code to the virtual.c.
Change-Id: Ia68ffdd2019adba3a37295ee455e93f8e0427fa2
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2017-03-03 10:06:46 -07:00
Cunyin Chang
fca35b7b96 scsi: Add support for hotplug in scsi layer.
Change-Id: Ic779a79d41d60b6998f9bd05ca4a59c1301a10ac
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2017-03-03 08:16:48 +08:00
Daniel Verkamp
4055a502ea vtophys: add function to dynamically allocate maps
Change-Id: I335a8712416576fecdde96cfb47baf83ea4f15e5
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-02 12:29:34 -07:00
Daniel Verkamp
b98eb28d85 vtophys: add default translation to mem map
This will allow returning a different default value per mem map.

Change-Id: I94d3de197acfb2e6ad40092ab0588ba4e951af80
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-02 12:29:34 -07:00
Daniel Verkamp
2c43c9bcca vtophys: begin refactoring into general memory map
Add a top-level structure that can be reused for other kinds of memory
address translations.

Change-Id: I046f98b76b4e98087d90095d6e9dea5cd6ab7898
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-02 12:29:34 -07:00
Daniel Verkamp
44ceff8c17 test/nvmf/shutdown: reduce number of subsystems
The setup.sh parameters we use in autotest don't allow for enough RAM
for 12 subsystems; reduce it slightly while still testing a large
number.

Change-Id: I595589db6e5199ad87ad9511bb0ad63b7b60211d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-02 09:55:05 -07:00
Ziye Yang
bfe2897da3 nvmf,target: solve shutdown coredump issue
It is caused by this commit:
4163626c5c

nvmf_tgt_delete_subsystem registers the poller
with function subsystem_delete_event.
subsystem_delete_event is called asynchronously,
the deletion should happen in this function.
Otherwise, with the current code,

g_subsystems_shutdown = true
TAILQ_EMPTY(&g_subsystems) = true
when subsystem_delete_event is firstly called.

If there are multiple subsystems, the logic is wrong.
Thus other subsystem will never be delete. since
we already execute shutdown_complete().

Also add related test scripts.

Change-Id: I3823563fc9e8611c11a6d798685ff64e2939842e
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-02 09:39:48 -07:00
Cunyin Chang
b21fd06463 iscsi: finish the task if the lun is NULL immediately in iscsi layer.
This patch make the function spdk_scsi_task_process_null_lun() as public and
finish the task immediately once we get task in iscsi layer.

Change-Id: I4ada027d3a324dce8ef0d0f7706dbc14184ead96
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2017-03-02 00:54:34 -07:00
cunyinch
c932e122b7 bdev/nvme: Add support for hotplug in bdev/nvme layer.
Change-Id: I4decd60fdb065a1865519013f47b6c32111fa5c4
Signed-off-by: cunyinch <cunyin.chang@intel.com>
2017-03-02 11:44:14 +08:00
Cunyin Chang
77183f9722 bdev: Add support for hot plug in generic bdev layer.
Change-Id: Iac724518fb82b1b1bcafa7610210b0000c2063aa
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2017-03-02 09:48:39 +08:00
Daniel Verkamp
b9ca539390 nvme: add transport ID comparison function
Change-Id: I4ab7cbad1c31ac57347bb470f3f545d3ca81de43
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-01 14:35:18 -07:00
Daniel Verkamp
a3a3d7dddf nvme: export transport ID trtype and adrfam parsers
Change-Id: I8d417c5baa68832c568c3df0927d84e2f44bb887
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-01 14:35:18 -07:00
Daniel Verkamp
007196152f env_dpdk: print DPDK version during initialization
Change-Id: Ib6478c3e54a93f6f4c77c63cef4ab2ff47df2f10
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-01 13:46:51 -07:00
Ziye Yang
0801877b7d nvmf,direct: add AER support in direct mode.
After checking the code, aerl in our session is 0,
so there will be only 1 AER. So currently,
we will only handle 1 AER case.

When the AER event is triggered by real NVMe device owned
by the subsystem, it notifies all sessions belonging to
the subsystem.

Change-Id: Ia80fb0f03e893c20d8dd14afbed8db10db38301c
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-01 10:47:52 -07:00
GangCao
fde3041296 app/nvmf_tgt: correct the parsing of listen addrs
Change-Id: I77ececd69884e58019e038096ebdcac8e87ede3a
Signed-off-by: GangCao <gang.cao@intel.com>
2017-03-01 12:26:48 +08:00