Commit Graph

1580 Commits

Author SHA1 Message Date
Dariusz Stojaczyk
67cd059c11 vhost_scsi: moved spdk_scsi_task_construct() out of spdk_vhost_get_tasks()
spdk_vhost_get_tasks() is now fully generic function for getting tasks,
which have to be specifically initialized *later*.
This allows us to remove extra loop inside spdk_vhost_get_tasks().

Change-Id: I9a9155189599cbae1b2eb94f64fba29a3e2d010b
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/366723
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-06-30 16:32:47 -04:00
Dariusz Stojaczyk
d3d4a688cd vhost_scsi: added spdk_vhost_task_init_target()
Removed get_scsi_dev and get_scsi_lun functions, moved virtio lun field
parsing into a single function.

Change-Id: I2d1588491e0aee523b053d8ea49fdc6bb7f90613
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/366721
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-06-30 16:32:47 -04:00
Dariusz Stojaczyk
62eb231574 vhost: removed task.h/task.c
Vhost scsi tasks aren't complicated enough to have their own files.
Also used spdk_ring instead of rte_membuf for task management.
This patch is a first step towards making vhost task pool
queue-specific, so that it can be single-producer, single-consumer.

Change-Id: I181417f49ccd9a5b8f53d4b96c9fefddca087692
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/366720
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-06-30 16:32:47 -04:00
Dariusz Stojaczyk
b3ecb4c45c vhost_scsi: get vhost tasks in bulks
Instead of getting tasks from mempool 1 by 1, prefetch a whole chunk.

Change-Id: I17f61e3de9b081b61af7a2a8568681aafe26ab0a
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/366719
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-06-30 16:32:47 -04:00
Dariusz Stojaczyk
475d400394 vhost: removed spdk_vhost_dev_task_ref/unref
Removed these functions in preperation to removing task.h/task.c.

Change-Id: I84b3c81505c0b8a7d08e2ca803aada1d20bc518e
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/366718
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-06-30 16:32:47 -04:00
Dariusz Stojaczyk
b93a37a8fb rte_vhost: added error log in vhost_user_set_features
Since vhost_user_set_features failure is not handled in any way, a
single error log has been added to at least to let the user know that
something has gone wrong.

Change-Id: Ifcf27320af75ba74347b742643b23e43b7c01149
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/365807
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-06-30 16:32:47 -04:00
Dariusz Stojaczyk
0c471fd668 vhost_scsi: enable VIRTIO_SCSI_F_CHANGE flag
As of virtio spec 1.0, driver must not accept flags which the device
did not offer (section 2.2). However, that flag is apparently being
accepted, causing silent exception to be triggered in rte_vhost. This
results in all negotiated features to be rejected in rte_vhost.

This patch is a workaround. Enabling that flag does not enforce us to do
any additional actions.

Change-Id: Iede0c0360de33d438f109442c7a83231e9d4479e
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/365806
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-06-30 16:32:47 -04:00
Dariusz Stojaczyk
5160ffaff5 vhost_scsi: fixed unsafe type conversion from vdev to svdev
A vhost_dev had been explicitly converted to vhost_scsi_dev in a
following manner:
vhost_dev* -> void* -> vhost_scsi_dev*

Change-Id: Idfd4307bfea7385d71e67f140554dfc2e86447b5
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/367310
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-06-30 16:32:47 -04:00
Dariusz Stojaczyk
3c497395cc vhost_scsi: implemented eventq hotremove
Implemented eventq. For now only hotremove is supported.

Change-Id: I1ec7aa2137173b5dfb30e9906dd41707e371b7a8
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/364285
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-06-30 16:32:47 -04:00
Dariusz Stojaczyk
f168e45283 vhost_scsi: renamed controlq poller to mgmt poller
Renamed it in preparation for handling eventq & hotremove in the very
same poller. It would only complicate code to handle all of these in
separate pollers.
This patch does not change any functionality on it's own.

Change-Id: I321e2ced0d6afb3ccb66a13bc25bbf42da20417b
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/367528
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-06-30 16:32:47 -04:00
Dariusz Stojaczyk
72343bcf23 scsi: added lun hotremove callback
Added optional callback inside scsi lun hotremove, so that higher-level
abstraction can be notified about hotremove.

