From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33563) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6kIE-000870-MO for qemu-devel@nongnu.org; Wed, 29 Aug 2012 11:34:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T6kID-0004Jb-GD for qemu-devel@nongnu.org; Wed, 29 Aug 2012 11:34:58 -0400 Received: from mail-wi0-f175.google.com ([209.85.212.175]:58601) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6kID-0004JO-9r for qemu-devel@nongnu.org; Wed, 29 Aug 2012 11:34:57 -0400 Received: by wibhm2 with SMTP id hm2so4608222wib.10 for ; Wed, 29 Aug 2012 08:34:56 -0700 (PDT) Date: Wed, 29 Aug 2012 16:34:52 +0100 From: Stefan Hajnoczi Message-ID: <20120829153452.GA26167@stefanha-thinkpad.localdomain> References: <1345815593-5555-1-git-send-email-stefanha@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1345815593-5555-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [PATCH 0/3] net: fix hub control flow (again) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Paolo Bonzini , Vincent Palatin , qemu-devel@nongnu.org, "Roy.Li" On Fri, Aug 24, 2012 at 02:39:50PM +0100, Stefan Hajnoczi wrote: > 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 > > Applied to the net tree: https://github.com/stefanha/qemu/commits/net Stefan