From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 19FE85A71 for ; Tue, 13 Jan 2015 10:23:18 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 13 Jan 2015 01:20:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,748,1413270000"; d="scan'208";a="636509426" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by orsmga001.jf.intel.com with ESMTP; 13 Jan 2015 01:23:17 -0800 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.71]) by IRSMSX101.ger.corp.intel.com ([169.254.1.126]) with mapi id 14.03.0195.001; Tue, 13 Jan 2015 09:23:16 +0000 From: "Ferriter, Cian" To: "dev@dpdk.org" Thread-Topic: [PATCH] lib/librte_ether: change socket_id passed to rte_memzone_reserve Thread-Index: AQHQLxJxCtZNxstVx0ajqB3SBqs+d5y9xuPQ Date: Tue, 13 Jan 2015 09:23:16 +0000 Message-ID: References: <1421140920-9964-1-git-send-email-cian.ferriter@intel.com> In-Reply-To: <1421140920-9964-1-git-send-email-cian.ferriter@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 09:23:19 -0000 Passing a socket id of "rte_socket_id()" can cause problems in non DPDK app= lications as there is a dependency on the current logical core we are runni= ng on. Passing " rte_lcore_to_socket_id(rte_get_master_lcore())" as the socket id = to rte_memzone_reserve resolves these issues as the master lcore doesn't ch= ange. -----Original Message----- From: Ferriter, Cian=20 Sent: Tuesday, January 13, 2015 9:22 AM To: dev@dpdk.org Cc: Ferriter, Cian Subject: [PATCH] lib/librte_ether: change socket_id passed to rte_memzone_r= eserve 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 =3D> = 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() =3D=3D RTE_PROC_PRIMARY){ mz =3D 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 =3D rte_memzone_lookup(MZ_RTE_ETH_DEV_DATA); if (mz =3D=3D NULL) -- 1.7.4.1