From: Stefan Hajnoczi <stefanha@gmail.com>
To: Bug 1467240 <1467240@bugs.launchpad.net>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Bug 1467240] Re: Regression - bridged networking broken for Mac OS X guest
Date: Mon, 22 Jun 2015 13:49:16 +0100 [thread overview]
Message-ID: <20150622124916.GC783@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <20150622104929.29785.71346.malone@chaenomeles.canonical.com>
[-- Attachment #1: Type: text/plain, Size: 2074 bytes --]
On Mon, Jun 22, 2015 at 10:49:29AM -0000, Jonathan Liu wrote:
> Yes, -device e1000-82545em is being used.
>
> Here is the debug output with the patch applied against QEMU git ad7020a7e7b27d468ecc2aacb04ba4eb09017074 after booting to desktop and waiting for DHCP to fallback to automatic private IP address:
> tap_update_fd_handler read_poll 1 write_poll 0 enabled 1
> e1000_can_receive lu 2 rctl_en 0 pci_master 0 has_rxbufs 0
The NIC is not ready to receive so incoming packets are queued...
> tap_update_fd_handler read_poll 0 write_poll 0 enabled 1
> tap_update_fd_handler read_poll 1 write_poll 0 enabled 1
> e1000_can_receive lu 2 rctl_en 0 pci_master 4 has_rxbufs 0
> tap_update_fd_handler read_poll 0 write_poll 0 enabled 1
> tap_update_fd_handler read_poll 1 write_poll 0 enabled 1
> e1000_can_receive lu 2 rctl_en 0 pci_master 4 has_rxbufs 0
> tap_update_fd_handler read_poll 0 write_poll 0 enabled 1
> e1000_link_down link down
> tap_update_fd_handler read_poll 1 write_poll 0 enabled 1
> e1000_can_receive lu 0 rctl_en 0 pci_master 4 has_rxbufs 0
> tap_update_fd_handler read_poll 0 write_poll 0 enabled 1
> tap_update_fd_handler read_poll 1 write_poll 0 enabled 1
> e1000_can_receive lu 0 rctl_en 0 pci_master 4 has_rxbufs 1
> tap_update_fd_handler read_poll 0 write_poll 0 enabled 1
> tap_update_fd_handler read_poll 1 write_poll 0 enabled 1
> e1000_can_receive lu 0 rctl_en 2 pci_master 4 has_rxbufs 1
Now the NIC is ready to receive packets but the link is still down.
Packets remain queued.
> tap_update_fd_handler read_poll 0 write_poll 0 enabled 1
> e1000_link_up link up
We should flush queued packets now that the link has come back up.
Please try this patch:
diff --git a/hw/net/e1000.c b/hw/net/e1000.c
index bab8e2a..ea58373 100644
--- a/hw/net/e1000.c
+++ b/hw/net/e1000.c
@@ -185,6 +185,7 @@ e1000_link_up(E1000State *s)
{
s->mac_reg[STATUS] |= E1000_STATUS_LU;
s->phy_reg[PHY_STATUS] |= MII_SR_LINK_STATUS;
+ qemu_flush_queued_packets(qemu_get_queue(s->nic));
}
static bool
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-06-22 12:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-21 11:26 [Qemu-devel] [Bug 1467240] [NEW] Regression - bridged networking broken for Mac OS X guest Jonathan Liu
2015-06-22 8:39 ` Peter Maydell
2015-06-22 10:26 ` Stefan Hajnoczi
2015-06-22 10:49 ` [Qemu-devel] [Bug 1467240] " Jonathan Liu
2015-06-22 12:49 ` Stefan Hajnoczi [this message]
2015-06-22 10:54 ` Jonathan Liu
2015-06-22 15:20 ` Jonathan Liu
2015-06-25 1:10 ` Jonathan Liu
2015-06-25 8:07 ` Stefan Hajnoczi
2018-06-08 11:31 ` Thomas Huth
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=20150622124916.GC783@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=1467240@bugs.launchpad.net \
--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).