Commit Graph

2946 Commits

Author SHA1 Message Date
Daniel Verkamp
a604a70edd Add CONTRIBUTING.md
This filename is recognized by GitHub:

  https://help.github.com/articles/setting-guidelines-for-repository-contributors/

Point contributors at the spdk.io development page so they can learn how
to use Gerrit.

Change-Id: I155b9437a8e3b5490bf4ce982fe47918140f5268
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/376848
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-09-05 13:25:45 -04:00
Daniel Verkamp
691912ef44 nvmf: allow user to specify NSID via conf and RPC
The nvmf library now supports the ability to assign arbitrary NSIDs,
rather than automatically assigning the next one in line.  Expose this
functionality to the user via the configuration file and RPC interfaces.

Change-Id: Ia85a9a6dfe31a2cd0605c7a6c098eec0c1b7de68
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/376463
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>
2017-09-05 13:03:09 -04:00
Daniel Verkamp
a2db49a121 nvmf: add AllowAnyHost option to subsystems
The previous behavior with an empty host NQN whitelist was to allow any
host to connect.

Change-Id: I5401e52d96642cf20afe0d50c692613e67262edf
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/376432
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>
2017-09-05 13:03:09 -04:00
Daniel Verkamp
6847a679ea nvme/rdma: add option to specify source address
Allow the user to set the source address when connecting to a NVMe-oF
controller.

Change-Id: Ice3add4b2cd3b64fdb8d0d7807d2235f90fd86b1
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/375837
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>
2017-09-05 13:02:28 -04:00
Dariusz Stojaczyk
63af5ff13b test/bdev: cleaned up / added local run_fio function
Change-Id: I7aa80792bf6d14ff8beb104bfe967482316e8c28
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/376097
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>
2017-09-05 11:29:19 -04:00
Dariusz Stojaczyk
854c2908f1 bdev_virtio: split target scan into smaller functions
In preparations to make it asynchronous.

Change-Id: Iab651974841d83cf36b8e050e3905638f88ad992
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/375729
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>
2017-09-01 18:16:46 -04:00
Dariusz Stojaczyk
50f453de07 bdev_virtio: use pointers to process target scan
Temporary patch to reduce diffs of upcoming async target scan commits.

Change-Id: Idf82296bb30b36b3625c3f43d99c46ec2e40e168
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/375728
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>
2017-09-01 18:16:46 -04:00
Dariusz Stojaczyk
c5ff3d7d26 bdev: make module init asynchronous again
bdev_virtio requires us to do SCSI inquiry for
each device and wait for a response. It currently
polls inline for this response, taking up entire
reactor exclusively. Making it async would allow
other pollers to run while bdev_virtio still has
to wait.

Change-Id: Iefc88e0a2efb5b791ffe23b2e623b7c50d759084
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/375573
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>
2017-09-01 18:16:46 -04:00
Dariusz Stojaczyk
5557843311 bdev: cleaned up module init
Removed duplicated code.

Change-Id: Id50466f97932db580f29c1ca5cc6f5a20c134707
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/375727
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>
2017-09-01 18:16:46 -04:00
Dariusz Stojaczyk
dde6213708 rte_vhost: added user callbacks for socket open/close
Added new callbacks to notify about socket connection status.
As destroy_device is used for virtqueue processing *pause* as well as
connection close, the user has no distinction between those.

Consider the following scenario:
rte_vhost: received SET_VRING_BASE message,
           calling destroy_device() as usual

user:  end-user asks to remove the device (together with socket file),
       OK, device is not *in use* - that's NOT the behavior we want
       calling rte_vhost_driver_unregister() etc.

Instead of changing new_device/destroy_device callbacks and breaking
the ABI, a set of new functions new_connection/destroy_connection
has been added.

Change-Id: I50a8ca4035045892d6c658da7df58c0c97025ec3
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/372074
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-01 15:34:24 -04:00
Ben Walker
3e084a34e1 env: Automatically register new memory with the IOMMU
If the IOMMU is enabled, automatically register memory
added by the user through spdk_mem_register().

Change-Id: Ie02c7bf445314da23e2efee9de9c187ed0773a9f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/375249
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>
2017-09-01 15:25:24 -04:00
Ben Walker
01bed940fe env: Remove old translation reference counting
Memory is now reference counted at a higher level.

Change-Id: I61b24db7b92a129686775eddbff3a48814c842fe
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/375644
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>
2017-09-01 15:25:24 -04:00
Ben Walker
3f09f0f98a env: Add unit tests for memory module
Change-Id: Iad372db86857ce92145388279e5095b17efe3983
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/375829
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>
2017-09-01 15:25:24 -04:00
Ben Walker
1d24e67d63 env: Split spdk_mem_map* functions into a separate file
This makes the separation between the vtophys map
and the generic memory map code clearer.

