From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] linuxapp eal: set fd to -1 for MAP_ANONYMOUS cases Date: Thu, 12 Apr 2018 00:27:31 +0200 Message-ID: <5500696.OPBsZNLSF3@xps> References: <20180402120619.30404-1-nhorman@tuxdriver.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Ferruh Yigit To: Neil Horman , anatoly.burakov@intel.com Return-path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id A0A8B1B847 for ; Thu, 12 Apr 2018 00:27:33 +0200 (CEST) In-Reply-To: <20180402120619.30404-1-nhorman@tuxdriver.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 02/04/2018 14:06, Neil Horman: > https://dpdk.org/tracker/show_bug.cgi?id=18 > > Indicated that several mmap call sites in the linuxapp eal code used an > fd that was not -1 in their calls while using MAP_ANONYMOUS. While > probably not a huge deal, the man page does say the fd should be -1 for > portability, as some implementations don't ignore fd as they should for > MAP_ANONYMOUS, and seting -1 here allows us to eliminate some code. > > Signed-off-by: Neil Horman > CC: Thomas Monjalon > CC: Ferruh Yigit > --- > lib/librte_eal/linuxapp/eal/eal_memory.c | 32 +++++++------------------------- > 1 file changed, 7 insertions(+), 25 deletions(-) This patch probably need a rebase on top of Anatoly's patches. Anatoly, please, could you review?