From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JnTa1-0005Hu-Ok for qemu-devel@nongnu.org; Sun, 20 Apr 2008 03:03:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JnTZz-0005HG-7l for qemu-devel@nongnu.org; Sun, 20 Apr 2008 03:03:17 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JnTZz-0005HD-5I for qemu-devel@nongnu.org; Sun, 20 Apr 2008 03:03:15 -0400 Received: from mx20.gnu.org ([199.232.41.8]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JnTZy-0003WO-Di for qemu-devel@nongnu.org; Sun, 20 Apr 2008 03:03:14 -0400 Received: from fk-out-0910.google.com ([209.85.128.185]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JnTFk-0004H7-F1 for qemu-devel@nongnu.org; Sun, 20 Apr 2008 02:42:20 -0400 Received: by fk-out-0910.google.com with SMTP id 18so1641052fkq.2 for ; Sat, 19 Apr 2008 23:42:18 -0700 (PDT) Message-ID: Date: Sun, 20 Apr 2008 09:42:18 +0300 From: "Blue Swirl" Subject: Re: [kvm-devel] [Qemu-devel] [PATCH 1/5] PCI DMA API (v3) In-Reply-To: <480A4FDA.3070706@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1208297491-1287-1-git-send-email-aliguori@us.ibm.com> <4806596C.4090107@us.ibm.com> <4807ADA7.7000500@us.ibm.com> <480A4FDA.3070706@codemonkey.ws> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Anthony Liguori , kvm-devel@lists.sourceforge.net, qemu-devel@nongnu.org, Marcelo Tosatti , Paul Brook , Aurelien Jarno On 4/19/08, Anthony Liguori wrote: > Blue Swirl wrote: > > > On 4/17/08, Anthony Liguori wrote: > > > > > > > Yes, the vector version of packet receive is tough. I'll take a look > at > > > your patch. Basically, you need to associate a set of RX vectors with > each > > > VLANClientState and then when it comes time to deliver a packet to the > VLAN, > > > before calling fd_read, see if there is an RX vector available for the > > > client. > > > > > > In the case of tap, I want to optimize further and do the initial > readv() > > > to one of the clients RX buffers and then copy that RX buffer to the > rest of > > > the clients if necessary. > > > > > > > > > > The vector versions should also help SLIRP to add IP and Ethernet > > headers to the incoming packets. > > > > > > Yeah, I'm hoping that with my posted linux-aio interface, I can add vector > support since linux-aio has a proper asynchronous vector function. > > Are we happy with the DMA API? If so, we should commit it now so we can > start adding proper vector interfaces for net/block. Well, the IOVector part and bdrv_readv look OK, except for the heavy mallocing involved. I'm not so sure about the DMA side and how everything fits together for zero-copy IO. For example, do we still need explicit translation at some point?