enic: fix allocation when not using first numa node
authorDavid Marchand <david.marchand@6wind.com>
Fri, 11 Sep 2015 08:02:30 +0000 (10:02 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 20 Oct 2015 19:30:48 +0000 (21:30 +0200)
Seen by code review.

If dpdk is run with memory only available on socket != 0, then enic pmd
refuses to initialize ports as this pmd requires some memory on socket 0.
Fix this by setting socket to SOCKET_ID_ANY, so that allocations happen on
the caller socket.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked by: Sujith Sankar <ssujith@cisco.com>

drivers/net/enic/enic_main.c

index 398ada2..c3c62c4 100644 (file)
@@ -538,7 +538,7 @@ enic_alloc_consistent(__rte_unused void *priv, size_t size,
        *dma_handle = 0;
 
        rz = rte_memzone_reserve_aligned((const char *)name,
-               size, 0, 0, ENIC_ALIGN);
+                                        size, SOCKET_ID_ANY, 0, ENIC_ALIGN);
        if (!rz) {
                pr_err("%s : Failed to allocate memory requested for %s",
                        __func__, name);