Message ID | 20190122162714.9144-1-i.maximets@samsung.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Thomas Monjalon |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 66DAF3237; Tue, 22 Jan 2019 17:27:24 +0100 (CET) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 7F74425D9 for <dev@dpdk.org>; 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 <dev@dpdk.org>; Tue, 22 Jan 2019 16:27:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190122162722euoutp02feaddf9f30afcb362600d2dcee2d5e09~8OHPe-Ei_2788627886euoutp02P DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1548174442; bh=q6DEmYJzTGC6NChfoqxDcKPKDC/1rB3mluicyZVD2E0=; h=From:To:Cc:Subject:Date:References:From; b=B6tXLipHUqB0aekhLyCQRKFBsV7J6bBeTTgh64OZhu9RDZSMMYII+VLr3JY6luINV aBxSoWtbdlL/YREzyJlusBr52Rpoo0CnT7F+MdfL3fmK5NBM+EhtlPdwj2Ni9asaB/ xTLc39KEv2BzeDHactwRDcvLHND03q1PIfsS6414= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190122162721eucas1p21f8e32a969ee437ebc74086e44b67b02~8OHPAtJdx1473714737eucas1p2x; Tue, 22 Jan 2019 16:27:21 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 0E.50.04294.964474C5; Tue, 22 Jan 2019 16:27:21 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190122162720eucas1p1a9b93996c3a9384ba141313d3de9e37a~8OHOKH6cN1324213242eucas1p1E; Tue, 22 Jan 2019 16:27:20 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20190122162720eusmtrp100cc6734adf5ab5f2fab613bce59f696~8OHN7_hRu0172601726eusmtrp1T; Tue, 22 Jan 2019 16:27:20 +0000 (GMT) X-AuditID: cbfec7f4-84fff700000010c6-be-5c47446996a1 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 32.66.04128.864474C5; Tue, 22 Jan 2019 16:27:20 +0000 (GMT) Received: from imaximets.rnd.samsung.ru (unknown [106.109.129.180]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20190122162719eusmtip2aa329e20e4d956bb3a25b8e530f489b9~8OHNKsnv72152221522eusmtip2w; Tue, 22 Jan 2019 16:27:19 +0000 (GMT) From: Ilya Maximets <i.maximets@samsung.com> To: dev@dpdk.org, Anatoly Burakov <anatoly.burakov@intel.com> Cc: Thomas Monjalon <thomas@monjalon.net>, Ilya Maximets <i.maximets@samsung.com>, stable@dpdk.org Date: Tue, 22 Jan 2019 19:27:14 +0300 Message-Id: <20190122162714.9144-1-i.maximets@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrHIsWRmVeSWpSXmKPExsWy7djPc7qZLu4xBtPPyVg8ureY2eLdp+1M Flfaf7Jb/Ov4w27x6cEJFgdWj18LlrJ6LN7zksnj2M1p7B59W1YxBrBEcdmkpOZklqUW6dsl cGUs6L3OVLCds2LVvz7mBsab7F2MnBwSAiYS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QsDBQeOOTF8wgNouAqsTrBReZQGxeASuJ TdM2Qs2Xl1i94QDzBEaeBYwMqxhFUkuLc9Nzi430ihNzi0vz0vWS83M3MQKDbNuxn1t2MHa9 Cz7EKMDBqMTD+8PMPUaINbGsuDL3EKMEB7OSCK/rRbcYId6UxMqq1KL8+KLSnNTiQ4ymQMsn MkuJJucDIyCvJN7Q1NDcwtLQ3Njc2MxCSZz3vEFllJBAemJJanZqakFqEUwfEwenVANj741q Jss6l/iIQKv1AU5rXNXFjv+T+D279Krv3LmMQYUneNV+93bOfeAWmGszf8pKnV++k5acSBDY lperale/pH6yyoep/6a/XBj9KVhL7t+Byw//tsn+bHUMfvBm6zc7Tg2RJb3pZx4Kh71/sXLv v31bS3Z1Hi2z3j1tp4NqRtsSXy+P/7oZSizFGYmGWsxFxYkAWCNHIEgCAAA= X-CMS-MailID: 20190122162720eucas1p1a9b93996c3a9384ba141313d3de9e37a X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190122162720eucas1p1a9b93996c3a9384ba141313d3de9e37a X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190122162720eucas1p1a9b93996c3a9384ba141313d3de9e37a References: <CGME20190122162720eucas1p1a9b93996c3a9384ba141313d3de9e37a@eucas1p1.samsung.com> Subject: [dpdk-dev] [PATCH] eal: fix parsing zero socket memory and limits X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series |
eal: fix parsing zero socket memory and limits
|
|
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
ci/Intel-compilation | success | Compilation OK |
ci/mellanox-Performance-Testing | success | Performance Testing PASS |
ci/intel-Performance-Testing | success | Performance Testing PASS |
Commit Message
Ilya Maximets
Jan. 22, 2019, 4:27 p.m. UTC
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 <i.maximets@samsung.com>
---
lib/librte_eal/linuxapp/eal/eal.c | 4 ----
1 file changed, 4 deletions(-)
Comments
On 22-Jan-19 4:27 PM, Ilya Maximets wrote: > 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 <i.maximets@samsung.com> > --- That's kind of an odd parameter to pass, as it is assumed that if you don't need any limitations or preallocated memory, you don't specify these flags in the first place, but OK :) Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
23/01/2019 11:15, Burakov, Anatoly: > On 22-Jan-19 4:27 PM, Ilya Maximets wrote: > > 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 <i.maximets@samsung.com> > > --- > > That's kind of an odd parameter to pass, as it is assumed that if you > don't need any limitations or preallocated memory, you don't specify > these flags in the first place, but OK :) > > Acked-by: Anatoly Burakov <anatoly.burakov@intel.com> Applied, thanks
> On Jan 23, 2019, at 5:03 PM, Thomas Monjalon <thomas@monjalon.net> wrote: > > 23/01/2019 11:15, Burakov, Anatoly: >> On 22-Jan-19 4:27 PM, Ilya Maximets wrote: >>> 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 <i.maximets@samsung.com> >>> --- >> >> That's kind of an odd parameter to pass, as it is assumed that if you >> don't need any limitations or preallocated memory, you don't specify >> these flags in the first place, but OK :) I personally would have liked a comment replacing the three lines stating that total_mem of zero is fine as it only seems reasonable to document the reason total_mem can be zero. >> >> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com> > > Applied, thanks Regards, Keith
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; }