From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKlwT-0005R7-SO for Qemu-devel@nongnu.org; Tue, 04 Mar 2014 04:47:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKlwM-0003xJ-Sl for Qemu-devel@nongnu.org; Tue, 04 Mar 2014 04:47:17 -0500 Received: from alln-iport-6.cisco.com ([173.37.142.93]:6027) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKlwM-0003xF-ML for Qemu-devel@nongnu.org; Tue, 04 Mar 2014 04:47:10 -0500 From: "Anton Ivanov (antivano)" Date: Tue, 4 Mar 2014 09:47:09 +0000 Message-ID: <5315A119.2090600@cisco.com> References: <5310489A.4060501@cisco.com> <20140303132746.GE21055@stefanha-thinkpad.redhat.com> <53148B1A.3070008@cisco.com> <20140304093614.GG25676@stefanha-thinkpad.redhat.com> In-Reply-To: <20140304093614.GG25676@stefanha-thinkpad.redhat.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-ID: <9A5D04C7B8C5324EA60129DD3583F5D5@emea.cisco.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Qemu-devel] Contribution - L2TPv3 transport List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Luigi Rizzo , "Qemu-devel@nongnu.org" , Vincenzo Maffione On 04/03/14 09:36, Stefan Hajnoczi wrote: > On Mon, Mar 03, 2014 at 02:01:00PM +0000, Anton Ivanov (antivano) wrote: >> On 03/03/14 13:27, Stefan Hajnoczi wrote: >>> On Fri, Feb 28, 2014 at 08:28:11AM +0000, Anton Ivanov (antivano) wrote= : >>>> 3. Qemu to communicate with the local host, remote vms, network device= s, >>>> etc at speeds which for a number of use cases exceed the speed of the >>>> legacy tap driver. >>> This surprises me. It's odd that tap performs significantly worse. >> >> Multipacket RX can go a very long way and it does not work on tap's >> emulation of a raw socket. At least in 3.2 :) > Luigi and Vincenzo had ideas on making QEMU's net layer support > multipacket tx using something like TCP_CORK. This would map to > sendmmsg(2). > > Basically the net client gets multiple .receive() calls but is told to > hold off on submitting the packets. Then, when it finally gets > uncorked, it can sendmmsg(2). The only issue is we need to hold on to > the tx buffers longer than normal. Cool, I will be happy to give a hand with that. My main problem so far trying to implement it has been the timers - the=20 qemu internal timer API has no relative timers, only absolute. So you=20 end up with a very high cost of setting and checking a delayed xmit timer. > >>> Now about the tap userspace ABI, is the performance bottleneck that the >>> read(2) system call only receives one packet at a time? The tap file >>> descriptor is not a socket so recvmmsg(2) cannot be used on it directly= . >> If I read the kernel source correctly the tap fd can emulate a socket >> for some calls. However, when I try recvmmsg I get an ENOTSOCKET. > The fd is not a real socket. Confusingly, inside the kernel the tun.c > driver has a "socket" which is used for zero-copy tx by vhost_net. That explains it. Otherwise I am nearly done incorporating all comments. An updated=20 version should be available some time this week. A.=