From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Shai Brandes <shaibran@amazon.com>,
Evgeny Schemeilin <evgenys@amazon.com>,
Ron Beider <rbeider@amazon.com>,
Amit Bernstein <amitbern@amazon.com>,
Wajeeh Atrash <atrwajee@amazon.com>,
Igor Chauskin <igorch@amazon.com>,
Michal Krawczyk <mk@semihalf.com>, Artur Rojek <ar@semihalf.com>
Subject: [PATCH] net/ena: revert redefining memcpy
Date: Mon, 12 Aug 2024 08:34:17 -0700 [thread overview]
Message-ID: <20240812153417.65225-1-stephen@networkplumber.org> (raw)
In-Reply-To: <200~bug-1510-3@http.bugs.dpdk.org>
Redefining memcpy as rte_memcpy has no performance gain on
current compilers, and introduced bugs like this one where
rte_memcpy() will be detected as referencing past the destination.
Bugzilla ID: 1510
Fixes: 142778b3702a ("net/ena: switch memcpy to optimized version")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/ena/base/ena_plat_dpdk.h | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h
index 21b96113c7..291db6cabe 100644
--- a/drivers/net/ena/base/ena_plat_dpdk.h
+++ b/drivers/net/ena/base/ena_plat_dpdk.h
@@ -26,7 +26,6 @@
#include <rte_spinlock.h>
#include <sys/time.h>
-#include <rte_memcpy.h>
typedef uint64_t u64;
typedef uint32_t u32;
@@ -70,13 +69,7 @@ typedef uint64_t dma_addr_t;
#define ENA_UDELAY(x) rte_delay_us_block(x)
#define ENA_TOUCH(x) ((void)(x))
-/* Redefine memcpy with caution: rte_memcpy can be simply aliased to memcpy, so
- * make the redefinition only if it's safe (and beneficial) to do so.
- */
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64_MEMCPY) || defined(RTE_ARCH_ARM_NEON_MEMCPY)
-#undef memcpy
-#define memcpy rte_memcpy
-#endif
+
#define wmb rte_wmb
#define rmb rte_rmb
#define mb rte_mb
--
2.43.0
next parent reply other threads:[~2024-08-12 15:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200~bug-1510-3@http.bugs.dpdk.org>
2024-08-12 15:34 ` Stephen Hemminger [this message]
2024-08-12 20:53 ` Wathsala Wathawana Vithanage
2024-08-13 8:57 ` Morten Brørup
2024-09-12 5:12 ` Tyler Retzlaff
2024-09-12 8:19 ` Ferruh Yigit
2024-09-12 14:53 ` Brandes, Shai
2024-09-16 6:33 ` Brandes, Shai
2024-09-16 15:11 ` Stephen Hemminger
2024-09-16 16:06 ` Brandes, Shai
2024-09-22 4:08 ` Ferruh Yigit
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=20240812153417.65225-1-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=amitbern@amazon.com \
--cc=ar@semihalf.com \
--cc=atrwajee@amazon.com \
--cc=dev@dpdk.org \
--cc=evgenys@amazon.com \
--cc=igorch@amazon.com \
--cc=mk@semihalf.com \
--cc=rbeider@amazon.com \
--cc=shaibran@amazon.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;
as well as URLs for NNTP newsgroup(s).