From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id B51452931 for ; Tue, 23 Aug 2016 16:18:43 +0200 (CEST) Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 28D937F7A7; Tue, 23 Aug 2016 14:18:43 +0000 (UTC) Received: from [10.36.4.245] (vpn1-4-245.ams2.redhat.com [10.36.4.245]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u7NEIfpY004828 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 23 Aug 2016 10:18:42 -0400 To: Yuanhan Liu , dev@dpdk.org References: <1471939839-29778-1-git-send-email-yuanhan.liu@linux.intel.com> From: Maxime Coquelin Message-ID: <7eeb0acd-e98d-1dcd-793f-0b5f4b74874c@redhat.com> Date: Tue, 23 Aug 2016 16:18:40 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1471939839-29778-1-git-send-email-yuanhan.liu@linux.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 23 Aug 2016 14:18:43 +0000 (UTC) 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: Tue, 23 Aug 2016 14:18:44 -0000 On 08/23/2016 10:10 AM, Yuanhan Liu wrote: > 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. This is indeed impressive. Somewhere else, you mention that there is a small regression with small packets. Do you have some figures to share? Also, with this feature OFF, do you see some regressions for both small and bigger packets? Thanks, Maxime > > --- > 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(-) >