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

Xie, Huawei huawei.xie at intel.com
Wed Jan 27 03:46:39 CET 2016


On 12/3/2015 2:03 PM, Yuanhan Liu wrote:
> +	if (vq->vhost_hlen == sizeof(struct virtio_net_hdr_mrg_rxbuf)) {
> +		*(struct virtio_net_hdr_mrg_rxbuf *)(uintptr_t)desc_addr = hdr;
> +	} else {
> +		*(struct virtio_net_hdr *)(uintptr_t)desc_addr = hdr.hdr;
> +	}

Thanks!
We might simplify this further. Just reset the first two fields flags
and gso_type.


More information about the dev mailing list