qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Bug 1467240] Re: Regression - bridged networking broke


From: Stefan Hajnoczi
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
User-agent: Mutt/1.5.23 (2014-03-12)

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: pgpv35rZvCrJx.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]