* [dpdk-dev] [PATCH] net/memif: allocate socket hash on any NUMA socket
@ 2021-09-28 13:51 Junxiao Shi
2021-09-30 13:31 ` Ferruh Yigit
0 siblings, 1 reply; 4+ messages in thread
From: Junxiao Shi @ 2021-09-28 13:51 UTC (permalink / raw)
To: dev
Previously, memif socket hash is always allocated on NUMA socket 0.
If the application is entirely running on another NUMA socket and EAL
--socket-limit prevents memory allocation on NUMA socket 0, memif
creation fails with "HASH: memory allocation failed" error.
This patch allows allocating memif socket hash on any NUMA socket.
Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
---
drivers/net/memif/memif_socket.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/memif/memif_socket.c b/drivers/net/memif/memif_socket.c
index f58ff4c0cb..364e818d65 100644
--- a/drivers/net/memif/memif_socket.c
+++ b/drivers/net/memif/memif_socket.c
@@ -946,6 +946,7 @@ memif_create_socket_hash(void)
params.key_len = MEMIF_SOCKET_UN_SIZE;
params.hash_func = rte_jhash;
params.hash_func_init_val = 0;
+ params.socket_id = SOCKET_ID_ANY;
return rte_hash_create(¶ms);
}
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] net/memif: allocate socket hash on any NUMA socket
2021-09-28 13:51 [dpdk-dev] [PATCH] net/memif: allocate socket hash on any NUMA socket Junxiao Shi
@ 2021-09-30 13:31 ` Ferruh Yigit
2021-10-04 12:02 ` Jakub Grajciar -X (jgrajcia - PANTHEON TECH SRO at Cisco)
0 siblings, 1 reply; 4+ messages in thread
From: Ferruh Yigit @ 2021-09-30 13:31 UTC (permalink / raw)
To: Junxiao Shi, Jakub Grajciar; +Cc: dev
On 9/28/2021 2:51 PM, Junxiao Shi wrote:
> Previously, memif socket hash is always allocated on NUMA socket 0.
> If the application is entirely running on another NUMA socket and EAL
> --socket-limit prevents memory allocation on NUMA socket 0, memif
> creation fails with "HASH: memory allocation failed" error.
>
> This patch allows allocating memif socket hash on any NUMA socket.
>
> Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
> ---
> drivers/net/memif/memif_socket.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/memif/memif_socket.c b/drivers/net/memif/memif_socket.c
> index f58ff4c0cb..364e818d65 100644
> --- a/drivers/net/memif/memif_socket.c
> +++ b/drivers/net/memif/memif_socket.c
> @@ -946,6 +946,7 @@ memif_create_socket_hash(void)
> params.key_len = MEMIF_SOCKET_UN_SIZE;
> params.hash_func = rte_jhash;
> params.hash_func_init_val = 0;
> + params.socket_id = SOCKET_ID_ANY;
> return rte_hash_create(¶ms);
> }
>
>
looks good to me. cc'ed the memif maintainer.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] net/memif: allocate socket hash on any NUMA socket
2021-09-30 13:31 ` Ferruh Yigit
@ 2021-10-04 12:02 ` Jakub Grajciar -X (jgrajcia - PANTHEON TECH SRO at Cisco)
2021-10-04 17:29 ` Ferruh Yigit
0 siblings, 1 reply; 4+ messages in thread
From: Jakub Grajciar -X (jgrajcia - PANTHEON TECH SRO at Cisco) @ 2021-10-04 12:02 UTC (permalink / raw)
To: Ferruh Yigit, Junxiao Shi; +Cc: dev
> On 9/28/2021 2:51 PM, Junxiao Shi wrote:
> > Previously, memif socket hash is always allocated on NUMA socket 0.
> > If the application is entirely running on another NUMA socket and EAL
> > --socket-limit prevents memory allocation on NUMA socket 0, memif
> > creation fails with "HASH: memory allocation failed" error.
> >
> > This patch allows allocating memif socket hash on any NUMA socket.
> >
> > Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
Looks ok. Thanks for the patch!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] net/memif: allocate socket hash on any NUMA socket
2021-10-04 12:02 ` Jakub Grajciar -X (jgrajcia - PANTHEON TECH SRO at Cisco)
@ 2021-10-04 17:29 ` Ferruh Yigit
0 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2021-10-04 17:29 UTC (permalink / raw)
To: Jakub Grajciar -X (jgrajcia - PANTHEON TECH SRO at Cisco), Junxiao Shi
Cc: dev
On 10/4/2021 1:02 PM, Jakub Grajciar -X (jgrajcia - PANTHEON TECH SRO at Cisco) wrote:
>
>
>> On 9/28/2021 2:51 PM, Junxiao Shi wrote:
>>> Previously, memif socket hash is always allocated on NUMA socket 0.
>>> If the application is entirely running on another NUMA socket and EAL
>>> --socket-limit prevents memory allocation on NUMA socket 0, memif
>>> creation fails with "HASH: memory allocation failed" error.
>>>
>>> This patch allows allocating memif socket hash on any NUMA socket.
>>>
>>> Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
>
Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
Applied to dpdk-next-net/main, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-04 17:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-28 13:51 [dpdk-dev] [PATCH] net/memif: allocate socket hash on any NUMA socket Junxiao Shi
2021-09-30 13:31 ` Ferruh Yigit
2021-10-04 12:02 ` Jakub Grajciar -X (jgrajcia - PANTHEON TECH SRO at Cisco)
2021-10-04 17:29 ` Ferruh Yigit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).