[68/71] app/graph: replace use of fixed size rte_memcpy

Message ID 20240229225936.483472-69-stephen@networkplumber.org (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series replace use of fixed size rte_memcpy |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger Feb. 29, 2024, 10:58 p.m. UTC
Automatically generated by devtools/cocci/rte_memcpy.cocci

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/graph/neigh.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
  

Patch

diff --git a/app/graph/neigh.c b/app/graph/neigh.c
index 22be7361e310..a99d2b6981a2 100644
--- a/app/graph/neigh.c
+++ b/app/graph/neigh.c
@@ -91,14 +91,14 @@  ip6_rewrite_node_add(struct neigh_ipv6_config *v6_config)
 	memset(data, 0, len);
 
 	/* Copy dst mac */
-	rte_memcpy((void *)&data[0], (void *)&v6_config->mac, RTE_ETHER_ADDR_LEN);
+	memcpy((void *)&data[0], (void *)&v6_config->mac, RTE_ETHER_ADDR_LEN);
 
 	/* Copy src mac */
 	rc = rte_eth_macaddr_get(portid, &smac);
 	if (rc < 0)
 		return rc;
 
-	rte_memcpy(&data[RTE_ETHER_ADDR_LEN], smac.addr_bytes, RTE_ETHER_ADDR_LEN);
+	memcpy(&data[RTE_ETHER_ADDR_LEN], smac.addr_bytes, RTE_ETHER_ADDR_LEN);
 
 	return rte_node_ip6_rewrite_add(portid, data, len, portid);
 }
@@ -121,7 +121,7 @@  ip4_rewrite_node_add(struct neigh_ipv4_config *v4_config)
 	memset(data, 0, len);
 
 	/* Copy dst mac */
-	rte_memcpy((void *)&data[0], (void *)&v4_config->mac, RTE_ETHER_ADDR_LEN);
+	memcpy((void *)&data[0], (void *)&v4_config->mac, RTE_ETHER_ADDR_LEN);
 
 	/* Copy src mac */
 	rc = rte_eth_macaddr_get(portid, &smac);
@@ -130,7 +130,7 @@  ip4_rewrite_node_add(struct neigh_ipv4_config *v4_config)
 		return rc;
 	}
 
-	rte_memcpy(&data[RTE_ETHER_ADDR_LEN], smac.addr_bytes, RTE_ETHER_ADDR_LEN);
+	memcpy(&data[RTE_ETHER_ADDR_LEN], smac.addr_bytes, RTE_ETHER_ADDR_LEN);
 
 	return rte_node_ip4_rewrite_add(portid, data, len, portid);
 }