On Thu, 19 Dec 2024 14:38:28 +0800
Yunjian Wang <wangyunj...@huawei.com> wrote:

> -                     hdr = (struct virtio_net_hdr 
> *)((uintptr_t)buf_vec[0].buf_addr);
> +                     rte_memcpy((void *)(uintptr_t)&tmp_hdr,
> +                             (void *)(uintptr_t)buf_vec[0].buf_addr,
> +                             sizeof(struct virtio_net_hdr));
>               }

Do not introduce more rte_memcpy of a fixed size.
You don't need that many casts!
Why can you not use a structure assignment here.

Reply via email to