From: Mark McLoughlin <markmc@redhat.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: kvm@vger.kernel.org, Avi Kivity <avi@qumranet.com>
Subject: Re: [PATCH 6/7] Do not modify VirtQueueElement
Date: Thu, 04 Dec 2008 12:06:37 +0000 [thread overview]
Message-ID: <1228392397.3732.71.camel@blaa> (raw)
In-Reply-To: <1228325221-18106-6-git-send-email-aliguori@us.ibm.com>
On Wed, 2008-12-03 at 11:27 -0600, Anthony Liguori wrote:
> Right now, virtio-net modifies the iovec structure in VirtQueueElement. This is
> evil. This creates an impossible situation if we want to bounce iovec buffers
> in VirtQueueElement as we lose track of the original buffers and the resulting
> free results in very bad things.
>
> I tried to refactor receive_headers() and iov_fill() to be able to skip the
> header if present but failed miserably. Instead of spending more time trying to
> get that to work, I simply decided to leave the code as-is and copy the iovec
> to a temporary buffer.
Sounds sensible to me.
We could perhaps make things a bit more clear by never using the guest
supplied header and always translating between the two header formats.
But whatever way we do it, if we want to avoid modifying the original
iovec structure, we need the temporary buffer.
Cheers,
Mark.
next prev parent reply other threads:[~2008-12-04 12:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-03 17:26 [PATCH 1/7] Fix whitespace in virtio Anthony Liguori
2008-12-03 17:26 ` [PATCH 2/7] Create virtio-blk.h header Anthony Liguori
2008-12-03 17:26 ` [PATCH 3/7] Create virtio-net.h header Anthony Liguori
2008-12-03 17:26 ` [PATCH 4/7] Move virtio_balloon_init to virtio-balloon.h Anthony Liguori
2008-12-03 17:26 ` [PATCH 5/7] Do not access virtio-rings directly Anthony Liguori
2008-12-03 17:27 ` [PATCH 6/7] Do not modify VirtQueueElement Anthony Liguori
2008-12-03 17:27 ` [PATCH 7/7] Optionally bounce the virtio buffers Anthony Liguori
2008-12-11 9:36 ` [PATCH] kvm: qemu: virtio: enable VIRTIO_ZERO_COPY Mark McLoughlin
2008-12-14 8:39 ` Avi Kivity
2008-12-04 12:06 ` Mark McLoughlin [this message]
2008-12-05 17:38 ` [PATCH 1/7] Fix whitespace in virtio Avi Kivity
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=1228392397.3732.71.camel@blaa \
--to=markmc@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=avi@qumranet.com \
--cc=kvm@vger.kernel.org \
/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).