[PATCH v2 62/68] hash: replace use of rte_memcpy
Stephen Hemminger
stephen at networkplumber.org
Fri Aug 21 21:24:57 CEST 2026
Don't need to use rte_memcpy to copy small key value here.
Signed-off-by: Stephen Hemminger <stephen at 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
More information about the dev
mailing list