Change-Id: I3e8686e432a4594339008698de156d3978e9768a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/375640
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>
2017-09-01 15:25:24 -04:00
Ben Walker
5d92c3e68d env: Only notify mem maps on newly registered memory
Previously, if the user registered memory twice the
mem maps would get notified both times. Instead,
reference count the registrations.

Change-Id: I3f5cbf9e9320c2f4491ec8a5892c1f83cce41706
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/375639
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>
2017-09-01 15:25:24 -04:00
Ben Walker
382bf2e894 env: Replace asserts with error code returns in vtophys
Change-Id: Iffce947b4ccd13fd0747cdb9372fdb7587b1f5a2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/375828
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>
2017-09-01 15:25:24 -04:00
Ben Walker
fdc397bc2d env/vtophys: Break vtophys_get_paddr into two functions
This is in preparation for needing to know if the
address is in the DPDK memsegs on unregister.

Change-Id: Ie2febecae789808ae8ae63ce6889b9bbf3a72aab
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/375248
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>
2017-09-01 15:25:24 -04:00
Ben Walker
4f4bc79e98 env/vtophys: Remove duplicated code in spdk_vtophys_notify
Both the register and unregister paths did the same splitting
on 2MB boundaries, so do that first and then switch on
the action.

Change-Id: I532c42a698c2d423d3ecb48bc0d964e766cf742b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/375247
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>
2017-09-01 15:25:24 -04:00
Ben Walker
a10779ca75 env/vtophys: Add a macro for debug prints
This code can't use our standard logging mechanism, but the
if DEBUG statements were making it hard to read. Add a
basic macro to clean it up.

Change-Id: I1d5c87df60d212ffe2b2455cc2169036dcb9e807
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/375246
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>
2017-09-01 15:25:24 -04:00
Ben Walker
d9a2fd3a41 env: Remove one layer of functions in spdk_vtophys_register
spdk_vtophys_register_one and spdk_vtophys_unregister_one
were both only called from one spot and are tiny functions.
Remove the extra layer of indirection for code clarity.

Change-Id: I4cf2698d6c7df7e09bfe05d786e39e1fb063a973
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/375245
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>
2017-09-01 15:25:24 -04:00
Ben Walker
189c02996b env: Remove vtophys_get_dpdk_paddr
This function was only called from one place, so
inline it there. It's easier to follow the code
without so much jumping around.

Change-Id: I3bb11dda321af5f266d23aa32f1a79c8b361595b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/375224
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>
2017-09-01 15:25:24 -04:00
Cunyin Chang
14f45fc832 env: close all files which still opened before shutdown.
For multiple db test, there will be some files not close at the end of test,
this patch make sure to close all the files before shutdown the app.

Change-Id: Ie87d9e44b55a9192a19c35c439fbf33268f8ca4c
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/375168
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>
2017-09-01 13:34:06 -04:00
Cunyin Chang
970891ccb4 lib/rocksdb: Add support for subdirectory.
Change-Id: I280bc8f9c0c4a79d70e16231e019fba0aa445f51
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/374558
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>
2017-09-01 13:34:06 -04:00
Dariusz Stojaczyk
76bbfcbc44 bdev_virtio: set proper bdev_io status on I/O completion
Change-Id: I5d30ce273031b8025b2705c458eb4b1cc123dcb6
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/375576
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-01 13:02:28 -04:00
Daniel Verkamp
d3828a23ec scsi: remove LUN I/O channel ref counting
spdk_bdev_get_io_channel() already handles this.

Change-Id: I6b28fe10b86b00762ff15324fcd0a32aae94e012
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/376267
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>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2017-09-01 12:46:43 -04:00
Daniel Verkamp
f9958316d8 ut/scsi/lun: clean up old stubs, simplify
The SCSI LUN unit test was still stubbing spdk_spdk_get_task(), which
doesn't exist anymore.  Replace it with a unit test helper function to
initialize a task, and remove the unnecessary heap allocation by putting
the tasks on the stack.

While we're here, clarify which tests should result in the task
completion function getting called by removing the (unnecessary)
spdk_scsi_task_put() calls.

Change-Id: If2b7983a66611131e6a1547dbfed2ad869bdb6e8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/376266
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>
2017-09-01 12:46:43 -04:00
Daniel Verkamp
70c3e1f2eb reactor: add context_switch_monitor RPC
This allows the user to enable/disable getrusage() monitoring at
runtime.

