Show total accessible clusters when listing lvol stores
instead of total blocks. This is more readable for user.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I22a14f626816769cf2f494ae30cfd8ee63897771
Reviewed-on: https://review.gerrithub.io/385634
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>
During tasting, if bdev is already claimed, we send errors on screen.
This is expected behavior so we should send only debug logs.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ic5766cfa3aed88099415991998381de69ee8b8b6
Reviewed-on: https://review.gerrithub.io/384229
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Piotr Pelpliński <piotr.pelplinski@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
spdk_pci_device_claim() can be used to ensure only one process
at a time uses any given PCI device. Previously this was only
used in the bdev_nvme driver - other apps like nvme/perf do
not use spdk_pci_device_claim() and could effectively rip out
the device from a running bdev-based app like the NVMe-oF target.
So instead of modifying all of the nvme apps, put this logic into
the core nvme driver instead so that all applications get the
benefit transparently. Save the fd when the controller is constructed
and then close it when the controller is destructed to handle the
detach (including hotplug) cases.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5dc48a2e41dc06707800f15a9e1f9141477628c6
Reviewed-on: https://review.gerrithub.io/385524
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This allows users of this interface to then close the fd
when they want to release the claim.
This prepares for calling spdk_pci_device_claim() in the
nvme driver to cover not just the bdev_nvme driver but all
of our nvme example and test applications as well. We'll
want the fd returned so that we can properly close it during
detach (including hotplug) use cases.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8b149cc4e778ba31c0e7045b858c8a1561b6b7af
Reviewed-on: https://review.gerrithub.io/385523
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
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>
Modified the above files to add rpc support to update NVMe firmware. Currently,
the path parameter must be local to the RPC Server.
Change-Id: I2b14e37792a2f0a5759e8b13e21137e7f346e58e
Signed-off-by: Isaac Otsiabah <iotsiabah@us.fujitsu.com>
Reviewed-on: https://review.gerrithub.io/369083
Reviewed-by: Paul von Stamwitz <pvonstamwitz@us.fujitsu.com>
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>
As part of the SCSI target scan, request the Block Thin Provisioning VPD
page to determine if the target device supports Unmap, and report it via
the io_type_supported bdev callback.
Change-Id: Id2fdaf3a2cae72e6356a862d40ff772f9d12d144
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/384131
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
This prepares for adding more steps to the scanning phase. Each step
will put its results into the scan info struct, and the final
alloc_virtio_disk() call will copy the info to the allocated disk at the
end of each target scan.
Change-Id: I836ada42e25c817bb1998328cb592acac25be08d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/384130
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: Ic6770371d9d62cbdd40ae0612eb4f7dceccd507f
Reviewed-on: https://review.gerrithub.io/383771
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
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>
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: Ifbb02f99cd2e5752b2bc9091733b87ddadec11a4
Reviewed-on: https://review.gerrithub.io/383895
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Some devices expect alloc_len
to be the same as payload len.
Kernel vhost-scsi reports:
Expected Transfer Length: 256 does
not match SCSI CDB Length: 255 for
SAM Opcode: 0x12.
Change-Id: I499290c207b77be6757441da002f9fcc9eebcecd
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/383779
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Scan requests will be re-sent
if non-critical failure has
happened.
This is actually required, as
some Virtio SCSI devices require
a dummy request to clear it's
POWER ON OCCURED unit attention
status after Virtio device init.
The very first request might fail
with asc = 0x29 (POWER ON, RESET,
OR BUS RESET OCCURED), but
subsequent requests will be
processed correctly.
Change-Id: I809bfe7952062995078f33dccb92192d722e6574
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/383689
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>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I1df83cbd6414a1bb8f54328c735950b9476e323b
Reviewed-on: https://review.gerrithub.io/384105
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Piotr Pelpliński <piotr.pelplinski@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
First this change moves spdk_subsystem_fini() to trigger on
spdk_app_stop(). This ensures that spdk_subsystem_fini() is called
before reactors are stopped in spdk_reactors_stop().
Finish paths for subsystems, bdevs and copy engine is now
asynchronous.
Each of those three mentioned have to make sure they are
asynchronous as well.
Only bdev that currently has requirement for asynchronous finish
are logical volume.
Thus the change in vbdev_lvol.c making it move to next bdev module
only after all lvol stores were unloaded.
Fio_plugin finish of bdev and copy_engine was removed for now.
Next patch in series adds it back with async support.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I80ee2d084f3d82c50bf1329e08996604ae61b1b3
Reviewed-on: https://review.gerrithub.io/381536
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>
The *TODO* section was outdated. Most of
this README's contents have been already
moved to doc/virtio.md and doc/bdev.md.
Change-Id: I2f2108afdc543276c9f08ae053ccebdbd6b1a229
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/384054
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Inserting into g_spdk_lvol_pairs list is done in vbdev_lvs_create_cb,
at that point it is known that it can be used. Meanwhile removing
was done at start of _vbdev_lvs_remove, to prevent possibility to
access it when waiting for destruct callback to complete.
This made checking if the g_spdk_lvol_pairs list is empty unreliable
to detect if all lvs were destroyed - they could still be being
processed and callback not yet called.
This patch removes lvs from global list only after the callback of
_vbdev_lvs_remove is called.
It will be used in future patch during asynchronous
finish of vbdev module to determine when all lvs were removed.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I638fe63a80b3cf00e9773f5a8c7be315d2c05555
Reviewed-on: https://review.gerrithub.io/382986
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>
To avoid code duplication those two functions were merged.
New _vbdev_lvs_remove function deals with differences by
additional argument "destroy".
No functional difference should be observed after this patch.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I09067646ec9b9656f361077c54906a618e4e0c48
Reviewed-on: https://review.gerrithub.io/383908
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>
This patch adds new API to remove logical volume store
from device it is on. It is only used from RPC, when
user explicitly requests. It allows to use the device to
use as any other bdev.
vbdev_lvs_unload() is now only called from hotremove and
during application shutdown. Which makes it possible to
load it again during application start up.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: If6452ecc3fff99237d1704ff7cd8de4d7133221d
Reviewed-on: https://review.gerrithub.io/382021
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>
Currently deleting bdev does not support asynchronous delete
operations. Because of that results are returned before device
is actually deleted and some operation can be peformed on that
device after removal of this device started.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I305c302d8abd5d7c2c0f947fca70c58396872132
Reviewed-on: https://review.gerrithub.io/383732
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>
It used to be NULL.
Fixes: a85a4452
("bdev_virtio/rpc: add construct_virtio_user_scsi_bdev")
Change-Id: I490b41571e5667cf95b59b2e316006d1ef7381e8
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/383892
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>
Make sure the recv() can't write beyond the end of the msg buffer.
Change-Id: Ibc4bb51ac3a1c2a027a458d59356b7a5496eca7e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/383646
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Use the correct size types (rather than int) for values passed to and
returned from recv().
Change-Id: I2d38eed63e2d9c9f056d1053e156088fd361c88b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/383645
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Add a name to each lvol which is persisted as a blob
xattr. lvol names must be unique within its
lvolstore.
While here, fix a few lvol_ut issues that were caught
as part of testing the lvol unique names. Also fix
a couple of tests that registered the wrong string
name with CUnit.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I6d24d241e8f52158d14886f928d41823bbc93fa9
Reviewed-on: https://review.gerrithub.io/383567
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
There are some upcoming changes which will deprecate
the old lvsuuid_blobid name in favor of an
lvs_name/lvol_name name where these names are
user-specified.
In preparation for this change, rename the previous
lvol->name to lvol->old_name. This will allow us
to add a new lvol->name but keep the original
old_name during the transition.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I10deb219097fa8726c146ab2427ee7373933b97d
Reviewed-on: https://review.gerrithub.io/383534
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Each lvolstore now has a unique name which is persisted to
metadata. Eventually this will provide a friendlier
way to reference logical volumes, in the form
lvolstore_name/lvol_name.
This patch only covers the unique lvolstore name. An
lvolstore may not be created nor loaded if its name
conflicts with an already loaded blobstore.
Currently there is no way to rename an lvolstore to
resolve a conflict. This will be coming in the future.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I842f13b79776e5b8f81e56de10778c35328e8cd3
Reviewed-on: https://review.gerrithub.io/383533
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Fix up the two existing instances of trailing whitespace in text files,
and add a check to enforce that no new trailing whitespace is added.
Change-Id: I2197bed69bb356142aa6d2e4e8261c7434dd358b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/383291
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Replace POSIX and standard C #includes with the central SPDK stdinc.h
and remove the rte_virtio exclusion from header checking in
scripts/check_format.sh
Change-Id: Ie53d11de7cd9a51c59957e3c500bd8b9b4c4bc5e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/383003
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Remove the exclusion of the rte_virtio code from scripts/check_format.sh
since we will be maintaining this code going forward (unlike rte_vhost,
which we intend to keep up to date with upstream DPDK).
Change-Id: I30c186e566ca777dff552a36af53443d197a8824
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/383002
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
If an I/O fails during the write zeroes fallback to write on a split
I/O, the previous code would call spdk_bdev_io_complete() again on the
same I/O, causing infinite recursion.
Fix this by restoring the original user callback before completing the
I/O, as well as using _spdk_bdev_io_complete() rather than
spdk_bdev_io_complete() to avoid double-counting the statistics.
This also preserves the original bdev_io->status code set by the module,
rather than always setting it to SPDK_BDEV_IO_STATUS_FAILED.
Change-Id: Ib71fa6e54eed3d5823652971f7c439e0ff236fc1
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/383506
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
This patch introduces lvol store and lvols parameters saving
on persistent memories and loading it from saved data on app start.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ia63f0cf3d6365d59f31c5f0a1724636bfe73b5b8
Reviewed-on: https://review.gerrithub.io/375764
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>
pci_dump_json_config() is used for both legacy and modern PCI virtio
devices, so move it out of the #ifdef PCI_LEGACY_SUPPORT so it is
available when building against older DPDK versions.
Change-Id: I986f9e6a81abda64d77f954b15807d06e35d1748
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/383487
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
17.05-rc4 is the version e.g.
rte_pci_ioport_read function was
introduced in. The bdev_virtio
module previously did not compile
with older DPDK versions.
Change-Id: Ib96d5d7934166acc552515b02bfba25b71929438
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/382829
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>
if write_zeroes is not supported by the block device, we can get the
same behavior by simply writing a buffer full of zeroes to the blocks
we want to erase. I also incorporate splitting into the bdev layer to
accomodate large i/o.
Change-Id: I8fa1bfaaf22d7bfc6e3afb6e89d22fa9f7767e55
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/373829
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I3a86f28056e67b3c237441fb1048ca6ccd081ae7
Reviewed-on: https://review.gerrithub.io/383252
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>
Close and destroy lvol functions should support callback
functions so that they can be processed sequentially
and also give user result.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I9e87fb281916c65c17b2b7e54e91228844962048
Reviewed-on: https://review.gerrithub.io/383230
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>
SPDK can now be compiled without
the virtio driver.
Change-Id: I92999c871d28875d519749a73a7f2230c3881fbe
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/382828
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>
Some future patches will require specifying an lvol_store
name when calling spdk_lvs_init(). This means that passing
NULL for spdk_lvs_opts will no longer be an option. So
add an spdk_lvs_opts_init() (similar to spdk_bs_opts_init)
which will initialize a default value for the cluster size.
While here, prepend an underscore to spdk_setup_lvs_opts, since
this function is not part of the public SPDK API.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I155bcfd0c396017304bb3d58b7511ada71dade17
Reviewed-on: https://review.gerrithub.io/383030
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
We interpeted max request queue
count as number of all queues.
It did not take into account
eventq and controlq.
This patch also fixes overall
max_queues negotiation for
modern PCI devices.
Fixes 8b0a4a3 ("bdev_virtio: implement multiqueue")
Change-Id: I834cb973772ca5946ac26d18bd3eeb2783f48ea9
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/382816
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>
It was wrongly assumed that
each READ will contain at least
one iovec. This could potentially
corrupt the desc array.
Change-Id: I48ca7efbe4bea897e0ad16184452bddcf3daf49b
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/383009
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Only the initial xmit_pkt is checked
against an error, the subsequent
xmits are just asserted. As scan
messages are sent 1-by-1 if the first
request (containing 3 iovectors) has
been enqueued successfully so should
the next ones.
Change-Id: Ie102256a42ef1c67132d606af90ab96771adba10
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/382784
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>
In case of not enough free descriptors
the bdev_virtio will fail the I/O with
NOMEM status.
Change-Id: I1cb0cd5453ff70468898bc8e414b53b9c64dbe50
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/382783
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>
Previously all bdevs were using
hardcoded name Virtio0.
Change-Id: Ib990027a0edd4e200aa4b6f4689ccb9e0824a9c3
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/382926
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>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This doesn't change any behavior
as queue_idx was always either
0 or -1, but makes it clear that
this function always returns
-1 on error. This is required
by current io_channel implementation.
Change-Id: I2b613ab9ff1e48d5b4aee0cd499bbc0a04cb765c
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/382927
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>
Always start bdev pollers on the calling core.
This removes the lcore concept from the bdev poller abstraction and
simplifies the job of spdk_bdev_initialize() callers providing their own
poller and event implementations.
All callers except the NVMe bdev hotplug poller already used the current
core as the parameter. The NVMe HotplugPollCore option was undocumented
and unused in any of the tests or example configuration files, so it
should be safe to remove.
Change-Id: I93b466e1e58901b8785c40cbe296fa46c157850f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/382857
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
A single thread that initialized
bdev_virtio subsystem will be used
to poll control queues for all
virtio devices.
Every io_channel will put it's e.g.
RESET requests to the controlq MP-SC
spdk_ring. The controlq poller will
dequeue these requests and put them
into the virtio queue. The same
poller will then poll for completions
and send them to proper threads
that submitted given requests.
Change-Id: I90ae7c5d76dc89cc52ff69cf2a60e27a9314557c
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/382201
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>
Some error messages were printed
outside of the error-checking
if() condition.
Fixes: bd273d4 ("rte_vhost: replace strerror() with spdk_strerror_r()")
Change-Id: Icf965ae56ffc2e0970572308b38607ac63cdb1f2
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/382943
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>
Values from previous bdev_ios
were reused and were taken into
account e.g. in bdev_io_get_buf()
to check if a buffer is already
assigned.
Change-Id: I239aaf83a4ce8a9342c1820e3ac9e9ccf6a28336
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/382959
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>