From: Jasvinder Singh Subject: [PATCH] librte_sched: allocate memory on the given socket id Date: Thu, 27 Sep 2018 18:10:45 +0100 Message-ID: <20180927171045.103407-1-jasvinder.singh@intel.com> Cc: cristian.dumitrescu@intel.com To: dev@dpdk.org Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 3CD1A1B136 for ; Thu, 27 Sep 2018 19:10:58 +0200 (CEST) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Replace rte_zmalloc() with rte_zmalloc_socket() to allocate memory on the socket id provided by the application. Signed-off-by: Jasvinder Singh --- 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