From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from office2.cesnet.cz (office2.cesnet.cz [195.113.144.244]) by dpdk.org (Postfix) with ESMTP id 3BFD414E8 for ; Mon, 4 Dec 2017 08:32:30 +0100 (CET) Received: from [IPv6:2001:67c:1220:c1a2:1d93:f44b:c762:c658] (unknown [IPv6:2001:67c:1220:c1a2:1d93:f44b:c762:c658]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by office2.cesnet.cz (Postfix) with ESMTPSA id 5901A400052; Mon, 4 Dec 2017 08:32:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cesnet.cz; s=office2; t=1512372750; bh=nomcW+IxaDGcXA09AZrZNecarZ9nFrvyk+ldwFc/qg4=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=SzQREd4zZLQo3tMUgicffHb4GxMDvs53qVzaGJUZOAo2WWbYfqX6bP6Gay6isk8Hl z9B2M0VWX0bhjgkrmQBNOHPV3DbKotyUguIMEK7r61qS3Vk888W1QGm3x8jWtALZHu jb6VvgZ+dj/erSbZ+Ws8qUHmWgLC431IySuMsKlg= To: Ferruh Yigit Cc: Michael McConville , dev@dpdk.org References: <24F37CB2-A34A-472D-88DF-3E27E0E98F78@mykolab.com> From: Matej Vido Message-ID: <90735d0a-de20-5388-4355-5dad1f9f4376@cesnet.cz> Date: Mon, 4 Dec 2017 08:32:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US 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: Mon, 04 Dec 2017 07:32:31 -0000 On 02.12.2017 01:54, Ferruh Yigit wrote: > 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 Hi Ferruh, I will send a patch. Thanks, Matej > >> RTE_LOG(ERR, EAL, "Could not mmap %s\n", eal_hugepage_info_path()); >> goto error; >> } >>