qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Make virtio-net.c ring size configurable?


From: Mario Smarduch
Subject: Re: [Qemu-devel] Make virtio-net.c ring size configurable?
Date: Fri, 14 Feb 2014 11:34:36 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130804 Thunderbird/17.0.8

On 02/14/2014 05:43 AM, Luke Gorrie wrote:
> Howdy!
> 
> Observation: virtio-net.c hard-codes the vring size to 256 buffers.
> 
> Could this reasonably be made configurable, or would that be likely to
> cause a problem?
> 
> In Snabb Switch we are creating a 1:1 mapping between Virtio-net
> descriptors and VMDq hardware receive descriptors. The VMDq queues
> support 32768 buffers and I'd like to match this on the QEMU/Virtio-net
> side -- or at least come close.
> 
> Cheers!
> -Luke
> 
> 

For PCI that seems to be hardcoded. For 'virtio-mmio' call to get QUEUE_NUM
checks if vring.num != 0 and returns VIRTQUEUE_MAX_SIZE (1024). Later the
guest writes VIRTIO_MMIO_QUEUE_NUM this new size (early on in probe) and 
virtio_queue_set_num() adjusts the vring_desc, avail, .. values accordingly. 
The PCI variant doesn't support write to VIRTIO_PCI_QUEUE_NUM. 

You might be able to try something like that adjusting max value.

- Mario



reply via email to

[Prev in Thread] Current Thread [Next in Thread]