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 C0EADA0471 for ; Wed, 14 Aug 2019 11:21:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 73E6837B7; Wed, 14 Aug 2019 11:21:32 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id F4149375B for ; Wed, 14 Aug 2019 11:21:29 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Aug 2019 02:21:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,384,1559545200"; d="scan'208";a="188092124" Received: from unknown (HELO dpdk-wenjielx-KVM193.icx.intel.com) ([10.240.176.193]) by orsmga002.jf.intel.com with ESMTP; 14 Aug 2019 02:21:27 -0700 From: Wenjie Li To: dts@dpdk.org Cc: Wenjie Li Date: Wed, 14 Aug 2019 18:16:30 +0000 Message-Id: <1565806590-21199-1-git-send-email-wenjiex.a.li@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [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" optimize script: 1. verify the link is up before send packets 2. in test case inconsistent_rules, if the output of "flow create" does not contain keyword "error", it will fail and return "timeout to flow create ...". This is not clear and would 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_flow_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="255.192.0.0", src_spec="2.128.0.0", protomask=self.protomask, protospec=132, l4type="sctp", sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, index=[1]) self.generate_rules(dst_mask="255.192.0.0", dst_spec="4.0.0.0", protomask=self.protomask, sportspec=100, sportmask=self.portmask, dportmask=self.portmask, dportspec=200, index=[0]) self.dut.send_expect("start", "testpmd> ", 60) + ret = self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") # rule 0 test pcap_file = '/tmp/route_0.pcap' @@ -522,6 +524,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(src_mask=self.ipv4_mask, dst_mask=self.ipv4_mask, src_spec="100.0.0.3", dst_spec="200.0.0.3", protomask=self.protomask, protospec=132, l4type="sctp", sportmask=self.portmask, dportmask=self.portmask, sportspec=103, dportspec=203, index=[1]) self.generate_rules(src_mask=self.ipv4_mask, dst_mask=self.ipv4_mask, src_spec="100.0.0.4", dst_spec="200.0.0.4", protomask=self.protomask, sportmask=self.portmask, dportmask=self.portmask, sportspec=104, dportspec=204, index=[0]) self.dut.send_expect("start", "testpmd> ", 60) + ret = self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") # rule 0 test pcap_file = '/tmp/route_0.pcap' @@ -562,6 +566,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(src_mask=self.ipv4_mask, src_spec="100.0.0.3", dst_spec="200.0.0.1", sportspec=100, dportspec=200, index=[1]) self.generate_rules(src_mask=self.ipv4_mask, src_spec="100.0.0.4", dst_spec="200.0.0.1", sportspec=100, dportspec=200, index=[0]) self.dut.send_expect("start", "testpmd> ", 60) + ret = self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") # rule 0 test pcap_file = '/tmp/route_0.pcap' @@ -595,6 +601,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(dst_mask="255.255.255.0", src_spec="100.0.0.1", dst_spec="200.0.2.1", protospec=132, l4type="sctp", sportspec=100, dportspec=200, index=[1]) self.generate_rules(dst_mask="255.255.255.0", src_spec="100.0.0.1", dst_spec="200.0.3.1", l4type="", index=[0]) self.dut.send_expect("start", "testpmd> ", 60) + ret = self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") # rule 0 test pcap_file = '/tmp/route_0.pcap' @@ -628,6 +636,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(src_spec="100.0.0.1", dst_spec="200.0.0.1", protospec=132, l4type="sctp", sportmask=self.portmask, sportspec=102, dportspec=200, index=[1]) self.generate_rules(src_spec="100.0.0.1", dst_spec="200.0.0.1", sportmask=self.portmask, sportspec=103, dportspec=200, index=[0]) self.dut.send_expect("start", "testpmd> ", 60) + ret = self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") # rule 0 test pcap_file = '/tmp/route_0.pcap' @@ -671,6 +681,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(iptype="ipv6", src_mask=self.ipv6_mask, src_spec="ABCD:EF01:2345:6789:ABCD:EF01:2345:7789", protomask=self.protomask, protospec=132, l4type="sctp", index=[1]) self.generate_rules(iptype="ipv6", src_mask=self.ipv6_mask, src_spec="ABCD:EF01:2345:6789:ABCD:EF01:2345:8789", protomask=self.protomask, sportmask=self.portmask, sportspec=100, index=[0]) self.dut.send_expect("start", "testpmd> ", 60) + ret = self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") # rule 0 test pcap_file = '/tmp/route_0.pcap' @@ -728,6 +740,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(iptype="ipv6", src_mask=self.ipv6_mask, src_spec="ABCD:EF01:2345:6789:ABCD:EF01:2345:7789", index=[1]) self.generate_rules(iptype="ipv6", src_mask=self.ipv6_mask, src_spec="ABCD:EF01:2345:6789:ABCD:EF01:2345:8789", index=[0]) self.dut.send_expect("start", "testpmd> ", 60) + ret = self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") # rule 0 test pcap_file = '/tmp/route_0.pcap' @@ -767,6 +781,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(iptype="ipv6", dst_mask=self.ipv6_mask, dst_spec="ABCD:EF01:2345:6789:ABCD:EF01:2345:7789", index=[1]) self.generate_rules(iptype="ipv6", dst_mask=self.ipv6_mask, dst_spec="ABCD:EF01:2345:6789:ABCD:EF01:2345:8789", index=[0]) self.dut.send_expect("start", "testpmd> ", 60) + ret = self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") # rule 0 test pcap_file = '/tmp/route_0.pcap' @@ -810,6 +826,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(iptype="ipv6", src_mask=self.ipv6_mask, dst_mask=self.ipv6_mask, src_spec="2001::3", dst_spec="0::3", protomask=self.protomask, protospec=132, l4type="sctp", sportmask=self.portmask, dportmask=self.portmask, sportspec=103, dportspec=203, index=[1]) self.generate_rules(iptype="ipv6", src_mask=self.ipv6_mask, dst_mask=self.ipv6_mask, src_spec="2001::4", dst_spec="0::4", protomask=self.protomask, sportmask=self.portmask, dportmask=self.portmask, sportspec=104, dportspec=204, index=[0]) self.dut.send_expect("start", "testpmd> ", 60) + ret = self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") # rule 0 test pcap_file = '/tmp/route_0.pcap' @@ -849,28 +867,32 @@ class TestFlowClassifySoftnic(TestCase): self.start_testpmd(filename, self.port_num) # 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 100 dst spec 200 / end actions queue index 3 / end", "error", 60) + out = 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 100 dst spec 200 / 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") cmd = "pipeline RX table match hash ext key 8 mask FFFFFF0000000000 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 100 dst spec 200 / end actions queue index 3 / end", "error", 60) + out = 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 100 dst spec 200 / 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") # ipv6 filename = "flow_ipv6_5tuple_hash_firmware.cli" cmd = "pipeline RX table match hash ext key 64 mask 0000FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000000000000 offset 274 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 255 src mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff dst mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff src spec 2001::1 dst spec 0::1 proto spec 17 / udp src mask 0 dst mask 65535 src spec 31 dst spec 41 / end actions queue index 3 / end", "error", 60) + out = 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 mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff src spec 2001::1 dst spec 0::1 proto spec 17 / udp src mask 0 dst mask 65535 src spec 31 dst spec 41 / 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") cmd = "pipeline RX table match hash ext key 16 mask FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 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 mask 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 spec 0 / end actions queue index 3 / end", "error", 60) + out = 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 mask 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 spec 0 / 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") def test_ipv4_hash_rss_action(self): """ @@ -889,6 +911,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(src_mask=self.ipv4_mask, dst_mask=self.ipv4_mask, src_spec="100.0.0.3", dst_spec="200.0.0.3", protomask=self.protomask, protospec=132, l4type="sctp", sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="rss", index=[1]) self.generate_rules(src_mask=self.ipv4_mask, dst_mask=self.ipv4_mask, src_spec="100.0.0.4", dst_spec="200.0.0.4", protomask=self.protomask, protospec=6, l4type="tcp", sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="rss", index=[0]) self.dut.send_expect("start", "testpmd> ", 60) + ret = self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") # rule 0 test pcap_file = '/tmp/route_0.pcap' @@ -926,6 +950,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(src_mask="255.255.255.0", dst_mask=self.ipv4_mask, src_spec="100.0.0.1", dst_spec="200.0.0.1", protomask=self.protomask, sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="rss", index=[0, 1, 2, 3]) self.generate_rules(src_mask="255.255.255.0", dst_mask=self.ipv4_mask, src_spec="100.0.1.2", dst_spec="200.0.0.1", protomask=self.protomask, sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="rss", index=[0, 1, 2, 3]) self.dut.send_expect("start", "testpmd> ", 60) + ret = self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") self.send_continuous_packet("ipv4", "src", "100.0.0.1", "200.0.0.1", self.tester_itf) out = self.dut.send_expect("stop", "testpmd> ", 120) @@ -945,6 +971,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(src_mask="255.255.0.0", dst_mask=self.ipv4_mask, src_spec="100.0.0.1", dst_spec="200.0.0.2", sportspec=100, dportspec=200, action="rss", index=[2, 3]) self.generate_rules(src_mask="255.255.0.0", dst_mask=self.ipv4_mask, src_spec="200.0.0.1", dst_spec="200.0.0.2", sportspec=100, dportspec=200, action="rss", index=[1, 2]) self.dut.send_expect("start", "testpmd> ", 60) + ret = self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") self.send_continuous_packet("ipv4", "src", "100.0.0.1", "200.0.0.1", self.tester_itf) out = self.dut.send_expect("stop", "testpmd> ", 120) @@ -977,6 +1005,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(iptype="ipv6", src_mask=self.ipv6_mask, dst_mask=self.ipv6_mask, src_spec="2001::3", dst_spec="1001::3", protomask=self.protomask, protospec=132, l4type="sctp", sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="rss", index=[1]) self.generate_rules(iptype="ipv6", src_mask=self.ipv6_mask, dst_mask=self.ipv6_mask, src_spec="2001::4", dst_spec="1001::4", protomask=self.protomask, protospec=6, l4type="tcp", sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="rss", index=[0]) self.dut.send_expect("start", "testpmd> ", 60) + ret = self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") # rule 0 test pcap_file = '/tmp/route_0.pcap' @@ -1014,6 +1044,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(iptype="ipv6", src_mask="ffff:ffff:ffff:ffff:ffff:ffff:ffff:0", dst_mask=self.ipv6_mask, src_spec="ABCD:EF01:2345:6789:ABCD:EF01:2345:0", dst_spec="0::1", protomask=self.protomask, sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="rss", index=[0, 1, 2, 3]) self.generate_rules(iptype="ipv6", src_mask="ffff:ffff:ffff:ffff:ffff:ffff:ffff:0", dst_mask=self.ipv6_mask, src_spec="ABCD:EF01:2345:6789:ABCD:EF01:2346:0", dst_spec="0::1", protomask=self.protomask, sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="rss", index=[0, 1, 2, 3]) self.dut.send_expect("start", "testpmd> ", 60) + ret = self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") self.send_continuous_packet("ipv6", "src", "ABCD:EF01:2345:6789:ABCD:EF01:2345:0", "0::1", self.tester_itf) out = self.dut.send_expect("stop", "testpmd> ", 120) @@ -1033,6 +1065,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(iptype="ipv6", src_mask=self.ipv6_mask, dst_mask="ffff:ffff:ffff:ffff:ffff:ffff:ffff:0", src_spec="2001::2", dst_spec="1001::1", sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="rss", index=[2, 3]) self.generate_rules(iptype="ipv6", src_mask=self.ipv6_mask, dst_mask="ffff:ffff:ffff:ffff:ffff:ffff:ffff:0", src_spec="2001::1", dst_spec="1002::1", sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="rss", index=[1, 2]) self.dut.send_expect("start", "testpmd> ", 60) + ret = self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") self.send_continuous_packet("ipv6", "dst", "2001::1", "1001::1", self.tester_itf) out = self.dut.send_expect("stop", "testpmd> ", 120) @@ -1061,6 +1095,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(port=port_num, dst_mask="255.192.0.0", dst_spec="200.0.0.0", protomask=self.protomask, sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="jump", index=[1]) self.generate_rules(port=port_num, dst_mask="255.192.0.0", dst_spec="200.64.0.0", protomask=self.protomask, sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="jump", index=[1]) self.dut.send_expect("start", "testpmd> ", 60) + ret = self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") # rule 0 test pcap_file = '/tmp/route_0.pcap' @@ -1105,6 +1141,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(port=port_num, src_mask=self.ipv4_mask, dst_mask=self.ipv4_mask, src_spec="1.10.11.0", dst_spec="2.20.21.0", protomask=self.protomask, sportspec=100, dportspec=200, action="jump", index=[1]) self.generate_rules(port=port_num, src_mask=self.ipv4_mask, dst_mask=self.ipv4_mask, src_spec="1.10.11.1", dst_spec="2.20.21.1", protomask=self.protomask, sportspec=100, dportspec=200, action="jump", index=[1]) self.dut.send_expect("start", "testpmd> ", 60) + ret = self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") # rule 0 test pcap_file = '/tmp/route_0.pcap' @@ -1149,6 +1187,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(port=port_num, src_mask=self.ipv4_mask, dst_mask=self.ipv4_mask, src_spec="1.10.11.0", dst_spec="2.20.21.0", protomask=self.protomask, sportspec=100, dportspec=200, action="jump", index=[1]) self.generate_rules(port=port_num, src_mask=self.ipv4_mask, dst_mask=self.ipv4_mask, src_spec="1.10.11.1", dst_spec="2.20.21.1", protomask=self.protomask, sportspec=100, dportspec=200, action="jump", index=[1]) self.dut.send_expect("start", "testpmd> ", 60) + ret = self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") # rule 0 test pcap_file = '/tmp/route_0.pcap' @@ -1189,6 +1229,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(port=port_num, src_mask=self.ipv4_mask, dst_mask="255.255.255.0", src_spec="1.10.11.0", dst_spec="2.20.21.0", protomask=self.protomask, sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="jump", index=[1]) self.generate_rules(port=port_num, src_mask=self.ipv4_mask, dst_mask="255.255.255.0", src_spec="1.10.11.1", dst_spec="2.20.21.1", protomask=self.protomask, sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="jump", index=[1]) self.dut.send_expect("start", "testpmd> ", 60) + ret = self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") # rule 0 test pcap_file = '/tmp/route_0.pcap' @@ -1229,6 +1271,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(port=port_num, iptype="ipv6", dst_mask=self.ipv6_mask, src_spec="1001::1", dst_spec="2001::1", protomask=self.protomask, sportspec=100, dportspec=200, action="jump", index=[1]) self.generate_rules(port=port_num, iptype="ipv6", dst_mask=self.ipv6_mask, src_spec="1001::1", dst_spec="2001::2", protomask=self.protomask, sportspec=100, dportspec=200, action="jump", index=[1]) self.dut.send_expect("start", "testpmd> ", 60) + ret = self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") # rule 0 test pcap_file = '/tmp/route_0.pcap' @@ -1266,6 +1310,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(port=port_num, iptype="ipv6", src_mask=self.ipv6_mask, dst_mask=self.ipv6_mask, src_spec="1001::1", dst_spec="2001::1", protomask=self.protomask, sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="jump", index=[1]) self.generate_rules(port=port_num, iptype="ipv6", src_mask=self.ipv6_mask, dst_mask=self.ipv6_mask, src_spec="1001::2", dst_spec="2001::2", protomask=self.protomask, protospec=6, l4type="tcp", sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="jump", index=[1]) self.dut.send_expect("start", "testpmd> ", 60) + ret = self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") # rule 0 test pcap_file = '/tmp/route_0.pcap' @@ -1310,6 +1356,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(port=port_num, iptype="ipv6", dst_mask=self.ipv6_mask, src_spec="1001::1", dst_spec="2001::1", protomask=self.protomask, sportspec=100, dportspec=200, action="jump", index=[1]) self.generate_rules(port=port_num, iptype="ipv6", dst_mask=self.ipv6_mask, src_spec="1001::2", dst_spec="2001::2", protomask=self.protomask, sportspec=100, dportspec=200, action="jump", index=[1]) self.dut.send_expect("start", "testpmd> ", 60) + ret = self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") # rule 0 test pcap_file = '/tmp/route_0.pcap' @@ -1348,6 +1396,8 @@ class TestFlowClassifySoftnic(TestCase): self.generate_rules(port=port_num, iptype="ipv6", src_mask=self.ipv6_mask, dst_mask=self.ipv6_mask, src_spec="1001::1", dst_spec="2001::1", protomask=self.protomask, sportmask=self.portmask, sportspec=100, dportspec=200, action="jump", index=[1]) self.generate_rules(port=port_num, iptype="ipv6", src_mask=self.ipv6_mask, dst_mask=self.ipv6_mask, src_spec="1001::2", dst_spec="2001::2", protomask=self.protomask, sportmask=self.portmask, sportspec=100, dportspec=200, action="jump", index=[1]) self.dut.send_expect("start", "testpmd> ", 60) + ret = self.pmdout.wait_link_status_up("all", 15) + self.verify(ret is True, "port link is down") # rule 0 test pcap_file = '/tmp/route_0.pcap' -- 2.17.1