Spdk/lib/bdev/virtio
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
..
bdev_virtio_rpc.c virtio/rpc: fix construct_virtio_user_scsi_bdev 2017-12-08 12:17:19 -05:00
bdev_virtio_scsi.c virtio: split device initialization to separate functions 2017-12-27 15:13:03 -05:00
bdev_virtio.h bdev/virtio: cleanup public API 2017-12-05 23:06:38 -05:00
Makefile bdev/virtio: add "scsi" keyword to filenames 2017-12-27 15:13:03 -05:00