From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ilya Maximets Subject: [PATCH] eal: fix parsing zero socket memory and limits Date: Tue, 22 Jan 2019 19:27:14 +0300 Message-ID: <20190122162714.9144-1-i.maximets@samsung.com> References: Content-Type: text/plain; charset="utf-8" Cc: Thomas Monjalon , Ilya Maximets , stable@dpdk.org To: dev@dpdk.org, Anatoly Burakov Return-path: Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 7F74425D9 for ; Tue, 22 Jan 2019 17:27:23 +0100 (CET) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190122162722euoutp02feaddf9f30afcb362600d2dcee2d5e09~8OHPe-Ei_2788627886euoutp02P for ; Tue, 22 Jan 2019 16:27:22 +0000 (GMT) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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 a386829f3..13f401684 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.17.1