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 23163A04E0; Wed, 27 Nov 2019 09:54:00 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DCA2C5B3E; Wed, 27 Nov 2019 09:53:59 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 3B01258C3 for ; Wed, 27 Nov 2019 09:53:58 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Nov 2019 00:53:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,248,1571727600"; d="scan'208";a="211693868" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga006.jf.intel.com with ESMTP; 27 Nov 2019 00:53:56 -0800 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 27 Nov 2019 00:53:56 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 27 Nov 2019 00:53:56 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.213]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.2]) with mapi id 14.03.0439.000; Wed, 27 Nov 2019 16:53:54 +0800 From: "Ma, LihongX" To: "Li, WenjieX A" , "dts@dpdk.org" CC: "Li, WenjieX A" Thread-Topic: [dts] [PATCH V1] tests/interrupt_pmd: reduce the execution time Thread-Index: AQHVpDQrmDaH+LC+ME2m1Di7YWkYyaeetcjQ Date: Wed, 27 Nov 2019 08:53:54 +0000 Message-ID: References: <1574788723-61123-1-git-send-email-wenjiex.a.li@intel.com> In-Reply-To: <1574788723-61123-1-git-send-email-wenjiex.a.li@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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/interrupt_pmd: reduce the execution 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" Hi, Wenjie It is better use the Packet function instead of execute scapy in suite. Like: Pkt =3D Packet() Str=3D'Ether()/IP(dst=3D"198.0.0.1")/UDP()/Raw(\'X\'*18)' Pkt.append_pkt(str) Pkt. send_pkt(crb=3Dself.tester, tx_port=3DtxItf) By the way, the value " txport", " mac", " txItf" can move to outer loopba= ck from inner loopback, because the value does not change after outer loopb= ack. -----Original Message----- From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Wenjie Li Sent: Wednesday, November 27, 2019 1:19 AM To: dts@dpdk.org Cc: Li, WenjieX A Subject: [dts] [PATCH V1] tests/interrupt_pmd: reduce the execution time It is unnecessary to start/close scapy when sending every packet. The execution time could be reduced to 1 minute from 9. Signed-off-by: Wenjie Li --- tests/TestSuite_interrupt_pmd.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/TestSuite_interrupt_pmd.py b/tests/TestSuite_interrupt_p= md.py index a0467bd..4e99cf4 100644 --- a/tests/TestSuite_interrupt_pmd.py +++ b/tests/TestSuite_interrupt_pmd.py @@ -106,19 +106,20 @@ class TestInterruptPmd(TestCase): """ Send a packet to port """ + self.tester.send_expect("scapy", ">>>", 30) for i in range(len(self.dut_ports[:portnum])): for j in range(num): txport =3D self.tester.get_local_port(self.dut_ports[i]) mac =3D self.dut.get_mac_address(self.dut_ports[i]) txItf =3D self.tester.get_interface(txport) - self.tester.scapy_append( - 'sendp([Ether()/IP(dst=3D"198.0.0.%d")/UDP()/Raw(\'X\'= *18)], iface=3D"%s")' % (j, txItf)) - self.tester.scapy_execute() + self.tester.send_expect('sendp([Ether()/IP(dst=3D"198.0.0.= %d")/UDP()/Raw(\'X\'*18)], iface=3D"%s")' % (j, txItf), ">>>") + self.tester.send_expect("quit()", "#", 30) =20 def tear_down(self): """ Run after each test case. """ + self.dut.kill_all() pass =20 def tear_down_all(self): --=20 2.17.1