From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id BE14C293B; Fri, 25 Jan 2019 15:12:28 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jan 2019 06:12:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,521,1539673200"; d="scan'208";a="137753951" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.252.8.113]) ([10.252.8.113]) by fmsmga002.fm.intel.com with ESMTP; 25 Jan 2019 06:12:25 -0800 To: Ilya Maximets , David Marchand Cc: dev@dpdk.org, Thomas Monjalon , ShuaiX Zhu , Xueqin Lin , WenjieX A Li , FengqinX Wang , dpdk stable References: <20190125075558.27139-1-i.maximets@samsung.com> <756c04d0-86fd-853d-7f29-6f11a9ec007d@intel.com> <88e56f1a-f86b-7b19-5f82-28ca31dfea7a@samsung.com> From: "Burakov, Anatoly" Message-ID: <0937580d-ddbf-f1f2-a6e2-e0d6dad0f33d@intel.com> Date: Fri, 25 Jan 2019 14:12:24 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <88e56f1a-f86b-7b19-5f82-28ca31dfea7a@samsung.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] test: test zero socket-mem as valid X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jan 2019 14:12:29 -0000 On 25-Jan-19 2:00 PM, Ilya Maximets wrote: > 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. > Good point. Maybe leave it as is then :) Acked-by: Anatoly Burakov -- Thanks, Anatoly