]> git.ipfire.org Git - thirdparty/qemu.git/commit
net: broadcast hub packets if at least one port can receive
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Fri, 24 Aug 2012 12:50:30 +0000 (13:50 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Fri, 12 Oct 2012 02:44:18 +0000 (21:44 -0500)
commit5c8240c09ccb73e53984a2af80a6b90659e7b131
tree64cb4e38b3b44b9425c7af2899d51849b93a172c
parentd8f481188025e56c229e3fd41afa1d17f9e0cff0
net: broadcast hub packets if at least one port can receive

In commit 60c07d933c66c4b30a83b7ccbc8a0cb3df1b2d0e ("net: fix
qemu_can_send_packet logic") the "VLAN" broadcast behavior was changed
to queue packets if any net client cannot receive.  It turns out that
this was not actually the right fix and just hides the real bug that
hw/usb/dev-network.c:usbnet_receive() clobbers its receive buffer when
called multiple times in a row.  The commit also introduced a new bug
that "VLAN" packets would not be sent if one of multiple net clients was
down.

The hw/usb/dev-network.c bug has since been fixed, so this patch reverts
broadcast behavior to send packets as long as one net client can
receive.  Packets simply get queued for the net clients that are
temporarily unable to receive.

Reported-by: Roy.Li <rongqing.li@windriver.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
(cherry picked from commit 61518a74ca98870e8ff132f91dd5dda252e31f58)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
net/hub.c