vhost: avoid memory write on net header when necessary
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>