Spdk/include/spdk_internal
Dariusz Stojaczyk 7755bed389 virtio: split device initialization to separate functions
Previously we used to manually set
vdev->max_queues and called virtio_dev_restart
to go through all virtio init states, negotiate
features and allocate virtqueues. This is,
however, insufficient for Virtio-Blk, where we
e.g. need to check against negotiated multiqueue
flag before deciding how many queues we can use
(reading num_queues field from device config is
forbidden unless VIRTIO_BLK_F_MQ is negotiated).

This patch refactors queue-num related code
and also removes various restrictions. If device
supports less queues than requested, a warning
will be printed during initialization, but
the device will now continue to init normally.

The queue-num negotiation for virtio-user should
be eventually moved to upper layers, but that is
not necessary for now.

Change-Id: I418b56fa62c17b547243422ea077f0d76555bd13
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/393087
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-12-27 15:13:03 -05:00
..
assert.h include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
bdev.h bdev: unregister all bdevs in spdk_bdev_finish() 2017-12-21 13:29:29 -05:00
copy_engine.h event/subsystem/bdev: asynchronous SPDK finish 2017-10-27 13:03:55 -04:00
event.h event/subsystem: remove unused params from g_next_subsystem->fini 2017-11-17 13:10:52 -05:00
log.h log: rename SPDK_TRACE_* to SPDK_LOG_* 2017-12-07 12:23:19 -05:00
lvolstore.h blob: spdk_bs_destroy now only zeroes the super block 2017-12-06 17:21:46 -05:00
mock.h test/mock: add pthread_self 2017-09-19 17:15:15 -04:00
virtio.h virtio: split device initialization to separate functions 2017-12-27 15:13:03 -05:00