Also change the log level to INFO and enable the monitoring in all
builds, not just #ifdef DEBUG.

Change-Id: I2f5c3bc8cd83dcb2a72dc7078bf2cb43aa28827c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/376473
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Cunyin Chang <cunyin.chang@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-09-01 12:46:18 -04:00
Daniel Verkamp
491a44a71c dpdk: update DPDK submodule to 9561efb
Update to include:

9561efb linuxapp/eal: fix mmap error handling in create_shared_memory

Change-Id: I05290ea4cbb7290ebd92736b5d3b203b9f40f2b1
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/376689
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-01 12:46:11 -04:00
Daniel Verkamp
7e94a4806f version: add "v" to version string
For example, VERSION_STRING will now be "SPDK v17.10-pre" instead of the
current "SPDK 17.10-pre".

This matches the release tags that we use, and it will generally be more
obvious that it's a version.

Change-Id: I0770124991b18e328f3c47f22e88798950aa8b26
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/376669
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-09-01 12:45:50 -04:00
Daniel Verkamp
90c9ad7beb doc/vagrant: formatting tweaks and typo fixes
Change-Id: I93ea23068bf558f78e9cfe26b3b42dcb5088060e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/376694
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2017-09-01 12:45:28 -04:00
Ben Walker
7c6ca97834 nvmf: Move all struct definitions to nvmf_internal.h
This is not a public API, so simplify the number
of internal header files where important types
are defined.

Change-Id: I115d0497d37e3cfe399c3a5b2546d20aa4fe24b4
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/376249
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>
2017-09-01 12:43:26 -04:00
Ben Walker
c1535ca0af nvmf: Poll groups can now span transports
We are still creating one poll group per controller,
so this isn't particularly useful just yet.

Change-Id: I65c54385bdba587d4b1098629727877970d39277
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/376241
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>
2017-09-01 12:43:26 -04:00
Dariusz Stojaczyk
e237ce317e bdev: don't continue on module init error
spdk_bdev_init_complete could have been called twice.

While here, also simplify bdev_initialize error path.
On allocation failure, bdev subsystem will now finish
with bdev_mgr->module_init_complete set to false.

Fixes: 7fefd60fab ("bdev: make module init synchronous again")

Change-Id: Ia4b5d571d26beb34f0e6c0f4c7b3176215eec69f
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/375572
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>
2017-09-01 12:36:59 -04:00
Cunyin Chang
5847d6887e nvme: update the nvme devices quirks.
Change-Id: Ie5ea2e3929a3f0ce93e9dc9760c686370777635d
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/376465
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-09-01 12:35:57 -04:00
Daniel Verkamp
376c0de84d ut/nvme: restore spdk_memzone_lookup mock value
Make sure the global spdk_memzone_lookup mock variable is set back to
NULL rather than pointing at dummy, which is a local variable.

