[dpdk-dev] [PATCH 0/6] vhost: add Tx zero copy support

Yuanhan Liu yuanhan.liu at linux.intel.com
Tue Aug 23 16:42:11 CEST 2016


On Tue, Aug 23, 2016 at 04:18:40PM +0200, Maxime Coquelin wrote:
> 
> 
> 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?

It could be 15% drop for PVP case with 64B packet size. The test topo is:

	 nic 0 --> VM Rx --> VM Tx --> nic 0

Put simply, I run vhost-switch example in the host and run testpmd in
the guest.

Though the number looks big, I don't think it's an issue. First of all,
it's disabled by default. Secondly, if you want to enable it, you should
be certain that the packet size is normally big, otherwise, you should
not bother to try with zero copy.

> Also, with this feature OFF, do you see some regressions for both small
> and bigger packets?

Good question. I didn't check it on purpose, but I did try when it's
disabled, the number I got is pretty the same as the one I got without
this feature. So, I would say I don't see regressions. Anyway, I could
do more tests to make sure.
	
	--yliu


More information about the dev mailing list