From 13389617efbcb463caeca5d6209655b76ba87abe Mon Sep 17 00:00:00 2001 From: Luc Provoost Date: Sun, 8 Jan 2023 10:27:45 +0100 Subject: Fix socket_id in rte_hash_parameters The socket_id was either not initialized or set to 0. This fix sets the proper socket_id to the relevant NUMA node. When running on NUMA nodes other than 0, memory allocation for the hash table could fail. With this fix, it is supposed to work on all NUMA nodes. Signed-off-by: Luc Provoost Change-Id: I59887fe064a7e7c96ce2f6ce1c70791844b165b2 --- VNFs/DPPD-PROX/prox_shared.c | 1 + 1 file changed, 1 insertion(+) (limited to 'VNFs/DPPD-PROX/prox_shared.c') diff --git a/VNFs/DPPD-PROX/prox_shared.c b/VNFs/DPPD-PROX/prox_shared.c index 52f4eb18..de26441d 100644 --- a/VNFs/DPPD-PROX/prox_shared.c +++ b/VNFs/DPPD-PROX/prox_shared.c @@ -55,6 +55,7 @@ static void prox_sh_create_hash(struct prox_shared *ps, size_t size) { param.entries = size; param.name = get_sh_name(); + param.socket_id = rte_socket_id(); ps->hash = rte_hash_create(¶m); PROX_PANIC(ps->hash == NULL, "Failed to create hash table for shared data"); ps->size = size; -- cgit 1.2.3-korg