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 2B87EA0525; Fri, 21 Feb 2020 02:56:12 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 158C94C81; Fri, 21 Feb 2020 02:56:12 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id ECDC325B3 for ; Fri, 21 Feb 2020 02:56:10 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Feb 2020 17:56:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,466,1574150400"; d="scan'208";a="349289565" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga001.fm.intel.com with ESMTP; 20 Feb 2020 17:56:09 -0800 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 20 Feb 2020 17:56:09 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 20 Feb 2020 17:56:09 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.222]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.196]) with mapi id 14.03.0439.000; Fri, 21 Feb 2020 09:56:07 +0800 From: "Tu, Lijuan" To: "Tu, Lijuan" , "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: AQHV6FlQzMHZ2fkxT0CzivB2SRfY1Kgk42ew Date: Fri, 21 Feb 2020 01:56:07 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BBCC866@SHSMSX101.ccr.corp.intel.com> References: <1582020730-323282-1-git-send-email-qimaix.xiao@intel.com> <8CE3E05A3F976642AAB0F4675D0AD20E0BBCC7C3@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <8CE3E05A3F976642AAB0F4675D0AD20E0BBCC7C3@SHSMSX101.ccr.corp.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" Sorry, applied V2, not v1. > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Tu, Lijuan > Sent: Friday, February 21, 2020 9:50 AM > To: Xiao, QimaiX ; dts@dpdk.org > Cc: Xiao, QimaiX > Subject: Re: [dts] [PATCH > V1]tests/TestSuite_virtio_user_for_container_networking: add if sentence = to > verify 2M env >=20 > Applied, thanks >=20 > > -----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 > > > > * optimize testpmd eal parameters > > > > Signed-off-by: Xiao Qimai > > --- > > ...stSuite_virtio_user_for_container_networking.py | 22 > > +++++++++++--------- > > -- > > 1 file changed, 11 insertions(+), 11 deletions(-) > > > > 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_co= res*2+2] > > - self.core_mask_vhost_user =3D utils.create_mask(core_list_vhos= t_user) > > - self.core_mask_virtio_user =3D utils.create_mask(core_list_vir= tio_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] > > > > def send_and_verify(self): > > """ > > @@ -133,17 +131,19 @@ class TestVirtioUserForContainer(TestCase): > > results_row.append(throughput) > > self.result_table_add(results_row) > > > > + @property > > + def check_2M_env(self): > > + hugepage_size =3D self.dut.send_expect("cat /proc/meminfo |gre= p > > 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 --fi= le-prefix=3Dvhost ' + > \ > > - '--vdev "net_vhost0,iface=3Dvhost-net,qu= eues=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_= number, > > - 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,cl= ient=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) > > > > -- > > 1.8.3.1