From 0a703f0f36c11b6f23fad4fab9e79c308811329d Mon Sep 17 00:00:00 2001 From: Ilya Maximets Date: Tue, 22 Jan 2019 19:27:14 +0300 Subject: [PATCH] eal/linux: fix parsing zero socket memory and limits Modern memory mode allowes to not reserve any memory by the '--socket-mem' option. i.e. it could be possible to specify zero preallocated memory like '--socket-mem 0'. Also, it should be possible to configure unlimited memory allocations by '--socket-limit 0'. Both cases are impossible now and blocks starting the DPDK application: ./dpdk-app --socket-limit 0 <...> EAL: invalid parameters for --socket-limit EAL: Invalid 'command line' arguments. Unable to initialize DPDK: Invalid argument Fixes: 6b42f75632f0 ("eal: enable non-legacy memory mode") Cc: stable@dpdk.org Signed-off-by: Ilya Maximets Acked-by: Anatoly Burakov --- lib/librte_eal/linuxapp/eal/eal.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index a386829f30..13f4016841 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -582,10 +582,6 @@ eal_parse_socket_arg(char *strval, volatile uint64_t *socket_arg) socket_arg[i] = val; } - /* check if we have a positive amount of total memory */ - if (total_mem == 0) - return -1; - return 0; } -- 2.20.1