[dpdk-dev] [PATCH] linuxapp eal: set fd to -1 for MAP_ANONYMOUS cases

Thomas Monjalon thomas at monjalon.net
Thu Apr 12 00:27:31 CEST 2018


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 <nhorman at tuxdriver.com>
> CC: Thomas Monjalon <thomas at monjalon.net>
> CC: Ferruh Yigit <ferruh.yigit at intel.com>
> ---
>  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?





More information about the dev mailing list