[dpdk-dev] [PATCH v2 4/7] vhost: do not use rte_memcpy for virtio_hdr copy

2016-03-07 Thread Yuanhan Liu
On Sun, Mar 06, 2016 at 08:20:00PM -0800, Stephen Hemminger wrote: > On Thu, 18 Feb 2016 21:49:09 +0800 > Yuanhan Liu wrote: > > > +static inline void > > +copy_virtio_net_hdr(struct vhost_virtqueue *vq, uint64_t desc_addr, > > + struct virtio_net_hdr_mrg_rxbuf hdr) > > +{ > > + i

[dpdk-dev] [PATCH v2 4/7] vhost: do not use rte_memcpy for virtio_hdr copy

2016-03-07 Thread Xie, Huawei
On 3/7/2016 12:20 PM, Stephen Hemminger wrote: > On Thu, 18 Feb 2016 21:49:09 +0800 > Yuanhan Liu wrote: > >> +static inline void >> +copy_virtio_net_hdr(struct vhost_virtqueue *vq, uint64_t desc_addr, >> +struct virtio_net_hdr_mrg_rxbuf hdr) >> +{ >> +if (vq->vhost_hlen == siz

[dpdk-dev] [PATCH v2 4/7] vhost: do not use rte_memcpy for virtio_hdr copy

2016-03-07 Thread Xie, Huawei
On 2/18/2016 9:48 PM, Yuanhan Liu wrote: > Signed-off-by: Yuanhan Liu Acked-by: Huawei Xie

[dpdk-dev] [PATCH v2 4/7] vhost: do not use rte_memcpy for virtio_hdr copy

2016-03-06 Thread Stephen Hemminger
On Thu, 18 Feb 2016 21:49:09 +0800 Yuanhan Liu wrote: > +static inline void > +copy_virtio_net_hdr(struct vhost_virtqueue *vq, uint64_t desc_addr, > + struct virtio_net_hdr_mrg_rxbuf hdr) > +{ > + if (vq->vhost_hlen == sizeof(struct virtio_net_hdr_mrg_rxbuf)) { > +

[dpdk-dev] [PATCH v2 4/7] vhost: do not use rte_memcpy for virtio_hdr copy

2016-02-18 Thread Yuanhan Liu
First of all, rte_memcpy() is mostly useful for coping big packets by leveraging hardware advanced instructions like AVX. But for virtio net hdr, which is 12 bytes at most, invoking rte_memcpy() will not introduce any performance boost. And, to my suprise, rte_memcpy() is VERY huge. Since rte_memc