Skip to content

Commit

Permalink
net/ena: switch memcpy to optimized version
Browse files Browse the repository at this point in the history
[ upstream commit 142778b ]

memcpy is now mapped to rte_memcpy macro on x86 architectures.

Fixes: 9ba7981 ("ena: add communication layer for DPDK")

Signed-off-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Artur Rojek <ar@semihalf.com>
  • Loading branch information
Igor Chauskin authored and cpaelzer committed Jun 10, 2021
1 parent 8640d6c commit 0019c2b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/net/ena/base/ena_plat_dpdk.h
Expand Up @@ -24,6 +24,7 @@
#include <rte_spinlock.h>

#include <sys/time.h>
#include <rte_memcpy.h>

typedef uint64_t u64;
typedef uint32_t u32;
Expand Down Expand Up @@ -59,7 +60,11 @@ typedef uint64_t dma_addr_t;
#define ENA_UDELAY(x) rte_delay_us_block(x)

#define ENA_TOUCH(x) ((void)(x))
#define memcpy_toio memcpy
/* Avoid nested declaration on arm64, as it may define rte_memcpy as memcpy. */
#if defined(RTE_ARCH_X86)
#undef memcpy
#define memcpy rte_memcpy
#endif
#define wmb rte_wmb
#define rmb rte_rmb
#define mb rte_mb
Expand Down

0 comments on commit 0019c2b

Please sign in to comment.