public inbox for dev@dpdk.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Lukas Sismis <sismis@dyna-nic.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH v3 3/7] app/testpmd: use shared flow parser library
Date: Fri, 16 Jan 2026 09:21:43 -0800	[thread overview]
Message-ID: <20260116092143.543ab6ab@phoenix.local> (raw)
In-Reply-To: <682f7f69f26347653492144e9ad23087de3695a3.1768518003.git.sismis@dyna-nic.com>

On Fri, 16 Jan 2026 00:01:09 +0100
Lukas Sismis <sismis@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

  reply	other threads:[~2026-01-16 17:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-15 23:01 [PATCH v3 0/7] flow_parser: add shared parser library Lukas Sismis
2026-01-15 23:01 ` [PATCH v3 1/7] cmdline: include stddef.h for offsetof Lukas Sismis
2026-01-15 23:01 ` [PATCH v3 3/7] app/testpmd: use shared flow parser library Lukas Sismis
2026-01-16 17:21   ` Stephen Hemminger [this message]
2026-01-15 23:01 ` [PATCH v3 4/7] examples/flow_parsing: add flow parser demo Lukas Sismis
2026-01-16 17:22   ` Stephen Hemminger
2026-01-15 23:01 ` [PATCH v3 5/7] dpdk-test: add flow parser library functional tests Lukas Sismis
2026-01-15 23:01 ` [PATCH v3 6/7] mailmap: update a new contributor email Lukas Sismis
2026-01-15 23:01 ` [PATCH v3 7/7] dts: fix invalid f-string syntax in testpmd API Lukas Sismis
2026-01-20 16:44   ` Dean Marx
2026-01-20 16:53   ` Patrick Robb
2026-01-20 17:29     ` Dean Marx
2026-01-16  6:01 ` [PATCH v3 0/7] flow_parser: add shared parser library Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260116092143.543ab6ab@phoenix.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=sismis@dyna-nic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox