All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mario Smarduch <m.smarduch@samsung.com>
To: Luke Gorrie <luke@snabb.co>
Cc: "snabb-devel@googlegroups.com" <snabb-devel@googlegroups.com>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Make virtio-net.c ring size configurable?
Date: Fri, 14 Feb 2014 11:34:36 -0800	[thread overview]
Message-ID: <52FE6FCC.5070802@samsung.com> (raw)
In-Reply-To: <CAA2XHbddwSHVrbiYWQJEE0OiQMxrLPsahjJHZwUP31G+N1E4ig@mail.gmail.com>

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	other threads:[~2014-02-14 19:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-14 13:43 [Qemu-devel] Make virtio-net.c ring size configurable? Luke Gorrie
2014-02-14 19:34 ` Mario Smarduch [this message]
2014-02-24 15:20 ` Stefan Hajnoczi
2014-02-24 16:14   ` [Qemu-devel] [snabb-devel] " Luke Gorrie
2014-02-27 14:17     ` Stefan Hajnoczi
2014-02-27 14:49       ` Michael S. Tsirkin
2014-02-28  8:02         ` Luke Gorrie
2014-02-24 19:16   ` Luke Gorrie
2016-05-12 17:38 ` [Qemu-devel] " xchenum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52FE6FCC.5070802@samsung.com \
    --to=m.smarduch@samsung.com \
    --cc=luke@snabb.co \
    --cc=qemu-devel@nongnu.org \
    --cc=snabb-devel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.