From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id D9123388F for ; Sun, 9 Oct 2016 17:19:15 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 09 Oct 2016 08:19:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,467,1473145200"; d="scan'208";a="770600887" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by FMSMGA003.fm.intel.com with ESMTP; 09 Oct 2016 08:19:14 -0700 Date: Sun, 9 Oct 2016 23:20:10 +0800 From: Yuanhan Liu To: "Xu, Qian Q" Cc: "dev@dpdk.org" , Maxime Coquelin Message-ID: <20161009152010.GR1597@yliu-dev.sh.intel.com> References: <1471939839-29778-1-git-send-email-yuanhan.liu@linux.intel.com> <82F45D86ADE5454A95A89742C8D1410E39110B70@SHSMSX104.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <82F45D86ADE5454A95A89742C8D1410E39110B70@SHSMSX104.ccr.corp.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH 0/6] vhost: add Tx 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: Sun, 09 Oct 2016 15:19:16 -0000 On Mon, Aug 29, 2016 at 08:32:55AM +0000, Xu, Qian Q wrote: > I just ran a PVP test, nic receive packets then forwards to vhost PMD, and virtio user interface. I didn't see any performance gains in this scenario. All packet size from 64B to 1518B > performance haven't got benefit from this patchset, and in fact, the performance dropped a lot before 1280B, and similar at 1518B. 40G nic? > The TX/RX desc setting is " txd=64, rxd=128" Try it with "txd=128", you should be able to set that value since the vhost Tx indirect patch is merged. --yliu > for TX-zero-copy enabled case. For TX-zero-copy disabled case, I just ran default testpmd(txd=512, rxd=128) without the patch. > Could you help check if NIC2VM case? > > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yuanhan Liu > Sent: Tuesday, August 23, 2016 4:11 PM > To: dev@dpdk.org > Cc: Maxime Coquelin ; Yuanhan Liu > Subject: [dpdk-dev] [PATCH 0/6] vhost: add Tx zero copy support > > This patch set enables vhost Tx zero copy. The majority work goes to patch 4: vhost: add Tx zero copy. > > The basic idea of Tx 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_TX_ZERO_COPY, to enable Tx zero copy, which is disabled by default. > > Few more TODOs are left, including handling a desc buf that is across two physical pages, updating release note, etc. Those will be fixed in later version. For now, here is a simple one that hopefully it shows the idea clearly. > > I did some quick tests, the performance gain is quite impressive. > > For a simple dequeue workload (running rxonly in vhost-pmd and runnin txonly in guest testpmd), it yields 40+% performance boost for packet size 1400B. > > For VM2VM iperf test case, it's even better: about 70% boost. > > --- > Yuanhan Liu (6): > vhost: simplify memory regions handling > vhost: get guest/host physical address mappings > vhost: introduce last avail idx for Tx > vhost: add Tx zero copy > vhost: add a flag to enable Tx zero copy > examples/vhost: add an option to enable Tx zero copy > > doc/guides/prog_guide/vhost_lib.rst | 7 +- > 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 | 103 +++++++++---- > lib/librte_vhost/vhost_user.c | 297 +++++++++++++++++++++++------------- > lib/librte_vhost/virtio_net.c | 188 +++++++++++++++++++---- > 8 files changed, 472 insertions(+), 160 deletions(-) > > -- > 1.9.0