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 834C3A04F1; Thu, 18 Jun 2020 08:05:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7683C1B3BB; Thu, 18 Jun 2020 08:05:22 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 4C28B5B3A for ; Thu, 18 Jun 2020 08:05:20 +0200 (CEST) IronPort-SDR: e5pOmLm1Gaf+nrb4jqLAd5+TBYwabNASljacGed8Al6bu9mYjj4XiIta8CCYw6VMo3fxI/ymSu MloejyXMJBkg== X-IronPort-AV: E=McAfee;i="6000,8403,9655"; a="207700809" X-IronPort-AV: E=Sophos;i="5.73,525,1583222400"; d="scan'208";a="207700809" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jun 2020 23:05:19 -0700 IronPort-SDR: yqISNhlkf352s6KN1rf9hqixDy1wO6hm4JL7l//N5rjNhtHOQ/tBwTEzkcvxCLeYtrSEwu6OtN RJeYwGDjYRyA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,525,1583222400"; d="scan'208";a="291663145" Received: from unknown (HELO localhost.localdomain) ([10.240.183.103]) by orsmga002.jf.intel.com with ESMTP; 17 Jun 2020 23:05:18 -0700 From: Zeng Xiaoxiao To: dts@dpdk.org Cc: Zeng Xiaoxiao Date: Thu, 18 Jun 2020 14:45:16 +0000 Message-Id: <20200618144517.2201-2-xiaoxiaox.zeng@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200618144517.2201-1-xiaoxiaox.zeng@intel.com> References: <20200618144517.2201-1-xiaoxiaox.zeng@intel.com> Subject: [dts] [PATCH V1 1/2] optimize cvl_advanced_rss code 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" Signed-off-by: Zeng Xiaoxiao --- tests/TestSuite_cvl_advanced_rss.py | 32 ++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/tests/TestSuite_cvl_advanced_rss.py b/tests/TestSuite_cvl_advanced_rss.py index 58c7b02..44c8b23 100644 --- a/tests/TestSuite_cvl_advanced_rss.py +++ b/tests/TestSuite_cvl_advanced_rss.py @@ -736,8 +736,8 @@ tv_mac_ipv6_vxlan_icmp_symmetric_toeplitz= { tv_mac_ipv4_simple_xor= { "name":"tv_mac_ipv4_simple_xor", "rte_flow_pattern":"flow create 0 ingress pattern end actions rss func simple_xor key_len 0 queues end / end", - "scapy_str": ['Ether()/IP("src="1.1.4.1",dst="2.2.2.3")/("X"*480)', - 'Ether()/IP("src="2.2.2.3",dst="1.1.4.1")/("X"*480)'], + "scapy_str": ['Ether()/IP(src="1.1.4.1",dst="2.2.2.3")/("X"*480)', + 'Ether()/IP(src="2.2.2.3",dst="1.1.4.1")/("X"*480)'], "check_func": rfc.check_simplexor_queue, "check_func_param": {"expect_port":0} } @@ -856,7 +856,6 @@ class AdvancedRSSTest(TestCase): def _rte_flow_validate_pattern(self, test_vectors, command, is_vxlan): - global test_results out = self.dut.send_expect(command, "testpmd> ", 120) self.logger.debug(out) #print the log self.dut.send_expect("port config 0 rss-hash-key ipv4 1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd", "testpmd> ", 15) @@ -865,9 +864,10 @@ class AdvancedRSSTest(TestCase): self.dut.send_expect("set fwd rxonly", "testpmd> ", 15) self.dut.send_expect("set verbose 1", "testpmd> ", 15) - test_results.clear() self.count = 1 - self.mac_count=100 + self.mac_count = 100 + result_dic = dict() + result_flag = 0 for tv in test_vectors: out = self.dut.send_expect(tv["rte_flow_pattern"], "testpmd> ", 15) #create a rule print(out) @@ -888,14 +888,26 @@ class AdvancedRSSTest(TestCase): print("packet:") print(tv["scapy_str"]) - out = self.dut.send_expect("stop", "testpmd> ",60) - print(out) - log_msg = tv["check_func"](out) - print(log_msg) - rfc.check_rx_tx_packets_match(out, self.mac_count) + if "symmetric" or "xor" in tv["name"]: + out = self.dut.get_session_output(timeout=3) + self.dut.send_expect("stop", "testpmd> ", 60) + else: + out = self.dut.send_expect("stop", "testpmd> ", 60) + result, ret_log = rfc.check_rx_tx_packets_match(out, self.mac_count) + self.verify(result is True, ret_log) + ret_result, log_msg = tv["check_func"](out) + print("%s result is: %s ,%s " % (tv["name"], ret_result, log_msg)) + + result_dic[tv["name"]] = ret_result + + print(result_dic) + + if False in result_dic.values(): + result_flag = 1 self.dut.send_expect("flow flush %d" % self.dut_ports[0], "testpmd> ") self.dut.send_expect("quit", "#") + self.verify(result_flag == 0, "Some case failed") def test_advance_rss_ipv4(self): command = self.create_testpmd_command() -- 2.17.1