From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 98592F72 for ; Fri, 25 Jan 2019 15:00:08 +0100 (CET) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190125140007euoutp0243deb967cc1de051dbd627bba0707fdd~9HCiMuwwH2112421124euoutp02V for ; Fri, 25 Jan 2019 14:00:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190125140007euoutp0243deb967cc1de051dbd627bba0707fdd~9HCiMuwwH2112421124euoutp02V DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1548424807; bh=dVnrKqWI3o+9gCilRvL0X8xgRdhDAXa+ZMgskwJ5dag=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=XYK6aTXpPjZSUZzRog0HvbHJ61VTDCydxDe9mR5yo9vli2fSCFVavbdHnAGTYHCVq W7U+IgtHXxnTbouBJvdZ5yTyAPwWoG+sLbW8mrE/Lvc42n/76RvZOzS/VhT68YIVxw uY8IHe8dTIWmZCvBkgEZvoUh5BJg7x2JIMJwpqXs= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190125140006eucas1p2a8b0c4c468dfa60f46c7b6e63b3a081e~9HChx7inL0062800628eucas1p2I; Fri, 25 Jan 2019 14:00:06 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id BA.A9.04294.6661B4C5; Fri, 25 Jan 2019 14:00:06 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20190125140005eucas1p2ffee9c8054266b6dc890cd3f38e0659e~9HCgwluyT3043830438eucas1p26; Fri, 25 Jan 2019 14:00:05 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20190125140005eusmtrp1e53eb1c2cb854f4fc1ba9b403262c730~9HCgiFh8m2861628616eusmtrp1a; Fri, 25 Jan 2019 14:00:05 +0000 (GMT) X-AuditID: cbfec7f4-835ff700000010c6-a7-5c4b16668517 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id A6.A1.04284.5661B4C5; Fri, 25 Jan 2019 14:00:05 +0000 (GMT) Received: from [106.109.129.180] (unknown [106.109.129.180]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20190125140004eusmtip29326d6e5644d54443ed991aaf2f40568~9HCf7YM9u0239802398eusmtip2r; Fri, 25 Jan 2019 14:00:04 +0000 (GMT) To: "Burakov, Anatoly" , David Marchand Cc: dev@dpdk.org, Thomas Monjalon , ShuaiX Zhu , Xueqin Lin , WenjieX A Li , FengqinX Wang , dpdk stable From: Ilya Maximets Message-ID: <88e56f1a-f86b-7b19-5f82-28ca31dfea7a@samsung.com> Date: Fri, 25 Jan 2019 17:00:04 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <756c04d0-86fd-853d-7f29-6f11a9ec007d@intel.com> Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrFKsWRmVeSWpSXmKPExsWy7djPc7ppYt4xBq/Oalg8ureY2WL7ii42 i3eftjNZHN60msXiSvtPdouDn1awWfzr+MNu8enBCRaLlntr2C1+T57E6sDl8WvBUlaPxXte MnkcuzmN3eP9vqtsHn1bVjEGsEZx2aSk5mSWpRbp2yVwZbS9+cZeMEmqYlPTPNYGxnWiXYyc HBICJhLnT/9m62Lk4hASWMEosaHnOCuE84VR4vXhmVCZz4wS0x9cZ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T6ts1gByli FvjEKPHo/npGiI59TBLX555hAqliE9CROLX6CCOIzStgJ7HnznqwOIuAqsTZlbeZQWxRgQiJ sy/XQdUISpyc+YQF5FJOAVuJK1M1QcLMAuoSf+ZdYoawxSWavqxkhbDlJZq3zmaewCg0C0n3 LCQts5C0zELSsoCRZRWjSGppcW56brGhXnFibnFpXrpecn7uJkZgTG479nPzDsZLG4MPMQpw MCrx8Ebwe8cIsSaWFVfmHmKU4GBWEuHlFAAK8aYkVlalFuXHF5XmpBYfYjQF+m0is5Rocj4w XeSVxBuaGppbWBqaG5sbm1koifOeN6iMEhJITyxJzU5NLUgtgulj4uCUamBk+R5bLli3el1r Ek9m76TEpTszfBpVGt/8TPI6efjKdPGzrDFbL99UKD6l6acvP+HbD603DUmeNscY2JLYT86d Gad8yfu+yBWmyWkqj3KirP8VNv+bstTtzBKzOUk2P5u76lqaK35GbtbR3uN0Qm3j3sKOD1xi 8WtmXDneuGfK6+TrG56cTf+vxFKckWioxVxUnAgAkvZ+Zt8CAAA= X-CMS-MailID: 20190125140005eucas1p2ffee9c8054266b6dc890cd3f38e0659e X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190125075604eucas1p2ecf0177c3f953e889721d784ef387254 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190125075604eucas1p2ecf0177c3f953e889721d784ef387254 References: <20190125075558.27139-1-i.maximets@samsung.com> <756c04d0-86fd-853d-7f29-6f11a9ec007d@intel.com> Subject: Re: [dpdk-dev] [PATCH] test: test zero socket-mem as valid X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jan 2019 14:00:08 -0000 On 25.01.2019 16:48, Burakov, Anatoly wrote: > On 25-Jan-19 9:53 AM, David Marchand wrote: >> >> >> On Fri, Jan 25, 2019 at 9:06 AM Ilya Maximets > wrote: >> >>     On 25.01.2019 10:55, Ilya Maximets wrote: >>      > Dynamic memory mode allowes zero socket-mem because all the >>      > required memory could be allocated on demand. >>      > >>      > Fixes: 339c2244b4f1 ("eal: fix parsing zero socket memory and >>     limits") >>      > Cc: stable@dpdk.org >>      > >> >>     Reported-by: Shuai Zhu >     > >> >>      > Signed-off-by: Ilya Maximets >     > >> >>      > --- >>      >  test/test/test_eal_flags.c | 6 +++--- >>      >  1 file changed, 3 insertions(+), 3 deletions(-) >>      > >>      > diff --git a/test/test/test_eal_flags.c b/test/test/test_eal_flags.c >>      > index e3a60c7ae..81e345b87 100644 >>      > --- a/test/test/test_eal_flags.c >>      > +++ b/test/test/test_eal_flags.c >>      > @@ -1158,7 +1158,7 @@ test_memory_flags(void) >>      >       const char *argv1[] = {prgname, "-c", "10", "-n", "2", >>      >                       "--file-prefix=" memtest, "-m", >>     DEFAULT_MEM_SIZE}; >>      > >>      > -     /* invalid (zero) --socket-mem flag */ >>      > +     /* valid (zero) --socket-mem flag */ >>      >       const char *argv2[] = {prgname, "-c", "10", "-n", "2", >>      >                       "--file-prefix=" memtest, >>     "--socket-mem=0,0,0,0"}; >>      > >>      > @@ -1256,8 +1256,8 @@ test_memory_flags(void) >>      >               printf("Error - process failed with valid -m flag!\n"); >>      >               return -1; >>      >       } >>      > -     if (launch_proc(argv2) == 0) { >>      > -             printf("Error - process run ok with invalid (zero) >>     --socket-mem!\n"); >>      > +     if (launch_proc(argv2) != 0) { >>      > +             printf("Error - process failed with valid (zero) >>     --socket-mem!\n"); >>      >               return -1; >>      >       } >>      > >>      > >> >> >> Reviewed-by: David Marchand > >> >> >> --  >> David Marchand > > Now that i think of it, maybe it's not that simple. > > --socket-mem/-m flag with zero is still an invalid value *if* --legacy-mem is involved. However, it is a valid value in non-legacy mode. > > So maybe the test should reflect this, and the previous fix should have instead added a check for legacy mode rather than disabling the zero check outright. > I don't think that it's a big deal, because "--socket-mem=0 --legacy-mem" quickly fails with clear: EAL: WARNING: Master core has no memory on local socket! IMHO, It's actually more informative than previous: EAL: invalid parameters for --socket-limit I agree that we could add a test for a legacy-mem cases, but that's a bit different task.