From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id BB4A929CF for ; Wed, 12 Oct 2016 09:47:28 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP; 12 Oct 2016 00:47:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,333,1473145200"; d="scan'208";a="19199759" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga004.jf.intel.com with ESMTP; 12 Oct 2016 00:47:27 -0700 Date: Wed, 12 Oct 2016 15:48:20 +0800 From: Yuanhan Liu To: dev@dpdk.org Cc: Maxime Coquelin Message-ID: <20161012074820.GI16751@yliu-dev.sh.intel.com> References: <1475998080-4644-1-git-send-email-yuanhan.liu@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1475998080-4644-1-git-send-email-yuanhan.liu@linux.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v3 0/7] vhost: add dequeue zero copy support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Oct 2016 07:47:29 -0000 On Sun, Oct 09, 2016 at 03:27:53PM +0800, Yuanhan Liu wrote: > This patch set enables vhost dequeue zero copy. The majority work goes > to patch 4: "vhost: add dequeue zero copy". Applied to dpdk-next-virtio. --yliu > > The basic idea of dequeue zero copy is, instead of copying data from the > desc buf, here we let the mbuf reference the desc buf addr directly. > > The major issue behind that is how and when to update the used ring. > You could check the commit log of patch 4 for more details. > > Patch 5 introduces a new flag, RTE_VHOST_USER_DEQUEUE_ZERO_COPY, to enable > dequeue zero copy, which is disabled by default. > > The performance gain is quite impressive. For a simple dequeue workload > (running rxonly in vhost-pmd and runnin txonly in guest testpmd), it yields > 50+% performance boost for packet size 1500B. For VM2VM iperf test case, > it's even better: about 70% boost. > > For small packets, the performance is worse (it's expected, as the extra > overhead introduced by zero copy outweighs the benefits from saving few > bytes copy). > > v3: - rebase: mainly for removing conflicts with the Tx indirect patch > - don't update last_used_idx twice for zero-copy mode > - handle two mssiing "Tx -> dequeue" renames in log and usage > > v2: - renamed "tx zero copy" to "dequeue zero copy", to reduce confusions. > - hnadle the case that a desc buf might across 2 host phys pages > - use MAP_POPULATE to let kernel populate the page tables > - updated release note > - doc-ed the limitations for the vm2nic case > - merge 2 continuous guest phys memory region > - and few more trivial changes, please see them in the corresponding > patches > > --- > Yuanhan Liu (7): > vhost: simplify memory regions handling > vhost: get guest/host physical address mappings > vhost: introduce last avail idx for dequeue > vhost: add dequeue zero copy > vhost: add a flag to enable dequeue zero copy > examples/vhost: add an option to enable dequeue zero copy > net/vhost: add an option to enable dequeue zero copy > > doc/guides/prog_guide/vhost_lib.rst | 35 +++- > doc/guides/rel_notes/release_16_11.rst | 13 ++ > drivers/net/vhost/rte_eth_vhost.c | 13 ++ > examples/vhost/main.c | 19 +- > lib/librte_vhost/rte_virtio_net.h | 1 + > lib/librte_vhost/socket.c | 5 + > lib/librte_vhost/vhost.c | 12 ++ > lib/librte_vhost/vhost.h | 102 ++++++++--- > lib/librte_vhost/vhost_user.c | 315 ++++++++++++++++++++++----------- > lib/librte_vhost/virtio_net.c | 196 +++++++++++++++++--- > 10 files changed, 549 insertions(+), 162 deletions(-) > > -- > 1.9.0