On 12/13/17 10:29, Paolo Bonzini wrote:
> On 13/12/2017 09:35, Laszlo Ersek wrote:
>> I consider the lack of a "VIRTIO_SCSI_F_MQ" feature bit an issue with
>> the virtio specification (and consequently with vhost-scsi), not with
>> the guest driver(s).
> 
> VIRTIO_SCSI_F_MQ does not exist because virtio-scsi has _always_
> supported multiqueue and has always had a "num_queues" field in the
> configuration space.  For virtio-net, VIRTIO_NET_F_MQ does not say "the
> device or driver knows about multiqueue", it says "the device or driver
> wants to read max_virtqueue_pairs" from configuration space.  It's
> perfectly fine for a device to propose VIRTIO_NET_F_MQ and set
> max_virtqueue_pairs=1, or for a driver to negotiate VIRTIO_NET_F_MQ and
> then skip initialization of some virtqueues.
> 
> This also means that Maxime's patch to DPDK is also not enough. :)
> Virtio-net actually does have a configuration mechanism for multiqueue,
> namely the VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET command; the driver sends
> that command specifying the number of the transmit and receive queues to
> use.  However, in my understanding, that command is only needed for the
> device to configure receive flow steering, so virtio-scsi doesn't need
> that either.
> 
>> Perhaps you can update vhost-scsi similarly to the last patch of
>> Maxime's v4 series, even without "VIRTIO_SCSI_F_MQ" -- in the
>> SET_FEATURES request handler, just destroy the unused virtqueues that
>> have not been configured by the guest driver until that time?
> 
> Yes, this is the right solution.  We can assume that if the descriptor
> address is equal to zero, the queue is not in use.  This is not in the
> spec as far as I can see, but it is QEMU's assumption.  I will send a
> patch to the virtio specification.

Thank you Paolo!
Laszlo
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to