[dpdk-dev] [PATCH v2] vhost: Only access header if offloading is supported in dequeue path

2016-10-14 Thread Maxime Coquelin
On 10/11/2016 11:01 AM, Yuanhan Liu wrote: > On Tue, Oct 11, 2016 at 09:45:27AM +0200, Maxime Coquelin wrote: >> @@ -684,12 +699,12 @@ copy_desc_to_mbuf(struct virtio_net *dev, struct >> vring_desc *descs, >>struct rte_mempool *mbuf_pool) >> { >> struct vring_desc *desc;

[dpdk-dev] [PATCH v2] vhost: Only access header if offloading is supported in dequeue path

2016-10-11 Thread Yuanhan Liu
On Tue, Oct 11, 2016 at 09:45:27AM +0200, Maxime Coquelin wrote: > @@ -684,12 +699,12 @@ copy_desc_to_mbuf(struct virtio_net *dev, struct > vring_desc *descs, > struct rte_mempool *mbuf_pool) > { > struct vring_desc *desc; > - uint64_t desc_addr; > + uint64_t

[dpdk-dev] [PATCH v2] vhost: Only access header if offloading is supported in dequeue path

2016-10-11 Thread Maxime Coquelin
If offloading features are not negotiated, parsing the virtio header is not needed. Micro-benchmark with testpmd shows that the gain is +4% with indirect descriptors, +1% when using direct descriptors. Signed-off-by: Maxime Coquelin --- Changes since v1: = - Rebased - Fix