From: Stefan Hajnoczi <stefanha@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel@nongnu.org, agraf@suse.de
Subject: Re: [Qemu-devel] [PATCH] tap: reset vnet header size on open
Date: Mon, 12 Nov 2012 13:23:39 +0100 [thread overview]
Message-ID: <20121112122339.GC32040@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <20121112071918.GA31752@redhat.com>
On Mon, Nov 12, 2012 at 09:19:18AM +0200, Michael S. Tsirkin wrote:
> For tap, we currently assume the vnet header size is 10
> (the default value) but that might not be the case
> if tap is persistent and has been used by qemu previously.
> To fix, set vnet header size correctly on open.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>
> This fixes the issue reported by Alexander Graf on the kvm forum.
> Alexander, could you confirm please?
> Thanks,
>
> net/tap-linux.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/net/tap-linux.c b/net/tap-linux.c
> index c6521be..3eaedc4 100644
> --- a/net/tap-linux.c
> +++ b/net/tap-linux.c
> @@ -39,6 +39,7 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required
> {
> struct ifreq ifr;
> int fd, ret;
> + int len = sizeof(struct virtio_net_hdr);
We probably want the same behavior in the tap,fd= codepath. How about a
call to tap_set_vnet_hdr_len() in net_init_tap() instead?
Stefan
prev parent reply other threads:[~2012-11-12 12:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-12 7:19 [Qemu-devel] [PATCH] tap: reset vnet header size on open Michael S. Tsirkin
2012-11-12 12:23 ` Stefan Hajnoczi [this message]
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=20121112122339.GC32040@stefanha-thinkpad.redhat.com \
--to=stefanha@redhat.com \
--cc=agraf@suse.de \
--cc=aliguori@us.ibm.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.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).