From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39754) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6ywA-0002jC-68 for qemu-devel@nongnu.org; Mon, 22 Jun 2015 06:26:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z6yw6-0006ot-0J for qemu-devel@nongnu.org; Mon, 22 Jun 2015 06:26:46 -0400 Received: from mail-wi0-x22d.google.com ([2a00:1450:400c:c05::22d]:34241) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6yw5-0006ol-BE for qemu-devel@nongnu.org; Mon, 22 Jun 2015 06:26:41 -0400 Received: by wicnd19 with SMTP id nd19so71951601wic.1 for ; Mon, 22 Jun 2015 03:26:40 -0700 (PDT) Date: Mon, 22 Jun 2015 11:26:38 +0100 From: Stefan Hajnoczi Message-ID: <20150622102638.GF20966@stefanha-thinkpad.redhat.com> References: <20150621112608.24532.97250.malonedeb@gac.canonical.com> <20150621112608.24532.97250.malonedeb@gac.canonical.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tmoQ0UElFV5VgXgH" Content-Disposition: inline In-Reply-To: <20150621112608.24532.97250.malonedeb@gac.canonical.com> Subject: Re: [Qemu-devel] [Bug 1467240] [NEW] 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 --tmoQ0UElFV5VgXgH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jun 21, 2015 at 11:26:08AM -0000, Jonathan Liu wrote: > Using the instructions at > http://www.contrib.andrew.cmu.edu/~somlo/OSXKVM/ for running Mac OS X > Snow Leopard under QEMU, bridged networking is broken when using QEMU > git. The result is that Mac OS X is unable to obtain an IP address using > DHCP. It works in the latest stable release - QEMU 2.3.0. >=20 > Replace "-netdev user,id=3Dhub0port0" with "-netdev > bridge,br=3Dbr0,id=3Dhub0port0" when testing bridged networking. >=20 > Bisecting the git repository shows the following bad commit: > commit a90a7425cf592a3afeff3eaf32f543b83050ee5c > Author: Fam Zheng > Date: Thu Jun 4 14:45:17 2015 +0800 >=20 > tap: Drop tap_can_send Please confirm that you are using -device e1000-82545em. Please try the following patch to gather debug output: diff --git a/hw/net/e1000.c b/hw/net/e1000.c index bab8e2a..2f68c6d 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -174,6 +174,7 @@ enum { static void e1000_link_down(E1000State *s) { + fprintf(stderr, "%s link down\n", __func__); s->mac_reg[STATUS] &=3D ~E1000_STATUS_LU; s->phy_reg[PHY_STATUS] &=3D ~MII_SR_LINK_STATUS; s->phy_reg[PHY_STATUS] &=3D ~MII_SR_AUTONEG_COMPLETE; @@ -183,6 +184,7 @@ e1000_link_down(E1000State *s) static void e1000_link_up(E1000State *s) { + fprintf(stderr, "%s link up\n", __func__); s->mac_reg[STATUS] |=3D E1000_STATUS_LU; s->phy_reg[PHY_STATUS] |=3D MII_SR_LINK_STATUS; } @@ -923,6 +925,12 @@ e1000_can_receive(NetClientState *nc) { E1000State *s =3D qemu_get_nic_opaque(nc); =20 + fprintf(stderr, "%s lu %d rctl_en %d pci_master %d has_rxbufs %d\n", + __func__, s->mac_reg[STATUS] & E1000_STATUS_LU, + s->mac_reg[RCTL] & E1000_RCTL_EN, + s->parent_obj.config[PCI_COMMAND] & PCI_COMMAND_MASTER, + e1000_has_rxbufs(s, 1)); + return (s->mac_reg[STATUS] & E1000_STATUS_LU) && (s->mac_reg[RCTL] & E1000_RCTL_EN) && (s->parent_obj.config[PCI_COMMAND] & PCI_COMMAND_MASTER) && diff --git a/net/tap.c b/net/tap.c index bd01590..07676ce 100644 --- a/net/tap.c +++ b/net/tap.c @@ -67,6 +67,8 @@ static void tap_writable(void *opaque); =20 static void tap_update_fd_handler(TAPState *s) { + fprintf(stderr, "%s read_poll %d write_poll %d enabled %d\n", + __func__, s->read_poll, s->write_poll, s->enabled); qemu_set_fd_handler(s->fd, s->read_poll && s->enabled ? tap_send : NULL, s->write_poll && s->enabled ? tap_writable : NULL, --tmoQ0UElFV5VgXgH Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVh+LeAAoJEJykq7OBq3PIM3EH/3jor99WAvb+jbXsWXIN+94+ PH3j85ixZiwJTXrFNiVoExt6TzRjCcACAoOLEwvZzshzUo/1t4G952cnQYkvbdAe 5BZsL2SKFeXbJGpWPqS3QTmKtTXSiiD0Ya09+yV328eNxCz5s7rzhhNekyYMIriJ 8b4ozgltw2RU7ycIqfM5xpn4/bBGFlEN7q7fanX/bVBoY4FdiMyh3iU1TzO/7eR/ BZvHlyb9+9MPi1czpxKiXycr7a5iPDeQnRj5oJQmVyR00gD7NhNCC5eumDK+5xUF 01GhpuZSV8+zQpFr/+PibVz6jyCKtW1SwNVeXgSBWT0JYpmT5/N6U70qhNpvy6E= =RPIm -----END PGP SIGNATURE----- --tmoQ0UElFV5VgXgH--