vhost: avoid memory write on net header when necessary
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Fri, 14 Apr 2017 07:53:18 +0000 (15:53 +0800)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Wed, 19 Apr 2017 08:49:06 +0000 (10:49 +0200)
Like what we did for virtio PMD driver [0][1], we could also apply such
trick to vhost, to avoid the memory write on net header when necessary.

[0]: c9ea670c1dc7 ("net/virtio: fix performance regression due to TSO")
[1]: 16994abee215 ("net/virtio: optimize header reset on any layout")

With this, the cache issue of the mergeable path is again greatly reduced:
even the write of "num_buffers" could be avoided. A quick PVP test shows
the gap between the mergeable Rx and non-mergeable Rx is pretty small now:
they are basically the same in my test.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>

No differences found