From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 9D6319604 for ; Tue, 10 May 2016 11:13:59 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP; 10 May 2016 02:11:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,604,1455004800"; d="scan'208";a="699632782" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by FMSMGA003.fm.intel.com with ESMTP; 10 May 2016 02:11:35 -0700 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 10 May 2016 02:11:34 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 10 May 2016 02:11:34 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.58]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.116]) with mapi id 14.03.0248.002; Tue, 10 May 2016 17:11:32 +0800 From: "Tan, Jianfeng" To: "Gonzalez Monroy, Sergio" , "dev@dpdk.org" CC: "david.marchand@6wind.com" , "nhorman@tuxdriver.com" Thread-Topic: [PATCH v3] eal: make hugetlb initialization more robust Thread-Index: AQHRqeBo39m7EchXdka4GxQj07G2kp+xWUeAgACH/nA= Date: Tue, 10 May 2016 09:11:32 +0000 Message-ID: References: <1457089092-4128-1-git-send-email-jianfeng.tan@intel.com> <1462790934-87685-1-git-send-email-jianfeng.tan@intel.com> <1437de5d-b233-0c2a-7181-39d267c395c4@intel.com> In-Reply-To: <1437de5d-b233-0c2a-7181-39d267c395c4@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3] eal: make hugetlb initialization more robust 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, 10 May 2016 09:14:00 -0000 Hi Sergio, > -----Original Message----- > From: Gonzalez Monroy, Sergio > Sent: Tuesday, May 10, 2016 4:55 PM > To: Tan, Jianfeng; dev@dpdk.org > Cc: david.marchand@6wind.com; nhorman@tuxdriver.com > Subject: Re: [PATCH v3] eal: make hugetlb initialization more robust >=20 >=20 > Hi Jianfeng, >=20 > On 09/05/2016 11:48, Jianfeng Tan wrote: >=20 > > /* find physical addresses and sockets for each hugepage */ > > @@ -1172,8 +1255,9 @@ rte_eal_hugepage_init(void) > > hp_offset +=3D new_pages_count[i]; > > #else > > /* remap all hugepages */ > > - if (map_all_hugepages(&tmp_hp[hp_offset], hpi, 0) < 0){ > > - RTE_LOG(DEBUG, EAL, "Failed to remap %u MB > pages\n", > > + if ((uint32_t)map_all_hugepages(&tmp_hp[hp_offset], hpi, > 0) !=3D > > + hpi->num_pages[0]) { >=20 > It probably makes more sense to have map_all_hugepages return uint32_t > instead. Yes, I agree. I was wrongly expecting there's a freebsd version map_all_hug= epages with the same function type. I'll fix this in next version. Thanks, Jianfeng >=20 > Sergio