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 49AA1A0613 for ; Tue, 24 Sep 2019 11:21:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3C0802C02; Tue, 24 Sep 2019 11:21:10 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 8FECA1DBD for ; Tue, 24 Sep 2019 11:21:08 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Sep 2019 02:21:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,543,1559545200"; d="scan'208";a="193394263" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga006.jf.intel.com with ESMTP; 24 Sep 2019 02:21:07 -0700 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 24 Sep 2019 02:21:07 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 24 Sep 2019 02:21:07 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.92]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.53]) with mapi id 14.03.0439.000; Tue, 24 Sep 2019 17:21:05 +0800 From: "Tu, Lijuan" To: "Peng, Yuan" , "dts@dpdk.org" CC: "Peng, Yuan" Thread-Topic: [dts] [PATCH v1]tests: add some check parameters to TestSuite_ipgre.py Thread-Index: AQHVcfDRAbHU3JjHqkWsiKOljN56lac6juAQ Date: Tue, 24 Sep 2019 09:21:04 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB27785@SHSMSX101.ccr.corp.intel.com> References: <1569230945-82019-1-git-send-email-yuan.peng@intel.com> In-Reply-To: <1569230945-82019-1-git-send-email-yuan.peng@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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODRjYzQ3NWYtNjVmYi00ZmM3LTg3OTctMDg2NmIyOGViNmUzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiakppZVhPKzdVdmZZaHdBbmRCWHlxKzk1SzAyaElWaXg2elpmc1B6WlQwaDVxZElJSUFtQUUxQ28zZVVoQjQydSJ9 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: add some check parameters to TestSuite_ipgre.py 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 Peng Yuan > Sent: Monday, September 23, 2019 5:29 PM > To: dts@dpdk.org > Cc: Peng, Yuan > Subject: [dts] [PATCH v1]tests: add some check parameters to > TestSuite_ipgre.py >=20 > Add some check parameters to TestSuite_ipgre.py >=20 > Signed-off-by: Peng Yuan >=20 > diff --git a/tests/TestSuite_ipgre.py b/tests/TestSuite_ipgre.py index > d74ac05..d08a933 100644 > --- a/tests/TestSuite_ipgre.py > +++ b/tests/TestSuite_ipgre.py > @@ -63,7 +63,9 @@ class TestIpgre(TestCase): > """ > self.printFlag =3D self._enable_debug > ports =3D self.dut.get_ports() > - self.verify(self.nic in ["columbiaville_25g", "columbiaville_100= g", > "fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortvi= lle_25g", > "carlsville"], > + self.verify(self.nic in ["fortville_eagle", "fortville_spirit", > + "fortville_spirit_single", "fortville_2= 5g", "carlsville", > + "columbiaville_25g", > + "columbiaville_100g"], > "GRE tunnel packet type only support by fortville an= d carlsville") > self.verify(len(ports) >=3D 1, "Insufficient ports for testing") > valports =3D [_ for _ in ports if self.tester.get_local_port(_) = !=3D -1] @@ -90,7 > +92,7 @@ class TestIpgre(TestCase): > """ > pass >=20 > - def check_packet_transmission(self, pkt_types, layer_configs=3DNone)= : > + def check_packet_transmission(self, pkt_types, layer_configs=3DNone, > queue=3DNone, add_filter=3D0): > time.sleep(1) > for pkt_type in pkt_types.keys(): > pkt_names =3D pkt_types[pkt_type] @@ -115,6 +117,14 @@ class > TestIpgre(TestCase): > else: > print utils.GREEN("Detected %s successfully" % pkt_type) > time.sleep(1) > + if queue =3D=3D None: # no filter > + pass > + else: > + if add_filter: # remove filter > + self.verify(("Receive queue=3D0x%s" % queue) in out,= "Failed to > enter the right queue.") > + else: > + self.verify(("Receive queue=3D0x%s" % queue) not in > + out, "Failed to enter the right queue.") > + >=20 > def save_ref_packet(self, pkt_types, layer_configs=3DNone): > for pkt_type in pkt_types.keys(): > @@ -186,7 +196,7 @@ class TestIpgre(TestCase): > config_layers =3D {'ether': {'src': self.outer_mac_src}, > 'ipv4': {'proto': 'gre'}} > # Start testpmd and enable rxonly forwarding mode > - testpmd_cmd =3D "./%s/app/testpmd -c ffff -n 4 -- -i --enable-rx= -cksum -- > enable-rx-cksum" % self.target > + testpmd_cmd =3D "./%s/app/testpmd -c ffff -n 4 -- -i > + --enable-rx-cksum" % self.target > self.dut.send_expect( testpmd_cmd, > "testpmd>", > 20) > @@ -278,12 +288,16 @@ class TestIpgre(TestCase): > # Send packet inner ip address matched and check packet received= by > queue 3 > pkt_types =3D {"MAC_IP_GRE_IPv4-TUNNEL_UDP_PKT": > ["TUNNEL_GRENAT", "INNER_L4_UDP"]} > config_layers =3D {'ether': {'src': self.outer_mac_src}, > - 'ipv4': {'dst': "0.0.0.0", 'proto': 'gre'}} > - self.check_packet_transmission(pkt_types, config_layers) > + 'ipv4': {'proto': 'gre', > + 'src': self.outer_ip_src, > + 'dst': self.outer_ip_dst}, > + 'inner_ipv4':{'dst': "0.0.0.0"}} > + self.check_packet_transmission(pkt_types, config_layers, "3", > + 1) >=20 > # Remove tunnel filter and check same packet received by queue 0 > cmd =3D "tunnel_filter rm 0 %s %s 0.0.0.0 1 ipingre iip 0 3"%(ou= ter_mac, > inner_mac) > self.dut.send_expect( cmd, "testpmd>") > + self.check_packet_transmission(pkt_types, config_layers, "3") >=20 > # Add GRE filter that forward outer ip address 0.0.0.0 to queue = 3 > cmd =3D "tunnel_filter add 0 %s %s 0.0.0.0 1 ipingre oip 0 3"%(o= uter_mac, > inner_mac) @@ -293,11 +307,13 @@ class TestIpgre(TestCase): > pkt_types =3D {"MAC_IP_GRE_IPv4-TUNNEL_UDP_PKT": > ["TUNNEL_GRENAT", "INNER_L4_UDP"]} > config_layers =3D {'ether': {'src': self.outer_mac_src}, > 'ipv4': {'dst': "0.0.0.0", 'proto': 'gre'}} > - self.check_packet_transmission(pkt_types, config_layers) > + self.check_packet_transmission(pkt_types, config_layers, "3", > + 1) >=20 > # Add GRE filter that forward outer ip address 0.0.0.0 to queue = 3 > - cmd =3D "tunnel_filter rm 0 %s %s 0.0.0.0 1 ipingre iip 0 3"%(ou= ter_mac, > inner_mac) > + cmd =3D "tunnel_filter rm 0 %s %s 0.0.0.0 1 ipingre oip 0 > + 3"%(outer_mac, inner_mac) > self.dut.send_expect( cmd, "testpmd>") > + self.check_packet_transmission(pkt_types, config_layers, "3") > + > time.sleep(2) > self.dut.send_expect("quit", "#") >=20 > @@ -437,14 +453,12 @@ class TestIpgre(TestCase): > def tear_down(self): > """ > Run after each test case. > - Nothing to do. > """ > - pass > + self.dut.kill_all() >=20 > def tear_down_all(self): > """ > Run after each test suite. > Nothing to do. > """ > - self.dut.kill_all() > pass > -- > 2.7.4