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 950D1A0352; Wed, 6 May 2020 05:23:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 839711C0CE; Wed, 6 May 2020 05:23:58 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 265C71C0B6 for ; Wed, 6 May 2020 05:23:55 +0200 (CEST) IronPort-SDR: 2yaBi2FVOjzH3D+c0M0rsupflQfzpY3bJWZC1e+GYjhqdW9Cvs7Iabme6RVZNnjHfi26Tkum8d AKmejAg4ql7w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2020 20:23:55 -0700 IronPort-SDR: xQO4jB/QmG8m1eCLq9uR2phL8dHhKkt+ayD/sDzeCFcOfOH5KVNwxd6NIyNhibbEsig6mdxMLt z3oLjwVuupRQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,357,1583222400"; d="scan'208";a="296047012" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga008.jf.intel.com with ESMTP; 05 May 2020 20:23:55 -0700 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 5 May 2020 20:23:54 -0700 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 5 May 2020 20:23:53 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 5 May 2020 20:23:53 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.225]) by shsmsx102.ccr.corp.intel.com ([169.254.2.38]) with mapi id 14.03.0439.000; Wed, 6 May 2020 11:23:51 +0800 From: "Tu, Lijuan" To: "Chen, BoX C" , "dts@dpdk.org" CC: "Chen, BoX C" Thread-Topic: [dts] [PATCH V1] test/ddp_l2tpv3: Adapt to Python 3 format Thread-Index: AQHWHgjMOrYYpt9ylEGWUqmK5YECEKiab2vA Date: Wed, 6 May 2020 03:23:51 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BC21EDB@SHSMSX101.ccr.corp.intel.com> References: <20200429091326.17171-1-box.c.chen@intel.com> In-Reply-To: <20200429091326.17171-1-box.c.chen@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-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] test/ddp_l2tpv3: Adapt to Python 3 format 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 ChenBo > Sent: Wednesday, April 29, 2020 5:13 PM > To: dts@dpdk.org > Cc: Chen, BoX C > Subject: [dts] [PATCH V1] test/ddp_l2tpv3: Adapt to Python 3 format >=20 > Adapt to Python 3 format, remove invalid variables >=20 > Signed-off-by: ChenBo > --- > tests/TestSuite_ddp_l2tpv3.py | 427 +++++++++++++++++++--------------- > 1 file changed, 235 insertions(+), 192 deletions(-) >=20 > diff --git a/tests/TestSuite_ddp_l2tpv3.py b/tests/TestSuite_ddp_l2tpv3.p= y > index 710a069..552232b 100644 > --- a/tests/TestSuite_ddp_l2tpv3.py > +++ b/tests/TestSuite_ddp_l2tpv3.py > @@ -35,28 +35,26 @@ l2tpv3 test script. > """ > import time > import re > -import sys > -import utils > from test_case import TestCase > from pmd_output import PmdOutput > -from settings import get_nic_name > from scapy.all import * > import random > + > + > class TestDdpL2tpv3(TestCase): >=20 > def set_up_all(self): > + self.dut.session.copy_file_to('dep/l2tpv3oip-l4.pkg', "/tmp/") > + self.dut_testpmd =3D PmdOutput(self.dut) > self.dut_ports =3D self.dut.get_ports(self.nic) > - profile_file =3D 'dep/l2tpv3oip-l4.pkg' > - profile_dst =3D "/tmp/" > - self.dut.session.copy_file_to(profile_file, profile_dst) > + self.used_dut_port =3D self.dut_ports[0] > + tester_port =3D self.tester.get_local_port(self.used_dut_port) > + self.tester_intf =3D self.tester.get_interface(tester_port) > out =3D self.dut.send_expect("cat config/common_base", "]# ", 10= ) > self.PF_Q_strip =3D 'CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_PF' > pattern =3D "(%s=3D)(\d*)" % self.PF_Q_strip > self.PF_QUEUE =3D self.element_strip(out, pattern) > - self.used_dut_port =3D self.dut_ports[0] > - tester_port =3D self.tester.get_local_port(self.used_dut_port) > - self.tester_intf =3D self.tester.get_interface(tester_port) > - self.dut_testpmd =3D PmdOutput(self.dut) > + self.PF_Q_strip =3D 'CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_PF' >=20 > def set_up(self): > self.load_profile() > @@ -69,13 +67,12 @@ class TestDdpL2tpv3(TestCase): > s =3D re.compile(pattern) > res =3D s.search(out) > if res is None: > - print 'Queue number not in output.' > + print('Queue number not in output.') > return None > else: > result =3D res.group(2) > return int(result) >=20 > - > def load_profile(self): > """ > Load profile to update FVL configuration tables, profile will be= @@ - > 84,15 +81,16 @@ class TestDdpL2tpv3(TestCase): > self.dut_testpmd.start_testpmd( > "Default", "--pkt-filter-mode=3Dperfect --port-topology=3Dch= ained \ > --txq=3D%s --rxq=3D%s --disable-rss" > - % (self.PF_QUEUE, self.PF_QUEUE)) > - self.dut_testpmd.execute_cmd('port stop 0') > + % (self.PF_QUEUE, self.PF_QUEUE)) > + self.dut_testpmd.execute_cmd('port stop all') > time.sleep(1) > self.dut_testpmd.execute_cmd( > 'ddp add 0 /tmp/l2tpv3oip-l4.pkg,/tmp/l2tpv3oip-l4.bak') > out =3D self.dut_testpmd.execute_cmd('ddp get list 0') > self.verify("Profile number is: 1" in out, > "Failed to load ddp profile!!!") > - self.dut_testpmd.execute_cmd('port start 0') > + self.dut_testpmd.execute_cmd('port start all') > + time.sleep(3) >=20 > def l2tpv3pkts(self, keyword): > """ > @@ -101,7 +99,7 @@ class TestDdpL2tpv3(TestCase): > pkt =3D [] > if keyword is not 'def': > if keyword is "l2tpv3oipv4": > - > pkt.append("Ether()/IP(proto=3D115)/Raw('\\x00\\x00\\x03\\xe9')") > + > + pkt.append("Ether()/IP(proto=3D115)/Raw('\\x00\\x00\\x03\\xe9')") > pkt.append("Ether()/IP(proto=3D115)/Raw('\\x00\\x00\\x03= \\fe9')") > if keyword is "l2tpv3oipv4_dst": >=20 > pkt.append("Ether()/IP(dst=3D\"8.8.8.8\",proto=3D115)/Raw('\\x00\\x00\\x0= 3\\x > e9')") > @@ -128,16 +126,20 @@ class TestDdpL2tpv3(TestCase): >=20 > pkt.append("Ether()/IPv6(src=3D\"1:2:3:4:5:6:7:8\",nh=3D115)/Raw('\\x00\\= x00\\ > x03\\xf9')") >=20 > pkt.append("Ether()/IPv6(src=3D\"1111:2:3:4:5:6:7:8\",nh=3D115)/Raw('\\x0= 0\\x0 > 0\\x03\\xe9')") > if keyword is "l2tpv3oipv6_src_dst": > - > pkt.append("Ether()/IPv6(src=3D\"2:3:4:5:6:7:8:9\",dst=3D\"6:5:4:3:2:1:8:= 9\",nh=3D1 > 15)/Raw('\\x00\\x00\\x03\\xe9')") > - > pkt.append("Ether()/IPv6(src=3D\"2:3:4:5:6:7:8:9\",dst=3D\"6:5:4:3:2:1:8:= 9\",nh=3D1 > 15)/Raw('\\x00\\x00\\x03\\xf9')") > - > pkt.append("Ether()/IPv6(src=3D\"2222:3:4:5:6:7:8:9\",dst=3D\"6:5:4:3:2:1= :8:9\",n > h=3D115)/Raw('\\x00\\x00\\x03\\xe9')") > - > pkt.append("Ether()/IPv6(src=3D\"2:3:4:5:6:7:8:9\",dst=3D\"6666:5:4:3:2:1= :8:9\",n > h=3D115)/Raw('\\x00\\x00\\x03\\xe9')") > + pkt.append( > + > "Ether()/IPv6(src=3D\"2:3:4:5:6:7:8:9\",dst=3D\"6:5:4:3:2:1:8:9\",nh=3D11= 5)/Raw('\\ > x00\\x00\\x03\\xe9')") > + pkt.append( > + > "Ether()/IPv6(src=3D\"2:3:4:5:6:7:8:9\",dst=3D\"6:5:4:3:2:1:8:9\",nh=3D11= 5)/Raw('\\ > x00\\x00\\x03\\xf9')") > + pkt.append( > + > "Ether()/IPv6(src=3D\"2222:3:4:5:6:7:8:9\",dst=3D\"6:5:4:3:2:1:8:9\",nh= =3D115)/Raw > ('\\x00\\x00\\x03\\xe9')") > + pkt.append( > + > + "Ether()/IPv6(src=3D\"2:3:4:5:6:7:8:9\",dst=3D\"6666:5:4:3:2:1:8:9\",nh= =3D11 > + 5)/Raw('\\x00\\x00\\x03\\xe9')") > if keyword is "l2tpv3_ipv4_ipv6": > pkt.append("Ether()/IP(proto=3D115)/Raw('\\x00\\x00\\x03= \\xe9')") > pkt.append("Ether()/IP(proto=3D115)/Raw('\\x00\\x00\\x03= \\xf9')") > pkt.append("Ether()/IPv6(nh=3D115)/Raw('\\x00\\x00\\x03\= \xe9')") > pkt.append("Ether()/IPv6(nh=3D115)/Raw('\\x00\\x00\\x03\= \xf9')") > - if keyword is "l2tpv3oip_v4src_v6src" : > + if keyword is "l2tpv3oip_v4src_v6src": >=20 > pkt.append("Ether()/IP(src=3D\"1.3.5.7\",proto=3D115)/Raw('\\x00\\x00\\x0= 3\\x > e9')") >=20 > pkt.append("Ether()/IP(src=3D\"1.3.5.7\",proto=3D115)/Raw('\\x00\\x00\\x0= 3\\x > a9')") >=20 > pkt.append("Ether()/IP(src=3D\"11.3.5.7\",proto=3D115)/Raw('\\x00\\x00\\x= 03\\ > xe9')") > @@ -156,10 +158,14 @@ class TestDdpL2tpv3(TestCase): >=20 > pkt.append("Ether()/IP(src=3D\"9.8.7.6\",dst=3D\"4.5.6.7\",proto=3D115)/R= aw('\\x0 > 0\\x00\\x03\\xf9')") >=20 > pkt.append("Ether()/IP(src=3D\"99.8.7.6\",dst=3D\"4.5.6.7\",proto=3D115)/= Raw('\\x > 00\\x00\\x03\\xe9')") >=20 > pkt.append("Ether()/IP(src=3D\"9.8.7.6\",dst=3D\"44.5.6.7\",proto=3D115)/= Raw('\\x > 00\\x00\\x03\\xe9')") > - > pkt.append("Ether()/IPv6(src=3D\"1:2:3:4:5:6:7:8\",dst=3D\"9:8:7:6:5:4:3:= 2\",nh=3D1 > 15)/Raw('\\x00\\x00\\x03\\xe9')") > - > pkt.append("Ether()/IPv6(src=3D\"1:2:3:4:5:6:7:8\",dst=3D\"9:8:7:6:5:4:3:= 2\",nh=3D1 > 15)/Raw('\\x00\\x00\\x03\\xf9')") > - > pkt.append("Ether()/IPv6(src=3D\"1111:2:3:4:5:6:7:8\",dst=3D\"9:8:7:6:5:4= :3:2\",n > h=3D115)/Raw('\\x00\\x00\\x03\\xe9')") > - > pkt.append("Ether()/IPv6(src=3D\"1:2:3:4:5:6:7:8\",dst=3D\"9999:8:7:6:5:4= :3:2\",n > h=3D115)/Raw('\\x00\\x00\\x03\\xe9')") > + pkt.append( > + > "Ether()/IPv6(src=3D\"1:2:3:4:5:6:7:8\",dst=3D\"9:8:7:6:5:4:3:2\",nh=3D11= 5)/Raw('\\ > x00\\x00\\x03\\xe9')") > + pkt.append( > + > "Ether()/IPv6(src=3D\"1:2:3:4:5:6:7:8\",dst=3D\"9:8:7:6:5:4:3:2\",nh=3D11= 5)/Raw('\\ > x00\\x00\\x03\\xf9')") > + pkt.append( > + > "Ether()/IPv6(src=3D\"1111:2:3:4:5:6:7:8\",dst=3D\"9:8:7:6:5:4:3:2\",nh= =3D115)/Raw > ('\\x00\\x00\\x03\\xe9')") > + pkt.append( > + > + "Ether()/IPv6(src=3D\"1:2:3:4:5:6:7:8\",dst=3D\"9999:8:7:6:5:4:3:2\",nh= =3D11 > + 5)/Raw('\\x00\\x00\\x03\\xe9')") > if keyword is "l2tpv3oip_v4_v6_udp": >=20 > pkt.append("Ether()/IP(dst=3D\"9.7.5.3\",proto=3D115)/Raw('\\x00\\x00\\x0= 3\\x > e9')") >=20 > pkt.append("Ether()/IP(dst=3D\"9.7.5.3\",proto=3D115)/Raw('\\x00\\x00\\x0= 3\\x > b9')") > @@ -168,27 +174,27 @@ class TestDdpL2tpv3(TestCase): > pkt.append("Ether()/IP()/UDP()") > return pkt >=20 > - def send_and_verify(self,keyword=3D'def'): > + def send_and_verify(self, keyword=3D'def'): > """ > Send packets and verify result. > """ > pkt =3D self.l2tpv3pkts(keyword) > - qnum=3D[] > + qnum =3D [] > for i in range(len(pkt)): > - self.tester.scapy_append('sendp([%s], iface=3D"%s")'%(pkt[i], > self.tester_intf)) > - self.tester.scapy_execute() > - out =3D self.dut.get_session_output(timeout=3D2) > - pattern =3D "port (\d)/queue (\d{1,2}): received (\d) packets" > - qnum.append(self.element_strip(out, pattern)) > + self.tester.scapy_append('sendp([%s], iface=3D"%s")' % (pkt[= i], > self.tester_intf)) > + self.tester.scapy_execute() > + out =3D self.dut.get_session_output(timeout=3D2) > + pattern =3D "port (\d)/queue (\d{1,2}): received (\d) packet= s" > + qnum.append(self.element_strip(out, pattern)) > return qnum >=20 > - def run_fd_test(self, keyword,crlwords_ipv4,crlwords_ipv6): > + def run_fd_test(self, keyword, crlwords_ipv4, crlwords_ipv6): > """ > Configure Flow director rules. >=20 > keywords: keywords have IPv4/IPv6 SIP DIP and UDP > """ > - self.dut_testpmd.execute_cmd('port stop 0') > + self.dut_testpmd.execute_cmd('port stop all') > self.dut_testpmd.execute_cmd('port config 0 pctype 28 fdir_inset= clear > all') > self.dut_testpmd.execute_cmd('port config 0 pctype 38 fdir_inset= clear > all') > if crlwords_ipv4 is not None: > @@ -197,248 +203,282 @@ class TestDdpL2tpv3(TestCase): > if crlwords_ipv6 is not None: > for field in crlwords_ipv6: > self.dut_testpmd.execute_cmd('port config 0 pctype 38 fd= ir_inset > set field {}'.format(field)) > - self.dut_testpmd.execute_cmd('port start 0') > + self.dut_testpmd.execute_cmd('port start all') > self.dut_testpmd.execute_cmd('start') > self.dut_testpmd.execute_cmd('set verbose 1') > - qdef=3D[] > + qdef =3D [] > qnum =3D self.send_and_verify(keyword) > for i in range(len(qnum)): > self.verify(qnum[i] =3D=3D 0, "Receive packet from wrong que= ue!!!") >=20 > - queue =3D random.randint(1, self.PF_QUEUE - 1) > + queue =3D random.randint(1, self.PF_QUEUE - 1) >=20 > if 'l2tpv3oipv4' is keyword: > - > - self.dut_testpmd.execute_cmd( 'flow create 0 ingress pattern= eth / > ipv4 / l2tpv3oip session_id is 1001 / end actions queue index {} / > end'.format(queue)) > - qdef.append(queue) #Queue Number as configured in the rule f= or > matched sessionID > - qdef.append(0) #Default Queue number to check for in case of > non matching sessionID > + self.dut_testpmd.execute_cmd( > + 'flow create 0 ingress pattern eth / ipv4 / l2tpv3oip se= ssion_id is > 1001 / end actions queue index {} / end'.format( > + queue)) > + qdef.append(queue) # Queue Number as configured in the rule= for > matched sessionID > + qdef.append(0) # Default Queue number to check for in case > + of non matching sessionID >=20 > if 'l2tpv3oipv4_dst' is keyword: > - self.dut_testpmd.execute_cmd( 'flow create 0 ingress pattern= eth / > ipv4 dst is 8.8.8.8 / l2tpv3oip session_id is 1001 / end actions queue = index {} > / end'.format(queue)) > - qdef.append(queue) #Queue Number as configured in the rule f= or > matched sessionID > - qdef.append(0) #Default Queue number to check for in case of > non matching sessionID > - qdef.append(0) #Default Queue number to check for in case of > non matching DIP > - > + self.dut_testpmd.execute_cmd( > + 'flow create 0 ingress pattern eth / ipv4 dst is 8.8.8.= 8 / l2tpv3oip > session_id is 1001 / end actions queue index {} / end'.format( > + queue)) > + qdef.append(queue) # Queue Number as configured in the rule= for > matched sessionID > + qdef.append(0) # Default Queue number to check for in case = of non > matching sessionID > + qdef.append(0) # Default Queue number to check for in case > + of non matching DIP >=20 > if 'l2tpv3oipv4_src' is keyword: > - self.dut_testpmd.execute_cmd( 'flow create 0 ingress pattern= eth / > ipv4 src is 1.1.1.1 / l2tpv3oip session_id is 1001 / end actions queue in= dex {} / > end'.format(queue)) > - qdef.append(queue) #Queue Number as configured in the rule f= or > matched sessionID > - qdef.append(0) #Default Queue number to check for in case of > non matching sessionID > - qdef.append(0) #Default Queue number to check for in case of > non matching SIP > + self.dut_testpmd.execute_cmd( > + 'flow create 0 ingress pattern eth / ipv4 src is 1.1.1.1= / l2tpv3oip > session_id is 1001 / end actions queue index {} / end'.format( > + queue)) > + qdef.append(queue) # Queue Number as configured in the rule= for > matched sessionID > + qdef.append(0) # Default Queue number to check for in case = of non > matching sessionID > + qdef.append(0) # Default Queue number to check for in case > + of non matching SIP >=20 > if 'l2tpv3oipv4_src_dst' is keyword: > - self.dut_testpmd.execute_cmd( 'flow create 0 ingress pattern= eth / > ipv4 src is 5.5.5.5 dst is 2.2.2.2 / l2tpv3oip session_id is 1001 / end a= ctions > queue index {} / end'.format(queue)) > - qdef.append(queue) #Queue Number as configured in the rule f= or > matched sessionID > - qdef.append(0) #Default Queue number to check for in case of > non matching sessionID > - qdef.append(0) #Default Queue number to check for in case of > non matching SIP > - qdef.append(0) #Default Queue number to check for in case of > non matching DIP > + self.dut_testpmd.execute_cmd( > + 'flow create 0 ingress pattern eth / ipv4 src is 5.5.5.5= dst is 2.2.2.2 / > l2tpv3oip session_id is 1001 / end actions queue index {} / end'.format( > + queue)) > + qdef.append(queue) # Queue Number as configured in the rule= for > matched sessionID > + qdef.append(0) # Default Queue number to check for in case = of non > matching sessionID > + qdef.append(0) # Default Queue number to check for in case = of non > matching SIP > + qdef.append(0) # Default Queue number to check for in case > + of non matching DIP >=20 > if 'l2tpv3oipv6' is keyword: > - self.dut_testpmd.execute_cmd( 'flow create 0 ingress pattern= eth / > ipv6 / l2tpv3oip session_id is 1001 / end actions queue index {} / > end'.format(queue)) > - qdef.append(queue) #Queue Number as configured in the rule f= or > matched sessionID > - qdef.append(0) #Default Queue number to check for in case of > non matching sessionID > + self.dut_testpmd.execute_cmd( > + 'flow create 0 ingress pattern eth / ipv6 / l2tpv3oip se= ssion_id is > 1001 / end actions queue index {} / end'.format( > + queue)) > + qdef.append(queue) # Queue Number as configured in the rule= for > matched sessionID > + qdef.append(0) # Default Queue number to check for in case > + of non matching sessionID >=20 > if 'l2tpv3oipv6_dst' is keyword: > - self.dut_testpmd.execute_cmd( 'flow create 0 ingress pattern= eth / > ipv6 dst is 8:7:6:5:4:3:2:1 / l2tpv3oip session_id is 1001 / end actions = queue > index {} / end'.format(queue)) > - qdef.append(queue) #Queue Number as configured in the rule f= or > matched sessionID > - qdef.append(0) #Default Queue number to check for in case of > non matching sessionID > - qdef.append(0) #Default Queue number to check for in case of > non matching DIP > + self.dut_testpmd.execute_cmd( > + 'flow create 0 ingress pattern eth / ipv6 dst is 8:7:6:5= :4:3:2:1 / > l2tpv3oip session_id is 1001 / end actions queue index {} / end'.format( > + queue)) > + qdef.append(queue) # Queue Number as configured in the rule= for > matched sessionID > + qdef.append(0) # Default Queue number to check for in case = of non > matching sessionID > + qdef.append(0) # Default Queue number to check for in case > + of non matching DIP >=20 > if 'l2tpv3oipv6_src' is keyword: > - self.dut_testpmd.execute_cmd('flow create 0 ingress pattern = eth / > ipv6 src is 1:2:3:4:5:6:7:8 / l2tpv3oip session_id is 1001 / end actions = queue > index {} / end'.format(queue)) > - qdef.append(queue) #Queue Number as configured in the rule f= or > matched sessionID > - qdef.append(0) #Default Queue number to check for in case of > non matching sessionID > - qdef.append(0) #Default Queue number to check for in case of > non matching SIP > + self.dut_testpmd.execute_cmd( > + 'flow create 0 ingress pattern eth / ipv6 src is 1:2:3:4= :5:6:7:8 / > l2tpv3oip session_id is 1001 / end actions queue index {} / end'.format( > + queue)) > + qdef.append(queue) # Queue Number as configured in the rule= for > matched sessionID > + qdef.append(0) # Default Queue number to check for in case = of non > matching sessionID > + qdef.append(0) # Default Queue number to check for in case > + of non matching SIP >=20 > if 'l2tpv3oipv6_src_dst' is keyword: > - self.dut_testpmd.execute_cmd( 'flow create 0 ingress pattern= eth / > ipv6 src is 2:3:4:5:6:7:8:9 dst is 6:5:4:3:2:1:8:9 / l2tpv3oip session_id= is 1001 / > end actions queue index {} / end'.format(queue)) > - qdef.append(queue) #Queue Number as configured in the rule f= or > matched sessionID > - qdef.append(0) #Default Queue number to check for in case of > non matching sessionID > - qdef.append(0) #Default Queue number to check for in case of > non matching SIP > - qdef.append(0) #Default Queue number to check for in case of > non matching DIP > + self.dut_testpmd.execute_cmd( > + 'flow create 0 ingress pattern eth / ipv6 src is 2:3:4:5= :6:7:8:9 dst is > 6:5:4:3:2:1:8:9 / l2tpv3oip session_id is 1001 / end actions queue index = {} / > end'.format( > + queue)) > + qdef.append(queue) # Queue Number as configured in the rule= for > matched sessionID > + qdef.append(0) # Default Queue number to check for in case = of non > matching sessionID > + qdef.append(0) # Default Queue number to check for in case = of non > matching SIP > + qdef.append(0) # Default Queue number to check for in case > + of non matching DIP >=20 > if 'l2tpv3_ipv4_ipv6' is keyword: > - self.dut_testpmd.execute_cmd( 'flow create 0 ingress pattern= eth / > ipv4 / l2tpv3oip session_id is 1001 / end actions queue index {} / > end'.format(queue)) > - qdef.append(queue) #Queue Number as configured in the rule f= or > matched sessionID > - qdef.append(0) #Default Queue number to check for in case of > non matching sessionID > + self.dut_testpmd.execute_cmd( > + 'flow create 0 ingress pattern eth / ipv4 / l2tpv3oip se= ssion_id is > 1001 / end actions queue index {} / end'.format( > + queue)) > + qdef.append(queue) # Queue Number as configured in the rule= for > matched sessionID > + qdef.append(0) # Default Queue number to check for in case > + of non matching sessionID > queue =3D random.randint(1, self.PF_QUEUE - 1) > - out=3Dself.dut_testpmd.execute_cmd( 'flow create 0 ingress p= attern eth > / ipv6 / l2tpv3oip session_id is 1001 / end actions queue index {} / > end'.format(queue)) > - qdef.append(queue) #Queue Number as configured in the rule f= or > matched sessionID > - qdef.append(0) #Default Queue number to check for in case of > non matching sessionID > + self.dut_testpmd.execute_cmd( > + 'flow create 0 ingress pattern eth / ipv6 / l2tpv3oip se= ssion_id is > 1001 / end actions queue index {} / end'.format( > + queue)) > + qdef.append(queue) # Queue Number as configured in the rule= for > matched sessionID > + qdef.append(0) # Default Queue number to check for in case > + of non matching sessionID >=20 > if 'l2tpv3oip_v4src_v6src' is keyword: > - self.dut_testpmd.execute_cmd( 'flow create 0 ingress pattern= eth / > ipv4 src is 1.3.5.7 / l2tpv3oip session_id is 1001 / end actions queue in= dex {} / > end'.format(queue)) > - qdef.append(queue) #Queue Number as configured in the rule f= or > matched sessionID > - qdef.append(0) #Default Queue number to check for in case of= non > matching sessionID > - qdef.append(0) #Default Queue number to check for in case of= non > matching IPv4 SIP > + self.dut_testpmd.execute_cmd( > + 'flow create 0 ingress pattern eth / ipv4 src is 1.3.5.7= / l2tpv3oip > session_id is 1001 / end actions queue index {} / end'.format( > + queue)) > + qdef.append(queue) # Queue Number as configured in the rule= for > matched sessionID > + qdef.append(0) # Default Queue number to check for in case = of non > matching sessionID > + qdef.append(0) # Default Queue number to check for in case > + of non matching IPv4 SIP > queue =3D random.randint(1, self.PF_QUEUE - 1) > - out=3Dself.dut_testpmd.execute_cmd( 'flow create 0 ingress p= attern eth > / ipv6 src is 1:3:5:7:9:2:4:6 / l2tpv3oip session_id is 1001 / end action= s queue > index {} / end'.format(queue)) > - qdef.append(queue) #Queue Number as configured in the rule f= or > matched sessionID > - qdef.append(0) #Default Queue number to check for in case of= non > matching sessionID > - qdef.append(0) #Default Queue number to check for in case of= non > matching IPv6 SIP > + self.dut_testpmd.execute_cmd( > + 'flow create 0 ingress pattern eth / ipv6 src is 1:3:5:7= :9:2:4:6 / > l2tpv3oip session_id is 1001 / end actions queue index {} / end'.format( > + queue)) > + qdef.append(queue) # Queue Number as configured in the rule= for > matched sessionID > + qdef.append(0) # Default Queue number to check for in case = of non > matching sessionID > + qdef.append(0) # Default Queue number to check for in case > + of non matching IPv6 SIP >=20 > if 'l2tpv3oip_v4dst_v6dst' is keyword: > - self.dut_testpmd.execute_cmd( 'flow create 0 ingress pattern= eth / > ipv4 dst is 9.7.5.3 / l2tpv3oip session_id is 1001 / end actions queue in= dex {} / > end'.format(queue)) > - qdef.append(queue) #Queue Number as configured in the rule f= or > matched sessionID > - qdef.append(0) #Default Queue number to check for in case o= f non > matching sessionID > - qdef.append(0) #Default Queue number to check for in case o= f non > matching IPv4 DIP > + self.dut_testpmd.execute_cmd( > + 'flow create 0 ingress pattern eth / ipv4 dst is 9.7.5.3= / l2tpv3oip > session_id is 1001 / end actions queue index {} / end'.format( > + queue)) > + qdef.append(queue) # Queue Number as configured in the rule= for > matched sessionID > + qdef.append(0) # Default Queue number to check for in case = of non > matching sessionID > + qdef.append(0) # Default Queue number to check for in case > + of non matching IPv4 DIP > queue =3D random.randint(1, self.PF_QUEUE - 1) > - self.dut_testpmd.execute_cmd( 'flow create 0 ingress pattern= eth / > ipv6 dst is 2:4:6:8:1:3:5:7 / l2tpv3oip session_id is 1001 / end actions = queue > index {} / end'.format(queue)) > - qdef.append(queue) #Queue Number as configured in the rule f= or > matched sessionID > - qdef.append(0) #Default Queue number to check for in case of= non > matching sessionID > - qdef.append(0) #Default Queue number to check for in case of= non > matching IPv6 DIP > + self.dut_testpmd.execute_cmd( > + 'flow create 0 ingress pattern eth / ipv6 dst is 2:4:6:8= :1:3:5:7 / > l2tpv3oip session_id is 1001 / end actions queue index {} / end'.format( > + queue)) > + qdef.append(queue) # Queue Number as configured in the rule= for > matched sessionID > + qdef.append(0) # Default Queue number to check for in case = of non > matching sessionID > + qdef.append(0) # Default Queue number to check for in case > + of non matching IPv6 DIP >=20 > if 'l2tpv3oip_v4srcdst_v6srcdst' is keyword: > - self.dut_testpmd.execute_cmd( 'flow create 0 ingress pattern= eth / > ipv4 src is 9.8.7.6 dst is 4.5.6.7 / l2tpv3oip session_id is 1001 / end a= ctions > queue index {} / end'.format(queue)) > - qdef.append(queue) #Queue Number as configured in the rule f= or > matched sessionID > - qdef.append(0) #Default Queue number to check for in case o= f non > matching sessionID > - qdef.append(0) #Default Queue number to check for in case o= f non > matching IPv4 SIP > - qdef.append(0) #Default Queue number to check for in case o= f non > matching IPv4 DIP > + self.dut_testpmd.execute_cmd( > + 'flow create 0 ingress pattern eth / ipv4 src is 9.8.7.6= dst is 4.5.6.7 / > l2tpv3oip session_id is 1001 / end actions queue index {} / end'.format( > + queue)) > + qdef.append(queue) # Queue Number as configured in the rule= for > matched sessionID > + qdef.append(0) # Default Queue number to check for in case = of non > matching sessionID > + qdef.append(0) # Default Queue number to check for in case = of non > matching IPv4 SIP > + qdef.append(0) # Default Queue number to check for in case > + of non matching IPv4 DIP > queue =3D random.randint(1, self.PF_QUEUE - 1) > - self.dut_testpmd.execute_cmd( 'flow create 0 ingress pattern= eth / > ipv6 src is 1:2:3:4:5:6:7:8 dst is 9:8:7:6:5:4:3:2 / l2tpv3oip session_id= is 1001 / > end actions queue index {} / end'.format(queue)) > - qdef.append(queue) #Queue Number as configured in the rule f= or > matched sessionID > - qdef.append(0) #Default Queue number to check for in case o= f non > matching sessionID > - qdef.append(0) #Default Queue number to check for in case o= f non > matching IPv6 SIP > - qdef.append(0) #Default Queue number to check for in case o= f non > matching IPv6 DIP > + self.dut_testpmd.execute_cmd( > + 'flow create 0 ingress pattern eth / ipv6 src is 1:2:3:4= :5:6:7:8 dst is > 9:8:7:6:5:4:3:2 / l2tpv3oip session_id is 1001 / end actions queue index = {} / > end'.format( > + queue)) > + qdef.append(queue) # Queue Number as configured in the rule= for > matched sessionID > + qdef.append(0) # Default Queue number to check for in case = of non > matching sessionID > + qdef.append(0) # Default Queue number to check for in case = of non > matching IPv6 SIP > + qdef.append(0) # Default Queue number to check for in case > + of non matching IPv6 DIP >=20 > if 'l2tpv3oip_v4_v6_udp' is keyword: > - self.dut_testpmd.execute_cmd( 'flow create 0 ingress pattern= eth / > ipv4 / l2tpv3oip session_id is 1001 / end actions queue index {} / > end'.format(queue)) > - qdef.append(queue) #Queue Number as configured in the rule f= or > matched sessionID > - qdef.append(0) #Default Queue number to check for in case of= non > matching sessionID > + self.dut_testpmd.execute_cmd( > + 'flow create 0 ingress pattern eth / ipv4 / l2tpv3oip se= ssion_id is > 1001 / end actions queue index {} / end'.format( > + queue)) > + qdef.append(queue) # Queue Number as configured in the rule= for > matched sessionID > + qdef.append(0) # Default Queue number to check for in case > + of non matching sessionID > queue =3D random.randint(1, self.PF_QUEUE - 1) > - self.dut_testpmd.execute_cmd( 'flow create 0 ingress pattern= eth / > ipv6 / l2tpv3oip session_id is 1001 / end actions queue index {} / > end'.format(queue)) > - qdef.append(queue) #Queue Number as configured in the rule f= or > matched sessionID > - qdef.append(0) #Default Queue number to check for in case of= non > matching sessionID > + self.dut_testpmd.execute_cmd( > + 'flow create 0 ingress pattern eth / ipv6 / l2tpv3oip se= ssion_id is > 1001 / end actions queue index {} / end'.format( > + queue)) > + qdef.append(queue) # Queue Number as configured in the rule= for > matched sessionID > + qdef.append(0) # Default Queue number to check for in case > + of non matching sessionID > queue =3D random.randint(1, self.PF_QUEUE - 1) > - self.dut_testpmd.execute_cmd( 'flow create 0 ingress pattern= eth / > ipv4 / udp / end actions queue index {} / end'.format(queue)) > - qdef.append(queue) #Queue Number as configured in the rule > + self.dut_testpmd.execute_cmd( > + 'flow create 0 ingress pattern eth / ipv4 / udp / end ac= tions queue > index {} / end'.format(queue)) > + qdef.append(queue) # Queue Number as configured in the > + rule >=20 > - qnum=3Dself.send_and_verify(keyword) > + qnum =3D self.send_and_verify(keyword) > for i in range(len(qdef)): > - self.verify(qdef[i] =3D=3D qnum[i], "Receive packet from wrong > queue!!!") > - self.dut_testpmd.execute_cmd("flow flush 0") # Delete all the fl= ow > director rules > + self.verify(qdef[i] =3D=3D qnum[i], "Receive packet from wro= ng queue!!!") > + self.dut_testpmd.execute_cmd("flow flush 0") # Delete all the > + flow director rules >=20 > def test_l2tpv3oipv4(self): > """ > L2TPv3 PAY is supported by NVM with profile updated. > - Default flow director input set is sessionID > + Default flow director input set is sessionID > flow director works to send matched packets to configured queue, > otherwise to queue 0. > """ > keyword =3D 'l2tpv3oipv4' > - crlwords_ipv4=3Drange(44,46) > - crlwords_ipv6=3DNone > - self.run_fd_test(keyword,crlwords_ipv4,crlwords_ipv6) > + crlwords_ipv4 =3D range(44, 46) > + crlwords_ipv6 =3D None > + self.run_fd_test(keyword, crlwords_ipv4, crlwords_ipv6) >=20 > def test_l2tpv3oipv4_src(self): > """ > Flow director input set is sessionID + SIP for pctype 28 > """ >=20 > - crlwords_ipv4=3Dlist(range(15,17))+list(range(44,46)) > - crlwords_ipv6=3DNone > + crlwords_ipv4 =3D list(range(15, 17)) + list(range(44, 46)) > + crlwords_ipv6 =3D None > keyword =3D 'l2tpv3oipv4_src' > - self.run_fd_test(keyword,crlwords_ipv4,crlwords_ipv6) > + self.run_fd_test(keyword, crlwords_ipv4, crlwords_ipv6) >=20 > def test_l2tpv3oipv4_dst(self): > """ > Flow director input set is sessionID + DIP for pctype 28 > """ > - crlwords_ipv4=3Dlist(range(27,29))+list(range(44,46)) > - crlwords_ipv6=3DNone > + crlwords_ipv4 =3D list(range(27, 29)) + list(range(44, 46)) > + crlwords_ipv6 =3D None > keyword =3D 'l2tpv3oipv4_dst' > - self.run_fd_test(keyword,crlwords_ipv4,crlwords_ipv6) > + self.run_fd_test(keyword, crlwords_ipv4, crlwords_ipv6) >=20 > def test_l2tpv3oipv4_src_dst(self): > """ > Flow director input set is sessionID + SIP + DIP for pctype 28 > """ > - crlwords_ipv4=3Dlist(range(15,17))+list(range(27,29))+list(range= (44,46)) > - crlwords_ipv6=3DNone > + crlwords_ipv4 =3D list(range(15, 17)) + list(range(27, 29)) + li= st(range(44, > 46)) > + crlwords_ipv6 =3D None > keyword =3D 'l2tpv3oipv4_src_dst' > - self.run_fd_test(keyword,crlwords_ipv4,crlwords_ipv6) > + self.run_fd_test(keyword, crlwords_ipv4, crlwords_ipv6) >=20 > def test_l2tpv3oipv6(self): > - > """ > Flow director input set is sessionID for pctyp 38 > """ > - crlwords_ipv6=3Drange(44,46) > - crlwords_ipv4=3DNone > + crlwords_ipv6 =3D range(44, 46) > + crlwords_ipv4 =3D None > keyword =3D 'l2tpv3oipv6' > - self.run_fd_test(keyword,crlwords_ipv4,crlwords_ipv6) > + self.run_fd_test(keyword, crlwords_ipv4, crlwords_ipv6) >=20 > def test_l2tpv3oipv6_dst(self): > """ > Flow director input set is sessionID + DIP for pctype 38 > """ > - crlwords_ipv4=3DNone > - crlwords_ipv6=3Dlist(range(21,29))+list(range(44,46)) > + crlwords_ipv4 =3D None > + crlwords_ipv6 =3D list(range(21, 29)) + list(range(44, 46)) > keyword =3D 'l2tpv3oipv6_dst' > - self.run_fd_test(keyword,crlwords_ipv4,crlwords_ipv6) > + self.run_fd_test(keyword, crlwords_ipv4, crlwords_ipv6) >=20 > def test_l2tpv3oipv6_src(self): > """ > Flow director input set is sessionID + SIP for pctype 38 > """ > - crlwords_ipv4=3DNone > - crlwords_ipv6=3Dlist(range(13,21))+list(range(44,46)) > + crlwords_ipv4 =3D None > + crlwords_ipv6 =3D list(range(13, 21)) + list(range(44, 46)) > keyword =3D 'l2tpv3oipv6_src' > - self.run_fd_test(keyword,crlwords_ipv4,crlwords_ipv6) > + self.run_fd_test(keyword, crlwords_ipv4, crlwords_ipv6) >=20 > def test_l2tpv3oipv6_src_dst(self): > """ > Flow director input set is sessionID + SIP + DIP for pctype 38 > """ > - crlwords_ipv4=3DNone > - crlwords_ipv6=3Dlist(range(13,29))+list(range(44,46)) > + crlwords_ipv4 =3D None > + crlwords_ipv6 =3D list(range(13, 29)) + list(range(44, 46)) > keyword =3D 'l2tpv3oipv6_src_dst' > - self.run_fd_test(keyword,crlwords_ipv4,crlwords_ipv6) > + self.run_fd_test(keyword, crlwords_ipv4, crlwords_ipv6) >=20 > def test_l2tpv3_ipv4_ipv6(self): > """ > Flow director input set is sessionID for pctype 28 and 38 > """ > - crlwords_ipv4=3Drange(44,46) > - crlwords_ipv6=3Drange(44,46) > + crlwords_ipv4 =3D range(44, 46) > + crlwords_ipv6 =3D range(44, 46) > keyword =3D 'l2tpv3_ipv4_ipv6' > - self.run_fd_test(keyword,crlwords_ipv4,crlwords_ipv6) > + self.run_fd_test(keyword, crlwords_ipv4, crlwords_ipv6) >=20 > def test_l2tpv3oip_v4src_v6src(self): > """ > Flow director input set is sessionID + SIP for pctype 28 and 38 > """ > - crlwords_ipv4=3Dlist(range(15,17))+list(range(44,46)) > - crlwords_ipv6=3Dlist(range(13,21))+list(range(44,46)) > + crlwords_ipv4 =3D list(range(15, 17)) + list(range(44, 46)) > + crlwords_ipv6 =3D list(range(13, 21)) + list(range(44, 46)) > keyword =3D 'l2tpv3oip_v4src_v6src' > - self.run_fd_test(keyword,crlwords_ipv4,crlwords_ipv6) > + self.run_fd_test(keyword, crlwords_ipv4, crlwords_ipv6) >=20 > def test_l2tpv3oip_v4dst_v6dst(self): > """ > Flow director input set is sessionID + DIP for pctype 28 and 38 > """ > - crlwords_ipv4=3Dlist(range(27,29))+list(range(44,46)) > - crlwords_ipv6=3Dlist(range(21,29))+list(range(44,46)) > + crlwords_ipv4 =3D list(range(27, 29)) + list(range(44, 46)) > + crlwords_ipv6 =3D list(range(21, 29)) + list(range(44, 46)) > keyword =3D 'l2tpv3oip_v4dst_v6dst' > - self.run_fd_test(keyword,crlwords_ipv4,crlwords_ipv6) > + self.run_fd_test(keyword, crlwords_ipv4, crlwords_ipv6) >=20 > def test_l2tpv3oip_v4srcdst_v6srcdst(self): > """ > Flow director input set is sessionID + SIP + DIP for pctype 28 a= nd 38 > """ > - crlwords_ipv4=3Dlist(range(15,17))+list(range(27,29))+list(range= (44,46)) > - crlwords_ipv6=3Dlist(range(13,29))+list(range(44,46)) > - keyword =3D 'l2tpv3oip_v4srcdst_v6srcdst' > - self.run_fd_test(keyword,crlwords_ipv4,crlwords_ipv6) > + crlwords_ipv4 =3D list(range(15, 17)) + list(range(27, 29)) + li= st(range(44, > 46)) > + crlwords_ipv6 =3D list(range(13, 29)) + list(range(44, 46)) > + keyword =3D 'l2tpv3oip_v4srcdst_v6srcdst' > + self.run_fd_test(keyword, crlwords_ipv4, crlwords_ipv6) >=20 > def test_l2tpv3oip_v4_v6_udp(self): > """ > Flow director input set is sessionID for pctype 28 and 38 > """ > - crlwords_ipv4=3Drange(44,46) > - crlwords_ipv6=3Drange(44,46) > - keyword =3D 'l2tpv3oip_v4_v6_udp' > - self.run_fd_test(keyword,crlwords_ipv4,crlwords_ipv6) > + crlwords_ipv4 =3D range(44, 46) > + crlwords_ipv6 =3D range(44, 46) > + keyword =3D 'l2tpv3oip_v4_v6_udp' > + self.run_fd_test(keyword, crlwords_ipv4, crlwords_ipv6) >=20 > def test_l2tpv3oip_load_profile(self): > """ > @@ -446,15 +486,15 @@ class TestDdpL2tpv3(TestCase): > Step1: Check if it is already loaded, if loaded delete the same > Step2: Load the profile > """ > - self.dut_testpmd.execute_cmd('port stop 0') > + self.dut_testpmd.execute_cmd('port stop all') >=20 > - out=3Dself.dut_testpmd.execute_cmd('ddp get list 0') > + out =3D self.dut_testpmd.execute_cmd('ddp get list 0') > if "L2TPv3oIP with L4 payload" in out: > - print "Profile is already loaded!!" > - out=3Dself.dut_testpmd.execute_cmd('ddp del 0 /tmp/l2tpv3oip= -l4.bak') > - out=3Dself.dut_testpmd.execute_cmd('ddp add 0 /tmp/l2tpv3oip- > l4.pkg,/tmp/l2tpv3oip-l4.bak') > - out=3Dself.dut_testpmd.execute_cmd('ddp get list 0') > - self.verify("L2TPv3oIP with L4 payload" in out,"Failed to Load D= DP > profile ") > + print("Profile is already loaded!!") > + out =3D self.dut_testpmd.execute_cmd('ddp del 0 /tmp/l2tpv3o= ip- > l4.bak') > + out =3D self.dut_testpmd.execute_cmd('ddp add 0 /tmp/l2tpv3oip- > l4.pkg,/tmp/l2tpv3oip-l4.bak') > + out =3D self.dut_testpmd.execute_cmd('ddp get list 0') > + self.verify("L2TPv3oIP with L4 payload" in out, "Failed to Load > + DDP profile ") >=20 > def test_l2tpv3oip_delete_profile(self): > """ > @@ -462,21 +502,19 @@ class TestDdpL2tpv3(TestCase): > Step1: Check if profile is loaded, if loaded, delete the same > Step2: Add the profile again > """ > - self.dut_testpmd.execute_cmd('port stop 0') > - out=3Dself.dut_testpmd.execute_cmd('ddp get list 0') > + self.dut_testpmd.execute_cmd('port stop all') > + out =3D self.dut_testpmd.execute_cmd('ddp get list 0') >=20 > if "L2TPv3oIP with L4 payload" not in out: > - out=3Dself.dut_testpmd.execute_cmd('ddp add 0 /tmp/l2tpv3oip= - > l4.pkg,/tmp/l2tpv3oip-l4.bak') > - out=3Dself.dut_testpmd.execute_cmd('ddp get list 0') > - self.verify("L2TPv3oIP with L4 payload" in out,"Error in loa= ding the > Profile") > - out=3Dself.dut_testpmd.execute_cmd('ddp del 0 /tmp/l2tpv3oip- > l4.bak') > - print out > - out=3Dself.dut_testpmd.execute_cmd('ddp get list 0') > - print out > - self.verify("Profile number is: 0" in out,"Error in @@deleting t= he > Profile !!") > - out=3Dself.dut_testpmd.execute_cmd('ddp add 0 /tmp/l2tpv3oip- > l4.pkg,/tmp/l2tpv3oip-l4.bak') > - out=3Dself.dut_testpmd.execute_cmd('ddp get list 0') > - self.verify("L2TPv3oIP with L4 payload" in out,"Error in loading= the > Profile") > + out =3D self.dut_testpmd.execute_cmd('ddp add 0 /tmp/l2tpv3o= ip- > l4.pkg,/tmp/l2tpv3oip-l4.bak') > + out =3D self.dut_testpmd.execute_cmd('ddp get list 0') > + self.verify("L2TPv3oIP with L4 payload" in out, "Error in lo= ading the > Profile") > + self.dut_testpmd.execute_cmd('ddp del 0 /tmp/l2tpv3oip-l4.bak') > + out =3D self.dut_testpmd.execute_cmd('ddp get list 0') > + self.verify("Profile number is: 0" in out, "Error in @@deleting = the > Profile !!") > + self.dut_testpmd.execute_cmd('ddp add 0 /tmp/l2tpv3oip- > l4.pkg,/tmp/l2tpv3oip-l4.bak') > + out =3D self.dut_testpmd.execute_cmd('ddp get list 0') > + self.verify("L2TPv3oIP with L4 payload" in out, "Error in > + loading the Profile") >=20 > def test_l2tpv3oip_delete_rules(self): > """ > @@ -486,20 +524,26 @@ class TestDdpL2tpv3(TestCase): > Step3: Flush all rules > """ > queue =3D random.randint(1, self.PF_QUEUE - 1) > - self.dut_testpmd.execute_cmd( 'flow create 0 ingress pattern eth= / ipv4 > / l2tpv3oip session_id is 1001 / end actions queue index {} / > end'.format(queue)) > - self.dut_testpmd.execute_cmd( 'flow create 0 ingress pattern eth= / ipv4 > / l2tpv3oip session_id is 1002 / end actions queue index {} / > end'.format(queue)) > - self.dut_testpmd.execute_cmd( 'flow create 0 ingress pattern eth= / ipv4 > / l2tpv3oip session_id is 1003 / end actions queue index {} / > end'.format(queue)) > - out=3Dself.dut_testpmd.execute_cmd('flow list 0') > - verify=3Dout.splitlines() > - self.verify(len(verify)=3D=3D 6,"Flow rules not added") > - self.dut_testpmd.execute_cmd( 'flow destroy 0 rule 0') > - out=3Dself.dut_testpmd.execute_cmd('flow list 0') > - verify=3Dout.splitlines() > - self.verify(len(verify)=3D=3D 5,"Flow rules not destroyed") > - self.dut_testpmd.execute_cmd( 'flow flush 0') > - out=3Dself.dut_testpmd.execute_cmd('flow list 0') > - verify=3Dout.splitlines() > - self.verify(len(verify)=3D=3D 1,"Flow rules not destroyed") > + self.dut_testpmd.execute_cmd( > + 'flow create 0 ingress pattern eth / ipv4 / l2tpv3oip sessio= n_id is 1001 > / end actions queue index {} / end'.format( > + queue)) > + self.dut_testpmd.execute_cmd( > + 'flow create 0 ingress pattern eth / ipv4 / l2tpv3oip sessio= n_id is 1002 > / end actions queue index {} / end'.format( > + queue)) > + self.dut_testpmd.execute_cmd( > + 'flow create 0 ingress pattern eth / ipv4 / l2tpv3oip sessio= n_id is 1003 > / end actions queue index {} / end'.format( > + queue)) > + out =3D self.dut_testpmd.execute_cmd('flow list 0') > + verify =3D out.splitlines() > + self.verify(len(verify) =3D=3D 6, "Flow rules not added") > + self.dut_testpmd.execute_cmd('flow destroy 0 rule 0') > + out =3D self.dut_testpmd.execute_cmd('flow list 0') > + verify =3D out.splitlines() > + self.verify(len(verify) =3D=3D 5, "Flow rules not destroyed") > + self.dut_testpmd.execute_cmd('flow flush 0') > + out =3D self.dut_testpmd.execute_cmd('flow list 0') > + verify =3D out.splitlines() > + self.verify(len(verify) =3D=3D 1, "Flow rules not destroyed") >=20 > def tear_down(self): > self.dut_testpmd.execute_cmd('stop') > @@ -516,4 +560,3 @@ class TestDdpL2tpv3(TestCase): >=20 > def tear_down_all(self): > pass > - > -- > 2.17.1