sched: allocate memory on the given socket id
authorJasvinder Singh <jasvinder.singh@intel.com>
Thu, 27 Sep 2018 17:10:45 +0000 (18:10 +0100)
committerCristian Dumitrescu <cristian.dumitrescu@intel.com>
Mon, 8 Oct 2018 15:52:29 +0000 (17:52 +0200)
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>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
lib/librte_sched/rte_sched.c

index d4e2189..587d5e6 100644 (file)
@@ -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;