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 8BF3319F5 for ; Wed, 21 Sep 2016 09:57:54 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP; 21 Sep 2016 00:57:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,372,1470726000"; d="scan'208";a="171316910" Received: from stv-crb-56.sh.intel.com (HELO [10.239.128.116]) ([10.239.128.116]) by fmsmga004.fm.intel.com with ESMTP; 21 Sep 2016 00:57:52 -0700 Message-ID: <57E23E41.1010608@intel.com> Date: Wed, 21 Sep 2016 16:01:05 +0800 From: "Liu, Yong" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "xu,gang" , dts@dpdk.org References: <1474442404-24219-1-git-send-email-gangx.xu@intel.com> <1474442404-24219-3-git-send-email-gangx.xu@intel.com> In-Reply-To: <1474442404-24219-3-git-send-email-gangx.xu@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dts] [PATCH V1 2/4] fix TestSuite unit_tests_lpm X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 07:57:54 -0000 Hi gang, test suite is not the right instance to handle hugepage. We have planned to let unified module to handle this. My suggestion is that just increased default FreeBSD huge page memory size in framework. And warning that huge page is insufficient in linux OS. On 09/21/2016 03:20 PM, xu,gang wrote: > Signed-off-by: xu,gang > --- > tests/TestSuite_unit_tests_lpm.py | 15 +++++++++------ > 1 file changed, 9 insertions(+), 6 deletions(-) > > diff --git a/tests/TestSuite_unit_tests_lpm.py b/tests/TestSuite_unit_tests_lpm.py > index dadb492..253cbb4 100644 > --- a/tests/TestSuite_unit_tests_lpm.py > +++ b/tests/TestSuite_unit_tests_lpm.py > @@ -83,16 +83,19 @@ class TestUnitTestsLpmIpv6(TestCase): > """ > [arch, machine, env, toolchain] = self.target.split('-') > self.verify(arch == "x86_64", "lpm6 request huge memory") > - > - hugepage_ori = self.dut.get_total_huge_pages() > - self.dut.set_huge_pages(4096) > - hugepage_num = self.dut.get_total_huge_pages() > - self.verify(hugepage_num >= 4096, "failed to request huge memory") > + if env == 'bsdapp': > + self.dut.send_expect("kenv hw.contigmem.num_buffers=4", "#", 60) > + else: > + hugepage_ori = self.dut.get_total_huge_pages() > + page_size = self.dut.send_expect("awk '/Hugepagesize/ {print $2}' /proc/meminfo", "# ") > + if hugepage_ori * int(page_size) <= 4096 * 2048: > + self.dut.set_huge_pages(4096) > + hugepage_num = self.dut.get_total_huge_pages() > + self.verify(hugepage_num >= 4096, "failed to request huge memory") > > self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 60) > out = self.dut.send_expect("lpm6_autotest", "RTE>>", 3600) > self.dut.send_expect("quit", "# ") > - self.dut.set_huge_pages(hugepage_ori) > self.verify("Test OK" in out, "Test failed") > > def tear_down(self):