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 E8C4895D8 for ; Tue, 10 May 2016 10:54:35 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 10 May 2016 01:54:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,604,1455004800"; d="scan'208";a="949817645" Received: from smonroyx-mobl.ger.corp.intel.com (HELO [10.237.220.58]) ([10.237.220.58]) by orsmga001.jf.intel.com with ESMTP; 10 May 2016 01:54:33 -0700 To: Jianfeng Tan , dev@dpdk.org References: <1457089092-4128-1-git-send-email-jianfeng.tan@intel.com> <1462790934-87685-1-git-send-email-jianfeng.tan@intel.com> Cc: david.marchand@6wind.com, nhorman@tuxdriver.com From: Sergio Gonzalez Monroy Message-ID: <1437de5d-b233-0c2a-7181-39d267c395c4@intel.com> Date: Tue, 10 May 2016 09:54:33 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <1462790934-87685-1-git-send-email-jianfeng.tan@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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 08:54:36 -0000 Hi Jianfeng, On 09/05/2016 11:48, Jianfeng Tan wrote: > /* find physical addresses and sockets for each hugepage */ > @@ -1172,8 +1255,9 @@ rte_eal_hugepage_init(void) > hp_offset += 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) != > + hpi->num_pages[0]) { It probably makes more sense to have map_all_hugepages return uint32_t instead. Sergio