From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 9CF1BA05D3 for ; Wed, 22 May 2019 07:54:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9497D5592; Wed, 22 May 2019 07:54:53 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 3D6DA3DC for ; Wed, 22 May 2019 07:54:51 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 May 2019 22:54:51 -0700 X-ExtLoop1: 1 Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by FMSMGA003.fm.intel.com with ESMTP; 21 May 2019 22:54:51 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 21 May 2019 22:54:51 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 21 May 2019 22:54:50 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.129]) by shsmsx102.ccr.corp.intel.com ([169.254.2.249]) with mapi id 14.03.0415.000; Wed, 22 May 2019 13:54:49 +0800 From: "Tu, Lijuan" To: "Zhao, MeijuanX" , "dts@dpdk.org" CC: "Zhao, MeijuanX" Thread-Topic: [dts] [PATCH V1] tests/ddp_gtp optimize code to cut running time Thread-Index: AQHVC71lHtxFY469x0iDI9QRTxOmnqZ2rjrA Date: Wed, 22 May 2019 05:54:48 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BA8406E@SHSMSX101.ccr.corp.intel.com> References: <20190516160031.51716-1-meijuanx.zhao@intel.com> In-Reply-To: <20190516160031.51716-1-meijuanx.zhao@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.0.600.7 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTU1OTJiYjEtYjY4YS00YTg1LTg3ZGMtNDMwMjYwYWNkZDg1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoic2MwVnY5UFNkXC9jcGZFXC82MTVWQm5Zc25pbEZFNERqZ1Q5T3d0cmVQYlF2Z3lwRjBNdG9kV3ZVaWV1MHVJV3IwIn0= 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/ddp_gtp optimize code to cut running time 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 zhaomeijuan > Sent: Friday, May 17, 2019 12:01 AM > To: dts@dpdk.org > Cc: Zhao, MeijuanX > Subject: [dts] [PATCH V1] tests/ddp_gtp optimize code to cut running time >=20 > Signed-off-by: zhaomeijuan > --- > tests/TestSuite_ddp_gtp.py | 59 +++++++++++++++++++++++--------------- > 1 file changed, 36 insertions(+), 23 deletions(-) >=20 > diff --git a/tests/TestSuite_ddp_gtp.py b/tests/TestSuite_ddp_gtp.py inde= x > 0e86c8d..b8f6817 100644 > --- a/tests/TestSuite_ddp_gtp.py > +++ b/tests/TestSuite_ddp_gtp.py > @@ -285,6 +285,7 @@ class TestDdpGtp(TestCase): > 'flow create 0 ingress pattern eth / ipv4 / udp / \ > %s teid is %s / end actions %s / queue index %d / end' > % (tunnel_pkt, correct_teid, port, queue)) > + count =3D 0 > for match_opt in ['matched', 'not matched']: > teid =3D correct_teid > pkts =3D [] > @@ -294,33 +295,45 @@ class TestDdpGtp(TestCase): > pkts =3D self.gtp_packets( > type, tunnel_pkt, inner_L3, match_opt, chk, teid= ) > for packet_type in pkts.keys(): > + count =3D count + 1 > self.tester.scapy_append( > 'sendp([%s], iface=3D"%s")' > % (pkts[packet_type], self.tester_intf)) > - self.tester.scapy_execute() > - if port is 'pf': > - out =3D self.dut.get_session_output(timeout= =3D2) > + self.tester.scapy_execute() > + if port is 'pf': > + out =3D self.dut.get_session_output(timeout=3D5) > + else: > + out =3D self.vm0_dut.get_session_output(timeout= =3D5) > + self.verify( > + count =3D=3D out.count('port 0/queue %d' % queue= ), > + "Failed to receive packet in this queue!!!") > + if port is 'pf': > + layerparams =3D ['L3_', 'TUNNEL_', > + 'INNER_L3_', 'INNER_L4_'] > + ptypes =3D packet_type.split('/') > + other_ptypes =3D ptypes[1:] > + if 'IPV6' in ptypes: > + other_ptypes.insert(0,'IPV4') > else: > - out =3D self.vm0_dut.get_session_output(time= out=3D2) > - self.verify( > - "port 0/queue %d" % queue in out, > - "Failed to receive packet in this queue!!!") > - > - if port is 'pf': > - layerparams =3D ['L3_', 'TUNNEL_', > - 'INNER_L3_', 'INNER_L4_'] > - ptypes =3D packet_type.split('/') > - endparams =3D ['_EXT_UNKNOWN', '', > - '_EXT_UNKNOWN', ''] > - for layerparam, ptype, endparam in zip( > - layerparams, ptypes, endparams): > - layer_type =3D layerparam + ptype + endp= aram > - self.verify( > - layer_type in out, > - "Failed to output ptype information!= !!") > - if queue !=3D 0 and type is 'fdir': > - self.verify("PKT_RX_FDIR" in out, > - "Failed to test flow director!!!= ") > + other_ptypes.insert(0,'IPV6') > + endparams =3D ['_EXT_UNKNOWN', '', > + '_EXT_UNKNOWN', ''] > + for layerparam, ptype, endparam in zip( > + layerparams, ptypes, endparams): > + layer_type =3D layerparam + ptype + endparam > + self.verify( > + layer_type in out, > + "Failed to output ptype information!") > + for layerparam, ptype, endparam in zip( > + layerparams, other_ptypes, endparams): > + layer_type =3D layerparam + ptype + endparam > + self.verify( > + layer_type in out, > + "Failed to output ptype information!!!") > + if queue !=3D 0 and type is 'fdir': > + self.verify(count =3D=3D out.count("PKT_RX_FDIR"= ), > + "Failed to test flow director!!!") > + count =3D 0 > if teid =3D=3D wrong_teid or match_opt =3D=3D 'not m= atched': > break > chk =3D 'chksum=3D0x1234,' > -- > 2.17.1