From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id CDC792B86 for ; Thu, 2 Mar 2017 02:52:32 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Mar 2017 17:52:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,228,1484035200"; d="scan'208";a="231280897" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga004.fm.intel.com with ESMTP; 01 Mar 2017 17:52:27 -0800 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 1 Mar 2017 17:52:24 -0800 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; Wed, 1 Mar 2017 17:52:23 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX103.ccr.corp.intel.com ([10.239.4.69]) with mapi id 14.03.0248.002; Thu, 2 Mar 2017 09:52:21 +0800 From: "Pei, Yulong" To: "Liu, Yong" , "dts@dpdk.org" Thread-Topic: [PATCH 1/2] tests pmd: do changes due to performance test Thread-Index: AQHSkvVUtkWF7kwHC0C07L68CQVcKKGAP0uAgACJR3A= Date: Thu, 2 Mar 2017 01:52:20 +0000 Message-ID: <188971FCDA171749BED5DA74ABF3E6F03B690712@shsmsx102.ccr.corp.intel.com> References: <1488418539-8237-1-git-send-email-yulong.pei@intel.com> <58B77787.1000109@intel.com> In-Reply-To: <58B77787.1000109@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjIwYWUyMDctMjFjNi00YzlmLWE4NjktOTRmZDFiZGUyODkyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkxvWWY1QzF4YlE2U2hmU2tZZ2RxM2N3SzZRU1wvODUxdlRJWUc3ajVJSU1zPSJ9 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 1/2] tests pmd: do changes due to performance test 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: Thu, 02 Mar 2017 01:52:33 -0000 Hi, -----Original Message----- From: Liu, Yong=20 Sent: Thursday, March 2, 2017 9:38 AM To: Pei, Yulong ; dts@dpdk.org Subject: Re: [PATCH 1/2] tests pmd: do changes due to performance test Yulong, Some comments below. Thanks, Marvin On 03/02/2017 09:35 AM, Yulong Pei wrote: > 1. change to tcp stream traffic. > 2. change duration to 60s. > 3. using one entry point test_perf_single_core_performance. > > Signed-off-by: Yulong Pei > --- > tests/TestSuite_pmd.py | 42 +++++++++++++++++++++++++++--------------- > 1 file changed, 27 insertions(+), 15 deletions(-) > > diff --git a/tests/TestSuite_pmd.py b/tests/TestSuite_pmd.py index=20 > bc59849..a548496 100644 > --- a/tests/TestSuite_pmd.py > +++ b/tests/TestSuite_pmd.py > @@ -68,11 +68,15 @@ class TestPmd(TestCase,IxiaPacketGenerator): > =20 > self.blacklist =3D "" > =20 > + # Update config file and rebuild to get best perf on FVL > + self.dut.send_expect("sed -i -e=20 > + 's/CONFIG_RTE_LIBRTE_I40E_16BYTE_RX_DESC=3Dn/CONFIG_RTE_LIBRTE_I40E_16 > + BYTE_RX_DESC=3Dy/' ./config/common_base", "#", 20) Not sure this configuration will affect performance, look like it only affe= ct legacy Rx code path. I40e developer suggested to do so when measure single core perf. Will send v2 patch based on your below comments. Best Regards Yulong Pei=20 > + self.dut.build_install_dpdk(self.target) > + > # Based on h/w type, choose how many ports to use > self.dut_ports =3D self.dut.get_ports() > =20 > self.headers_size =3D HEADER_SIZE['eth'] + HEADER_SIZE[ > - 'ip'] + HEADER_SIZE['udp'] > + 'ip'] + HEADER_SIZE['tcp'] > =20 > self.ports_socket =3D self.dut.get_numa_id(self.dut_ports[0]) > =20 > @@ -84,15 +88,23 @@ class TestPmd(TestCase,IxiaPacketGenerator): > """ > pass > =20 > - def test_perf_pmd_performance_4ports(self): > + def test_perf_single_core_performance(self): > + """ > + Run single core performance > + """ > + if len(self.dut_ports) =3D=3D 4: > + self.test_pmd_performance_4ports() > + else: > + self.test_pmd_performance_2ports() > + > + > + def test_pmd_performance_4ports(self): > """ > PMD Performance Benchmarking with 4 ports. > """ Function named like "test_*" will be handled as normal case, please change = function name without "test_" prefix. > all_cores_mask =3D=20 > utils.create_mask(self.dut.get_core_list("all")) > =20 > # prepare traffic generator input > - self.verify(len(self.dut_ports) >=3D 4, > - "Insufficient ports for 4 ports performance") > tgen_input =3D [] > =20 > =20 > tgen_input.append((self.tester.get_local_port(self.dut_ports[0]), > @@ -126,27 +138,25 @@ class TestPmd(TestCase,IxiaPacketGenerator): > self.pmdout.start_testpmd(core_config, " --rxq=3D%d --txq= =3D%d --portmask=3D%s --rss-ip --txrst=3D32 --txfreet=3D32 --txd=3D128 --tx= qflags=3D0xf01" % (queues, 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['= cores'] > + info =3D "Executing PMD using %s\n" % test_cycle['cores'] > self.rst_report(info, annex=3DTrue) > self.logger.info(info) > - > self.rst_report(command_line + "\n\n", frame=3DTrue,=20 > annex=3DTrue) > =20 > # self.dut.send_expect("set fwd mac", "testpmd> ", 100) > - self.dut.send_expect("start", "testpmd> ") > - > + self.dut.send_expect("start", "testpmd> ", 100) > for frame_size in self.frame_sizes: > wirespeed =3D self.wirespeed(self.nic, frame_size, 4) > =20 > # create pcap file > self.logger.info("Running with frame size %d " % frame_= size) > - payload_size =3D frame_size - HEADER_SIZE['eth'] - HEADE= R_SIZE['ip'] > + payload_size =3D frame_size - self.headers_size > self.tester.scapy_append( > - 'wrpcap("test.pcap", [Ether(src=3D"52:00:00:00:00:00= ")/IP(src=3D"1.2.3.4",dst=3D"1.1.1.1")/("X"*%d)])' % payload_size) > + 'wrpcap("test.pcap",=20 > + [Ether(src=3D"52:00:00:00:00:00")/IP(src=3D"1.2.3.4",dst=3D"1.1.1.1")/T= CP( > + )/("X"*%d)])' % payload_size) > self.tester.scapy_execute() > =20 > # run traffic generator > - _, pps =3D self.tester.traffic_generator_throughput(tgen= _input) > + _, pps =3D=20 > + self.tester.traffic_generator_throughput(tgen_input,=20 > + rate_percent=3D100, delay=3D60) > =20 > pps /=3D 1000000.0 > test_cycle['Mpps'][frame_size] =3D pps @@ -176,7=20 > +186,7 @@ class TestPmd(TestCase,IxiaPacketGenerator): > =20 > self.result_table_print() > =20 > - def test_perf_pmd_performance_2ports(self): > + def test_pmd_performance_2ports(self): Same comment as previous. > """ > PMD Performance Benchmarking with 2 ports. > """ > @@ -215,8 +225,9 @@ class TestPmd(TestCase,IxiaPacketGenerator): > self.logger.info(info) > self.rst_report(info, annex=3DTrue) > self.rst_report(command_line + "\n\n", frame=3DTrue,=20 > annex=3DTrue) > + > + self.dut.send_expect("start", "testpmd> ", 100) > =20 > - self.dut.send_expect("start", "testpmd> ") > for frame_size in self.frame_sizes: > wirespeed =3D self.wirespeed(self.nic, frame_size, 2) > =20 > @@ -224,11 +235,12 @@ class TestPmd(TestCase,IxiaPacketGenerator): > self.logger.info("Running with frame size %d " % frame_= size) > payload_size =3D frame_size - self.headers_size > self.tester.scapy_append( > - 'wrpcap("test.pcap", [Ether(src=3D"52:00:00:00:00:00= ")/IP()/UDP()/("X"*%d)])' % payload_size) > + 'wrpcap("test.pcap",=20 > + [Ether(src=3D"52:00:00:00:00:00")/IP(src=3D"1.2.3.4",dst=3D"1.1.1.1")/T= CP( > + )/("X"*%d)])' % payload_size) > self.tester.scapy_execute() > =20 > # run traffic generator > - _, pps =3D self.tester.traffic_generator_throughput(tgen= _input) > + _, pps =3D=20 > + self.tester.traffic_generator_throughput(tgen_input,=20 > + rate_percent=3D100, delay=3D60) > + > =20 > pps /=3D 1000000.0 > test_cycle['Mpps'][frame_size] =3D pps