LOG_DEBUG is a symbol defined by POSIX, so if sys/log.h
is included the symbols conflict.
We'll need to push this patch to upstream DPDK too.
Change-Id: Ib263731864aca4791226ea6e3abb5ddfe42e97d8
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Since we keep a copy of DPDK vhost library, the header file don't
have dependency on DPDK vhost library.
Change-Id: I14d48e10227633547231e4f429e7375ffa76128d
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
The contents of struct spdk_scsi_lun don't need to be part of the public
API.
Change-Id: I101b77871054557380610fd901ab38bada463202
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Fix up all existing spacing errors in comments and add an automated
check for patterns like /*comment*/.
Change-Id: I28f61c93612dc0f8aed66bd509da78e91ea9737e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Vhost needs to register memory given by guest in VFIO container to be
able to do any DMA using this memory.
Currently DPDK doesn't provide any interface to handle guest memory, so
for now lets find container fd in /proc/self/fd/ directory and provide
some VFIO internal API that finally should extend DPDK API.
Change-Id: Iee9d496367ccd61219068fc0eadc17e786ff0731
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
As VFIO does not work with vhost library print warning during vhost
initialization
Change-Id: Iaa31808c7007f1840a6a441e2591f0a3986b0c29
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
First step is do not destroy an existing device in
vhost_user_set_mem_table(). This is because we may
still be processing I/O via INT13 while QEMU is setting
up the mem tables for OS boot.
The primary part of this patch though is to defer
using the new mem table until after we receive the
first SET_VRING_ADDR message. SET_VRING_ADDR will be
sent by QEMU when guest OS virtio-scsi driver starts
initialization. At this point it is safe to invalidate
the old mem tables because there will be no more
INT13 I/O at this point.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I45fb5910f45e7fd2cf4a325341ad105a57d8ea40
This enables the vhost library to build on systems missing the (fairly
recent) linux/virtio_scsi.h header.
Change-Id: I680863b26961ec3cbe4ad4e575555454f6461bbf
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This patch makes create_vhost_scsi_controller check if given file is a socket before deleting it
Change-Id: I7a37c12913b461f779732e724c85e2f7b5d67442
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Change SCSI device configuration format from "DevX LUN0" to "Dev X LUN0"
This allow checking configuration against silly errors when device
number is out of range.
Also assert exactly only one LUN is given.
Change-Id: Idccd6878119282fc51947b092bdda7ae06aa94ad
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
They are not used outside of their respective files.
Change-Id: I754834e7354caec877cd2fe193e56854e5a34e20
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
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>
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