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 975BBA2EFC for ; Wed, 18 Sep 2019 08:16:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 724101BF9A; Wed, 18 Sep 2019 08:16:42 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 3CE1F1BF8B for ; Wed, 18 Sep 2019 08:16:41 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Sep 2019 23:16:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,519,1559545200"; d="scan'208";a="362087154" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga005.jf.intel.com with ESMTP; 17 Sep 2019 23:16:39 -0700 Received: from fmsmsx119.amr.corp.intel.com (10.18.124.207) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 17 Sep 2019 23:16:38 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX119.amr.corp.intel.com (10.18.124.207) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 17 Sep 2019 23:16:38 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.113]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.53]) with mapi id 14.03.0439.000; Wed, 18 Sep 2019 14:16:36 +0800 From: "Mo, YufengX" To: "dts@dpdk.org" , "Wang, Yinan" , "Ma, LihongX" Thread-Topic: [dts][PATCH V1 1/1] tests/pvp_vhost_user_built_in_net_driver: support one Thread-Index: AQHVbehPPOhzMD4jMEWEAGZ0dPALeKcw9V0w Date: Wed, 18 Sep 2019 06:16:36 +0000 Message-ID: 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: 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" Tested by Mo, YufengX > -----Original Message----- > From: Mo, YufengX > 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: su= pport 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/test= s/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_vh= ost_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=3Dvi= rtio-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.vir= tio_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