From patchwork Thu Jan 22 15:05:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cian Ferriter X-Patchwork-Id: 2486 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 6CBF15A8E; Thu, 22 Jan 2015 16:05:55 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 3754D5A15 for ; Thu, 22 Jan 2015 16:05:51 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 22 Jan 2015 06:59:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,449,1418112000"; d="scan'208";a="654936203" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga001.fm.intel.com with ESMTP; 22 Jan 2015 07:05:12 -0800 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t0MF5Blf028528; Thu, 22 Jan 2015 15:05:11 GMT Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id t0MF5Api028715; Thu, 22 Jan 2015 15:05:10 GMT Received: (from cferrite@localhost) by sivswdev01.ir.intel.com with id t0MF5A7e028711; Thu, 22 Jan 2015 15:05:10 GMT From: Cian Ferriter To: dev@dpdk.org Date: Thu, 22 Jan 2015 15:05:08 +0000 Message-Id: <1421939108-28666-1-git-send-email-cian.ferriter@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] lib/librte_ether: change socket_id passed to rte_memzone_reserve X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.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)