From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JfypJ-0006gi-Up for qemu-devel@nongnu.org; Sun, 30 Mar 2008 10:48:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JfypH-0006fc-BS for qemu-devel@nongnu.org; Sun, 30 Mar 2008 10:48:05 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JfypH-0006fV-81 for qemu-devel@nongnu.org; Sun, 30 Mar 2008 10:48:03 -0400 Received: from e34.co.us.ibm.com ([32.97.110.152]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JfypG-0001cK-P8 for qemu-devel@nongnu.org; Sun, 30 Mar 2008 10:48:03 -0400 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e34.co.us.ibm.com (8.13.8/8.13.8) with ESMTP id m2UEkQQI002279 for ; Sun, 30 Mar 2008 10:46:26 -0400 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v8.7) with ESMTP id m2UEm1uD213466 for ; Sun, 30 Mar 2008 08:48:01 -0600 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m2UElxXT031000 for ; Sun, 30 Mar 2008 08:48:00 -0600 Message-ID: <47EFA81D.90802@us.ibm.com> Date: Sun, 30 Mar 2008 09:47:57 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 4/6] virtio network driver References: <1206827760-4566-1-git-send-email-aliguori@us.ibm.com> <1206827760-4566-4-git-send-email-aliguori@us.ibm.com> <200803301127.08620.paul@codesourcery.com> In-Reply-To: <200803301127.08620.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: kvm-devel@lists.sourceforge.net, Marcelo Tosatti , qemu-devel@nongnu.org, Aurelien Jarno Paul Brook wrote: > On Saturday 29 March 2008, Anthony Liguori wrote: > >> + if ((elem = virtqueue_pop(n->rx_vq)) == NULL) { >> + /* wait until the guest adds some rx bufs */ >> + n->can_receive = 0; >> + return; >> + } >> > > 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 point > of can_receive is to workaround lack of proper TCP rate control in the slirp > code. > Yeah, I should just drop the can_receive handler. I assumed when I wrote the driver originally that can_receive queued packets. Since we have to drop packets anyway in the code now, there's no point in having a can_receive handler. Regards, Anthony Liguori > Paul >