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 DA438A0471 for ; Wed, 14 Aug 2019 11:22:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D19991BDAC; Wed, 14 Aug 2019 11:22:52 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id C3C148F96 for ; Wed, 14 Aug 2019 11:22:50 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Aug 2019 02:22:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,384,1559545200"; d="scan'208";a="351833084" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga005.jf.intel.com with ESMTP; 14 Aug 2019 02:22:48 -0700 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 14 Aug 2019 02:22:21 -0700 Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 14 Aug 2019 02:22:21 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.80]) by SHSMSX105.ccr.corp.intel.com ([169.254.11.15]) with mapi id 14.03.0439.000; Wed, 14 Aug 2019 17:22:19 +0800 From: "Wu, ChangqingX" To: "Li, WenjieX A" , "dts@dpdk.org" CC: "Li, WenjieX A" Thread-Topic: [dts] [PATCH V1] tests/flow_classify_softnic: optimize script Thread-Index: AQHVUoG2pSfOcw2DlUueea8duFgcZ6b6XoMw Date: Wed, 14 Aug 2019 09:22:18 +0000 Message-ID: <7F81DD3887C58F49A6B2EFEC3C28E22E0B7453B8@SHSMSX101.ccr.corp.intel.com> References: <1565806590-21199-1-git-send-email-wenjiex.a.li@intel.com> In-Reply-To: <1565806590-21199-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/flow_classify_softnic: optimize script 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" Tested-by: Wu, ChangqingX -----Original Message----- From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Wenjie Li Sent: Thursday, August 15, 2019 2:17 AM To: dts@dpdk.org Cc: Li, WenjieX A Subject: [dts] [PATCH V1] tests/flow_classify_softnic: optimize script optimize script: 1. verify the link is up before send packets 2. in test case inconsistent_r= ules, if the output of "flow create" does not contain keyword "error", it w= ill fail and return "timeout to flow create ...". This is not clear and wou= ld take more time to wait for the timeout. Change it to self.verify("error"= in out, "...."). Signed-off-by: Wenjie Li --- tests/TestSuite_flow_classify_softnic.py | 58 ++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 4 deletions(-) diff --git a/tests/TestSuite_flow_classify_softnic.py b/tests/TestSuite_flo= w_classify_softnic.py index a649a44..d936df3 100644 --- a/tests/TestSuite_flow_classify_softnic.py +++ b/tests/TestSuite_flow_classify_softnic.py @@ -421,6 +421,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(src_mask=3D"255.192.0.0", src_spec=3D"2.128.0.= 0", protomask=3Dself.protomask, protospec=3D132, l4type=3D"sctp", sportmask= =3Dself.portmask, dportmask=3Dself.portmask, sportspec=3D100, dportspec=3D2= 00, index=3D[1]) self.generate_rules(dst_mask=3D"255.192.0.0", dst_spec=3D"4.0.0.0"= , protomask=3Dself.protomask, sportspec=3D100, sportmask=3Dself.portmask, d= portmask=3Dself.portmask, dportspec=3D200, index=3D[0]) self.dut.send_expect("start", "testpmd> ", 60) + ret =3D self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") =20 # rule 0 test pcap_file =3D '/tmp/route_0.pcap' @@ -522,6 +524,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(src_mask=3Dself.ipv4_mask, dst_mask=3Dself.ipv= 4_mask, src_spec=3D"100.0.0.3", dst_spec=3D"200.0.0.3", protomask=3Dself.pr= otomask, protospec=3D132, l4type=3D"sctp", sportmask=3Dself.portmask, dport= mask=3Dself.portmask, sportspec=3D103, dportspec=3D203, index=3D[1]) self.generate_rules(src_mask=3Dself.ipv4_mask, dst_mask=3Dself.ipv= 4_mask, src_spec=3D"100.0.0.4", dst_spec=3D"200.0.0.4", protomask=3Dself.pr= otomask, sportmask=3Dself.portmask, dportmask=3Dself.portmask, sportspec=3D= 104, dportspec=3D204, index=3D[0]) self.dut.send_expect("start", "testpmd> ", 60) + ret =3D self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") =20 # rule 0 test pcap_file =3D '/tmp/route_0.pcap' @@ -562,6 +566,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(src_mask=3Dself.ipv4_mask, src_spec=3D"100.0.0= .3", dst_spec=3D"200.0.0.1", sportspec=3D100, dportspec=3D200, index=3D[1]) self.generate_rules(src_mask=3Dself.ipv4_mask, src_spec=3D"100.0.0= .4", dst_spec=3D"200.0.0.1", sportspec=3D100, dportspec=3D200, index=3D[0]) self.dut.send_expect("start", "testpmd> ", 60) + ret =3D self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") =20 # rule 0 test pcap_file =3D '/tmp/route_0.pcap' @@ -595,6 +601,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(dst_mask=3D"255.255.255.0", src_spec=3D"100.0.= 0.1", dst_spec=3D"200.0.2.1", protospec=3D132, l4type=3D"sctp", sportspec= =3D100, dportspec=3D200, index=3D[1]) self.generate_rules(dst_mask=3D"255.255.255.0", src_spec=3D"100.0.= 0.1", dst_spec=3D"200.0.3.1", l4type=3D"", index=3D[0]) self.dut.send_expect("start", "testpmd> ", 60) + ret =3D self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") =20 # rule 0 test pcap_file =3D '/tmp/route_0.pcap' @@ -628,6 +636,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(src_spec=3D"100.0.0.1", dst_spec=3D"200.0.0.1"= , protospec=3D132, l4type=3D"sctp", sportmask=3Dself.portmask, sportspec=3D= 102, dportspec=3D200, index=3D[1]) self.generate_rules(src_spec=3D"100.0.0.1", dst_spec=3D"200.0.0.1"= , sportmask=3Dself.portmask, sportspec=3D103, dportspec=3D200, index=3D[0]) self.dut.send_expect("start", "testpmd> ", 60) + ret =3D self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") =20 # rule 0 test pcap_file =3D '/tmp/route_0.pcap' @@ -671,6 +681,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(iptype=3D"ipv6", src_mask=3Dself.ipv6_mask, sr= c_spec=3D"ABCD:EF01:2345:6789:ABCD:EF01:2345:7789", protomask=3Dself.protom= ask, protospec=3D132, l4type=3D"sctp", index=3D[1]) self.generate_rules(iptype=3D"ipv6", src_mask=3Dself.ipv6_mask, sr= c_spec=3D"ABCD:EF01:2345:6789:ABCD:EF01:2345:8789", protomask=3Dself.protom= ask, sportmask=3Dself.portmask, sportspec=3D100, index=3D[0]) self.dut.send_expect("start", "testpmd> ", 60) + ret =3D self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") =20 # rule 0 test pcap_file =3D '/tmp/route_0.pcap' @@ -728,6 +740,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(iptype=3D"ipv6", src_mask=3Dself.ipv6_mask, sr= c_spec=3D"ABCD:EF01:2345:6789:ABCD:EF01:2345:7789", index=3D[1]) self.generate_rules(iptype=3D"ipv6", src_mask=3Dself.ipv6_mask, sr= c_spec=3D"ABCD:EF01:2345:6789:ABCD:EF01:2345:8789", index=3D[0]) self.dut.send_expect("start", "testpmd> ", 60) + ret =3D self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") =20 # rule 0 test pcap_file =3D '/tmp/route_0.pcap' @@ -767,6 +781,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(iptype=3D"ipv6", dst_mask=3Dself.ipv6_mask, ds= t_spec=3D"ABCD:EF01:2345:6789:ABCD:EF01:2345:7789", index=3D[1]) self.generate_rules(iptype=3D"ipv6", dst_mask=3Dself.ipv6_mask, ds= t_spec=3D"ABCD:EF01:2345:6789:ABCD:EF01:2345:8789", index=3D[0]) self.dut.send_expect("start", "testpmd> ", 60) + ret =3D self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") =20 # rule 0 test pcap_file =3D '/tmp/route_0.pcap' @@ -810,6 +826,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(iptype=3D"ipv6", src_mask=3Dself.ipv6_mask, ds= t_mask=3Dself.ipv6_mask, src_spec=3D"2001::3", dst_spec=3D"0::3", protomask= =3Dself.protomask, protospec=3D132, l4type=3D"sctp", sportmask=3Dself.portm= ask, dportmask=3Dself.portmask, sportspec=3D103, dportspec=3D203, index=3D[= 1]) self.generate_rules(iptype=3D"ipv6", src_mask=3Dself.ipv6_mask, ds= t_mask=3Dself.ipv6_mask, src_spec=3D"2001::4", dst_spec=3D"0::4", protomask= =3Dself.protomask, sportmask=3Dself.portmask, dportmask=3Dself.portmask, sp= ortspec=3D104, dportspec=3D204, index=3D[0]) self.dut.send_expect("start", "testpmd> ", 60) + ret =3D self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") =20 # rule 0 test pcap_file =3D '/tmp/route_0.pcap' @@ -849,28 +867,32 @@ class TestFlowClassifySoftnic(TestCase): self.start_testpmd(filename, self.port_num) =20 # create rule - self.dut.send_expect("flow create 4 group 0 ingress pattern eth / = ipv4 proto mask 0 src mask 0.0.0.0 dst mask 255.255.255.255 src spec 100.0.= 0.1 dst spec 200.0.0.1 proto spec 17 / udp src mask 0 dst mask 0 src spec 1= 00 dst spec 200 / end actions queue index 3 / end", "error", 60) + out =3D self.dut.send_expect("flow create 4 group 0 ingress=20 + pattern eth / ipv4 proto mask 0 src mask 0.0.0.0 dst mask=20 + 255.255.255.255 src spec 100.0.0.1 dst spec 200.0.0.1 proto spec 17 /=20 + udp src mask 0 dst mask 0 src spec 100 dst spec 200 / end actions=20 + queue index 3 / end", "testpmd>", 60) self.dut.send_expect("quit", "# ", 60) + self.verify("error" in out, "should fail to create the rule") =20 cmd =3D "pipeline RX table match hash ext key 8 mask FFFFFF0000000= 000 offset 286 buckets 16K size 64K action AP0" self.set_table(cmd, filename) self.start_testpmd(filename, self.port_num) - self.dut.send_expect("flow create 4 group 0 ingress pattern eth / = ipv4 proto mask 0 src mask 0.0.0.0 dst mask 255.255.255.255 src spec 100.0.= 0.1 dst spec 200.0.0.1 proto spec 17 / udp src mask 0 dst mask 0 src spec 1= 00 dst spec 200 / end actions queue index 3 / end", "error", 60) + out =3D self.dut.send_expect("flow create 4 group 0 ingress=20 + pattern eth / ipv4 proto mask 0 src mask 0.0.0.0 dst mask=20 + 255.255.255.255 src spec 100.0.0.1 dst spec 200.0.0.1 proto spec 17 /=20 + udp src mask 0 dst mask 0 src spec 100 dst spec 200 / end actions=20 + queue index 3 / end", "testpmd>", 60) self.dut.send_expect("quit", "# ", 60) + self.verify("error" in out, "should fail to create the rule") =20 # ipv6 filename =3D "flow_ipv6_5tuple_hash_firmware.cli" cmd =3D "pipeline RX table match hash ext key 64 mask 0000FF00FFFF= FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000= 00000000000000000000000000000000000000000 offset 274 buckets 16K size 64K a= ction AP0" self.set_table(cmd, filename) self.start_testpmd(filename, self.port_num) - self.dut.send_expect("flow create 4 group 0 ingress pattern eth / = ipv6 proto mask 255 src mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff dst ma= sk ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff src spec 2001::1 dst spec 0::1 p= roto spec 17 / udp src mask 0 dst mask 65535 src spec 31 dst spec 41 / end = actions queue index 3 / end", "error", 60) + out =3D self.dut.send_expect("flow create 4 group 0 ingress=20 + pattern eth / ipv6 proto mask 255 src mask=20 + ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff dst mask=20 + ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff src spec 2001::1 dst spec 0::1=20 + proto spec 17 / udp src mask 0 dst mask 65535 src spec 31 dst spec 41=20 + / end actions queue index 3 / end", "testpmd>", 60) self.dut.send_expect("quit", "# ", 60) + self.verify("error" in out, "should fail to create the rule") =20 cmd =3D "pipeline RX table match hash ext key 16 mask FFFFFFFFFFFF= FFFFFFFFFFFFFFFFFFFF offset 294 buckets 16K size 64K action AP0" self.set_table(cmd, filename) self.start_testpmd(filename, self.port_num) - self.dut.send_expect("flow create 4 group 0 ingress pattern eth / = ipv6 proto mask 0 src mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff dst mas= k 0:0:0:0:0:0:0:0 src spec ABCD:EF01:2345:6789:ABCD:EF01:2345:5789 dst spec= 0:0:0:0:0:0:0:0 proto spec 17 / udp src mask 0 dst mask 0 src spec 0 dst s= pec 0 / end actions queue index 3 / end", "error", 60) + out =3D self.dut.send_expect("flow create 4 group 0 ingress=20 + pattern eth / ipv6 proto mask 0 src mask=20 + ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff dst mask 0:0:0:0:0:0:0:0 src=20 + spec ABCD:EF01:2345:6789:ABCD:EF01:2345:5789 dst spec 0:0:0:0:0:0:0:0=20 + proto spec 17 / udp src mask 0 dst mask 0 src spec 0 dst spec 0 / end=20 + actions queue index 3 / end", "testpmd>", 60) self.dut.send_expect("quit", "# ", 60) + self.verify("error" in out, "should fail to create the rule") =20 def test_ipv4_hash_rss_action(self): """ @@ -889,6 +911,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(src_mask=3Dself.ipv4_mask, dst_mask=3Dself.ipv= 4_mask, src_spec=3D"100.0.0.3", dst_spec=3D"200.0.0.3", protomask=3Dself.pr= otomask, protospec=3D132, l4type=3D"sctp", sportmask=3Dself.portmask, dport= mask=3Dself.portmask, sportspec=3D100, dportspec=3D200, action=3D"rss", ind= ex=3D[1]) self.generate_rules(src_mask=3Dself.ipv4_mask, dst_mask=3Dself.ipv= 4_mask, src_spec=3D"100.0.0.4", dst_spec=3D"200.0.0.4", protomask=3Dself.pr= otomask, protospec=3D6, l4type=3D"tcp", sportmask=3Dself.portmask, dportmas= k=3Dself.portmask, sportspec=3D100, dportspec=3D200, action=3D"rss", index= =3D[0]) self.dut.send_expect("start", "testpmd> ", 60) + ret =3D self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") =20 # rule 0 test pcap_file =3D '/tmp/route_0.pcap' @@ -926,6 +950,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(src_mask=3D"255.255.255.0", dst_mask=3Dself.ip= v4_mask, src_spec=3D"100.0.0.1", dst_spec=3D"200.0.0.1", protomask=3Dself.p= rotomask, sportmask=3Dself.portmask, dportmask=3Dself.portmask, sportspec= =3D100, dportspec=3D200, action=3D"rss", index=3D[0, 1, 2, 3]) self.generate_rules(src_mask=3D"255.255.255.0", dst_mask=3Dself.ip= v4_mask, src_spec=3D"100.0.1.2", dst_spec=3D"200.0.0.1", protomask=3Dself.p= rotomask, sportmask=3Dself.portmask, dportmask=3Dself.portmask, sportspec= =3D100, dportspec=3D200, action=3D"rss", index=3D[0, 1, 2, 3]) self.dut.send_expect("start", "testpmd> ", 60) + ret =3D self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") =20 self.send_continuous_packet("ipv4", "src", "100.0.0.1", "200.0.0.1= ", self.tester_itf) out =3D self.dut.send_expect("stop", "testpmd> ", 120) @@ -945,6 += 971,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(src_mask=3D"255.255.0.0", dst_mask=3Dself.ipv4= _mask, src_spec=3D"100.0.0.1", dst_spec=3D"200.0.0.2", sportspec=3D100, dpo= rtspec=3D200, action=3D"rss", index=3D[2, 3]) self.generate_rules(src_mask=3D"255.255.0.0", dst_mask=3Dself.ipv4= _mask, src_spec=3D"200.0.0.1", dst_spec=3D"200.0.0.2", sportspec=3D100, dpo= rtspec=3D200, action=3D"rss", index=3D[1, 2]) self.dut.send_expect("start", "testpmd> ", 60) + ret =3D self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") =20 self.send_continuous_packet("ipv4", "src", "100.0.0.1", "200.0.0.1= ", self.tester_itf) out =3D self.dut.send_expect("stop", "testpmd> ", 120) @@ -977,6 += 1005,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(iptype=3D"ipv6", src_mask=3Dself.ipv6_mask, ds= t_mask=3Dself.ipv6_mask, src_spec=3D"2001::3", dst_spec=3D"1001::3", protom= ask=3Dself.protomask, protospec=3D132, l4type=3D"sctp", sportmask=3Dself.po= rtmask, dportmask=3Dself.portmask, sportspec=3D100, dportspec=3D200, action= =3D"rss", index=3D[1]) self.generate_rules(iptype=3D"ipv6", src_mask=3Dself.ipv6_mask, ds= t_mask=3Dself.ipv6_mask, src_spec=3D"2001::4", dst_spec=3D"1001::4", protom= ask=3Dself.protomask, protospec=3D6, l4type=3D"tcp", sportmask=3Dself.portm= ask, dportmask=3Dself.portmask, sportspec=3D100, dportspec=3D200, action=3D= "rss", index=3D[0]) self.dut.send_expect("start", "testpmd> ", 60) + ret =3D self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") =20 # rule 0 test pcap_file =3D '/tmp/route_0.pcap' @@ -1014,6 +1044,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(iptype=3D"ipv6", src_mask=3D"ffff:ffff:ffff:ff= ff:ffff:ffff:ffff:0", dst_mask=3Dself.ipv6_mask, src_spec=3D"ABCD:EF01:2345= :6789:ABCD:EF01:2345:0", dst_spec=3D"0::1", protomask=3Dself.protomask, spo= rtmask=3Dself.portmask, dportmask=3Dself.portmask, sportspec=3D100, dportsp= ec=3D200, action=3D"rss", index=3D[0, 1, 2, 3]) self.generate_rules(iptype=3D"ipv6", src_mask=3D"ffff:ffff:ffff:ff= ff:ffff:ffff:ffff:0", dst_mask=3Dself.ipv6_mask, src_spec=3D"ABCD:EF01:2345= :6789:ABCD:EF01:2346:0", dst_spec=3D"0::1", protomask=3Dself.protomask, spo= rtmask=3Dself.portmask, dportmask=3Dself.portmask, sportspec=3D100, dportsp= ec=3D200, action=3D"rss", index=3D[0, 1, 2, 3]) self.dut.send_expect("start", "testpmd> ", 60) + ret =3D self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") =20 self.send_continuous_packet("ipv6", "src", "ABCD:EF01:2345:6789:AB= CD:EF01:2345:0", "0::1", self.tester_itf) out =3D self.dut.send_expect("stop", "testpmd> ", 120) @@ -1033,6 = +1065,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(iptype=3D"ipv6", src_mask=3Dself.ipv6_mask, ds= t_mask=3D"ffff:ffff:ffff:ffff:ffff:ffff:ffff:0", src_spec=3D"2001::2", dst_= spec=3D"1001::1", sportmask=3Dself.portmask, dportmask=3Dself.portmask, spo= rtspec=3D100, dportspec=3D200, action=3D"rss", index=3D[2, 3]) self.generate_rules(iptype=3D"ipv6", src_mask=3Dself.ipv6_mask, ds= t_mask=3D"ffff:ffff:ffff:ffff:ffff:ffff:ffff:0", src_spec=3D"2001::1", dst_= spec=3D"1002::1", sportmask=3Dself.portmask, dportmask=3Dself.portmask, spo= rtspec=3D100, dportspec=3D200, action=3D"rss", index=3D[1, 2]) self.dut.send_expect("start", "testpmd> ", 60) + ret =3D self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") =20 self.send_continuous_packet("ipv6", "dst", "2001::1", "1001::1", s= elf.tester_itf) out =3D self.dut.send_expect("stop", "testpmd> ", 120) @@ -1061,6 = +1095,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(port=3Dport_num, dst_mask=3D"255.192.0.0", dst= _spec=3D"200.0.0.0", protomask=3Dself.protomask, sportmask=3Dself.portmask,= dportmask=3Dself.portmask, sportspec=3D100, dportspec=3D200, action=3D"jum= p", index=3D[1]) self.generate_rules(port=3Dport_num, dst_mask=3D"255.192.0.0", dst= _spec=3D"200.64.0.0", protomask=3Dself.protomask, sportmask=3Dself.portmask= , dportmask=3Dself.portmask, sportspec=3D100, dportspec=3D200, action=3D"ju= mp", index=3D[1]) self.dut.send_expect("start", "testpmd> ", 60) + ret =3D self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") =20 # rule 0 test pcap_file =3D '/tmp/route_0.pcap' @@ -1105,6 +1141,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(port=3Dport_num, src_mask=3Dself.ipv4_mask, ds= t_mask=3Dself.ipv4_mask, src_spec=3D"1.10.11.0", dst_spec=3D"2.20.21.0", pr= otomask=3Dself.protomask, sportspec=3D100, dportspec=3D200, action=3D"jump"= , index=3D[1]) self.generate_rules(port=3Dport_num, src_mask=3Dself.ipv4_mask, ds= t_mask=3Dself.ipv4_mask, src_spec=3D"1.10.11.1", dst_spec=3D"2.20.21.1", pr= otomask=3Dself.protomask, sportspec=3D100, dportspec=3D200, action=3D"jump"= , index=3D[1]) self.dut.send_expect("start", "testpmd> ", 60) + ret =3D self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") =20 # rule 0 test pcap_file =3D '/tmp/route_0.pcap' @@ -1149,6 +1187,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(port=3Dport_num, src_mask=3Dself.ipv4_mask, ds= t_mask=3Dself.ipv4_mask, src_spec=3D"1.10.11.0", dst_spec=3D"2.20.21.0", pr= otomask=3Dself.protomask, sportspec=3D100, dportspec=3D200, action=3D"jump"= , index=3D[1]) self.generate_rules(port=3Dport_num, src_mask=3Dself.ipv4_mask, ds= t_mask=3Dself.ipv4_mask, src_spec=3D"1.10.11.1", dst_spec=3D"2.20.21.1", pr= otomask=3Dself.protomask, sportspec=3D100, dportspec=3D200, action=3D"jump"= , index=3D[1]) self.dut.send_expect("start", "testpmd> ", 60) + ret =3D self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") =20 # rule 0 test pcap_file =3D '/tmp/route_0.pcap' @@ -1189,6 +1229,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(port=3Dport_num, src_mask=3Dself.ipv4_mask, ds= t_mask=3D"255.255.255.0", src_spec=3D"1.10.11.0", dst_spec=3D"2.20.21.0", p= rotomask=3Dself.protomask, sportmask=3Dself.portmask, dportmask=3Dself.port= mask, sportspec=3D100, dportspec=3D200, action=3D"jump", index=3D[1]) self.generate_rules(port=3Dport_num, src_mask=3Dself.ipv4_mask, ds= t_mask=3D"255.255.255.0", src_spec=3D"1.10.11.1", dst_spec=3D"2.20.21.1", p= rotomask=3Dself.protomask, sportmask=3Dself.portmask, dportmask=3Dself.port= mask, sportspec=3D100, dportspec=3D200, action=3D"jump", index=3D[1]) self.dut.send_expect("start", "testpmd> ", 60) + ret =3D self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") =20 # rule 0 test pcap_file =3D '/tmp/route_0.pcap' @@ -1229,6 +1271,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(port=3Dport_num, iptype=3D"ipv6", dst_mask=3Ds= elf.ipv6_mask, src_spec=3D"1001::1", dst_spec=3D"2001::1", protomask=3Dself= .protomask, sportspec=3D100, dportspec=3D200, action=3D"jump", index=3D[1]) self.generate_rules(port=3Dport_num, iptype=3D"ipv6", dst_mask=3Ds= elf.ipv6_mask, src_spec=3D"1001::1", dst_spec=3D"2001::2", protomask=3Dself= .protomask, sportspec=3D100, dportspec=3D200, action=3D"jump", index=3D[1]) self.dut.send_expect("start", "testpmd> ", 60) + ret =3D self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") =20 # rule 0 test pcap_file =3D '/tmp/route_0.pcap' @@ -1266,6 +1310,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(port=3Dport_num, iptype=3D"ipv6", src_mask=3Ds= elf.ipv6_mask, dst_mask=3Dself.ipv6_mask, src_spec=3D"1001::1", dst_spec=3D= "2001::1", protomask=3Dself.protomask, sportmask=3Dself.portmask, dportmask= =3Dself.portmask, sportspec=3D100, dportspec=3D200, action=3D"jump", index= =3D[1]) self.generate_rules(port=3Dport_num, iptype=3D"ipv6", src_mask=3Ds= elf.ipv6_mask, dst_mask=3Dself.ipv6_mask, src_spec=3D"1001::2", dst_spec=3D= "2001::2", protomask=3Dself.protomask, protospec=3D6, l4type=3D"tcp", sport= mask=3Dself.portmask, dportmask=3Dself.portmask, sportspec=3D100, dportspec= =3D200, action=3D"jump", index=3D[1]) self.dut.send_expect("start", "testpmd> ", 60) + ret =3D self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") =20 # rule 0 test pcap_file =3D '/tmp/route_0.pcap' @@ -1310,6 +1356,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(port=3Dport_num, iptype=3D"ipv6", dst_mask=3Ds= elf.ipv6_mask, src_spec=3D"1001::1", dst_spec=3D"2001::1", protomask=3Dself= .protomask, sportspec=3D100, dportspec=3D200, action=3D"jump", index=3D[1]) self.generate_rules(port=3Dport_num, iptype=3D"ipv6", dst_mask=3Ds= elf.ipv6_mask, src_spec=3D"1001::2", dst_spec=3D"2001::2", protomask=3Dself= .protomask, sportspec=3D100, dportspec=3D200, action=3D"jump", index=3D[1]) self.dut.send_expect("start", "testpmd> ", 60) + ret =3D self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") =20 # rule 0 test pcap_file =3D '/tmp/route_0.pcap' @@ -1348,6 +1396,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(port=3Dport_num, iptype=3D"ipv6", src_mask=3Ds= elf.ipv6_mask, dst_mask=3Dself.ipv6_mask, src_spec=3D"1001::1", dst_spec=3D= "2001::1", protomask=3Dself.protomask, sportmask=3Dself.portmask, sportspec= =3D100, dportspec=3D200, action=3D"jump", index=3D[1]) self.generate_rules(port=3Dport_num, iptype=3D"ipv6", src_mask=3Ds= elf.ipv6_mask, dst_mask=3Dself.ipv6_mask, src_spec=3D"1001::2", dst_spec=3D= "2001::2", protomask=3Dself.protomask, sportmask=3Dself.portmask, sportspec= =3D100, dportspec=3D200, action=3D"jump", index=3D[1]) self.dut.send_expect("start", "testpmd> ", 60) + ret =3D self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") =20 # rule 0 test pcap_file =3D '/tmp/route_0.pcap' -- 2.17.1