From: David Marchand Date: Thu, 3 Sep 2015 13:23:30 +0000 (+0200) Subject: i40e: fix base driver allocation when not using first numa node X-Git-Tag: spdx-start~8480 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=17e01e3141aa520042eb1fa705b3472757350bab;p=dpdk.git i40e: fix base driver allocation when not using first numa node Seen by code review. If dpdk is run with memory only available on a non-0 socket, then i40e 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 Acked-by: Helin Zhang --- diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 40b052603c..2dd9fdc5be 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -2099,10 +2099,11 @@ i40e_allocate_dma_mem_d(__attribute__((unused)) struct i40e_hw *hw, id++; snprintf(z_name, sizeof(z_name), "i40e_dma_%"PRIu64, id); #ifdef RTE_LIBRTE_XEN_DOM0 - mz = rte_memzone_reserve_bounded(z_name, size, 0, 0, alignment, - RTE_PGSIZE_2M); + mz = rte_memzone_reserve_bounded(z_name, size, SOCKET_ID_ANY, 0, + alignment, RTE_PGSIZE_2M); #else - mz = rte_memzone_reserve_aligned(z_name, size, 0, 0, alignment); + mz = rte_memzone_reserve_aligned(z_name, size, SOCKET_ID_ANY, 0, + alignment); #endif if (!mz) return I40E_ERR_NO_MEMORY;