From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYGAH-0005ty-Jn for qemu-devel@nongnu.org; Sat, 26 May 2012 08:32:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SYGAF-0006lc-N6 for qemu-devel@nongnu.org; Sat, 26 May 2012 08:32:13 -0400 Received: from mail-pz0-f45.google.com ([209.85.210.45]:40102) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYGAF-0006lH-Ec for qemu-devel@nongnu.org; Sat, 26 May 2012 08:32:11 -0400 Received: by dadv2 with SMTP id v2so2628765dad.4 for ; Sat, 26 May 2012 05:32:08 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20120525121308.GB4376@stefanha-thinkpad.localdomain> References: <1337943134-1107-1-git-send-email-zwu.kernel@gmail.com> <20120525121308.GB4376@stefanha-thinkpad.localdomain> Date: Sat, 26 May 2012 20:32:08 +0800 Message-ID: From: Zhi Yong Wu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v4 16/16] hub: add the support for hub own flow control List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: pbonzini@redhat.com, wuzhy@linux.vnet.ibm.com, qemu-devel@nongnu.org, kvm@vger.kernel.org, jan.kiszka@siemens.com On Fri, May 25, 2012 at 8:13 PM, Stefan Hajnoczi wrote: > On Fri, May 25, 2012 at 06:52:14PM +0800, zwu.kernel@gmail.com wrote: >> @@ -59,16 +60,16 @@ static ssize_t net_hub_receive_iov(NetHub *hub, NetH= ubPort *source_port, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = const struct iovec *iov, int iovcnt) >> =A0{ >> =A0 =A0 =A0NetHubPort *port; >> - =A0 =A0ssize_t ret =3D 0; >> + =A0 =A0ssize_t len =3D iov_size(iov, iovcnt); >> >> =A0 =A0 =A0QLIST_FOREACH(port, &hub->ports, next) { >> =A0 =A0 =A0 =A0 =A0if (port =3D=3D source_port) { >> =A0 =A0 =A0 =A0 =A0 =A0 =A0continue; >> =A0 =A0 =A0 =A0 =A0} >> >> - =A0 =A0 =A0 =A0ret =3D qemu_sendv_packet(&port->nc, iov, iovcnt); >> + =A0 =A0 =A0 =A0qemu_sendv_packet(&port->nc, iov, iovcnt); >> =A0 =A0 =A0} >> - =A0 =A0return ret; >> + =A0 =A0return len; >> =A0} > > I think this is okay because at this point we've given it our best shot: > we already checked that port peers can receive. =A0If they error out now > there's not much we can do. =A0The packet is dropped for that particular > peer but at least we tried to deliver it when they claimed to be ready. Yeah, i think that he is lack of enough understanding on net subsystem code. He can't see that his thought brought a lot of issues. > > Stefan > --=20 Regards, Zhi Yong Wu