From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 12BFB271 for ; Sat, 2 Dec 2017 01:54:11 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Dec 2017 16:54:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,348,1508828400"; d="scan'208";a="8200748" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.241.225.115]) ([10.241.225.115]) by FMSMGA003.fm.intel.com with ESMTP; 01 Dec 2017 16:54:10 -0800 References: <24F37CB2-A34A-472D-88DF-3E27E0E98F78@mykolab.com> Cc: Michael McConville , dev@dpdk.org To: Matej Vido From: Ferruh Yigit Message-ID: Date: Fri, 1 Dec 2017 16:54:10 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <24F37CB2-A34A-472D-88DF-3E27E0E98F78@mykolab.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] mmap(2) returns MAP_FAILED, not NULL, on failure X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Dec 2017 00:54:12 -0000 On 11/30/2017 10:51 PM, Michael McConville wrote: > Signed-off-by: Michael McConville > --- > lib/librte_eal/bsdapp/eal/eal_memory.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_eal/bsdapp/eal/eal_memory.c b/lib/librte_eal/bsdapp/eal/eal_memory.c > index 6ba058578..2c8a4b592 100644 > --- a/lib/librte_eal/bsdapp/eal/eal_memory.c > +++ b/lib/librte_eal/bsdapp/eal/eal_memory.c > @@ -155,7 +155,7 @@ rte_eal_hugepage_attach(void) > /* Map the shared hugepage_info into the process address spaces */ > hpi = mmap(NULL, sizeof(struct hugepage_info), PROT_READ, MAP_PRIVATE, > fd_hugepage_info, 0); > - if (hpi == NULL) { > + if (hpi == MAP_FAILED) { Hi Matej, Can you fix same thing in szedata2 PMD please [1] ? [1] http://dpdk.org/browse/dpdk/tree/drivers/net/szedata2/rte_eth_szedata2.c?h=v17.11#n1556 > RTE_LOG(ERR, EAL, "Could not mmap %s\n", eal_hugepage_info_path()); > goto error; > } >