Change-Id: I5f1bd8160e3d770a484068dd73928bc2b64c876f
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/367309
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-06-30 16:32:47 -04:00
Daniel Verkamp
a502b88da6 env_dpdk: allow spdk_mem_map_free() map to be NULL
There was already handling for a NULL map pointer pointer, but the inner
pointer wasn't checked.  Treat pointer to NULL as a no-op as well to
simplify calling code.

Change-Id: I0a213233c021957ab2f4b6c1dd304034ca98b868
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/367433
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-06-30 13:53:30 -04:00
GangCao
ec7dad7199 nvme-rdma: probe the discovery ctrlr when the subnqn is set
Change-Id: Ia15d65868773442937ce578f92b842989730804d
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/367010
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>
2017-06-30 12:46:05 -04:00
Daniel Verkamp
37a7ff0fd7 nvme: add API to convert trtype and adrfam to string
Also add adrfam to the NVMe bdev JSON config output.

Change-Id: I9472bda04947cffc0df9b02eba0035bac01b7d7b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/367292
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-06-30 12:43:18 -04:00
Pawel Wodkowski
0d7e2b6416 vhost: basic virtio block implementation
Change-Id: Ie48f4acf9aa724256f0a1f67b38c334c43b3e946
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/363090
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-06-28 21:37:56 -04:00
Changpeng Liu
c9a97addeb vhost: don't start device before got valid descriptor
For each virt queue's kickfd and callfd, there are 2 invalid
status: VIRTIO_UNINITIALIZED_EVENTFD and VIRTIO_INVALID_EVENTFD.
Don't set the virt queue to ready status until got the valid
descriptor.

This is safe for polling mode drivers in Guest OS, the backend
vhost process will not post notification to interrupt vector for
PMD mode in Guest, but the interrupt vector still valid.

Change-Id: Icdf1e67f3c4e8da221843eb1383469ca1fba485c
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/365327
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-06-28 17:56:02 -04:00
Daniel Verkamp
65bd6422ee iscsi: remove pointless assert(task != NULL)
We already dereference task in the line above, and all callers ensure
that task is not NULL already.

