[PATCH v3 26/30] app/test-eventdev: replace use of fixed size rte_memcpy
Stephen Hemminger
stephen at networkplumber.org
Tue Apr 2 23:50:42 CEST 2024
Automatically generated by devtools/cocci/rte_memcpy.cocci
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
app/test-eventdev/test_pipeline_common.c | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
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),
- ð_hdr, sizeof(struct rte_ether_hdr));
+ memcpy(rte_pktmbuf_mtod_offset(mbuf, char *, 0),
+ ð_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) +
--
2.43.0
More information about the dev
mailing list