Change-Id: I2c2d478fb5fd8cbb96983d7005e788cd88fe642f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/376684
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-08-31 19:18:40 -04:00
Dariusz Stojaczyk
1eac307937 rte_vhost: fix deadlock on rte_vhost_driver_unregister()
2 locks are executed in 2 places in opposite orders.
Consider the following scenario, threads A and B:
(A)
 * fdset_event_dispatch() start
   * pfdentry->busy = 1; (lock #1)
   * vhost_user_read_cb() start
     * vhost_destroy_device() start
(B)
 * rte_vhost_driver_unregister() start
   * pthread_mutex_lock(&vsocket->conn_mutex); (lock #2)
   * fdset_del()
     * endless loop, waiting for pfdentry->busy == 0 (lock #1)
(A)
     * vhost_destroy_device() end
     * pthread_mutex_lock(&vsocket->conn_mutex); (lock #2)
       (mutex already locked - deadlock at this point)

Thread B has locked vsocket->conn_mutex and is in while(1)
loop waiting for given fd to change it's busy flag to 0.
Thread A would have to finish vhost_user_read_cb() in order
to set busy flag back to 0, but that can't happen due to
the vsocket->conn_mutex lock.

This patch defers the fdset_del(), so that it's called outside of
vsocket->conn_mutex.

Change-Id: Ifb5d4699bdafe96a573444c11ad4eae3adc359f5
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/375910
Tested-by: SPDK Automated Test System <sys_sgsw@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>
2017-08-31 19:16:06 -04:00
Dariusz Stojaczyk
3d8dbc69c1 Revert "vhost: wrap vhost_user_read_cb with vhost_user mutex"
This reverts commit 6973898164.
This solution was incomplete, see the next patch which properly
fixes the deadlock issue.

Change-Id: Ib3cc609814276f1c48b05280379b8c2849ad831f
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/375909
Tested-by: SPDK Automated Test System <sys_sgsw@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>
2017-08-31 19:16:06 -04:00
Ziye Yang
a99dd7751f fio_plugin: Fix the performance issue on testing multiple remote nvme subsystem
The reason is that we create duplicated qpair on same subsystem many times,
thus the performance is influenced. And this patch can fix this issue.

Change-Id: I075b028b15e0d34857a89510710642f2d9520235
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/375782
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>
2017-08-31 19:08:49 -04:00
Ziye Yang
9e8853953a fio_plugin: Poll qpairs on the same thread in round-robin manner
With this change, the polling qpairs can be in round-robin manner.

Change-Id: I1926468dc596de2a43f42451525650356f44fbbd
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/375707
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>
2017-08-31 19:08:49 -04:00
Karol Latecki
bab64051de test/vhost: update filesystem integrity test
Updates for running with vhost-blk.
Removed checking & cloning Qemu sources - should be
already installed in working directory.
Some other minor fixes for typos.

Change-Id: Ifd790a301c8ca1e19434f03ba32f5eb916dbe0a6
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/373897
Tested-by: SPDK Automated Test System <sys_sgsw@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>
2017-08-31 19:02:50 -04:00
Ben Walker
de191b8fb1 doc: Move vagrant documentation to main doc/ page
This makes it easier to find from the main landing page.

Change-Id: Ic142427cede869c9cbfc6c265c8e4625731f8ce1
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/376232
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-08-31 17:15:52 -04:00
Ben Walker
735f7a5cbc doc: Add a getting started guide
This closely mirrors what is in README.md, but
makes it part of the main doc/ pages. Ultimately,
I think README.md should link here to reduce duplicated
documentation.

Change-Id: I930bada7d7c79d202b8503675511cfb824ec86e2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/376225
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-08-31 17:15:52 -04:00
GangCao
d09d382c60 nvme: update the comments of the public APIs
Change-Id: If8e3059400b3b65310fd16afeac0ef2954e783cb
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/376476
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-08-31 16:14:08 -04:00
Pawel Niedzwiecki
ced09e3eb6 ut/vhost: add UT coverage for vhost.c
Change-Id: Ie62f7684d64736fa393aaaddfc4a3232c6423c62
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/375077
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-08-31 12:31:28 -04:00
Pawel Niedzwiecki
9fdc10fc56 vhost: improve app vhost.c test coverage
Change-Id: I5e19d7ff6cc38e08fa4d7aebd5cc2a9c74fd5175
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/370952
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-08-31 12:30:51 -04:00
Ben Walker
7b3c6fbd40 nvmf: Remove connect/disconnect_cb from subsystems
The requests are now sent using spdk_thread_send_msg
internally, so the user no longer needs to supply
these callbacks.

Change-Id: I84b0f5f0f1f6fa6eaf9a717934925d3ad802fcfd
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/376240
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-08-30 15:07:22 -04:00
Ben Walker
d5ce9cff63 nvmf: Transport polling now done by poll group
Instead of polling each individual qpair, polling is now
done by poll group. This allows transports to use more
efficient polling schemes in the future.

The RDMA transport as of this patch still just loops
over each qpair in the group and polls it individually,
so this patch results in no performance change yet.

Change-Id: I0f63f0dbbc5fd43c1e0d9729b10b37c2cb0d9881
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/376239
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>
2017-08-30 15:07:22 -04:00
Ben Walker
3ee93c3293 nvmf/rdma: Poll groups can now span devices
Currently they're entirely contained within a single
spdk_nvmf_ctrlr, which won't span devices, but this
sets the stage for a more flexible library.

Change-Id: I653f3d6fe4187f4eaf18cda0a6960040ba6952d7
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/376238
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>
2017-08-30 15:07:22 -04:00
Ben Walker
0ab300f872 nvmf: Send all fabrics and admin commands to master core
This prepares us to fan out I/O qpairs to other cores

Change-Id: I3e9a60226cddf3ccd26b7ad121775ee36f07e6a9
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/375480
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>
2017-08-30 15:07:22 -04:00
Ben Walker
3c3c9da4ea nvmf: Remove g_nvmf_tgt
It isn't referenced directly anywhere but the unit tests, so
now we can remove it entirely.

Change-Id: I92bbf0e15ecffe2fbbdf5eecc29b6ef0e2fd5baf
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/375462
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>
2017-08-30 15:07:22 -04:00