From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id D48491E4CC for ; Tue, 12 Jun 2018 10:25:50 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Jun 2018 01:25:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,213,1526367600"; d="scan'208";a="58517943" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga003.jf.intel.com with ESMTP; 12 Jun 2018 01:25:48 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 12 Jun 2018 01:25:48 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 12 Jun 2018 01:25:47 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.51]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.87]) with mapi id 14.03.0319.002; Tue, 12 Jun 2018 16:25:45 +0800 From: "Liu, Yong" To: "Lu, PeipeiX" , "dts@dpdk.org" CC: "Lu, PeipeiX" Thread-Topic: [dts] [PATCH V2] tests/unit_tests_pmd_perf: fix the ports and cores were from different sockets Thread-Index: AQHUAhZ6WHGxZqB4c0OcXpeP/RnhA6RcSVYQ Date: Tue, 12 Jun 2018 08:25:45 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E630C2490@SHSMSX103.ccr.corp.intel.com> References: <1528784910-53404-1-git-send-email-peipeix.lu@intel.com> In-Reply-To: <1528784910-53404-1-git-send-email-peipeix.lu@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNGY1OTRhZjQtMjI5MS00NWY0LWI0MjItN2JmYTA0MWNkODFhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiRlpvMXpsSktOWVFoWUNXcVFMdHQySkZqV1pGclpGQ0xVMzdaaVJvV3k4VjJ1cUFlNUlqbjFIMmZlOGVjVlBuKyJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 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 V2] tests/unit_tests_pmd_perf: fix the ports and cores were from different sockets 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: , X-List-Received-Date: Tue, 12 Jun 2018 08:25:51 -0000 Peipei, More comments are inline. Thanks, Marvin > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lu,peipei > Sent: Tuesday, June 12, 2018 2:29 PM > To: dts@dpdk.org > Cc: Lu, PeipeiX > Subject: [dts] [PATCH V2] tests/unit_tests_pmd_perf: fix the ports and > cores were from different sockets >=20 > the cases need ports and cores from the same socket. >=20 > Signed-off-by: lu,peipei > --- > tests/TestSuite_unit_tests_pmd_perf.py | 24 ++++++++++++++++++++---- > 1 file changed, 20 insertions(+), 4 deletions(-) >=20 > diff --git a/tests/TestSuite_unit_tests_pmd_perf.py > b/tests/TestSuite_unit_tests_pmd_perf.py > index 7fc200e..ab67b5d 100644 > --- a/tests/TestSuite_unit_tests_pmd_perf.py > +++ b/tests/TestSuite_unit_tests_pmd_perf.py > @@ -85,12 +85,27 @@ class TestUnitTestsPmdPerf(TestCase): > """ > pass >=20 > + def get_core_from_socket(self): > + """ > + select the port and lcores from same socket. > + """ > + > + out =3D self.dut.send_expect("./usertools/cpu_layout.py","#", 10) Please add space after comma symbol. > + k =3D re.search("Core 0 (.*)", out) > + result =3D re.findall("(\d+),", k.group()) > + socket_id =3D self.dut.ports_info[0]['port'].socket > + if socket_id =3D=3D 0 or socket_id =3D=3D -1: > + return int(result[0]) > + else: > + return int(result[1]) > + > def test_pmd_burst(self): > """ > Run pmd stream control mode burst test case. > """ >=20 > - self.dut.send_expect("./test/test/test -n 1 -c f", > "R.*T.*E.*>.*>", 60) > + self.core =3D self.get_core_from_socket() > + self.dut.send_expect("./test/test/test -n 1 --lcores=3D'%d- > %d'" %(self.core, self.core + 6), "R.*T.*E.*>.*>", 60) Please add space after percent sign. > for mode in self.burst_ctlmodes: > self.dut.send_expect("set_rxtx_sc %s" % mode, "RTE>>", 10) > out =3D self.dut.send_expect("pmd_perf_autotest", "RTE>>", 1= 20) > @@ -105,7 +120,8 @@ class TestUnitTestsPmdPerf(TestCase): > """ > Run pmd stream control mode continues test case. > """ > - > + > + self.core =3D self.get_core_from_socket() > self.table_header =3D ['Mode'] > self.table_header +=3D self.anchors > self.result_table_create(self.table_header) > @@ -113,9 +129,9 @@ class TestUnitTestsPmdPerf(TestCase): >=20 > for mode in self.rxtx_modes: > if mode is "scalar": > - self.dut.send_expect("./test/test/test_scalar -n 1 -c f"= , > "R.*T.*E.*>.*>", 60) > + self.dut.send_expect("./test/test/test_scalar -n 1 -- > lcores=3D'%d-%d'" %(self.core, self.core + 6), "R.*T.*E.*>.*>", 60) Please reduce the number of core, if possible please just use 2 cores. > else: > - self.dut.send_expect("./test/test/test -n 1 -c f", > "R.*T.*E.*>.*>", 60) > + self.dut.send_expect("./test/test/test -n 1 --lcores=3D'= %d- > %d'" %(self.core, self.core + 6), "R.*T.*E.*>.*>", 60) >=20 > table_row =3D [mode] > self.dut.send_expect("set_rxtx_sc continuous", "RTE>>", 10) > -- > 1.9.3