[dts] [PATCH V1] tests/fortville_rss_granularity_config and vxlan: check ports status before send pkt
Zhu, WenhuiX
wenhuix.zhu at intel.com
Fri Sep 6 03:21:55 CEST 2019
Tested-by: Zhu, WenhuiX <wenhuix.zhu at intel.com>
-----Original Message-----
From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of Wenjie Li
Sent: Thursday, September 5, 2019 1:59 AM
To: dts at dpdk.org
Cc: Li, WenjieX A <wenjiex.a.li at intel.com>
Subject: [dts] [PATCH V1] tests/fortville_rss_granularity_config and vxlan: check ports status before send pkt
check ports status before send packets.
Signed-off-by: Wenjie Li <wenjiex.a.li at intel.com>
---
...tSuite_fortville_rss_granularity_config.py | 20 +++++++++++++++++++
tests/TestSuite_vxlan.py | 13 ++++++++++++
2 files changed, 33 insertions(+)
diff --git a/tests/TestSuite_fortville_rss_granularity_config.py b/tests/TestSuite_fortville_rss_granularity_config.py
index 0d19c93..e827df2 100644
--- a/tests/TestSuite_fortville_rss_granularity_config.py
+++ b/tests/TestSuite_fortville_rss_granularity_config.py
@@ -52,6 +52,7 @@ import random
import re
import utils
import dut
+from pmd_output import PmdOutput
testQueues = [16]
reta_entries = []
@@ -85,6 +86,7 @@ class TestFortvilleRssGranularityConfig(TestCase):
dutPorts = self.dut.get_ports(self.nic)
localPort = self.tester.get_local_port(dutPorts[0])
self.itf = self.tester.get_interface(localPort)
+ self.pmdout = PmdOutput(self.dut)
def set_up(self):
"""
@@ -207,6 +209,9 @@ class TestFortvilleRssGranularityConfig(TestCase):
self.dut.send_expect(
"set_hash_global_config 0 toeplitz ipv4-tcp enable", "testpmd> ")
self.dut.send_expect("port start all", "testpmd> ")
+ res = self.pmdout.wait_link_status_up("all")
+ self.verify(res is True, "link is donw")
+
self.dut.send_expect(
"port config all rss tcp", "testpmd> ")
self.send_packet(self.itf, "ipv4-tcp") @@ -278,6 +283,9 @@ class TestFortvilleRssGranularityConfig(TestCase):
self.dut.send_expect(
"set_hash_global_config 0 toeplitz ipv4-udp enable", "testpmd> ")
self.dut.send_expect("port start all", "testpmd> ")
+ res = self.pmdout.wait_link_status_up("all")
+ self.verify(res is True, "link is donw")
+
self.dut.send_expect(
"port config all rss udp", "testpmd> ")
self.send_packet(self.itf, "ipv4-udp") @@ -350,6 +358,9 @@ class TestFortvilleRssGranularityConfig(TestCase):
self.dut.send_expect(
"set_hash_global_config 0 toeplitz ipv6-tcp enable", "testpmd> ")
self.dut.send_expect("port start all", "testpmd> ")
+ res = self.pmdout.wait_link_status_up("all")
+ self.verify(res is True, "link is donw")
+
self.dut.send_expect(
"port config all rss tcp", "testpmd> ")
self.send_packet(self.itf, "ipv6-tcp") @@ -422,6 +433,9 @@ class TestFortvilleRssGranularityConfig(TestCase):
self.dut.send_expect(
"set_hash_global_config 0 toeplitz ipv6-udp enable", "testpmd> ")
self.dut.send_expect("port start all", "testpmd> ")
+ res = self.pmdout.wait_link_status_up("all")
+ self.verify(res is True, "link is donw")
+
self.dut.send_expect(
"port config all rss udp", "testpmd> ")
self.send_packet(self.itf, "ipv6-udp") @@ -495,6 +509,9 @@ class TestFortvilleRssGranularityConfig(TestCase):
self.dut.send_expect(
"set_hash_global_config 0 toeplitz l2_payload enable", "testpmd> ")
self.dut.send_expect("port start all", "testpmd> ")
+ res = self.pmdout.wait_link_status_up("all")
+ self.verify(res is True, "link is donw")
+
self.dut.send_expect(
"port config all rss ether", "testpmd> ")
self.send_packet(self.itf, "l2_payload") @@ -550,6 +567,9 @@ class TestFortvilleRssGranularityConfig(TestCase):
self.dut.send_expect(
"set_hash_global_config 0 toeplitz ipv4-other enable", "testpmd> ")
self.dut.send_expect("port start all", "testpmd> ")
+ res = self.pmdout.wait_link_status_up("all")
+ self.verify(res is True, "link is donw")
+
self.dut.send_expect(
"port config all rss all", "testpmd> ")
self.send_packet(self.itf, "ipv4-other") diff --git a/tests/TestSuite_vxlan.py b/tests/TestSuite_vxlan.py index ecc3f3a..acbb8b5 100644
--- a/tests/TestSuite_vxlan.py
+++ b/tests/TestSuite_vxlan.py
@@ -555,6 +555,8 @@ class TestVxlan(TestCase, IxiaPacketGenerator):
self.dut.send_expect("set verbose 1", "testpmd>", 10)
self.enable_vxlan(self.dut_port)
self.enable_vxlan(self.recv_port)
+ res = self.pmdout.wait_link_status_up("all")
+ self.verify(res is True, "link is donw")
# check normal packet
self.send_and_detect(outer_udp_dst=1234)
@@ -605,6 +607,8 @@ class TestVxlan(TestCase, IxiaPacketGenerator):
self.dut.send_expect("set verbose 1", "testpmd>", 10)
self.enable_vxlan(self.dut_port)
self.enable_vxlan(self.recv_port)
+ res = self.pmdout.wait_link_status_up("all")
+ self.verify(res is True, "link is donw")
# check normal ipv6 packet
self.send_and_detect(outer_ip6_src="FE80:0:0:0:0:0:0:0",
@@ -662,6 +666,9 @@ class TestVxlan(TestCase, IxiaPacketGenerator):
self.dut.send_expect("port start all", "testpmd>")
self.dut.send_expect("csum parse-tunnel on %d" %
self.recv_port, "testpmd>", 10)
+ res = self.pmdout.wait_link_status_up("all")
+ self.verify(res is True, "link is donw")
+
self.enable_vxlan(self.dut_port)
self.enable_vxlan(self.recv_port) @@ -736,6 +743,7 @@ class TestVxlan(TestCase, IxiaPacketGenerator):
self.enable_vxlan(self.dut_port)
self.enable_vxlan(self.recv_port)
+ time.sleep(10) #lwj
# check normal ipv6 packet
self.send_and_check(outer_ip6_src="FE80:0:0:0:0:0:0:0",
@@ -1145,6 +1153,8 @@ class TestVxlan(TestCase, IxiaPacketGenerator):
self.dut.send_expect("port start all", "testpmd>")
self.verify("Bad arguments" not in out, "Failed to set vxlan csum")
self.verify("error" not in out, "Failed to set vxlan csum")
+ res = self.pmdout.wait_link_status_up("all")
+ self.verify(res is True, "link is donw")
def csum_set_sw(self, proto, port):
self.dut.send_expect("port stop all", "testpmd>") @@ -1153,6 +1163,9 @@ class TestVxlan(TestCase, IxiaPacketGenerator):
self.dut.send_expect("port start all", "testpmd>")
self.verify("Bad arguments" not in out, "Failed to set vxlan csum")
self.verify("error" not in out, "Failed to set vxlan csum")
+ res = self.pmdout.wait_link_status_up("all")
+ self.verify(res is True, "link is donw")
+
def tunnel_filter_add(self, *args):
# tunnel_filter add port_id outer_mac inner_mac ip inner_vlan
--
2.17.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestVxlan.log
Type: application/octet-stream
Size: 667071 bytes
Desc: TestVxlan.log
URL: <http://mails.dpdk.org/archives/dts/attachments/20190906/54838aea/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestFortvilleRssGranularityConfig.log
Type: application/octet-stream
Size: 237063 bytes
Desc: TestFortvilleRssGranularityConfig.log
URL: <http://mails.dpdk.org/archives/dts/attachments/20190906/54838aea/attachment-0001.obj>
More information about the dts
mailing list