7755bed389
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> |
||
---|---|---|
.. | ||
virtio_user | ||
Makefile | ||
virtio_pci.c | ||
virtio_user.c | ||
virtio.c |