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 9C9FBA2E1B for ; Wed, 4 Sep 2019 11:05:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5D1DB1EB85; Wed, 4 Sep 2019 11:05:41 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 193C31EAE2 for ; Wed, 4 Sep 2019 11:05:39 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Sep 2019 02:05:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,465,1559545200"; d="scan'208";a="266592447" Received: from unknown (HELO dpdk-wenjielx-KVM193.icx.intel.com) ([10.240.176.193]) by orsmga001.jf.intel.com with ESMTP; 04 Sep 2019 02:05:20 -0700 From: Wenjie Li To: dts@dpdk.org Cc: Wenjie Li Date: Wed, 4 Sep 2019 17:59:09 +0000 Message-Id: <1567619949-40730-1-git-send-email-wenjiex.a.li@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V1] tests/fortville_rss_granularity_config and vxlan: check ports status before send pkt 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" check ports status before send packets. Signed-off-by: Wenjie Li --- ...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