Current UNMAP implementation supports only
up to 2^32-1 unmapped blocks per request.
Change-Id: Ib473831fa32aaba465f76694afad71137288a73a
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/377688
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>
This is required for upcoming UNMAP implementation.
Change-Id: I81fb744e0813121cebd64aa60a03a80bfbecc94d
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/377421
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>
This is required for upcoming UNMAP
implementation in bdev_virtio.
While here, also added documentation for
spdk_bdev_io_get_buf().
Change-Id: Ia769ee9b8b132f31208ae66598b29a1c9ed37312
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/379721
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>
spdk_bdev_unmap_blocks() accepts a 64-bit number of blocks, which can
exceed the NVMe Dataset Management range's 32-bit number of blocks,
which can represent up to 2 TB with 512-byte blocks.
We can support up to 0.5 PB unmap requests by using the maximum number
of descriptors in a single Dataset Management command, which should be
sufficient for now.
Change-Id: I0a4ee77a9be148355991e1a081007ffa020a3ee5
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/379202
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This patch adds hotremove support of lvol base bdev
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I04dc7a0cc73fd6959824873f354d5c7db8c09a9b
Reviewed-on: https://review.gerrithub.io/379348
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
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 is in preparation for enabling hot remove of logical volumes when
their underlying blobstore device is hot-removed.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I310a3f64f0de5d628609c20a1a3b4d38df0755aa
Reviewed-on: https://review.gerrithub.io/377041
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Previously incorrectly it was assumed that cluster size
was always to be 1MiB. For most evident example of this
please see spdk_lvol_create() sz > free_clusters comparison.
This is now fixed and lvol->sz was changed to lvol->cluster_num.
It was done to increase readability - only dealing with
number of clusters when creating or resizing lvol.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: If8cdbad18978319e57b6952dbf5a55d56785f108
Reviewed-on: https://review.gerrithub.io/380467
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>
This patch allows unmap bdev_io to
be used with spdk_bdev_io_get_buf.
bdev_io->iovs/iovcnt has been zeroed-out for other
I/O types to overwrite any previous values/pointers.
Change-Id: I570a4d82d9e4db6630a6831b1aab3259fb46cdd8
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/377687
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>
Now bs_dev is destroyed only in two instances:
- within spdk_bs_init() on failure path
- vbdev_lvs_create() if spdk_lvs_init() errors out,
before even calling spdk_bs_init()
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I7b8af39fbe83907b0c47797f0f55ca3b941729d9
Reviewed-on: https://review.gerrithub.io/379848
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Change-Id: Ic094c34f1dc9063f12df80d77b2c70ebae9a4977
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/380066
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I46d564523ea20bc7c79a3896dfb024d3d5172a93
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/379911
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Until now we queued all IO to hardcoded
SCSI target 0.
Change-Id: Iefb229899725f53f26e927c4fb23e8d1d613c187
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/379840
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>
bdev_module_init_done could be called
multiple times when more than device
is available.
Change-Id: I17ee63a818945359648953c4f8f67678d10e8907
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/379864
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>
Added new struct virtio_driver together
with it's global instance. The struct should
keep all bdev_virtio related information.
Change-Id: If78967c68c4131c89cd86cb4b46f5f0194bca323
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/379863
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>
A mid-step towards porting virtio_pci to
use SPDK env/pci layer. See the next patch
for details.
Change-Id: Ia7cb417415bce686c3a888f949853834ddf6c7a6
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/379488
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>
SPDK env/pci layer does not provide equivalent
call to actually map all pci resources. This
patch will smooth future transition of rte_virtio
to SPDK.
Change-Id: I7a67c46a99824be83875385703dd6bbf0ec9645e
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/380001
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>
Fixed memleak on vbdev_gpt_read_gpt failure.
gpt_base->ch was never freed.
Change-Id: I97f6e433b26ab95253eac4753b68083f3433547b
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/377913
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>
Change-Id: Iad98baef576fe3d843967d0c02e9922dfc347830
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/378675
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>
This code was still using an old paradigm of returning the
number of bytes associated with a successful submission.
Just return 0 on success instead - if caller needs the
number of bytes for some reason they have the information
to get it.
While here, return an appropriate negated errno where possible -
we especially want ENOMEM returned when an ioat channel runs out
of descriptors.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5858ccd6cff916b6c80fda7d2c9fce96fb39ef89
Reviewed-on: https://review.gerrithub.io/378858
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Some of the internal functions used to return the
number of bytes associated with a successfully submitted
IO, but that was changed a while ago to just return 0
for success.
So change some of the callers of these functions to
just look for != 0 for failure rather than < 0. This
preps for some upcoming ENOMEM handling changes.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I0a66dd6bfac9053e0fd6103dee1ea36b20d902df
Reviewed-on: https://review.gerrithub.io/378856
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I374910a7d5ecf0125228d0c99ab523804956ca78
Reviewed-on: https://review.gerrithub.io/378852
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This patch introduces per-channel flags to keep state of information
needed in the primary I/O path. Setting/clearing of these flags
should only done through an spdk_for_each_channel() call. Currently
there is only a RESET_IN_PROGRESS flag defined but more may be added
in the future.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia81817e2dabc9997c12beebae72fb129cb5dcf9a
Reviewed-on: https://review.gerrithub.io/377828
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This was removed in NVMe 1.2.1 ECN 002.
Change-Id: Icacd53c1f33043cf1c9f30bff1fb9dce1efa69b3
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/378681
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>
It does not seem nessecary to include it, when this it used just once
in lvol disk creation.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I42ead55329f0ac7e55bb73702d071f118a5c7931
Reviewed-on: https://review.gerrithub.io/379678
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>
To increase readability, union in spdk_lvol_store_req is now split
into four separate structures.
As well spdk_bdev from lvs_basic/spdk_lvs_req was removed as it was
not needed.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I65c5155f3d15151a97cf8f8e425b26aa1966b677
Reviewed-on: https://review.gerrithub.io/379169
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
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>
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ife45dc8e27d767b9f09b67e7fae3b94837a14491
Reviewed-on: https://review.gerrithub.io/379458
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Now that the bdev_io read and write branches of the union have been
unified, the virtio-scsi bdev I/O code can be simplified a little bit.
Change-Id: Iadbe55862770a1b0e7f854b724a70d94c704218e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/379696
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Previously, we naively assumed that a completed
reset was the reset in progress, and would
unilaterally set reset_in_progres to false.
So change reset_in_progress to a bdev_io pointer
instead. If this is not NULL, a reset is not in
progress. Then when a reset completes, we only
set the reset_in_progress pointer to NULL if we
are completing the reset that is in progress.
We also were not aborting queued resets when
destroying a channel so that is fixed here too.
The added unit test covers both fixes above - it will
submit two resets on a different channels, then destroy
the second channel. This will abort the second reset
and check that the bdev still sees the first reset as in
progress.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I61df677cfa272c589ca03cb81753f71b0807a182
Reviewed-on: https://review.gerrithub.io/378199
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Upper layers are not supposed to put an I/O channel if there
are still I/O outstanding. This should apply to resets as well.
To better detect this case, do not remove the reset from
the channel's queued_reset list until it is ready to be
submitted to the bdev module. This ensures:
1) We can detect if a channel is put with a reset outstanding.
2) We do not access freed memory, when the channel is destroyed
before the reset message can submit the reset I/O.
3) Abort the queued reset if a channel is destroyed.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I0c03eee8b3642155c19c2996e25955baac22d406
Reviewed-on: https://review.gerrithub.io/378198
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This provides an alternate path for submitting
resets to a bdev module, in preparation for some
future patches where we will want to avoid
reset-specific checks in the main I/O submission
path.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I833c01cc33940771b4265f963cfb9de61c5f1faf
Reviewed-on: https://review.gerrithub.io/378670
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
We will use this typedef for some additional use
cases where are not specific to the need_buf
functionality.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8d18c7ac037ab4b0ba612f308b9ca38538d112b1
Reviewed-on: https://review.gerrithub.io/378197
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Since all direct bdev_io types have the same layout,
there is no need to keep them differentiated.
Change-Id: If8bb85e43c9922c0ebfc39837e3a45006e508b56
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/377686
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Added READ CAPACITY (10) support.
This is a work towards supporting both (10) and
(16)-bit SCSI commands.
If READ CAPACITY (10) returns 0xFFFFFFFF as max lba,
a READ CAPACITY (16) is sent.
As specified in SBC-3 5.10.2 READ CAPACITY (10):
```
If the number of logical blocks exceeds the maximum value that is able
to be specified in the RETURNED LOGICAL BLOCK ADDRESS field, the device
server shall set the RETURNED LOGICAL BLOCK ADDRESS field to FFFFFFFFh.
The application client should then issue a READ CAPACITY (16) command
(see 3.27) to retrieve the READ CAPACITY (16) parameter data.
```
Change-Id: If82bc45e904e91d95b124724e895350098337ae9
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/377091
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Added separate function for allocating virtio_scsi_disk.
This is required for the upcoming 10-bit SCSI command
support changes.
Change-Id: Ib60bfe003f37d796387944b04494baf2a77a6558
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/379422
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>
This patch also sets virtio_dev->modern for vhost-user
devices.
A word of explanation of what's happening now:
For virtio_pci, dev->modern is set when reading config,
as legacy devices have no Virtio PCI Capability in their
capability list. For virtio_user, the dev->modern should
be set if VIRTIO_F_VERSION_1 feature has been negotiated.
Change-Id: I056b1dcf65a5a6a87cda6499771399befdc59cb5
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/377090
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Moved negotiation to virtio_init_device.
This patch also cleans up feature negotiation a bit.
Change-Id: Ia67e8d694a5acebcbe37679a657d68d6c46979db
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/377089
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I9e550a879b50af0de476583f5efd4e0518667662
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/379213
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>
This restriction causes bdevs examination/discovery to fail
when there are asynchronous operations. We should remove this
limitation for now. Future plan is to implement approach
similar to the one that is present in kernel.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ibe5572297672022412d25a4a835dc9527ce97f3e
Reviewed-on: https://review.gerrithub.io/378758
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This patch shows UUID and base bdev for logical volume stores
when get_lvol_stores() RPC is called.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Idbd0bc6c4a0334e5af8d4a674a203ddb2270f3e4
Reviewed-on: https://review.gerrithub.io/374604
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Previously virtio_hw was managing both VirtIO PCI and
vhost-user devices. Now's there virtio_dev, a common
part for both backends. virtio_hw is only used for PCI.
Note that this patch does not introduce another
abstraction layer. It only unifies an already existing
one. Previously virtio_user_dev was built on top of
virtio_hw, with most PCI fields just hanging there
unused. Now both, virtio_user_dev and virtio_hw are
built on top of virtio_dev.
Change-Id: Ida25defc0063055a81cf4039c9b85470b9880bc3
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/376966
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>
This patch removes unnecessary if (hw->virtio_user_dev)
conditions. It also makes vq_ring_mem explicitly
a physical address. There's already a separate
vq_ring_virt_mem field that's used for vhost-user.
Change-Id: Ie8d97458744b4e3ae9d0e3d72b28d29f19179706
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/376965
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>
All rte_virtio filenames have virtio_ prefix now.
Change-Id: I42018624606d68997a0e982e7b622d6a23e3c190
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/376624
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>
Change-Id: Ia96ae78ff9530d953181ac5f7255a38f3c8ec430
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Reviewed-on: https://review.gerrithub.io/375392
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>
Fixes: 5f6306ea24 ("bdev/gpt: free base bdev_part in gpt after
examining")
Change-Id: Ia9cd64127f435b1b40f6a34b6e5166b329924ed6
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/378652
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This patch also fixes segfault on startup when using
a PCI device as a DPDK secondary process.
Change-Id: I93116ae207649fae2fb3461d32d04a98cecb4cf6
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/376622
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>
Don't allow enqueueing a request when not
enough free descriptors are available.
While here, also clarify some other
vq_desc_tail_idx code.
Change-Id: Ibcec2e31b2f609f2fd71f2426ce1a91728ed82f6
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/378154
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>
This was broken by commit 157969b60e.
However, this change doesn't fix any errors.
Neither vq->vq_free_cnt nor dxp->ndescs are used at the moment,
but this will change with future patches.
Fixes: 157969b60e ("bdev_virtio: added virtio_scsi_io_ctx")
Change-Id: I215d437c52f7060bf631bd193e7e59e2a4710368
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/378116
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>