From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4u7b-0002dq-NO for qemu-devel@nongnu.org; Fri, 24 Aug 2012 09:40:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4u7a-0001zM-CV for qemu-devel@nongnu.org; Fri, 24 Aug 2012 09:40:23 -0400 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:36406) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4u7a-0001c2-3n for qemu-devel@nongnu.org; Fri, 24 Aug 2012 09:40:22 -0400 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 24 Aug 2012 14:40:01 +0100 Received: from d06av12.portsmouth.uk.ibm.com (d06av12.portsmouth.uk.ibm.com [9.149.37.247]) by b06cxnps4076.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q7ODdrBB24772804 for ; Fri, 24 Aug 2012 13:39:53 GMT Received: from d06av12.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q7ODdwqF008242 for ; Fri, 24 Aug 2012 07:39:59 -0600 From: Stefan Hajnoczi Date: Fri, 24 Aug 2012 14:39:50 +0100 Message-Id: <1345815593-5555-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 0/3] net: fix hub control flow (again) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Vincent Palatin , Stefan Hajnoczi , "Roy.Li" Two networking issues have been observed: 1. When the USB network interface and dump net client are on the same "VLAN", the USB network interface drops packets. This was assumed to be because the dump net client can receive packets all the time, whereas the USB network interface has a single buffer that the guest must empty. The (incorrect) fix for #1 was to only broadcast "VLAN" packets when all net clients can receive. Once this code change was merged a new issue appeared: 2. When two NICs are on a "VLAN" they must both be up. If one NIC is not up then no traffic can flow on the "VLAN". This patch series fixes the root cause for #1, namely, that the USB network interface clobbers its input buffer when usbnet_receive() is called before the guest has a chance to empty the buffer. Then we can revert the "VLAN" flow control change which caused #2. The result is that both #1 and #2 are now fixed. Stefan Hajnoczi (3): net: clean up usbnet_receive() net: fix usbnet_receive() packet drops net: broadcast hub packets if at least one port can receive hw/usb/dev-network.c | 49 +++++++++++++++++++++++++++++++++---------------- net/hub.c | 6 +++--- 2 files changed, 36 insertions(+), 19 deletions(-) -- 1.7.10.4