From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 499055A5D for ; Wed, 8 Jul 2015 07:48:47 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 07 Jul 2015 22:48:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,429,1432623600"; d="scan'208";a="520616874" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by FMSMGA003.fm.intel.com with ESMTP; 07 Jul 2015 22:48:28 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t685mQtA008764; Wed, 8 Jul 2015 13:48:26 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t685mOft006414; Wed, 8 Jul 2015 13:48:26 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t685mNVV006410; Wed, 8 Jul 2015 13:48:23 +0800 From: Yong Liu To: dts@dpdk.org Date: Wed, 8 Jul 2015 13:48:22 +0800 Message-Id: <1436334502-6378-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH] disabled outer-ip hardware checksum offload when outer-ip is ipv6 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: , X-List-Received-Date: Wed, 08 Jul 2015 05:48:47 -0000 From: Marvin Liu In testpmd, hardware checksum offload will not work when enable outer-ip and outer-ip is ipv6. Also fix issue in case test_tunnel_filter_invalid. Signed-off-by: Marvin Liu diff --git a/tests/TestSuite_vxlan.py b/tests/TestSuite_vxlan.py index 6d8f6f8..9dd7862 100644 --- a/tests/TestSuite_vxlan.py +++ b/tests/TestSuite_vxlan.py @@ -430,10 +430,13 @@ class TestVxlan(TestCase, IxiaPacketGenerator): checksum """ # create pcap file with supplied arguments + outer_ipv6 = False args = {} for arg in kwargs: if "invalid" not in arg: args[arg] = kwargs[arg] + if "outer_ip6" in arg: + outer_ipv6 = True config = VxlanTestConfig(self, **args) # now cloud filter will default enable L2 mac filter, so dst mac must @@ -474,12 +477,16 @@ class TestVxlan(TestCase, IxiaPacketGenerator): # enable tx checksum offload self.dut.send_expect("set fwd csum", "testpmd>", 10) self.csum_set_type('ip', self.dut_port) - self.csum_set_type('outer-ip', self.dut_port) + # if packet outer L3 is ipv6, should not enable hardware checksum + if not outer_ipv6: + self.csum_set_type('outer-ip', self.dut_port) self.csum_set_type('udp', self.dut_port) self.csum_set_type('tcp', self.dut_port) self.csum_set_type('sctp', self.dut_port) self.csum_set_type('ip', self.recv_port) - self.csum_set_type('outer-ip', self.recv_port) + # if packet outer L3 is ipv6, should not enable hardware checksum + if not outer_ipv6: + self.csum_set_type('outer-ip', self.recv_port) self.csum_set_type('udp', self.recv_port) self.csum_set_type('tcp', self.recv_port) self.csum_set_type('sctp', self.recv_port) @@ -759,7 +766,6 @@ class TestVxlan(TestCase, IxiaPacketGenerator): filter_type = 'omac-imac-tenid' queue_id = 3 - self.filter_and_check(filter_type="imac", remove=True) config = VxlanTestConfig(self) config.outer_mac_dst = self.dut_port_mac @@ -777,22 +783,22 @@ class TestVxlan(TestCase, IxiaPacketGenerator): args = [self.dut_port, config.outer_mac_dst, self.invalid_mac, config.inner_ip_dst, vlan_id, filter_type, config.vni, queue_id] - out = self.tunnel_filter_add(*args) + out = self.tunnel_filter_add_nocheck(*args) self.verify("Bad arguments" in out, "Failed to detect invalid mac") args = [self.dut_port, config.outer_mac_dst, config.inner_mac_dst, self.invalid_ip, vlan_id, filter_type, config.vni, queue_id] - out = self.tunnel_filter_add(*args) + out = self.tunnel_filter_add_nocheck(*args) self.verify("Bad arguments" in out, "Failed to detect invalid ip") args = [self.dut_port, config.outer_mac_dst, config.inner_mac_dst, config.inner_ip_dst, self.invalid_vlan, filter_type, config.vni, queue_id] - out = self.tunnel_filter_add(*args) + out = self.tunnel_filter_add_nocheck(*args) self.verify("Input/output error" in out, "Failed to detect invalid vlan") args = [self.dut_port, config.outer_mac_dst, config.inner_mac_dst, config.inner_ip_dst, vlan_id, filter_type, config.vni, self.invalid_queue] - out = self.tunnel_filter_add(*args) + out = self.tunnel_filter_add_nocheck(*args) self.verify("Input/output error" in out, "Failed to detect invalid queue") @@ -1094,9 +1100,17 @@ class TestVxlan(TestCase, IxiaPacketGenerator): self.verify("error" not in out, "Failed to add tunnel filter") return out + def tunnel_filter_add_nocheck(self, *args): + out = self.dut.send_expect("tunnel_filter add %d " % args[0] + + "%s %s %s " % (args[1], args[2], args[3]) + + "%d vxlan %s " % (args[4], args[5]) + + "%d %d" % (args[6], args[7]), + "testpmd>", 10) + return out + def tunnel_filter_del(self, *args): out = self.dut.send_expect("tunnel_filter rm %d " % args[0] + - "%s %s %s" % (args[1], args[2], args[3]) + + "%s %s %s " % (args[1], args[2], args[3]) + "%d vxlan %s " % (args[4], args[5]) + "%d %d" % (args[6], args[7]), "testpmd>", 10) -- 1.9.3