From: Mark McLoughlin <markmc@redhat.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: Avi Kivity <avi@qumranet.com>,
Rusty Russell <rusty@rustcorp.com.au>,
kvm@vger.kernel.org
Subject: Re: [PATCH 4/5] kvm: qemu: Use vringfd to eliminate copies
Date: Tue, 17 Jun 2008 16:45:27 +0100 [thread overview]
Message-ID: <1213717527.31834.49.camel@muff> (raw)
In-Reply-To: <4857D026.1080304@us.ibm.com>
On Tue, 2008-06-17 at 09:54 -0500, Anthony Liguori wrote:
> Mark McLoughlin wrote:
> >
> > On Sat, 2008-06-14 at 18:28 -0500, Anthony Liguori wrote:
> >> We need to make some more pervasive changes to QEMU though to
> >> take advantage of vringfd upstream.
> >>
> >> Specifically, we need to introduce a RX/TX buffer adding/polling API for
> >> VLANClientState. We can then use this within a vringfd VLAN client to
> >> push the indexes to vringfd.
> >>
> >
> > I don't think I'm following you fully on this.
> >
> > The TX side is fine - guest adds buffer to ring, virtio VLANClient calls
> > ->add_tx_buffer() on every other VLANClient, waits until all are
> > finished sending and notifies the guest that we're done.
> >
> > But the RX side? The guest allocates the buffers, so does the virtio
> > VLANClient divide those buffers between every other VLANClient?
>
> This is where things get tricky. Internally, it will have to copy the
> TX buffer into each of the clients RX buffers. We need to special case
> the circumstance where the only other VLANClientState is a vringfd
> client so that we can pass the RX buffer directly to it. Haven't come
> up with a perfect API just yet but that's what we need to do.
How about if we reversed the tun recv vringfd?
i.e. rather than passing the guest's recv buffers down to the tun driver
where it copies the skbs into the buffers, have the tun driver pass the
skb buffers directly via the vringfd up to qemu where it can then pass
them to each of the other clients. The virtio client would then do copy
into the guest's buffer.
That would make the internal qemu API pretty simple and eliminate the
need for special cases.
Cheers,
Mark.
next prev parent reply other threads:[~2008-06-17 15:55 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-13 13:57 [PATCH 0/0][RFC] KVM use of vringfd Mark McLoughlin
2008-06-13 13:57 ` [PATCH 1/5] vring: Replace mmap() interface with ioctl() Mark McLoughlin
2008-06-13 13:57 ` [PATCH 2/5] lguest: Use VRINGSETINFO ioctl() instead of mmap() Mark McLoughlin
2008-06-13 13:57 ` [PATCH 3/5] kvm: qemu: Publish last_avail index in the ring Mark McLoughlin
2008-06-13 13:58 ` [PATCH 4/5] kvm: qemu: Use vringfd to eliminate copies Mark McLoughlin
2008-06-13 13:58 ` [PATCH 5/5] kvm: qemu: Add support for partial csums and GSO Mark McLoughlin
2008-06-14 23:28 ` [PATCH 4/5] kvm: qemu: Use vringfd to eliminate copies Anthony Liguori
2008-06-16 2:10 ` Rusty Russell
2008-06-16 14:02 ` Anthony Liguori
2008-06-16 14:58 ` Avi Kivity
2008-06-18 5:43 ` Rusty Russell
2008-06-18 14:01 ` Avi Kivity
2008-06-17 14:08 ` Mark McLoughlin
2008-06-17 14:54 ` Anthony Liguori
2008-06-17 15:45 ` Mark McLoughlin [this message]
2008-06-13 14:09 ` [PATCH 1/5] vring: Replace mmap() interface with ioctl() Avi Kivity
2008-06-17 12:19 ` Mark McLoughlin
2008-06-18 14:05 ` Avi Kivity
2008-06-14 9:02 ` Rusty Russell
2008-06-14 14:20 ` Avi Kivity
2008-06-14 23:23 ` Anthony Liguori
2008-06-15 15:24 ` Avi Kivity
2008-06-15 19:13 ` Anthony Liguori
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=1213717527.31834.49.camel@muff \
--to=markmc@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=avi@qumranet.com \
--cc=kvm@vger.kernel.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