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 D49E3A00E6 for ; Thu, 8 Aug 2019 07:41:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B68EA28EE; Thu, 8 Aug 2019 07:41:41 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id CEBA5F04 for ; Thu, 8 Aug 2019 07:41:39 +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 orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Aug 2019 22:41:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,360,1559545200"; d="scan'208";a="350062290" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga005.jf.intel.com with ESMTP; 07 Aug 2019 22:41:38 -0700 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 7 Aug 2019 22:41:38 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 7 Aug 2019 22:41:37 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.80]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.215]) with mapi id 14.03.0439.000; Thu, 8 Aug 2019 13:41:35 +0800 From: "Tu, Lijuan" To: "Mo, YufengX" , "dts@dpdk.org" CC: "Mo, YufengX" Thread-Topic: [dts] [PATCH V1 4/4] [next]tests/nic_single_core_perf: update script. Thread-Index: AQHVRa+0Xd80lRmEekew+nEm4sYj9abwzH0A Date: Thu, 8 Aug 2019 05:41:34 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BAFF5CF@SHSMSX101.ccr.corp.intel.com> References: <1564364921-33333-1-git-send-email-yufengx.mo@intel.com> <1564364921-33333-5-git-send-email-yufengx.mo@intel.com> In-Reply-To: <1564364921-33333-5-git-send-email-yufengx.mo@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-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiM2FiNjM3MTUtZmM5MC00NGQ4LTgyYmMtMmUyM2FiMzU3Y2FjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoicjJadGYxTHhmaERYRFZcL1laaTVTVm1pbGYwV0l2V29PWE1hcGZiQVJkNVJHV21HNFBCN1h3Sm40elB3aUYwNVEifQ== 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 4/4] [next]tests/nic_single_core_perf: update script. 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 yufengmx > Sent: Monday, July 29, 2019 9:49 AM > To: dts@dpdk.org > Cc: Mo, YufengX > Subject: [dts] [PATCH V1 4/4] [next]tests/nic_single_core_perf: update sc= ript. >=20 >=20 > update suite nic_single_core_perf with new pktgen measure_throughput > input parameter definition. > for pktgen testing belongs to performance test case, change > test_nic_single_core_perf to test_perf_nic_single_core. >=20 > Signed-off-by: yufengmx > --- > tests/TestSuite_nic_single_core_perf.py | 20 ++++++++++++-------- > 1 file changed, 12 insertions(+), 8 deletions(-) >=20 > diff --git a/tests/TestSuite_nic_single_core_perf.py > b/tests/TestSuite_nic_single_core_perf.py > index 847a94c..6b530bc 100644 > --- a/tests/TestSuite_nic_single_core_perf.py > +++ b/tests/TestSuite_nic_single_core_perf.py > @@ -42,6 +42,7 @@ from time import sleep from exception import > VerifyFailure from settings import HEADER_SIZE, UPDATE_EXPECTED, > load_global_setting from pmd_output import PmdOutput > +from pktgen import TRANSMIT_CONT > from copy import deepcopy > from prettytable import PrettyTable > import rst > @@ -112,7 +113,7 @@ class TestNicSingleCorePerf(TestCase): > 'Expected Throughput', 'Throughput Differen= ce'] > self.test_result =3D {} >=20 > - def test_nic_single_core_perf(self): > + def test_perf_nic_single_core(self): > """ > Run nic single core performance > """ > @@ -181,8 +182,9 @@ class TestNicSingleCorePerf(TestCase): >=20 > # measure throughput > stream_ids =3D self.prepare_stream(frame_size) > + traffic_opt =3D {'delay': self.test_duration} > _, packets_received =3D self.tester.pktgen.measure_throu= ghput( > - stream_ids =3D stream_ids, delay =3D self.test_durat= ion) > + stream_ids, traffic_opt) > throughput =3D packets_received / 1000000.0 > self.throughput[frame_size][nb_desc] =3D throughput >=20 > @@ -247,11 +249,6 @@ class TestNicSingleCorePerf(TestCase): > ''' > create streams for ports, one port two streams, and configure th= em. > ''' > - # traffic option > - options =3D { > - 'rate': '100%', > - } > - > # create pcap file > payload_size =3D frame_size - self.headers_size > self.tester.scapy_append( > @@ -271,6 +268,13 @@ class TestNicSingleCorePerf(TestCase): > # this's fine for other NIC too. > for k in range(2): > # txport -> rxport > + pcap =3D '/tmp/test{}.pcap'.format(k) > + options =3D { > + 'pcap': pcap, > + 'stream_config':{ > + 'txmode' : {}, > + 'transmit_mode': TRANSMIT_CONT, > + 'rate': 100,}} > stream_id =3D self.tester.pktgen.add_stream( > txport, rxport, '/tmp/test{}.pcap'.format(k)) > self.tester.pktgen.config_stream(stream_id, options)= @@ -280,7 > +284,7 @@ class TestNicSingleCorePerf(TestCase): > rxport, txport, '/tmp/test{}.pcap'.format(k)) > self.tester.pktgen.config_stream(stream_id, options) > stream_ids.append(stream_id) > - > + > return stream_ids >=20 > def save_result(self, data): > -- > 1.9.3