On Fri, 16 Jan 2026 00:01:09 +0100
Lukas Sismis <[email protected]> wrote:

> -     if (nvgre_encap_conf.select_vlan)
> -             nvgre_encap_conf.vlan_tci = rte_cpu_to_be_16(res->tci);
> -     rte_memcpy(nvgre_encap_conf.eth_src, res->eth_src.addr_bytes,
> +     if (nvgre_conf->select_vlan)
> +             nvgre_conf->vlan_tci = rte_cpu_to_be_16(res->tci);
> +     rte_memcpy(nvgre_conf->eth_src, res->eth_src.addr_bytes,
>                  RTE_ETHER_ADDR_LEN);
> -     rte_memcpy(nvgre_encap_conf.eth_dst, res->eth_dst.addr_bytes,
> +     rte_memcpy(nvgre_conf->eth_dst, res->eth_dst.addr_bytes,
>                  RTE_ETHER_ADDR_LEN);

rte_memcpy() should not be used everywhere. It should only be used in
optimized data paths with variable length values. The compiler inlining
is as fast or faster and static checkers do better job of checking for 
overrruns.

Also, where possible use rte_ether_addr_copy or structure assignment

Reply via email to