[PATCH 16/61] test-pipeline: replace use of rte_memcpy
From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2026-08-20 05:24:35
Subsystem:
the rest · Maintainer:
Linus Torvalds
Using regular memcpy is safer and as fast here. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- app/test-eventdev/test_pipeline_common.c | 8 ++++---- app/test-pipeline/config.c | 1 - app/test-pipeline/init.c | 1 - app/test-pipeline/main.c | 1 - app/test-pipeline/runtime.c | 1 - 5 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c
index eaf895869f..dd3021fa79 100644
--- a/app/test-eventdev/test_pipeline_common.c
+++ b/app/test-eventdev/test_pipeline_common.c@@ -153,22 +153,22 @@ pipeline_tx_first(struct test_pipeline *t, struct evt_options *opt) mbuf->pkt_len = pkt_sz; /* Copy Ethernet header */ - rte_memcpy(rte_pktmbuf_mtod_offset(mbuf, char *, 0), + memcpy(rte_pktmbuf_mtod_offset(mbuf, char *, 0), ð_hdr, sizeof(struct rte_ether_hdr)); /* Copy Ipv4 header */ - rte_memcpy(rte_pktmbuf_mtod_offset( + memcpy(rte_pktmbuf_mtod_offset( mbuf, char *, sizeof(struct rte_ether_hdr)), &ip_hdr, sizeof(struct rte_ipv4_hdr)); /* Copy UDP header */ - rte_memcpy( + memcpy( rte_pktmbuf_mtod_offset( mbuf, char *, sizeof(struct rte_ipv4_hdr) + sizeof(struct rte_ether_hdr)), - &udp_hdr, sizeof(struct rte_udp_hdr)); + &udp_hdr, sizeof(struct rte_udp_hdr)); pkt_udp_hdr = rte_pktmbuf_mtod_offset( mbuf, struct rte_udp_hdr *, sizeof(struct rte_ipv4_hdr) +
diff --git a/app/test-pipeline/config.c b/app/test-pipeline/config.c
index daf838948b..f4d5d435ad 100644
--- a/app/test-pipeline/config.c
+++ b/app/test-pipeline/config.c@@ -17,7 +17,6 @@ #include <rte_byteorder.h> #include <rte_log.h> #include <rte_memory.h> -#include <rte_memcpy.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
diff --git a/app/test-pipeline/init.c b/app/test-pipeline/init.c
index 558f0e428d..8028192306 100644
--- a/app/test-pipeline/init.c
+++ b/app/test-pipeline/init.c@@ -17,7 +17,6 @@ #include <rte_byteorder.h> #include <rte_log.h> #include <rte_memory.h> -#include <rte_memcpy.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
diff --git a/app/test-pipeline/main.c b/app/test-pipeline/main.c
index e5efafdf28..5782c55032 100644
--- a/app/test-pipeline/main.c
+++ b/app/test-pipeline/main.c@@ -19,7 +19,6 @@ #include <rte_byteorder.h> #include <rte_log.h> #include <rte_memory.h> -#include <rte_memcpy.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
diff --git a/app/test-pipeline/runtime.c b/app/test-pipeline/runtime.c
index 752f783370..a6457488c0 100644
--- a/app/test-pipeline/runtime.c
+++ b/app/test-pipeline/runtime.c@@ -17,7 +17,6 @@ #include <rte_byteorder.h> #include <rte_log.h> #include <rte_memory.h> -#include <rte_memcpy.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
--
2.53.0