DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] librte_sched: allocate memory on the given socket id
@ 2018-09-27 17:10 Jasvinder Singh
  2018-09-27 17:52 ` Dumitrescu, Cristian
  2018-10-08 15:57 ` Dumitrescu, Cristian
  0 siblings, 2 replies; 3+ messages in thread
From: Jasvinder Singh @ 2018-09-27 17:10 UTC (permalink / raw)
  To: dev; +Cc: cristian.dumitrescu

Replace rte_zmalloc() with rte_zmalloc_socket() to allocate
memory on the socket id provided by the application.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
 lib/librte_sched/rte_sched.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c
index 9269e5c71..328c983b4 100644
--- a/lib/librte_sched/rte_sched.c
+++ b/lib/librte_sched/rte_sched.c
@@ -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;
 
-- 
2.17.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] librte_sched: allocate memory on the given socket id
  2018-09-27 17:10 [dpdk-dev] [PATCH] librte_sched: allocate memory on the given socket id Jasvinder Singh
@ 2018-09-27 17:52 ` Dumitrescu, Cristian
  2018-10-08 15:57 ` Dumitrescu, Cristian
  1 sibling, 0 replies; 3+ messages in thread
From: Dumitrescu, Cristian @ 2018-09-27 17:52 UTC (permalink / raw)
  To: Singh, Jasvinder, dev



> -----Original Message-----
> From: Singh, Jasvinder
> Sent: Thursday, September 27, 2018 6:11 PM
> To: dev@dpdk.org
> Cc: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Subject: [PATCH] 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.
> 
> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
> ---
>  lib/librte_sched/rte_sched.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c
> index 9269e5c71..328c983b4 100644
> --- a/lib/librte_sched/rte_sched.c
> +++ b/lib/librte_sched/rte_sched.c
> @@ -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;
> 
> --
> 2.17.1

Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] librte_sched: allocate memory on the given socket id
  2018-09-27 17:10 [dpdk-dev] [PATCH] librte_sched: allocate memory on the given socket id Jasvinder Singh
  2018-09-27 17:52 ` Dumitrescu, Cristian
@ 2018-10-08 15:57 ` Dumitrescu, Cristian
  1 sibling, 0 replies; 3+ messages in thread
From: Dumitrescu, Cristian @ 2018-10-08 15:57 UTC (permalink / raw)
  To: Singh, Jasvinder, dev



> -----Original Message-----
> From: Singh, Jasvinder
> Sent: Thursday, September 27, 2018 6:11 PM
> To: dev@dpdk.org
> Cc: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Subject: [PATCH] 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.
> 
> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
> ---
>  lib/librte_sched/rte_sched.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c
> index 9269e5c71..328c983b4 100644
> --- a/lib/librte_sched/rte_sched.c
> +++ b/lib/librte_sched/rte_sched.c
> @@ -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;
> 
> --
> 2.17.1

Applied to next-qos tree, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-08 15:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-27 17:10 [dpdk-dev] [PATCH] librte_sched: allocate memory on the given socket id Jasvinder Singh
2018-09-27 17:52 ` Dumitrescu, Cristian
2018-10-08 15:57 ` Dumitrescu, Cristian

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).