From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoyRq-0002H6-NV for qemu-devel@nongnu.org; Fri, 06 Dec 2013 11:40:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VoyRh-0004NI-Bh for qemu-devel@nongnu.org; Fri, 06 Dec 2013 11:40:14 -0500 Received: from [2a03:4000:1::4e2f:c7ac:d] (port=50487 helo=v220110690675601.yourvserver.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoyRh-0004Kx-5k for qemu-devel@nongnu.org; Fri, 06 Dec 2013 11:40:05 -0500 Message-ID: <52A1FDDF.7000801@weilnetz.de> Date: Fri, 06 Dec 2013 17:39:59 +0100 From: Stefan Weil MIME-Version: 1.0 References: <1386341073-6584-1-git-send-email-v.maffione@gmail.com> In-Reply-To: <1386341073-6584-1-git-send-email-v.maffione@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] net: QEMU_NET_PACKET_FLAG_MORE introduced List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vincenzo Maffione , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, mst@redhat.com, jasowang@redhat.com, mjt@tls.msk.ru, lcapitulino@redhat.com, peter.crosthwaite@petalogix.com, owasserm@redhat.com, kraxel@redhat.com, yan@daynix.com, edgar.iglesias@gmail.com, akong@redhat.com, quintela@redhat.com, agraf@suse.de, aliguori@amazon.com, marcel.a@redhat.com, stefanha@redhat.com, g.lettieri@iet.unipi.it, rizzo@iet.unipi.it, dmitry@daynix.com, mark.langsdorf@calxeda.com, pbonzini@redhat.com, afaerber@suse.de Am 06.12.2013 15:44, schrieb Vincenzo Maffione: > This patch extends the frontend-backend interface so that it is possible > to pass a new flag (QEMU_NET_PACKET_FLAG_MORE) when sending a packet to the > other peer. The new flag acts as a hint for the receiving peer, which can > accumulate a batch of packets before forwarding those packets (to the host > if the receiving peer is the backend or to the guest if the receiving peer > is the frontend). > > The patch also implements a batching mechanism for the netmap backend (on the > backend receive side) and for the e1000 and virtio frontends (on the frontend > transmit side). > > Measured improvement of a guest-to-guest UDP_STREAM netperf test (64 bytes > packets) with virtio-net frontends: > 820 Kpps ==> 1000 Kpps (+22%). > > Measured improvement of a guest-to-guest UDP test (64 bytes packets) with > e1000 frontends and netmap clients on the guests: > 1.8 Mpps ==> 3.1 Mpps (+72%). > > Signed-off-by: Vincenzo Maffione > --- > If this patch is wanted, I suggest replacing flag value 0 by QEMU_NET_PACKET_FLAG_NONE in all function calls. Instead of type 'unsigned' for flag values, I'd prefer an enum type (for QEMU_NET_PACKET_FLAG_NONE, QEMU_NET_PACKET_FLAG_RAW, and QEMU_NET_PACKET_FLAG_MORE). This enum can then be used in the function prototypes. I wonder why the define statement for QEMU_NET_PACKET_FLAG_MORE uses 2<<0 instead of 1<<1 or simply 2. Regards, Stefan Weil