[PATCH v3 3/7] app/testpmd: use shared flow parser library
Stephen Hemminger
stephen at networkplumber.org
Fri Jan 16 18:21:43 CET 2026
On Fri, 16 Jan 2026 00:01:09 +0100
Lukas Sismis <sismis at dyna-nic.com> 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
More information about the dev
mailing list