From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4p8K-000290-4f for qemu-devel@nongnu.org; Fri, 24 Aug 2012 04:20:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4p8E-0000yL-77 for qemu-devel@nongnu.org; Fri, 24 Aug 2012 04:20:48 -0400 Received: from mail-ey0-f173.google.com ([209.85.215.173]:43679) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4p8D-0000yB-PG for qemu-devel@nongnu.org; Fri, 24 Aug 2012 04:20:41 -0400 Received: by eaac13 with SMTP id c13so489992eaa.4 for ; Fri, 24 Aug 2012 01:20:40 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <50373955.8020504@redhat.com> Date: Fri, 24 Aug 2012 10:20:37 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1345794984-10337-1-git-send-email-rongqing.li@windriver.com> <1345794984-10337-2-git-send-email-rongqing.li@windriver.com> In-Reply-To: <1345794984-10337-2-git-send-email-rongqing.li@windriver.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] hub: change hub can_receive() strategy List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: rongqing.li@windriver.com Cc: qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com Il 24/08/2012 09:56, rongqing.li@windriver.com ha scritto: > Only one hub port's peer can_receive() returns 1, the source > hub port .can_receive should return 1, to fix the below bug: > > The up state NIC can not receive any packets if guest has > more than two NICs and only one NIC is in down state. > http://lists.nongnu.org/archive/html/qemu-discuss/2012-08/msg00036.html > > This bug is introduced by 52a3cb8(add the support for hub > own flow control) and 60c07d93 (fix qemu_can_send_packet logic), > they are tried to fix that usb NIC lost packets by blocking hub > receive until all port attached this hub can receive since usb > NIC only can accept one packet at one time, their logic is wrong, > we should fix it by creating a queue for usb NIC. A link-down NIC should always return 1 from can_receive (and will drop the packet). Is that the real bug here? Paolo