From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
To: Stephen Hemminger <stephen@networkplumber.org>, dev@dpdk.org
Cc: Thomas Monjalon <thomas@monjalon.net>
Subject: Re: [PATCH] ethdev: replace rte_memcpy with assignment
Date: Thu, 1 Oct 2026 11:14:13 +0300 [thread overview]
Message-ID: <e42e8ade-b0e0-438f-b5a0-eb3f7e95397b@oktetlabs.ru> (raw)
In-Reply-To: <20260929155701.877309-1-stephen@networkplumber.org>
On 9/29/26 6:57 PM, Stephen Hemminger wrote:
> Can use structure assignment instead of rte_memcpy here.
It would be useful to mention in the description or summary why
it is better.
Right now the description say what is done, but it is obvious
from the code change.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> lib/ethdev/rte_ethdev.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
> index 7c57a9bb8f..6f5a957d00 100644
> --- a/lib/ethdev/rte_ethdev.c
> +++ b/lib/ethdev/rte_ethdev.c
> @@ -16,7 +16,6 @@
> #include <rte_log.h>
> #include <rte_interrupts.h>
> #include <rte_kvargs.h>
> -#include <rte_memcpy.h>
> #include <rte_common.h>
> #include <rte_mempool.h>
> #include <rte_malloc.h>
> @@ -631,7 +630,7 @@ rte_eth_dev_owner_get(const uint16_t port_id, struct rte_eth_dev_owner *owner)
> rte_spinlock_lock(rte_mcfg_ethdev_get_lock());
>
> if (eth_dev_shared_data_prepare() != NULL) {
> - rte_memcpy(owner, ðdev->data->owner, sizeof(*owner));
> + *owner = ethdev->data->owner;
> ret = 0;
> } else {
> ret = -ENOMEM;
next prev parent reply other threads:[~2026-10-01 8:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 15:57 [PATCH] ethdev: replace rte_memcpy with assignment Stephen Hemminger
2026-10-01 8:14 ` Andrew Rybchenko [this message]
2026-10-01 18:32 ` 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=e42e8ade-b0e0-438f-b5a0-eb3f7e95397b@oktetlabs.ru \
--to=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
/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