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 CB8F9A2EFC for ; Fri, 20 Sep 2019 08:48:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8A4A81F2D5; Fri, 20 Sep 2019 08:48:14 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 137AA1F2D4 for ; Fri, 20 Sep 2019 08:48:12 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Sep 2019 23:48:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,527,1559545200"; d="scan'208";a="188317831" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga007.fm.intel.com with ESMTP; 19 Sep 2019 23:48:12 -0700 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 19 Sep 2019 23:48:11 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 19 Sep 2019 23:48:11 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.92]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.195]) with mapi id 14.03.0439.000; Fri, 20 Sep 2019 14:48:09 +0800 From: "Tu, Lijuan" To: "Mo, YufengX" , "dts@dpdk.org" , "Wang, Yinan" , "Ma, LihongX" CC: "Mo, YufengX" Thread-Topic: [dts] [PATCH V1 1/1] tests/pvp_vhost_user_built_in_net_driver: support one Thread-Index: AQHVbehcu0ZSqA9dS0iXQxyZ+ybPn6c0IuDw Date: Fri, 20 Sep 2019 06:48:09 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB24DD5@SHSMSX101.ccr.corp.intel.com> References: <20190918061400.4397-1-yufengx.mo@intel.com> <20190918061400.4397-2-yufengx.mo@intel.com> In-Reply-To: <20190918061400.4397-2-yufengx.mo@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-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYWNjZDA4YWQtMTk1Zi00NjhkLWFhOTgtNzZmMTA0ODI5ZjFiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiMldPTHlmTVRZQ2pMYWdYaExpZEd2Y0dcL2I3QjZLb25iZTB0WG05a0hJR09sa0tRcjMxMUFIdDNIQXFobVY2Y2kifQ== 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 1/1] tests/pvp_vhost_user_built_in_net_driver: support one 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 yufengmx > Sent: Wednesday, September 18, 2019 2:14 PM > To: dts@dpdk.org; Wang, Yinan ; Ma, LihongX > > Cc: Mo, YufengX > Subject: [dts] [PATCH V1 1/1] tests/pvp_vhost_user_built_in_net_driver: > support one >=20 > socket server >=20 > set socket memsize to support suite deployed on one socket server. >=20 > Signed-off-by: yufengmx > --- > ...uite_pvp_vhost_user_built_in_net_driver.py | 20 +++++++++++++++---- > 1 file changed, 16 insertions(+), 4 deletions(-) >=20 > diff --git a/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py > b/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py > index 52d9df9..1c13665 100644 > --- a/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py > +++ b/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py > @@ -78,6 +78,10 @@ class TestPVPVhostUserBuiltInNetDriver(TestCase): > self.tester.send_expect('mkdir -p %s' % self.out_path, '# ') > # create an instance to set stream field setting > self.pktgen_helper =3D PacketGeneratorHelper() > + > + # set memory size > + self.verify(self.sockets > 0, 'cpu socket should not be zero') > + self.mem_size =3D ','.join(['2048']*self.sockets) >=20 > def set_up(self): > """ > @@ -100,6 +104,13 @@ class TestPVPVhostUserBuiltInNetDriver(TestCase): > self.table_header.append("% linerate") > self.result_table_create(self.table_header) >=20 > + @property > + def sockets(self): > + sockets =3D [ > + cpu.get('socket') for cpu in self.dut.get_all_cores() > + if cpu.get('socket')] > + return len(set(sockets)) > + > def prepare_vhost_switch(self): > cmd_info =3D self.dut.send_expect("grep 'define MAX_QUEUES' %s" = % > "./examples/vhost/main.c", "# ") @@ -158,12 +169= ,12 @@ > class TestPVPVhostUserBuiltInNetDriver(TestCase): > """ > self.dut.send_expect("rm -rf ./vhost.out", "#") > command_line_client =3D "./examples/vhost/build/app/vhost-switch= " + \ > - "-c %s -n %d --socket-mem 2048,2048 -- " += \ > + "-c %s -n %d --socket-mem %s -- " + \ > "-p 0x1 --mergeable 0 --vm2vm 1 " + \ > "--builtin-net-driver --socket-file ./vho= st-net" + \ > "> ./vhost.out &" > command_line_client =3D command_line_client % > (self.core_mask_vhost_user, > - self.mem_channels) > + self.mem_channels, > + self.mem_size) > self.vhost_switch.send_expect(command_line_client, "# ", 120) > time.sleep(15) > try: > @@ -185,11 +196,12 @@ class TestPVPVhostUserBuiltInNetDriver(TestCase): > start testpmd on virtio > """ > command_line_user =3D "./%s/app/testpmd -n %d -c %s " + \ > - "--no-pci --socket-mem 2048,2048 --file-pref= ix=3Dvirtio-user " > + \ > + "--no-pci --socket-mem %s > + --file-prefix=3Dvirtio-user " + \ > "--vdev=3Dnet_virtio_user0,mac=3D%s,path=3D.= /vhost- > net,queues=3D1 " + \ > "-- -i --rxq=3D1 --txq=3D1" > command_line_user =3D command_line_user % (self.target, > - self.mem_channels, self.core_mask_virtio_user, self.virtio_m= ac) > + self.mem_channels, > self.core_mask_virtio_user, > + self.mem_size, > + self.virtio_mac) > self.virtio_user.send_expect(command_line_user, "testpmd> ", 120= ) > self.virtio_user.send_expect("set fwd mac", "testpmd> ", 120) > self.virtio_user.send_expect("start tx_first", "testpmd> ", 120) > -- > 2.21.0