From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) by dpdk.org (Postfix) with ESMTP id 729DE58F7 for ; Wed, 14 Jan 2015 00:24:26 +0100 (CET) Received: by mail-pa0-f45.google.com with SMTP id lf10so6517700pab.4 for ; Tue, 13 Jan 2015 15:24:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=mY+WIBTCVeGNRguUeyvQBBzA32AvgqmzrIwxGEyW46A=; b=BxILjBMR9sSS78VGHZQVLT7a5zp+XTiozXpxt3qWAeI2bWD/wInK993XkrvMPhS5iZ sOydJ+7fGEk6GxGMMh7O8vJKM4ZwlqmMwfGSP53OtoRBEOYA59nu3uhYWQOcEM6/hYAG Au4aWS80CLDFMQ9xyD1WsxjfJMJ9KjABH+cMn3ps10/dwwZaSIGRTYlN2H5nKQQCUX62 sOhxELkKAM2wrk0arweWPipHMy66bKiioz3owPGHCHuq9JzQu2qdkBBC4fTvQzNcZst7 60Dvc+8nLnkT+SOcUaxg+aS7HFMSMVhtoVeas+8rRcZGu2h+ymGXWDc6NTvhwNrfMiS+ hukg== X-Gm-Message-State: ALoCoQktOpyKqWllqsJU+Xr1ChcRmesRZajKyzSAd07OPXN9tMzTOKrvZkSRx1+TV0C+7NttCyp6 X-Received: by 10.70.37.4 with SMTP id u4mr1253666pdj.40.1421191465752; Tue, 13 Jan 2015 15:24:25 -0800 (PST) Received: from urahara (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by mx.google.com with ESMTPSA id bx13sm18023825pdb.19.2015.01.13.15.24.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jan 2015 15:24:25 -0800 (PST) Date: Tue, 13 Jan 2015 15:24:15 -0800 From: Stephen Hemminger To: Cian Ferriter Message-ID: <20150113152415.0b3d0533@urahara> In-Reply-To: <1421140920-9964-1-git-send-email-cian.ferriter@intel.com> References: <1421140920-9964-1-git-send-email-cian.ferriter@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: Tue, 13 Jan 2015 23:24:26 -0000 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().