From patchwork Wed Sep 23 05:16:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhang, XiX" X-Patchwork-Id: 78496 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9A0E0A04B1; Wed, 23 Sep 2020 07:15:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 486C81DBD2; Wed, 23 Sep 2020 07:15:08 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id F32DB1DBD1 for ; Wed, 23 Sep 2020 07:15:05 +0200 (CEST) IronPort-SDR: EWozhvtboYSEFN/So8tM6I93lqVN/+kuH7GzXM/KSEQ/3wQ/hHUnWEoT1t8QRZ8xEQdrlwfbik HscUUcyrtbVg== X-IronPort-AV: E=McAfee;i="6000,8403,9752"; a="160072173" X-IronPort-AV: E=Sophos;i="5.77,293,1596524400"; d="scan'208";a="160072173" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2020 22:15:05 -0700 IronPort-SDR: K+sTFkej9SfEREHNSWqaau7idmuNB/KMknsszrZKbiWyMizJiA88/TqTkm29Ruf/MObJNEQWOb VTppvNyDHbPw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,293,1596524400"; d="scan'208";a="342305536" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.240.182.150]) by fmsmga002.fm.intel.com with ESMTP; 22 Sep 2020 22:15:03 -0700 From: xizhan4x To: dts@dpdk.org Cc: xizhan4x Date: Wed, 23 Sep 2020 13:16:32 +0800 Message-Id: <1600838192-16940-1-git-send-email-xix.zhang@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH V1] tests/TestSuite_checksum_offload:Fix package error 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" Fix package error and add vxlan Tunnel Signed-off-by: xizhan4x Tested-by: Zhang, XiX Acked-by: Lihong Ma --- tests/TestSuite_checksum_offload.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/TestSuite_checksum_offload.py b/tests/TestSuite_checksum_offload.py index 8f212cb..c917a15 100644 --- a/tests/TestSuite_checksum_offload.py +++ b/tests/TestSuite_checksum_offload.py @@ -129,6 +129,7 @@ class TestChecksumOffload(TestCase): def checksum_enablehw(self, port): self.dut.send_expect("port stop all", "testpmd>") + self.dut.send_expect("rx_vxlan_port add 4789 0 ", "testpmd>") self.dut.send_expect("csum set ip hw %d" % port, "testpmd>") self.dut.send_expect("csum set udp hw %d" % port, "testpmd>") self.dut.send_expect("csum set tcp hw %d" % port, "testpmd>") @@ -685,7 +686,6 @@ class TestChecksumOffload(TestCase): self.result_table_print() def test_hardware_checksum_check_ip_rx(self): - self.dut.send_expect("start", "testpmd>") self.tester.send_expect("scapy", ">>>") self.checksum_enablehw(self.dut_ports[0]) self.dut.send_expect("start", "testpmd>") @@ -791,8 +791,9 @@ class TestChecksumOffload(TestCase): # Tunneled # VXLAN + VXLAN_l4_protos=['UDP'] for l3 in l3_protos: - for l4 in l4_protos: + for l4 in VXLAN_l4_protos: for outer_arg in "", "chksum=0xf": for inner_arg in "", "chksum=0xf": for flag in "PKT_RX_L4_CKSUM_", "PKT_RX_OUTER_L4_CKSUM_": @@ -801,8 +802,8 @@ class TestChecksumOffload(TestCase): else: # flag == PKT_RX_OUTER_L4_CKSUM_ should_pass = outer_arg == "" vf = self.send_pkt_expect_good_bad_from_flag_catch_failure( - f"eth/{l3}()/{l4}({outer_arg})/VXLAN()/{l3}()/" - f"{l4}(chksum={inner_arg})/('X'*50)", + f"eth/{l3}()/{l4}(dport=4789,{outer_arg})/VXLAN()/eth/{l3}()/" + f"{l4}({inner_arg})/('X'*50)", flag, f"{l3}/{l4}/VXLAN/{l3}/{l4}", should_pass=should_pass) @@ -846,7 +847,7 @@ class TestChecksumOffload(TestCase): # if vf is not None: # verification_errors.append(vf) - self.tester.send_expect("quit", "#") + self.tester.send_expect("quit()", "#") self.dut.send_expect("stop", "testpmd>") for err in verification_errors: @@ -871,7 +872,7 @@ class TestChecksumOffload(TestCase): packet_file_path = "/tmp/test_hardware_checksum_check_l4_tx_packets.pcap" capture_file_path = "/tmp/tester/" + capture_file_name - self.tester.send_expect(f"tcpdump -i {iface} -s 65535 -w {capture_file_path} &", "# ") + self.tester.send_expect(f"tcpdump -i '{iface}' -s 65535 -w {capture_file_path} &", "# ") wrpcap(packet_file_path, packets) self.tester.session.copy_file_to(packet_file_path, packet_file_path)