[v4,26/30] app/test-eventdev: replace use of fixed size rte_memcpy

Message ID 20240405165518.367503-27-stephen@networkplumber.org (mailing list archive)
State Superseded
Delegated to: Thomas Monjalon
Headers
Series replace use of rte_memcpy with fixed sizes |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger April 5, 2024, 4:53 p.m. UTC
  Automatically generated by devtools/cocci/rte_memcpy.cocci

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/test-eventdev/test_pipeline_common.c | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)
  

Patch

diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c
index b111690b7c..49bfd0c363 100644
--- a/app/test-eventdev/test_pipeline_common.c
+++ b/app/test-eventdev/test_pipeline_common.c
@@ -177,22 +177,17 @@  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),
-				   &eth_hdr, sizeof(struct rte_ether_hdr));
+			memcpy(rte_pktmbuf_mtod_offset(mbuf, char *, 0),
+			       &eth_hdr, sizeof(struct rte_ether_hdr));
 
 			/* Copy Ipv4 header */
-			rte_memcpy(rte_pktmbuf_mtod_offset(
-					   mbuf, char *,
-					   sizeof(struct rte_ether_hdr)),
-				   &ip_hdr, sizeof(struct rte_ipv4_hdr));
+			memcpy(rte_pktmbuf_mtod_offset(mbuf, char *, sizeof(struct rte_ether_hdr)),
+			       &ip_hdr, sizeof(struct rte_ipv4_hdr));
 
 			/* Copy UDP header */
-			rte_memcpy(
-				rte_pktmbuf_mtod_offset(
-					mbuf, char *,
-					sizeof(struct rte_ipv4_hdr) +
-						sizeof(struct rte_ether_hdr)),
-				&udp_hdr, sizeof(struct rte_udp_hdr));
+			memcpy(rte_pktmbuf_mtod_offset(mbuf, char *, sizeof(struct rte_ipv4_hdr)
+						       + sizeof(struct rte_ether_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) +