From: Anthony Liguori <anthony@codemonkey.ws>
To: Jason Wang <jasowang@redhat.com>
Cc: krkumar2@in.ibm.com, kvm@vger.kernel.org, mst@redhat.com,
netdev@vger.kernel.org, rusty@rustcorp.com.au,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC PATCH 1/2] net: Add multiqueue support
Date: Fri, 29 Apr 2011 15:07:59 -0500 [thread overview]
Message-ID: <4DBB1A9F.2050803@codemonkey.ws> (raw)
In-Reply-To: <20110420083318.32157.63955.stgit@dhcp-91-7.nay.redhat.com.englab.nay.redhat.com>
On 04/20/2011 03:33 AM, Jason Wang wrote:
> This patch adds the multiqueues support for emulated nics. Each VLANClientState
> pairs are now abstract as a queue instead of a nic, and multiple VLANClientState
> pointers were stored in the NICState and treated as the multiple queues of a
> single nic. The netdev options of qdev were now expanded to accept more than one
> netdev ids. A queue_index were also introduced to let the emulated nics know
> which queue the packet were came from or sent out. Virtio-net would be the first
> user.
>
> The legacy single queue nics can still run happily without modification as the
> the compatibility were kept.
>
> Signed-off-by: Jason Wang<jasowang@redhat.com>
> ---
> hw/qdev-properties.c | 37 ++++++++++++++++++++++++++++++-------
> hw/qdev.h | 3 ++-
> net.c | 34 ++++++++++++++++++++++++++--------
> net.h | 15 +++++++++++----
> 4 files changed, 69 insertions(+), 20 deletions(-)
>
> diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c
> index 1088a26..dd371e1 100644
> --- a/hw/qdev-properties.c
> +++ b/hw/qdev-properties.c
> @@ -384,14 +384,37 @@ PropertyInfo qdev_prop_chr = {
>
> static int parse_netdev(DeviceState *dev, Property *prop, const char *str)
> {
> - VLANClientState **ptr = qdev_get_prop_ptr(dev, prop);
> + VLANClientState ***nc = qdev_get_prop_ptr(dev, prop);
> + const char *ptr = str;
> + int i = 0;
> + size_t len = strlen(str);
> + *nc = qemu_malloc(MAX_QUEUE_NUM * sizeof(VLANClientState *));
> +
> + while (i< MAX_QUEUE_NUM&& ptr< str + len) {
> + char *name = NULL;
> + char *this = strchr(ptr, '#');
However this is being used is not going to be right. Is this taking
netdev=a#b#c#d?
I sort of agree with Michael about using multiple netdevs for this but I
don't yet understand how this gets sets up from userspace.
Can you give an example of usage that involves the full tap device setup?
Ideally, a user/management tool would never need to know about any of this.
In a perfect world, we could just dup() the tap fd a few times to create
multiple queues.
Regards,
Anthony Liguori
next prev parent reply other threads:[~2011-04-29 20:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-20 8:33 [Qemu-devel] [RFC PATCH 0/2] Multiqueue support for qemu(virtio-net) Jason Wang
2011-04-20 8:33 ` [Qemu-devel] [RFC PATCH 1/2] net: Add multiqueue support Jason Wang
2011-04-29 20:07 ` Anthony Liguori [this message]
2011-04-30 15:15 ` Jason Wang
2011-04-20 8:33 ` [Qemu-devel] [RFC PATCH 2/2] virtio-net: add " Jason Wang
2011-04-20 8:52 ` [Qemu-devel] [RFC PATCH 0/2] Multiqueue support for qemu(virtio-net) Krishna Kumar2
2011-04-21 3:33 ` Jason Wang
2011-04-29 20:10 ` Anthony Liguori
2011-04-30 14:55 ` Jason Wang
2011-04-28 3:11 ` Jason Wang
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=4DBB1A9F.2050803@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=jasowang@redhat.com \
--cc=krkumar2@in.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
--cc=rusty@rustcorp.com.au \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).