From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cian Ferriter Subject: [PATCH] lib/librte_ether: change socket_id passed to rte_memzone_reserve Date: Thu, 22 Jan 2015 15:05:08 +0000 Message-ID: <1421939108-28666-1-git-send-email-cian.ferriter@intel.com> To: dev-VfR2kkLFssw@public.gmane.org Return-path: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Removes the dependency that this memzone reserve has on the socket currently running on. Following the socket of the master core will yield more predictable results when calling this function after initialisation. Signed-off-by: Cian Ferriter Reviewed-by: Maryam Tahhan Reviewed-by: Bruce Richardson --- lib/librte_ether/rte_ethdev.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) mode change 100644 => 100755 lib/librte_ether/rte_ethdev.c diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c old mode 100644 new mode 100755 index ea3a1fb..088bffc --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -184,7 +184,7 @@ rte_eth_dev_data_alloc(void) if (rte_eal_process_type() == RTE_PROC_PRIMARY){ mz = rte_memzone_reserve(MZ_RTE_ETH_DEV_DATA, RTE_MAX_ETHPORTS * sizeof(*rte_eth_dev_data), - rte_socket_id(), flags); + rte_lcore_to_socket_id(rte_get_master_lcore()), flags); } else mz = rte_memzone_lookup(MZ_RTE_ETH_DEV_DATA); if (mz == NULL) -- 1.7.4.1