From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 482F958F7 for ; Wed, 14 Jan 2015 11:13:38 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 14 Jan 2015 02:13:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="440382559" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.220.69]) by FMSMGA003.fm.intel.com with SMTP; 14 Jan 2015 02:00:42 -0800 Received: by (sSMTP sendmail emulation); Wed, 14 Jan 2015 10:13:34 +0025 Date: Wed, 14 Jan 2015 10:13:34 +0000 From: Bruce Richardson To: Stephen Hemminger Message-ID: <20150114101334.GB10476@bricha3-MOBL3> References: <1421140920-9964-1-git-send-email-cian.ferriter@intel.com> <20150113152415.0b3d0533@urahara> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150113152415.0b3d0533@urahara> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org Subject: Re: [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: , X-List-Received-Date: Wed, 14 Jan 2015 10:13:41 -0000 On Tue, Jan 13, 2015 at 03:24:15PM -0800, Stephen Hemminger wrote: > On Tue, 13 Jan 2015 09:22:00 +0000 > Cian Ferriter wrote: > > > Change the socket id that is passed to rte_memzone_reserve from > > the socket id of current logical core to the socket id of the > > master_lcore. > > --- > > 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 95f2ceb..835540d > > --- 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) > > > Why is this a memzone at all? > Seems like it should be allocated on a per-device basis on the same NUMA node > of the device. Probably with rte_malloc_socket(). > You can't look up a malloced area of memory in a secondary process, since it doesn't have a name. Question is: for normal apps, does the eth_dev_data ever drop out of cache? If not, the numa node used for memory doesn't matter. /Bruce