From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 64933A0525; Fri, 21 Feb 2020 02:50:08 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4C626397D; Fri, 21 Feb 2020 02:50:08 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 66E8D1DBD for ; Fri, 21 Feb 2020 02:50:06 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Feb 2020 17:50:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,466,1574150400"; d="scan'208";a="254672685" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga002.jf.intel.com with ESMTP; 20 Feb 2020 17:50:05 -0800 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 20 Feb 2020 17:50:04 -0800 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 20 Feb 2020 17:50:04 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.222]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.225]) with mapi id 14.03.0439.000; Fri, 21 Feb 2020 09:50:02 +0800 From: "Tu, Lijuan" To: "Xiao, QimaiX" , "dts@dpdk.org" CC: "Xiao, QimaiX" Thread-Topic: [dts] [PATCH V1]tests/TestSuite_virtio_user_for_container_networking: add if sentence to verify 2M env Thread-Index: AQHV5kSkja1RR44OoEW0VhBW1qZv6qgk5eXQ Date: Fri, 21 Feb 2020 01:50:01 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BBCC7C3@SHSMSX101.ccr.corp.intel.com> References: <1582020730-323282-1-git-send-email-qimaix.xiao@intel.com> In-Reply-To: <1582020730-323282-1-git-send-email-qimaix.xiao@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1]tests/TestSuite_virtio_user_for_container_networking: add if sentence to verify 2M env 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xiao Qimai > Sent: Tuesday, February 18, 2020 6:12 PM > To: dts@dpdk.org > Cc: Xiao, QimaiX > Subject: [dts] [PATCH > V1]tests/TestSuite_virtio_user_for_container_networking: add if sentence = to > verify 2M env >=20 > * optimize testpmd eal parameters >=20 > Signed-off-by: Xiao Qimai > --- > ...stSuite_virtio_user_for_container_networking.py | 22 +++++++++++-----= ---- > -- > 1 file changed, 11 insertions(+), 11 deletions(-) >=20 > diff --git a/tests/TestSuite_virtio_user_for_container_networking.py > b/tests/TestSuite_virtio_user_for_container_networking.py > index 034587e..cdcae01 100644 > --- a/tests/TestSuite_virtio_user_for_container_networking.py > +++ b/tests/TestSuite_virtio_user_for_container_networking.py > @@ -96,10 +96,8 @@ class TestVirtioUserForContainer(TestCase): > self.verify(len(core_list) >=3D (self.nb_cores*2 + 2), > 'There has not enought cores to test this case %s' % > self.running_case) > - core_list_vhost_user =3D core_list[0:self.nb_cores+1] > - core_list_virtio_user =3D core_list[self.nb_cores+1:self.nb_core= s*2+2] > - self.core_mask_vhost_user =3D utils.create_mask(core_list_vhost_= user) > - self.core_mask_virtio_user =3D utils.create_mask(core_list_virti= o_user) > + self.core_list_vhost_user =3D core_list[0:self.nb_cores+1] > + self.core_list_virtio_user =3D core_list[self.nb_cores+1:self.nb= _cores*2+2] >=20 > def send_and_verify(self): > """ > @@ -133,17 +131,19 @@ class TestVirtioUserForContainer(TestCase): > results_row.append(throughput) > self.result_table_add(results_row) >=20 > + @property > + def check_2M_env(self): > + hugepage_size =3D self.dut.send_expect("cat /proc/meminfo |grep > Hugepagesize|awk '{print($2)}'", "# ") > + return True if hugepage_size =3D=3D '2048' else False > + > def launch_testpmd_as_vhost(self): > """ > start testpmd as vhost > """ > - command_line_client =3D self.dut.target + '/app/testpmd ' + \ > - '-c %s -n %d --socket-mem 1024,1024 --file= -prefix=3Dvhost ' + \ > - '--vdev "net_vhost0,iface=3Dvhost-net,queu= es=3D%d,client=3D0" ' > + \ > - '-- -i --nb-cores=3D%d' > - command_line_client =3D command_line_client % > (self.core_mask_vhost_user, > - self.mem_channels, self.queue_nu= mber, > - self.nb_cores) > + eal_param =3D > self.dut.create_eal_parameters(cores=3Dself.core_list_vhost_user, > prefix=3D'vhost', vdevs=3D["net_vhost0,iface=3Dvhost-net,queues=3D%d,clie= nt=3D0" % > self.queue_number]) > + if self.check_2M_env: > + eal_param +=3D " --single-file-segments" > + command_line_client =3D self.dut.target + '/app/testpmd ' + eal_= param + > ' -- -i --nb-cores=3D%d' % self.nb_cores > self.vhost_user.send_expect(command_line_client, 'testpmd> ', 30= ) > self.vhost_user.send_expect('start', 'testpmd> ', 30) >=20 > -- > 1.8.3.1