Commit Graph

835 Commits

Author SHA1 Message Date
Daniel Verkamp
574a801941 nvmf: check Connect command RECFMT field
Verify that the record format is the one we support (only 0 is defined
by the spec for now).

Change-Id: Iddf038b381e540134abf572e0545c97a0ef71d5f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-17 09:12:48 -07:00
Daniel Verkamp
975362d236 nvmf: verify that Connect NQNs are null terminated
The spec requires that NQNs are null terminated and maximum of 223 bytes
long, despite the Connect command fields being larger (256 bytes), so
add checks for both subsystem NQN and host NQN before using them as null
terminated strings.

Change-Id: I343d9e44a09ab4d0f6654feba460b31e976c4e56
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-17 09:12:33 -07:00
Changpeng Liu
dcf49aa018 nvme: disable the controller from generating INTx# interrupts
Since we bind the NVMe device to UIO driver to protect against native
NVMe driver, but for Admin queue, there are still INTx interrupts
exist, as all the completion for Admin queue will be processed in
user space, so we don't need INTx anymore.

Change-Id: Ife5b3e410ae95690ed0f3f9a2f2dfaf55a7797b5
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2016-08-17 09:08:33 -07:00
Daniel Verkamp
0d61bf4b50 autotest: move NVMe device cleanup to startup
Make sure any partition tables or other random data on the disks is
cleaned up before running the tests, rather than trying to clean it up
on failure when the system is in a potentially bad state.

Change-Id: Ia2119485aee6a50243744328dff2314d7a72adad
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-17 09:04:16 -07:00
Daniel Verkamp
c3162ca0fb readme: add C++ compiler to dependency list
A C++ compiler is required to build the trace app. Add it to the list of
packages to install.

Change-Id: Ia30a42721d10a07a1b7949a815eb5616f575d878
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-16 15:44:12 -07:00
Changpeng Liu
8a23223e1b nvmf: Allow users to configure which lcore each subsystem runs on
Users can specify the core for each subsystem and the acceptor listen routine
to run on different cores for performance consideration.

Change-Id: I4bd1a96f39194c870863b4b778e6ea7cf8fc1a2d
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2016-08-16 09:20:42 -07:00
Cunyin Chang
077fe1da65 nvmf: Add nvmf subsystem dependence on bdev
prepare for the virtual controller.

Change-Id: I022e2c88cf8332c035b51e843d6b3ced4716df9c
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-08-16 08:54:25 -07:00
Daniel Verkamp
33dde51f83 doc: organize Key Functions into tables
Change-Id: I21ff868ddbea4e6819f74b7b01c344abe532ee19
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-15 16:07:26 -07:00
Daniel Verkamp
25d331b21f nvmf: add Doxygen title to spec header
Change-Id: I43e6646d756684f0f34e49f64a86444cb43f44c0
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-15 16:07:26 -07:00
Daniel Verkamp
0d8aaedba6 doc: replace another "NVMf" with NVMe over Fabrics
Change-Id: I70ce4d61539b5c27d7672b2bac04c6b33a7ca51b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-15 16:07:26 -07:00
Daniel Verkamp
0b252a7000 Revert "nvmf: only poll admin queue once every 10 ms"
This is causing issues during shutdown because the poller removal is not
synchronized with the rest of the cleanup path.

This reverts commit 7dfc5e922d.

Change-Id: If95c4b72c5d120f18bdc3db6d7d532ad1aada642
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-15 15:49:19 -07:00
Daniel Verkamp
0022304275 iscsi: track conn lcore for informational purposes
The lcore_id field in the get_iscsi_connections RPC was removed in
commit 5d8c94536a7d1d4c1f0ee3349188bf0e7e8c9e74; add a field to
spdk_iscsi_conn to track the lcore so this can be re-added.

