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 3E015A04EF; Mon, 1 Jun 2020 05:23:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 20FF61D40D; Mon, 1 Jun 2020 05:23:57 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 077721D174 for ; Mon, 1 Jun 2020 05:23:54 +0200 (CEST) IronPort-SDR: hLFilQYOlwzbo6CQ7ilT5Ph8J+ehTiy6pC5+jPgMDA2mdJQtli6rmFLmixTKl9xDH1GpzB63s+ 2RcX0yMeZRIQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2020 20:23:53 -0700 IronPort-SDR: EssIwdL6rbnMtOSSnRPyeMUIUrfqDw7T4F8Mh2tDvAZuRxcqj28XqfsI8fR69IOxURwQvRq3vr /GIZdVfUFhdw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,459,1583222400"; d="scan'208";a="268181723" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga003.jf.intel.com with ESMTP; 31 May 2020 20:23:53 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 31 May 2020 20:23:52 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sun, 31 May 2020 20:23:52 -0700 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Sun, 31 May 2020 20:23:52 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.85]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.168]) with mapi id 14.03.0439.000; Mon, 1 Jun 2020 11:23:50 +0800 From: "Tu, Lijuan" To: "Han, YingyaX" , "dts@dpdk.org" CC: "Han, YingyaX" Thread-Topic: [dts] [PATCH V1]tests/multiprocess: fix app to use the same socket cores Thread-Index: AQHWM/mVaLjJ7ff92US6aC+AZOPIOajDIB+A Date: Mon, 1 Jun 2020 03:23:49 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BC566F3@SHSMSX101.ccr.corp.intel.com> References: <20200527073316.72852-1-yingyax.han@intel.com> In-Reply-To: <20200527073316.72852-1-yingyax.han@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/multiprocess: fix app to use the same socket cores 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 hanyingya > Sent: Wednesday, May 27, 2020 3:33 PM > To: dts@dpdk.org > Cc: Han, YingyaX > Subject: [dts] [PATCH V1]tests/multiprocess: fix app to use the same sock= et > cores >=20 > Signed-off-by: hanyingya > --- > tests/TestSuite_multiprocess.py | 37 ++++++++++++++++----------------- > 1 file changed, 18 insertions(+), 19 deletions(-) >=20 > diff --git a/tests/TestSuite_multiprocess.py b/tests/TestSuite_multiproce= ss.py > index aa8bfde..a6af875 100644 > --- a/tests/TestSuite_multiprocess.py > +++ b/tests/TestSuite_multiprocess.py > @@ -59,7 +59,8 @@ class TestMultiprocess(TestCase): >=20 > self.verify(len(self.dut.get_all_cores()) >=3D 4, "Not enough Co= res") > self.tester.extend_external_packet_generator(TestMultiprocess, s= elf) > - > + self.dut_ports =3D self.dut.get_ports() > + self.socket =3D self.dut.get_numa_id(self.dut_ports[0]) > out =3D self.dut.build_dpdk_apps("./examples/multi_process/") > self.verify('Error' not in out, "Compilation failed") >=20 > @@ -94,7 +95,7 @@ class TestMultiprocess(TestCase): > Basic operation. > """ > # Send message from secondary to primary > - cores =3D self.dut.get_core_list('1S/2C/1T') > + cores =3D self.dut.get_core_list('1S/2C/1T', socket=3Dself.socke= t) > coremask =3D utils.create_mask(cores) >=20 > self.dut.send_expect("./examples/multi_process/simple_mp/%s/simple_mp > -n 1 -c %s --proc-type=3Dprimary" % (self.target, coremask), > "Finished Process Init", 100) @@ -110,7 +11= 1,7 @@ class > TestMultiprocess(TestCase): > self.dut.send_expect("quit", "# ") > self.verify("Received 'hello_primary'" in out, "Message not rece= ived on > primary process") > # Send message from primary to secondary > - cores =3D self.dut.get_core_list('1S/2C/1T') > + cores =3D self.dut.get_core_list('1S/2C/1T', socket=3Dself.socke= t) > coremask =3D utils.create_mask(cores) > self.session_secondary.send_expect( > "./examples/multi_process/simple_mp/%s/simple_mp -n 1 -c %s = -- > proc-type=3Dprimary " % (self.target, coremask), "Finished Process Init",= 100) > @@ -131,7 +132,7 @@ class TestMultiprocess(TestCase): > Load test of Simple MP application. > """ >=20 > - cores =3D self.dut.get_core_list('1S/2C/1T') > + cores =3D self.dut.get_core_list('1S/2C/1T', socket=3Dself.socke= t) > coremask =3D utils.create_mask(cores) >=20 > self.session_secondary.send_expect("./examples/multi_process/simple_mp/ > %s/simple_mp -n 1 -c %s --proc-type=3Dprimary" % (self.target, coremask), > "Finished Process Init", 100)= @@ -157,7 +158,7 @@ > class TestMultiprocess(TestCase): > """ >=20 > # Send message from secondary to primary (auto process type) > - cores =3D self.dut.get_core_list('1S/2C/1T') > + cores =3D self.dut.get_core_list('1S/2C/1T', socket=3Dself.socke= t) > coremask =3D utils.create_mask(cores) > out =3D > self.dut.send_expect("./examples/multi_process/simple_mp/%s/simple_mp > -n 1 -c %s --proc-type=3Dauto " % (self.target, coremask), > "Finished Process Init", 100) @@ -176= ,7 +177,7 @@ class > TestMultiprocess(TestCase): > self.verify("Received 'hello_primary'" in out, "Message not rece= ived on > primary process") >=20 > # Send message from primary to secondary (auto process type) > - cores =3D self.dut.get_core_list('1S/2C/1T') > + cores =3D self.dut.get_core_list('1S/2C/1T', socket=3Dself.socke= t) > coremask =3D utils.create_mask(cores) > out =3D self.session_secondary.send_expect( > "./examples/multi_process/simple_mp/%s/simple_mp -n 1 -c %s = -- > proc-type=3Dauto" % (self.target, coremask), "Finished Process Init", 100= ) @@ - > 199,7 +200,7 @@ class TestMultiprocess(TestCase): > Multiple processes without "--proc-type" flag. > """ >=20 > - cores =3D self.dut.get_core_list('1S/2C/1T') > + cores =3D self.dut.get_core_list('1S/2C/1T', socket=3Dself.socke= t) > coremask =3D utils.create_mask(cores) >=20 > self.session_secondary.send_expect("./examples/multi_process/simple_mp/ > %s/simple_mp -n 1 -c %s -m 64" % (self.target, coremask), > "Finished Process Init", 100)= @@ -217,11 +218,10 > @@ class TestMultiprocess(TestCase): > # """ > packet_count =3D 16 > self.dut.send_expect("fg", "# ") > - dutPorts =3D self.dut.get_ports() > - txPort =3D self.tester.get_local_port(dutPorts[0]) > - rxPort =3D self.tester.get_local_port(dutPorts[1]) > + txPort =3D self.tester.get_local_port(self.dut_ports[0]) > + rxPort =3D self.tester.get_local_port(self.dut_ports[1]) > mac =3D self.tester.get_mac(txPort) > - dmac =3D self.dut.get_mac_address(dutPorts[0]) > + dmac =3D self.dut.get_mac_address(self.dut_ports[0]) > tgenInput =3D [] >=20 > # create mutative src_ip+dst_ip package @@ -239,11 +239,11 @@ cl= ass > TestMultiprocess(TestCase): > if len(self.dut.get_core_list(execution['cores'])) =3D=3D ex= ecution['nprocs']: > validExecutions.append(execution) >=20 > - portMask =3D utils.create_mask([dutPorts[0], dutPorts[1]]) > + portMask =3D utils.create_mask(self.dut_ports) >=20 > for n in range(len(validExecutions)): > execution =3D validExecutions[n] > - coreMask =3D > utils.create_mask(self.dut.get_core_list(execution['cores'])) > + coreMask =3D > + utils.create_mask(self.dut.get_core_list(execution['cores'], > + socket=3Dself.socket)) > self.session_secondary.send_expect( > "./examples/multi_process/symmetric_mp/%s/symmetric_mp - > c %s --proc-type=3Dauto -- -p %s --num-procs=3D%d --proc-id=3D%d" % ( > self.target, coreMask, portMask, execution['nprocs']= , n), > "Finished Process Init") @@ -276,12 +276,11 @@ class > TestMultiprocess(TestCase): > """ > self.dut.kill_all() > self.dut.send_expect("fg", "# ") > - dutPorts =3D self.dut.get_ports() > - txPort =3D self.tester.get_local_port(dutPorts[0]) > - rxPort =3D self.tester.get_local_port(dutPorts[1]) > + txPort =3D self.tester.get_local_port(self.dut_ports[0]) > + rxPort =3D self.tester.get_local_port(self.dut_ports[1]) > mac =3D self.tester.get_mac(txPort) >=20 > - self.tester.scapy_append('dmac=3D"%s"' % > self.dut.get_mac_address(dutPorts[0])) > + self.tester.scapy_append('dmac=3D"%s"' % > + self.dut.get_mac_address(self.dut_ports[0])) > self.tester.scapy_append('smac=3D"%s"' % mac) > self.tester.scapy_append('flows =3D [Ether(src=3Dsmac, > dst=3Ddmac)/IP(src=3D"192.168.1.1", dst=3D"192.168.1.1")/("X"*26)]') >=20 > @@ -295,10 +294,10 @@ class TestMultiprocess(TestCase): > validExecutions.append(execution) >=20 > for execution in validExecutions: > - coreList =3D self.dut.get_core_list(execution['cores']) > + coreList =3D self.dut.get_core_list(execution['cores'], > + socket=3Dself.socket) >=20 > coreMask =3D utils.create_mask(self.dut.get_core_list('1S/1C= /1T')) > - portMask =3D utils.create_mask([dutPorts[0], dutPorts[1]]) > + portMask =3D utils.create_mask(self.dut_ports) >=20 > self.dut.send_expect("./examples/multi_process/client_server_mp/mp_serv > er/%s/mp_server -n %d -c %s -- -p %s -n %d" % ( > self.target, self.dut.get_memory_channels(), "0xA0", por= tMask, > execution['nprocs']), "Finished Process Init", 20) > self.dut.send_expect("^Z", "\r\n") > -- > 2.17.1