From 1074b879d1c84232177f9b4e044636639ac4c6a5 Mon Sep 17 00:00:00 2001 From: Jason Wang Date: Wed, 29 Mar 2017 10:41:23 +0800 Subject: [PATCH 1/2] virtio-net: avoid call tap_enable when there's only one queue We call tap_enable() even if for multiqueue is not enabled. This is wrong since it should be used for multiqueue codes to enable a disabled queue. Fixing this by only calling this when multiqueue is used. Fixes: 16dbaf905b72 ("tap: support enabling or disabling a queue") Reported-by: Andrew Baumann Tested-by: Andrew Baumann Cc: qemu-stable@nongnu.org Signed-off-by: Jason Wang --- hw/net/virtio-net.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index c32168077a..7d091c9259 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -510,6 +510,10 @@ static int peer_attach(VirtIONet *n, int index) return 0; } + if (n->max_queues == 1) { + return 0; + } + return tap_enable(nc->peer); } From b4053c64833762f1249b2d704d2da30b5b10c8ff Mon Sep 17 00:00:00 2001 From: Jason Wang Date: Wed, 22 Mar 2017 08:05:44 +0800 Subject: [PATCH 2/2] e1000: disable debug by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Disable debug output by default, the information were not needed for release. Cc: Peter Maydell Cc: Stefan Hajnoczi Cc: Leonid Bloch Cc: Dmitry Fleytman Cc: qemu-stable@nongnu.org Reviewed-by: Stefan Hajnoczi Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jason Wang --- hw/net/e1000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/e1000.c b/hw/net/e1000.c index 93249497f4..f2e5072d27 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -40,7 +40,7 @@ static const uint8_t bcast[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; -#define E1000_DEBUG +/* #define E1000_DEBUG */ #ifdef E1000_DEBUG enum {