Thanks Stefan. Appreciate your detailed response. Regards, Nirmal
On Fri, 27 Apr 2018, 5:52 pm Stefan Hajnoczi, <[email protected]> wrote: > On Wed, Apr 25, 2018 at 04:04:37PM +0530, Nirmalanand J wrote: > > 1) The number of descriptor count returned by the back-end through > > VIRTIO_PCI_QUEUE_NUM, is that negotiable with the backend? In some > > platforms like Google Cloud Platform (GCP) the value returned is 4096. > > VIRTIO_PCI_QUEUE_NUM is the legacy VIRTIO PCI hardware register > (called "queue_size" in 4.1.4.8 Legacy Interfaces: A Note on PCI Device > Layout). This field is read-only. > > However, in VIRTIO 1.0 the modern VIRTIO PCI queue_size field (4.1.4.3 > Common configuration structure layout) is writable during device > initialization. The driver may *reduce* the queue size. > > If you would like to use 256 descriptors instead of 4096, please make > sure your driver uses VIRTIO 1.0 (VIRTIO_F_VERSION_1) and not the legacy > interface. Then the driver can reduce the number of descriptors to 256. > > If the device does not support VIRTIO_F_VERSION_1 then you are out of > luck. > > Stefan >
