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 2D321A0096 for ; Thu, 9 May 2019 05:30:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 103592B87; Thu, 9 May 2019 05:30:30 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 0FCCF2082 for ; Thu, 9 May 2019 05:30:27 +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 orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 May 2019 20:30:24 -0700 X-ExtLoop1: 1 Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga003.jf.intel.com with ESMTP; 08 May 2019 20:30:24 -0700 Received: from fmsmsx162.amr.corp.intel.com (10.18.125.71) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 8 May 2019 20:30:24 -0700 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by fmsmsx162.amr.corp.intel.com (10.18.125.71) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 8 May 2019 20:30:23 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.129]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.7]) with mapi id 14.03.0415.000; Thu, 9 May 2019 11:30:21 +0800 From: "Tu, Lijuan" To: "Xiao, QimaiX" , "dts@dpdk.org" CC: "Xiao, QimaiX" Thread-Topic: [dts] [PATCH V1] update rss_to_rte_flow to reduce runtime Thread-Index: AQHU/Z6quRnJJdnbBkGmrQAbTI9ri6ZiM8jQ Date: Thu, 9 May 2019 03:30:20 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BA7E523@SHSMSX101.ccr.corp.intel.com> References: <1556441337-15976-1-git-send-email-qimaix.xiao@intel.com> In-Reply-To: <1556441337-15976-1-git-send-email-qimaix.xiao@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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTgyODc1MDItMGM2MS00NGRlLThlMDctOGI0NTNlNDVmMDgyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiSGlhUTMyTTRVaExMbXR6TEgzQ0U4Wm9IUnVIMFNseXhqMDFSZWxTOTh4aTg2Y2FMTHRkS2dyXC9BZUljSlphMWgifQ== 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] update rss_to_rte_flow to reduce runtime 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 xiao,qimai > Sent: Sunday, April 28, 2019 4:49 PM > To: dts@dpdk.org > Cc: Xiao, QimaiX > Subject: [dts] [PATCH V1] update rss_to_rte_flow to reduce runtime >=20 > optimize function of send packages with scapy >=20 > Signed-off-by: xiao,qimai > --- > tests/TestSuite_rss_to_rte_flow.py | 29 ++++++++++------------------- > 1 file changed, 10 insertions(+), 19 deletions(-) >=20 > diff --git a/tests/TestSuite_rss_to_rte_flow.py > b/tests/TestSuite_rss_to_rte_flow.py > index 587888f..0ee55bc 100644 > --- a/tests/TestSuite_rss_to_rte_flow.py > +++ b/tests/TestSuite_rss_to_rte_flow.py > @@ -36,18 +36,11 @@ Test moving RSS to rte_flow. >=20 > """ >=20 > -import utils > import time > import re >=20 > from test_case import TestCase > -from settings import HEADER_SIZE > from pmd_output import PmdOutput > -from settings import DRIVERS > - > -from project_dpdk import DPDKdut > -from dut import Dut > -from packet import Packet >=20 >=20 > class TestRSS_to_Rteflow(TestCase): > @@ -99,14 +92,13 @@ class TestRSS_to_Rteflow(TestCase): > """ > get the queue which packet enter. > """ > - outstring =3D self.dut.send_expect("stop", "testpmd> ") > - time.sleep(2) > - result_scanner =3D r"Forward Stats for RX Port=3D %s/Queue=3D\s?= ([0-9]+)" % > self.dut_ports[0] > + outstring =3D self.pmdout.get_output() > + result_scanner =3D r'port\s?%s/queue\s?(\d+):\s?received \d+ pac= kets' % > self.dut_ports[0] > scanner =3D re.compile(result_scanner, re.DOTALL) > m =3D scanner.search(outstring) > queue_id =3D m.group(1) > - print "queue is %s" % queue_id > - self.dut.send_expect("start", "testpmd> ") > + print("queue is %s" % queue_id) > + self.pmdout.execute_cmd("clear port stats all") > return queue_id >=20 > def send_and_check(self, pkt, rss_queue): > @@ -115,7 +107,6 @@ class TestRSS_to_Rteflow(TestCase): > """ > self.tester.scapy_append('sendp(%s, iface=3D"%s")' % (pkt, self.= tester_itf)) > self.tester.scapy_execute() > - time.sleep(2) > queue =3D self.get_queue_number() > self.verify(queue in rss_queue, "the packet doesn't enter the ex= pected > RSS queue.") > return queue > @@ -128,14 +119,14 @@ class TestRSS_to_Rteflow(TestCase): > time.sleep(2) > for i in range(128): > if ptype =3D=3D "ipv4-udp": > - packet =3D r'sendp([Ether(dst=3D"%s", > src=3Dget_if_hwaddr("%s"))/IP(src=3D"192.168.0.%d", > dst=3D"192.168.0.%d")/UDP(dport=3D%d, sport=3D%d)], iface=3D"%s")' % ( > - self.pf_mac, itf, i + 1, i + 2, i + 21, i + 22, itf) > + packet =3D r'sendp([Ether(dst=3D"%s", src=3D"%s")/IP(src= =3D"192.168.0.%d", > dst=3D"192.168.0.%d")/UDP(dport=3D%d, sport=3D%d)], iface=3D"%s")' % ( > + self.pf_mac, self.tester_mac, i + 1, i + 2, i + 21, = i + 22, itf) > elif ptype =3D=3D "ipv4-other": > - packet =3D r'sendp([Ether(dst=3D"%s", > src=3Dget_if_hwaddr("%s"))/IP(src=3D"192.168.0.%d", dst=3D"192.168.0.%d")= ], > iface=3D"%s")' % ( > - self.pf_mac, itf, i + 1, i + 2, itf) > + packet =3D r'sendp([Ether(dst=3D"%s", src=3D"%s")/IP(src= =3D"192.168.0.%d", > dst=3D"192.168.0.%d")], iface=3D"%s")' % ( > + self.pf_mac, self.tester_mac, i + 1, i + 2, itf) > self.tester.scapy_append(packet) > - self.tester.scapy_execute() > - time.sleep(2) > + self.tester.scapy_execute() > + time.sleep(2) >=20 > def check_packet_queue(self, queue, out): > """ > -- > 2.17.0