From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jfukx-0001bu-OF for qemu-devel@nongnu.org; Sun, 30 Mar 2008 06:27:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jfuku-0001Yb-DR for qemu-devel@nongnu.org; Sun, 30 Mar 2008 06:27:18 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jfuku-0001YC-3o for qemu-devel@nongnu.org; Sun, 30 Mar 2008 06:27:16 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Jfuks-0004Oi-Te for qemu-devel@nongnu.org; Sun, 30 Mar 2008 06:27:15 -0400 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH 4/6] virtio network driver Date: Sun, 30 Mar 2008 10:27:07 +0000 References: <1206827760-4566-1-git-send-email-aliguori@us.ibm.com> <1206827760-4566-4-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1206827760-4566-4-git-send-email-aliguori@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200803301127.08620.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kvm-devel@lists.sourceforge.net, Marcelo Tosatti , Anthony Liguori , Aurelien Jarno On Saturday 29 March 2008, Anthony Liguori wrote: > + =A0 =A0if ((elem =3D virtqueue_pop(n->rx_vq)) =3D=3D NULL) { > +=A0=A0=A0=A0=A0=A0=A0/* wait until the guest adds some rx bufs */ > +=A0=A0=A0=A0=A0=A0=A0n->can_receive =3D 0; > +=A0=A0=A0=A0=A0=A0=A0return; > + =A0 =A0} Setting can_receive to zero *after* dropping a packet is a bit late. Not a fatal flaw, but it does make can_receive fairly useless. The whole po= int=20 of can_receive is to workaround lack of proper TCP rate control in the slir= p=20 code. Paul