Thread (169 messages) flat view 169 messages, 10 authors, 1d ago
WARM1d

[PATCH v2 62/68] hash: replace use of rte_memcpy

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2026-08-21 19:33:12
Subsystem: library code, the rest · Maintainers: Andrew Morton, Linus Torvalds

Don't need to use rte_memcpy to copy small key value here.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/hash/rte_thash.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/hash/rte_thash.c b/lib/hash/rte_thash.c
index fcd41248b9..931bb55f0e 100644
--- a/lib/hash/rte_thash.c
+++ b/lib/hash/rte_thash.c
@@ -3,13 +3,13 @@
  */
 
 #include <stdalign.h>
+#include <string.h>
 #include <sys/queue.h>
 
 #include <eal_export.h>
 #include <rte_thash.h>
 #include <rte_tailq.h>
 #include <rte_random.h>
-#include <rte_memcpy.h>
 #include <rte_errno.h>
 #include <rte_eal_memconfig.h>
 #include <rte_log.h>
@@ -263,7 +263,7 @@ rte_thash_init_ctx(const char *name, uint32_t key_len, uint32_t reta_sz,
 	ctx->flags = flags;
 
 	if (key)
-		rte_memcpy(ctx->hash_key, key, key_len);
+		memcpy(ctx->hash_key, key, key_len);
 	else {
 		for (i = 0; i < key_len; i++)
 			ctx->hash_key[i] = rte_rand();
-- 
2.53.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help