From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49305) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z71AD-0006l6-7g for qemu-devel@nongnu.org; Mon, 22 Jun 2015 08:49:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z71A9-0001no-QS for qemu-devel@nongnu.org; Mon, 22 Jun 2015 08:49:25 -0400 Received: from mail-wi0-x22d.google.com ([2a00:1450:400c:c05::22d]:34328) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z71A9-0001ni-KW for qemu-devel@nongnu.org; Mon, 22 Jun 2015 08:49:21 -0400 Received: by wicnd19 with SMTP id nd19so75575308wic.1 for ; Mon, 22 Jun 2015 05:49:21 -0700 (PDT) Date: Mon, 22 Jun 2015 13:49:16 +0100 From: Stefan Hajnoczi Message-ID: <20150622124916.GC783@stefanha-thinkpad.redhat.com> References: <20150621112608.24532.97250.malonedeb@gac.canonical.com> <20150622104929.29785.71346.malone@chaenomeles.canonical.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FsscpQKzF/jJk6ya" Content-Disposition: inline In-Reply-To: <20150622104929.29785.71346.malone@chaenomeles.canonical.com> Subject: Re: [Qemu-devel] [Bug 1467240] Re: Regression - bridged networking broken for Mac OS X guest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bug 1467240 <1467240@bugs.launchpad.net> Cc: qemu-devel@nongnu.org --FsscpQKzF/jJk6ya Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 22, 2015 at 10:49:29AM -0000, Jonathan Liu wrote: > Yes, -device e1000-82545em is being used. >=20 > Here is the debug output with the patch applied against QEMU git ad7020a7= e7b27d468ecc2aacb04ba4eb09017074 after booting to desktop and waiting for D= HCP 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] |=3D E1000_STATUS_LU; s->phy_reg[PHY_STATUS] |=3D MII_SR_LINK_STATUS; + qemu_flush_queued_packets(qemu_get_queue(s->nic)); } =20 static bool --FsscpQKzF/jJk6ya Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJViARMAAoJEJykq7OBq3PID7cH/3ZX5ZtqPKKWQzEJ4gj10V0Z f7TwOSvsNg4cSHC+Cxw1LPTyTi8Yu5mrJjOzrlVk7LvFYM7gAq+WxtLAkIID7+Ie ul9TW8qhX7u0hVaBr70WgmLf9xh2QQVmbYd1gp3FDCO4uoZlJFqRx1K3X0czREbr 5MVrynZu3d+KEb6d9wfCHJ2Wab8pq3SPukpMAtzmNeT7UqsEQXJ5anX/t2dV1smG tH4xlTnr40iq4k4hrE7b0xIkw0AfMIJl+6LRVgElY8ALlgJoOI6Hx8lsyvflV/9C xB02Fj7Z1wLwiDMzS3gE01vO2ovj4UdvochwdHbhhhSf8kmXPmqnRUwoWMWCKmo= =GEc5 -----END PGP SIGNATURE----- --FsscpQKzF/jJk6ya--