Change-Id: I6c9574829466b168880728f4620401987fc7dd3c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-15 10:22:04 -07:00
Tsuyoshi Uchida
81976ebd55 nvme: modify not to retry IOs on reset (#33)
When a controller reset is finished, all outstanding IOs and all queued
IOs which submitted before the reset are returned to the caller.
2016-08-15 10:01:02 -07:00
GangCao
9dfc65b081 nvme: Create Proc Type for primary and secondary processes
Change-Id: I283ce03ed50fd12b9da906b0e09b4559b41776ef
Signed-off-by: GangCao <gang.cao@intel.com>
2016-08-15 09:21:20 -07:00
Daniel Verkamp
7dfc5e922d nvmf: only poll admin queue once every 10 ms
This should enhance performance, since the hardware admin queue poll
function takes a mutex and should not be in the performance path.

Change-Id: I7e4acde0337aaf7079811612cba5348acf0a467d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-12 10:55:04 -07:00
Daniel Verkamp
5d8c94536a event: hide struct spdk_poller internals
This leaves more flexibility for future changes to the poller
representation without requiring API changes (after this one).

It also prevents the user from accidentally using poller fields in a
non-thread-safe way, since they can't be accessed directly anymore.

Change-Id: I7677d5b93668665d29ae39c5e0ba74333ad3f878
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-12 10:42:12 -07:00
Daniel Verkamp
5c9d560b5a Work around DPDK 16.07 FreeBSD rte_zmalloc() bug
Replace other critical rte_zmalloc() sites that actually depend on the
memory being zeroed.

Change-Id: If6856ad44a4c50869811d3ce9411c993ce88018d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-11 17:59:38 -07:00
Changpeng Liu
17dbcf58c1 scsi: fill BLOCK LIMITS VPD page filed with suitable value
Linux block layer driver will use the maximum transfer length field to
split IOs larger than this value. We should set the field according to
iSCSI target limitation.

Change-Id: I03ee35bb96f0949418bb976a6c8013f88622a324
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2016-08-11 09:23:22 -07:00
Daniel Verkamp
bd2a3a0998 iscsi: make param tables const
Allow the tables to be in the read-only data section.

Change-Id: I58199a86d4d44dbad7baed397b2e148c45b3a3de
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-10 22:21:22 -07:00
Daniel Verkamp
dd2e6164c9 nvme: replace rte_zmalloc() with rte_malloc() + memset
rte_zmalloc() is broken and does not actually return zeroed memory on at
least DPDK 16.07 on FreeBSD, so do it ourselves.

Change-Id: If8da93ead0b3911c8bca24aa27ed90dc00b8a9a4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-10 16:12:59 -07:00
Cunyin Chang
fcc97846fa iscsi: Return check condition if the IO size exceed the maximum value.
Change-Id: Ibd36dda002559dbbf050253eb06ca24a179dbb66
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-08-10 11:32:26 -07:00
Changpeng Liu
3c5eac6bfb scsi: return correct data length of VPD page 0xB1 and 0xB2
For VPD page 0xB1 and 0xB2, the scsi target did not return correct
value to the initiator, so return the length with correct value.

Change-Id: Ic17d804ca00d490fd6a2f833db5c9b73ce8dc160
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2016-08-11 09:56:36 +08:00
Cunyin Chang
fc75d2a282 nvmf: Add nvmf controller operation structure.
Change-Id: I3f8c0cea7fbbf443b13ed336a786d0e14927131e
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-08-09 15:50:40 -07:00
Daniel Verkamp
0fc7daffe5 Replace "NVMf" with "NVMe over Fabrics" in docs
Use the final official spec name rather than a non-standard
abbreviation.

Change-Id: I4d797294be35b2fbf7b39570ea3246eb71c8d8ce
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-08 16:35:11 -07:00
Daniel Verkamp
181e568e7f iscsi: factor out epoll-based idle conn management
Change-Id: I16a2c268a646f859000eee3168656f5d39f951ad
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-08 15:53:57 -07:00
Daniel Verkamp
542664e032 iscsi: remove unused g_epoll_idle_cnt
This value was incremented and decremented, but it was never used
otherwise.

Change-Id: I6e83a504cf2ef4043363ca04b77556c612068658
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-08 15:53:57 -07:00
Daniel Verkamp
3c8183956e iscsi: use spdk_app_get_current_core() for events
Change-Id: I3758c147b9aed291ecd5a1361e20786d4d377e19
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-08 15:53:57 -07:00
Daniel Verkamp
e2d622e0aa iscsi: replace RTE_VERIFY() where possible
In files that don't otherwise use DPDK, switch to the standard C library
assert().

Change-Id: I79756908ecf9a2e141b036321e42309db30b5e0f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-08 15:53:57 -07:00
Daniel Verkamp
c320f79aa6 iscsi: replace uses of sprintf() with snprintf()
Change-Id: Iafee68ca24e330208539a4d0a61596b1dc9f6dd9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-08 15:53:57 -07:00
Daniel Verkamp
cd1377c636 iscsi: remove uses of strcpy()
Change-Id: Ia1e8c639655462d0218e7465c046cf604c1443fe
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-08 15:53:57 -07:00
Daniel Verkamp
02d42f4a69 iscsi: remove stray Doxygen file markers
Change-Id: Ia4f0b926b1e79e20a46b4c6af7cfd195e57824e3
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-08 15:53:57 -07:00
Daniel Verkamp
d96fe93bb8 iscsi: make globals static where possible
Change-Id: Ibd226babd873ad7cc10cf531abd90e3db24005b9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-08 15:53:57 -07:00
Daniel Verkamp
b8e5fbe688 iscsi: move g_flush_timeout into iSCSI globals
Change-Id: Ib77db9c4f0f1487fa8eb9e46409c7661dbb08cbc
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-08 15:53:57 -07:00
Daniel Verkamp
ab90ab3cda iscsi: split spec definitions into iscsi_spec.h
Change-Id: Ia41f2e87f8bbfbcfc93ef6f4f2fa53893511c6a4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-08 15:53:57 -07:00
Daniel Verkamp
ad6fa9f0d6 iscsi: replace printf()s with spdk/log.h calls
Change-Id: Ic2df5a410f5308bf8567058659d518052395fc36
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-08 15:53:57 -07:00
Daniel Verkamp
3c85e0a394 iscsi: add missing (void) in empty param list
Change-Id: Ia1c81e96b4109c92f50296cc29b86f38dd1e6652
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-08 15:53:57 -07:00
Daniel Verkamp
31bb40dcf9 iscsi_tgt: print net framework name during startup
Change-Id: I5ae4d6605fcc1b5777fff6a73f2edcb9851ce805
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-08 14:01:50 -07:00
Daniel Verkamp
8cbf609982 net: remove unused #defines
Change-Id: Ifd84fc620cfec6302882bc967c3c135e896c70ac
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-08 13:46:20 -07:00
gongchuang
4d01cd7d8a nvme:fixup print in hello_world (#35)
Signed-off-by: gongchuang <gong.chuang@zte.com.cn>
2016-08-08 11:29:52 -07:00
Daniel Verkamp
2c83419518 test/cunit: include stdio.h for fprintf()
Change-Id: Iabb79d8986c12b40c1dea322a319a6bee6971354
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-08 09:04:20 -07:00
Daniel Verkamp
184984603f nvmf: use Connect command SQSIZE to manage SQHD
The NVMe submission queue head wraparound point can be determined in the
generic NVMe over Fabrics layer; it should not be using the RDMA
connection queue depth.

Change-Id: I9da8f09e4f057f8fdc1ff4c6cc5f48cea7123e11
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-08 08:45:38 -07:00
Daniel Verkamp
f279de1f71 nvmf: set ASQSZ in discovery log
Report the maximum admin queue size correctly.

Change-Id: I52cad654bf59806e0abb8d869c22973647056617
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-08 08:45:38 -07:00
Daniel Verkamp
be0dae64be nvmf: simplify spdk_nvmf_rdma_conn_create()
Use the max_queue_depth parameter rather than rdma_conn->max_queue_depth
so that we can start to eliminate rdma_conn->max_queue_depth.

Change-Id: I1670c634e6d12aa004fb5a10338b7624850fbc4a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-08 08:45:38 -07:00
Ben Walker
daad9666f3 Update the changelog to prepare for the next release.
Change-Id: I0aab56c075c7d1956781380b45b36f068b0776c3
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-08-08 08:44:17 -07:00
Ben Walker
26350acc0a scsi: Fix integer size mismatch when setting lba
Change-Id: I25ce88006dbd073fb795046b80086237246a6ff5
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-08-05 16:08:01 -07:00
Ben Walker
55ec46aac6 nvmf: Free traddr/trsvc strings during config parsing
Change-Id: I10ab386a86a27e19ad571a9239039cc5a6c766f3
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-08-05 16:07:18 -07:00
Ben Walker
644b903b6c nvmf: Check callocs for failures
There were two unchecked allocations in the nvmf library. Check
for allocation failures.

Change-Id: Ic6b3104d825dba1ee6bd1748fa99e132702f300c
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-08-05 15:46:13 -07:00
Ben Walker
2cf599b378 nvmf: Make domain/bus/dev/func unsigned
This fixes a static analysis warning for unsigned/signed
mismatch.

Change-Id: I49bd8d6d195f13b402e14a85503a5de6114f5b7f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-08-05 15:44:18 -07:00
Daniel Verkamp
6697ff02f9 nvmf: test nvme cli over NVMf
Change-Id: I2d71945edc9596775092b59f70ca108c775b322e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-05 12:51:30 -07:00
Kevin Cabrera
85907e6cca addition of autorun.sh script
Change-Id: I3e38b68494ba8667e019174567405e6e5d62951b
Signed-off-by: Kevin Cabrera <kevin.a.cabrera@intel.com>
2016-08-05 12:50:36 -07:00