From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id D65D22C5A for ; Tue, 19 Apr 2016 10:33:37 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP; 19 Apr 2016 01:33:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,506,1455004800"; d="scan'208";a="961749102" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga002.fm.intel.com with ESMTP; 19 Apr 2016 01:33:36 -0700 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 19 Apr 2016 01:33:36 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 19 Apr 2016 01:33:36 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.232]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.229]) with mapi id 14.03.0248.002; Tue, 19 Apr 2016 16:33:35 +0800 From: "Xu, Qian Q" To: "Ding, HengX" , "dts@dpdk.org" CC: "Ding, HengX" , "Xu, Qian Q" Thread-Topic: [dts] [PATCH] performance case: optimize command for testpmd and comment some cases no need to run Thread-Index: AQHRmhP1lH/FrluH8kmrRuoOZA28hp+Q99Fw Date: Tue, 19 Apr 2016 08:33:34 +0000 Message-ID: <82F45D86ADE5454A95A89742C8D1410E0324B4DF@shsmsx102.ccr.corp.intel.com> References: <1461053824-20577-1-git-send-email-hengx.ding@intel.com> In-Reply-To: <1461053824-20577-1-git-send-email-hengx.ding@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTk3OTM1MjgtMTNkZC00ZTFiLWJjZDYtOGEwNzYzNGNlYWRjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlYzMEJEcUxVeVEzNGNiYkgySGFvU2NnXC9vMk1kOEh1M1JuWGk3bmpEQW5rPSJ9 x-ctpclassification: CTP_IC 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] performance case: optimize command for testpmd and comment some cases no need to run 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, 19 Apr 2016 08:33:38 -0000 Could you add packet size 72 in below, better to use a list to store these = packet sizes, not write it in the function.=20 + for frame_size in [64, 128, 256, 512, 1024, 2048]: Thanks Qian -----Original Message----- From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Ding Heng Sent: Tuesday, April 19, 2016 4:17 PM To: dts@dpdk.org Cc: Ding, HengX Subject: [dts] [PATCH] performance case: optimize command for testpmd and c= omment some cases no need to run l3fwd: comment 2 cases no need to run in nightly performance test. Fix issu= es for run rfc2544 case with different nic. testpmd: change report format for generate nightly performance test. Use co= re mask instead of all cores for performance test. framework/pmd_output: optimize command for performance, run testpmd in vect= or mode instead of Xmit mode. Optimize core configuration for testpmd becau= se run testpmd with all cores will get a bad performance result. Signed-off-by: Ding Heng diff --git a/framework/pmd_output.py b/framework/pmd_output.py index df8db1= 2..05e4e04 100644 --- a/framework/pmd_output.py +++ b/framework/pmd_output.py @@ -101,14 +101,18 @@ class PmdOutput(): =20 def start_testpmd(self, cores, param=3D'', eal_param=3D'', socket=3D0)= : # in dpdk2.0 need used --txqflags param to open hardware features + # use 0xf01 to enable vector mode and get better performance. if "--txqflags" not in param: - param +=3D " --txqflags=3D0" + param +=3D " --txqflags=3D0xf01" =20 if type(cores) =3D=3D list: core_list =3D cores elif cores =3D=3D "Default": core_list =3D self.dut.get_core_list(self.default_cores) else: + # testpmd could not run with single core, at least 2 cores are= needed. + if cores =3D=3D "1S/1C/1T": + cores =3D "1S/2C/1T" core_list =3D self.dut.get_core_list(cores, socket=3Dsocket) self.coremask =3D dts.create_mask(core_list) command =3D "./%s/app/testpmd -c %s -n %d %s -- -i %s" \ diff --gi= t a/tests/TestSuite_l3fwd.py b/tests/TestSuite_l3fwd.py index 0376a76..2aeb= ee8 100644 --- a/tests/TestSuite_l3fwd.py +++ b/tests/TestSuite_l3fwd.py @@ -50,7 +50,7 @@ class TestL3fwd(TestCase,IxiaPacketGenerator): test_cases_2_ports =3D [(1,"1S/1C/1T","%s -c %s -n %d -- -P -p %s --c= onfig '(P0,0,C{1.1.0}), (P1,0,C{1.1.0})'"), #"1S/1C/2T": "%s -c %s -n %d -- -p %s --config = '(P0,0,C{1.1.0}), (P1,0,C{1.1.1})'", (1,"1S/2C/1T","%s -c %s -n %d -- -P -p %s --con= fig '(P0,0,C{1.1.0}), (P1,0,C{1.2.0})'"), - #"1S/4C/1T": "%s -c %s -n %d -- -p %s --config = '(P0,0,C{1.1.0}), (P1,0,C{1.2.0}),(P0,1,C{1.3.0}), (P1,1,C{1.4.0})'", + (1,"1S/4C/1T", "%s -c %s -n %d -- -p %s =20 + --config '(P0,0,C{1.1.0}), (P1,0,C{1.2.0}),(P0,1,C{1.3.0}),=20 + (P1,1,C{1.4.0})'"), #"2S/2C/1T": "%s -c %s -n %d -- -p %s --config = '(P0,0,C{0.1.0}), (P1,0,C{0.2.0}),(P0,1,C{1.3.0}), (P1,1,C{1.4.0})'", ] =20 @@ -309,7 +309,7 @@ class TestL3fwd(TestCase,IxiaPacketGenerator): """ pass =20 - def test_perf_l3fwd_4ports(self): + def no_test_perf_l3fwd_4ports(self): """ L3fwd main 4 ports. """ @@ -360,7 +360,7 @@ class TestL3fwd(TestCase,IxiaPacketGenerator): =20 dts.results_table_print() =20 - def test_perf_l3fwd_2ports(self): + def no_test_perf_l3fwd_2ports(self): """ L3fwd main 2 ports. """ @@ -395,6 +395,7 @@ class TestL3fwd(TestCase,IxiaPacketGenerator): repl1 =3D "C{" + str(self.port_socket) =20 coreMask =3D {} + cmdlist =3D [] rtCmdLines =3D {} cmdlist =3D TestL3fwd.test_cases_2_ports for cmdline_pat in cmdlist: @@ -469,14 +470,15 @@ class TestL3fwd(TestCase,IxiaPacketGenerator): =20 def test_perf_rfc2544(self): =20 + nic =3D self.get_nic_name(self.dut.ports_info[0]['type']) ports =3D self.dut.get_ports() ports_num =3D len(ports) - header_row =3D ["Frame", "mode", "S/C/T", "LR_tx_pkts(1min)", "LR_= rx_pkts(1min)", "LR_loss_pkts(1min)", "% zero_loss_rate", "zero_loss_throug= hput(Mpps)"] + header_row =3D ["Frame_size(byte)", "mode", "S/C/T",=20 + "zero_loss_throughput(Mpps)", " % zero_loss_rate"]#=20 + "LR_tx_pkts(1min)", "LR_rx_pkts(1min)", "LR_loss_pkts(1min)", "%=20 + zero_loss_rate", "zero_loss_throughput(Mpps)"] self.l3fwd_test_results['header'] =3D header_row dts.results_table_add_header(header_row) self.l3fwd_test_results['data'] =3D [] =20 - for frame_size in [64, 128, 256, 512, 1024]: + for frame_size in [64, 128, 256, 512, 1024, 2048]: =20 # Prepare traffic flow payload_size =3D frame_size - \ @@ -501,10 +503,17 @@ class T= estL3fwd(TestCase,IxiaPacketGenerator): =20 coreMask =3D {} rtCmdLines =3D {} + cmdlist =3D [] if ports_num =3D=3D 4: - cmdlist =3D TestL3fwd.test_cases_4_ports + for i in TestL3fwd.test_cases_4_ports: + cmdlist.append(i) else: - cmdlist =3D TestL3fwd.test_cases_2_ports + for i in TestL3fwd.test_cases_2_ports: + cmdlist.append(i) + if 'eagle' in nic: + del cmdlist[2] + else: + del cmdlist[1] for cmdline_pat in cmdlist: corelist =3D [] rtCmdLines[cmdline_pat[1]] =3D cmdline_pat[2] @@ -561,14 += 570,15 @@ class TestL3fwd(TestCase,IxiaPacketGenerator): zero_loss_rate, tx_pkts, rx_pkts =3D self.tester.r= un_rfc2544(tgenInput, delay=3D60) loss_pkts =3D tx_pkts - rx_pkts self.dut.send_expect("^C", "#") - linerate =3D self.wirespeed(self.nic, frame_size, = 2) + linerate =3D self.wirespeed(self.nic, frame_size,= =20 + ports_num) zero_loss_throughput =3D (linerate * zero_loss_rat= e) / 100 =20 tx_pkts =3D human_read_number(tx_pkts) rx_pkts =3D human_read_number(rx_pkts) loss_pkts =3D human_read_number(loss_pkts) =20 - data_row =3D [frame_size, mode, cores, tx_pkts, rx= _pkts, loss_pkts, zero_loss_rate, zero_loss_throughput] + #data_row =3D [frame_size, mode, cores, tx_pkts, r= x_pkts, loss_pkts, zero_loss_rate, zero_loss_throughput] + data_row =3D [frame_size, mode, cores,=20 + zero_loss_throughput, zero_loss_rate] dts.results_table_add_row(data_row) self.l3fwd_test_results['data'].append(data_row) else: diff --git a/tests/TestSuite_pmd.py b/tests/TestSuite_pmd.py index aeab99a.= .6938a7d 100644 --- a/tests/TestSuite_pmd.py +++ b/tests/TestSuite_pmd.py @@ -58,14 +58,15 @@ class TestPmd(TestCase,IxiaPacketGenerator): self.rxfreet_values =3D [0, 8, 16, 32, 64, 128] =20 self.test_cycles =3D [{'cores': '1S/1C/1T', 'Mpps': {}, 'pct': {}}= , - {'cores': '1S/2C/1T', 'Mpps': {}, 'pct': {}}, - {'cores': '1S/2C/2T', 'Mpps': {}, 'pct': {}}, - {'cores': '1S/4C/1T', 'Mpps': {}, 'pct': {}}, - {'cores': '1S/8C/1T', 'Mpps': {}, 'pct': {}} + #{'cores': '1S/2C/1T', 'Mpps': {}, 'pct': {}}, + #{'cores': '1S/2C/2T', 'Mpps': {}, 'pct': {}}, + #{'cores': '1S/4C/1T', 'Mpps': {}, 'pct': {}}, + #{'cores': '1S/8C/1T', 'Mpps': {}, 'pct':=20 + {}} ] =20 self.table_header =3D ['Frame Size'] for test_cycle in self.test_cycles: + self.table_header.append("app") self.table_header.append("%s Mpps" % test_cycle['cores']) self.table_header.append("% linerate") =20 @@ -126,7 +127,7 @@ class TestPmd(TestCase,IxiaPacketGenerator): core_mask =3D dts.create_mask(core_list) port_mask =3D dts.create_mask(self.dut.get_ports()) =20 - self.pmdout.start_testpmd("all", "--coremask=3D%s --rxq=3D%d -= -txq=3D%d --portmask=3D%s --rss-ip" % (core_mask, queues, queues, port_mask= )) + self.pmdout.start_testpmd(core_config, " --rxq=3D%d --txq=3D%d= =20 + --portmask=3D%s --rss-ip --txrst=3D32 --txfreet=3D32 --txd=3D128" % (queu= es,=20 + queues, port_mask), socket=3Dself.ports_socket) command_line =3D self.pmdout.get_pmd_cmd() =20 info =3D "Executing PMD (mac fwd) using %s\n" % test_cycle['co= res'] @@ -171,6 +172,7 @@ class TestPmd(TestCase,IxiaPacketGenerator): table_row =3D [frame_size] =20 for test_cycle in self.test_cycles: + table_row.append("testpmd") table_row.append(test_cycle['Mpps'][frame_size]) table_row.append(test_cycle['pct'][frame_size]) =20 @@ -209,7 +211,8 @@ class TestPmd(TestCase,IxiaPacketGenerator): core_mask =3D dts.create_mask(core_list) port_mask =3D dts.create_mask([self.dut_ports[0], self.dut_por= ts[1]]) =20 - self.pmdout.start_testpmd("all", "--coremask=3D%s --rxq=3D%d -= -txq=3D%d --portmask=3D%s" % (core_mask, queues, queues, port_mask)) + #self.pmdout.start_testpmd("all", "--coremask=3D%s --rxq=3D%d = --txq=3D%d --portmask=3D%s" % (core_mask, queues, queues, port_mask)) + self.pmdout.start_testpmd(core_config, " --rxq=3D%d --txq=3D%d= =20 + --portmask=3D%s --rss-ip --txrst=3D32 --txfreet=3D32 --txd=3D128" % (queu= es,=20 + queues, port_mask), socket=3Dself.ports_socket) command_line =3D self.pmdout.get_pmd_cmd() =20 info =3D "Executing PMD using %s\n" % test_cycle['cores'] @@ -= 249,6 +252,7 @@ class TestPmd(TestCase,IxiaPacketGenerator): for frame_size in self.frame_sizes: table_row =3D [frame_size] for test_cycle in self.test_cycles: + table_row.append("testpmd") table_row.append(test_cycle['Mpps'][frame_size]) table_row.append(test_cycle['pct'][frame_size]) =20 -- 1.9.3