From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M6MPO-0007He-Os for qemu-devel@nongnu.org; Tue, 19 May 2009 06:18:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M6MPJ-0007F5-32 for qemu-devel@nongnu.org; Tue, 19 May 2009 06:18:53 -0400 Received: from [199.232.76.173] (port=45209 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M6MPI-0007Ey-SZ for qemu-devel@nongnu.org; Tue, 19 May 2009 06:18:48 -0400 Received: from mx2.redhat.com ([66.187.237.31]:54197) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M6MPI-000173-CQ for qemu-devel@nongnu.org; Tue, 19 May 2009 06:18:48 -0400 Message-ID: <4A128785.9040903@redhat.com> Date: Tue, 19 May 2009 13:18:45 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 0/13] Add generic packet buffering API References: <1242726931-5726-1-git-send-email-markmc@redhat.com> In-Reply-To: <1242726931-5726-1-git-send-email-markmc@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mark McLoughlin Cc: Anthony Liguori , qemu-devel@nongnu.org Mark McLoughlin wrote: > Hi, > This patch series works towards two[1] goals: > > 1) Merging the code in qemu-kvm which drains the tap file descriptor > when it is readable and buffers a packet if it fails to add it to > the NIC receive queue > > 2) Using the new TAP_SETSNDBUF ioctl() to put a limit on the number > of in-flight packets allowed on a tap device; in this case, if a > NIC pops a packet from its transmit queue, we need to be able to > buffer said packet if the tap queue is full > Isn't it better instead to unpop the buffer? The NIC tx ring already is a buffer, no need to add another one on top. It will need adjustments to the device models; for example we'll need virtqueue_pop_commit() after we're certain the tap had enough room for our packet and virtqueue_pop_cancel() (to unmap the buffers) if we don't. -- error compiling committee.c: too many arguments to function