[v2,12/71] rib: replace use of fixed size rte_memcpy

Message ID 20240301171707.95242-13-stephen@networkplumber.org (mailing list archive)
State Superseded
Delegated to: Thomas Monjalon
Headers
Series replace use of fixed size rte_mempcy |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger March 1, 2024, 5:15 p.m. UTC
  Mostly automatically generated by devtools/cocci/rte_memcpy.cocci
The fib/trie.c was relying on headers
  rte_rib6 -> rte_memcpy -> rte_vect
since rib6 is no longer using rte_memcpy need to get rte_vect.h

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/fib/trie.c     | 2 +-
 lib/rib/rte_rib6.h | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)
  

Patch

diff --git a/lib/fib/trie.c b/lib/fib/trie.c
index 09470e7287cc..a77f6c758b0d 100644
--- a/lib/fib/trie.c
+++ b/lib/fib/trie.c
@@ -9,7 +9,7 @@ 
 #include <rte_debug.h>
 #include <rte_malloc.h>
 #include <rte_errno.h>
-
+#include <rte_vect.h>
 #include <rte_rib6.h>
 #include <rte_fib6.h>
 #include "trie.h"
diff --git a/lib/rib/rte_rib6.h b/lib/rib/rte_rib6.h
index 775286f965f2..f366d3d197f3 100644
--- a/lib/rib/rte_rib6.h
+++ b/lib/rib/rte_rib6.h
@@ -14,7 +14,8 @@ 
  * Level compressed tree implementation for IPv6 Longest Prefix Match
  */
 
-#include <rte_memcpy.h>
+#include <string.h>
+
 #include <rte_common.h>
 
 #ifdef __cplusplus
@@ -61,7 +62,7 @@  rte_rib6_copy_addr(uint8_t *dst, const uint8_t *src)
 {
 	if ((dst == NULL) || (src == NULL))
 		return;
-	rte_memcpy(dst, src, RTE_RIB6_IPV6_ADDR_SIZE);
+	memcpy(dst, src, RTE_RIB6_IPV6_ADDR_SIZE);
 }
 
 /**