librte_sched: allocate memory on the given socket id
PATCH 1/1 librte_sched: allocate memory on the given socket id
Replace rte_zmalloc() with rte_zmalloc_socket() to allocate memory on the socket id provided by the application.
--- lib/librte_sched/rte_sched.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
lib/librte_sched/rte_sched.c +2 -1
@@ -633,7 +633,8 @@ rte_sched_port_config(struct rte_sched_port_params *params)return NULL ;/* Allocate memory to store the data structures */ - port =rte_zmalloc ("qos_params" , mem_size,RTE_CACHE_LINE_SIZE ); + port =rte_zmalloc_socket ("qos_params" , mem_size,RTE_CACHE_LINE_SIZE , + params->socket);if (port ==NULL )return NULL ;
Signature · 1 line
2.17.1
Quoted 35 lines
-----Original Message-----
From: Singh, Jasvinder
Sent: Thursday, September 27, 2018 6:11 PM
To: [email protected]
Cc: Dumitrescu, Cristian <[email protected]>
Subject: [PATCH]librte_sched: allocate memory on the given socket idReplace
rte_zmalloc()withrte_zmalloc_socket()to allocate memory on the socket id provided by the application.Signed-off-by Jasvinder Singh <[email protected]>--- lib/librte_sched/rte_sched.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)lib/librte_sched/rte_sched.c +2
-1@@ -633,7 +633,8 @@ rte_sched_port_config(struct rte_sched_port_params *params)return NULL ;/* Allocate memory to store the data structures */ - port =rte_zmalloc ("qos_params" , mem_size, RTE_CACHE_LINE_SIZE); + port =rte_zmalloc_socket ("qos_params" , mem_size,RTE_CACHE_LINE_SIZE , + params->socket);lib/librte_sched/rte_sched.c +0
-1if (port ==NULL )return NULL ; --
Quoted 1 line
2.17.1
Dumitrescu, Cristian
AppliedQuoted 35 lines
-----Original Message-----
From: Singh, Jasvinder
Sent: Thursday, September 27, 2018 6:11 PM
To: [email protected]
Cc: Dumitrescu, Cristian <[email protected]>
Subject: [PATCH]librte_sched: allocate memory on the given socket idReplace
rte_zmalloc()withrte_zmalloc_socket()to allocate memory on the socket id provided by the application.Signed-off-by Jasvinder Singh <[email protected]>--- lib/librte_sched/rte_sched.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)lib/librte_sched/rte_sched.c +2
-1@@ -633,7 +633,8 @@ rte_sched_port_config(struct rte_sched_port_params *params)return NULL ;/* Allocate memory to store the data structures */ - port =rte_zmalloc ("qos_params" , mem_size, RTE_CACHE_LINE_SIZE); + port =rte_zmalloc_socket ("qos_params" , mem_size,RTE_CACHE_LINE_SIZE , + params->socket);lib/librte_sched/rte_sched.c +0
-1if (port ==NULL )return NULL ; --
Quoted 1 line
2.17.1
Applied to next-qos tree, thanks!