From: Avi Kivity <avi@redhat.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-devel <qemu-devel@nongnu.org>, KVM list <kvm@vger.kernel.org>
Subject: [Qemu-devel] Re: persistent tun & different virtual NICs & dead guest network
Date: Sun, 05 Apr 2009 15:12:04 +0300 [thread overview]
Message-ID: <49D8A014.7010802@redhat.com> (raw)
In-Reply-To: <49D89CF8.8040200@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 349 bytes --]
Avi Kivity wrote:
>> I think all the settings should be reset to 0
>> when opening the tun device.
>
> This should definitely be fixed. I'll look at writing a patch.
>
Okay, that's not in upstream qemu, so I committed a fix to
kvm-userspace.git.
Attached if you want to test it.
--
error compiling committee.c: too many arguments to function
[-- Attachment #2: 0001-kvm-qemu-clear-tap-features-on-initialization.patch --]
[-- Type: text/x-patch, Size: 926 bytes --]
>From 25971710409c374e9486c960c297f324a9164a65 Mon Sep 17 00:00:00 2001
From: Avi Kivity <avi@redhat.com>
Date: Sun, 5 Apr 2009 15:08:55 +0300
Subject: [PATCH] kvm: qemu: clear tap features on initialization
tap features change how tap interprets data, so they must be cleared on
initialization to prevent old settings from interfering with new guest
instances.
Signed-off-by: Avi Kivity <avi@redhat.com>
---
qemu/net.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/qemu/net.c b/qemu/net.c
index d753fa0..703d01c 100644
--- a/qemu/net.c
+++ b/qemu/net.c
@@ -930,6 +930,7 @@ static TAPState *net_tap_fd_init(VLANState *vlan,
#endif
#ifdef TUNSETOFFLOAD
s->vc->set_offload = tap_set_offload;
+ tap_set_offload(s->vc, 0, 0, 0, 0);
#endif
qemu_set_fd_handler2(s->fd, tap_can_send, tap_send, NULL, s);
snprintf(s->vc->info_str, sizeof(s->vc->info_str), "fd=%d", fd);
--
1.6.0.6
next prev parent reply other threads:[~2009-04-05 12:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <49D735D6.3070803@msgid.tls.msk.ru>
2009-04-05 11:58 ` [Qemu-devel] Re: persistent tun & different virtual NICs & dead guest network Avi Kivity
2009-04-05 12:12 ` Avi Kivity [this message]
2009-07-09 18:13 ` Michael S. Tsirkin
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=49D8A014.7010802@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mjt@tls.msk.ru \
--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).