Change-Id: Iff23503959116083375082b1ab022a156438cc8b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/367109
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>
2017-06-27 14:01:59 -04:00
Daniel Verkamp
9b509a2944 iscsi: fix declaration after statement
Change-Id: Iee88b34165b3530c52301511ff1bd13c2680ea55
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/367123
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-06-27 13:57:06 -04:00
Daniel Verkamp
23d3f49e6c net: fix declaration after statement
Change-Id: I0302c363aac32a7d861773a14b1ba2d96979abbd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/367122
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-06-27 13:57:06 -04:00
Daniel Verkamp
4671369ab2 blobstore: fix declaration after statement
Change-Id: I1439b471b101b390fcbef558039f2a543f465acd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/367121
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>
2017-06-27 13:57:06 -04:00
Daniel Verkamp
58c2bb850c nvme: use case-sensitive comparison for NQNs
Nothing in the spec indicates that NQNs should be case insensitive, and
we have fixed this elsewhere (e.g. commit df70bc1559: "nvmf: use
case-sensitive comparison for NQNs").

Change-Id: I4a48d1c7f25ec5af9ce4d73f1bf2fa543236503a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/367106
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-06-27 13:48:42 -04:00
Ben Walker
45f7571a08 blobfs: Fix bug when reading unwritten region after truncate
If a file is extended and then the new region is immediately
read without being written, there as a math error in the
buffer cache.

Change-Id: Ibd2bbe98c734f98df43eada799ed62de4081964b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/367265
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-06-27 13:24:39 -04:00
Daniel Verkamp
763ec4c399 nvme/uevent: use env PCI addr helper functions
Change-Id: I6010465d573decd93ddf9881392b3d807cd52918
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/366663
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-06-23 11:20:05 -04:00
Daniel Verkamp
0ac06e088b env: extend PCI address domain to 32 bits
In some cases (for example, Intel VMD or Microsoft Azure), the PCI
domain may be larger than 16 bits.  Extend the domain field of struct
spdk_pci_addr to 32 bits to accomodate this.

Note that equivalent changes must be made in DPDK's struct rte_pci_addr
for larger domains to actually work.

Change-Id: I21c4666a68bc8a4aedfcc82b44042c02734246de
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/366520
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: Cunyin Chang <cunyin.chang@intel.com>
2017-06-23 11:20:05 -04:00
Jim Harris
c09bfe8965 lib/env: add spdk_unaffinitize_thread
This can be used by threads within SPDK to undo the
affinitization done either by DPDK (for DPDK lcores)
or by inheriting the parent's thread when using
pthread_create().

This will be used by the stub app to unaffinitize
the reactor core to allow the scheduler to flexibly
move it to an idle core.

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

Reviewed-on: https://review.gerrithub.io/366680
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-06-23 11:02:04 -04:00
Jim Harris
c588baab29 reactor: add pid to names for rings and mempools
This is required for using the event framework
in multi-process mode since they must be unique
across the group of processes..

Currently the stub app calls into the env layer
directly, bypassing the event framework, so this
issue would only be seen with multiple secondary
processes using the app framework.  Some future
changes will change the stub app to use the event
framework which necessitates this change immediately.

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

Reviewed-on: https://review.gerrithub.io/366647
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>
2017-06-23 11:02:04 -04:00
Ben Walker
e2a5855afd rocksdb: Add env/ as an include path
Recent versions of RocksDB have moved the env plugins
to the env/ directory from util/

Change-Id: Ie9478e871e9e656721aa963bc92183636e567f00
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/366699
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-06-22 19:50:25 -04:00
Ben Walker
e3ff3e4e59 rpc: Remove event framework and config file
All interactions with the event framework and config file
are now in the event_rpc subsystems.

Change-Id: I3f4ddb79c7ec90ccb9a5eb7b25bc9953fe3e41c8
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/366341
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-06-22 10:47:31 -04:00
Ben Walker
c224997be5 bdev: Remove direct calls to start/stop pollers
Abstract these through the bdev API to break this
dependency on the event framework.

Change-Id: I108505bf27e94b2985f53d0a4dc0b847ae264d25
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/366340
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-06-22 10:47:31 -04:00
Ben Walker
0cb7586e13 bdev: Use message passing from io_channel.h instead of events
This breaks one dependency of the bdev library on the
event framework.

Change-Id: I47ac81a3e4e951f94a66b5de2639eb485dc62e41
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/366339
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-06-22 10:47:31 -04:00
Ben Walker
4185205540 scsi: Remove cb_event. It is no longer necessary.
This is an artifact from a past design. There is no longer
any reason to create an event here - the bdev layer will
correctly queue events and call completions on the correct
thread.

Change-Id: I145dab4046899834c0449ec7380dcbb28215b493
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/364831
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-06-22 10:47:31 -04:00
Karol Latecki
293f920158 test: add vhost test plan
Change-Id: I9a38111eea5ea71f3084642f6b6fe284d981978d
Signed-off-by: Karol Latecki <karolx.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/362667
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-06-21 19:55:13 -04:00
Daniel Verkamp
2d34864a61 nvmf: stub out Abort command support
Add handling of the Abort command in virtual subsystems.  This doesn't
actually abort any requests - the spdk_nvmf_request_abort()
implementation just fails all abort requests - but at least this gives
us a place to hook up actual abort handling later.

Change-Id: Iafaa393c6f9e7f404af91747cbd81c64ab4810bb
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/365905
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-06-20 20:03:01 -04:00
Ben Walker
90779f58c7 bdev: Move event subsystem initialization to event_bdev
This breaks the dependency on the event subsystem logic.

Change-Id: Ic47a219bc1e272c3421b265f74bba959e1aa5f62
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/365730
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-06-20 16:58:35 -04:00
Ben Walker
aacd61d54a vhost: Move subsystem initialization to event_vhost
This removes one dependency on the event framework.

Change-Id: Ib9c8160b1704a15b662a35d5ad1f32c0b745485c
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/365729
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-06-20 16:58:35 -04:00
Ben Walker
c9f8765a69 scsi: Move event subsystem initialization to event_scsi
This removes the event framework dependency from the
scsi library entirely.

Change-Id: I73546d06721487f86c4c6a3be24474a5677bdb41
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/365728
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-06-20 16:58:35 -04:00
GangCao
619ab1a700 nvme: no need to send abort notification for died application
Change-Id: I7005159b2c4cc71c249cfdc4adbf8500f006fb1c
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/365646
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-06-20 15:43:21 -04:00
Dariusz Stojaczyk
bc70a4d63f vhost_scsi: properly handle requests to unsupported lun
Fixes vhost crash on null lun target.
Added extra check in vhost IO path.

Change-Id: Ia6aa29cce41c2fc74e0a8eec545e6675858a28e3
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/365196
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-by: Jim Harris <james.r.harris@intel.com>
2017-06-20 15:25:39 -04:00
Dariusz Stojaczyk
6bd3e2a0a7 vhost_scsi: do not abort on unfinished scsi tasks in destroy_device
Replaced rte_panic with SPDK_ERRLOG (for now).

Change-Id: I7ca012368ba6a49cbbf0397b3750a86da4ab776a
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/365026
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-06-20 15:25:39 -04:00
Dariusz Stojaczyk
db751c1625 Revert "vhost: Don't panic if the task count isn't 0"
This reverts commit 86f215f38d.

Change-Id: Id3d18ffb44586ac38c5bc080a0550e5825d5ef3a
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/364947
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-06-20 15:25:39 -04:00
Ben Walker
2b22e2aa7a rpc: Move module initialization to event_rpc
This removes one of the dependencies on the event framework.

Change-Id: I0b0b4dc1afc4a9cdd0679f2667b72a848bb09035
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/365727
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-06-20 13:46:37 -04:00
Ben Walker
e7485922b0 net: Move module initialization into event_net
This removes the event framework dependency from the net
library entirely.

Change-Id: I7bc1a6f146437fd3d2dab0289bbd845f0ff61ae8
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/365726
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-06-20 13:46:37 -04:00
Ben Walker
199e4862d2 iscsi: Move asynchronous subsystem init to event_iscsi
This removes a dependency on the event framework.

Change-Id: Iac8e21b76012a949115e6b793bed89cac14a236c
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/365725
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-06-20 13:46:37 -04:00
Ben Walker
4d8c07901f copy: Move asynchronous module init to event_copy
This removes the last use of the event framework from
the copy_engine library.

Change-Id: I9b8788430249766e0b3bbec591822e2c1bb77792
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/365724
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-06-20 13:46:37 -04:00
Ben Walker
65918cb8ff log: Add a print to stderr threshold
Change-Id: I9c1865ff1ca2d8093227c89aa9857ff18d3e346a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/365294
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-06-20 13:34:47 -04:00
Ben Walker
cca697b0ec log: Reduce lots of duplicated code
Use the log level enum to eliminate the variants of the log
function.

Change-Id: I5bd0e7b4f84f78dab86a5102baa6baa0808627a8
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/365293
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-06-20 13:34:47 -04:00
Daniel Verkamp
721a4d44ec bdev/nvme: generalize check for NVMe-oF TRID types
Anything that is not a PCIe TransportID is a remote NVMe over Fabrics
address and must have a subsystem NQN.

Change-Id: I1d34ce09a2c4ad7d3ec14fd90b5afccc33eb2bbf
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/365917
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>
2017-06-16 20:46:26 -04:00
Daniel Verkamp
65ff7a63d2 nvme: special case TRID comparison for PCIe
PCIe transport IDs are a non-standard extension to the NVMe-oF transport
address, and they only use the transport type and address fields of the
structure.  Add a special case so that the rest of the fields are
ignored for PCIe addresses.  All other transport types are NVMe-oF
addresses and should compare all fields.

Change-Id: I45ed143ea1712d17c6de8082677deeefd395c8a2
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/365916
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>
2017-06-16 20:46:26 -04:00
Ben Walker
235a8e377e log: Rename, document the open and close calls
Name them spdk_log_open and spdk_log_close, and give them
API documentation.

Change-Id: I6c2bbdd6a32894c1e030ec70a97dc054cd7102a9
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/365292
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-06-16 16:15:06 -04:00
Ben Walker
dda26fba8b log: Change priority to generic log level
The log priority was very syslog specific. Instead, create
a generic set of log levels as an enum.

The log level/priority isn't actually used anywhere today.

Change-Id: Iebcf6b7e1b263b56f317b86b5f2ea0d9e45170f3
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/365267
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-06-16 16:15:06 -04:00