test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] disabled outer-ip hardware checksum offload when outer-ip is ipv6
@ 2015-07-08  5:48 Yong Liu
  0 siblings, 0 replies; only message in thread
From: Yong Liu @ 2015-07-08  5:48 UTC (permalink / raw)
  To: dts

From: Marvin Liu <yong.liu@intel.com>

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 <yong.liu@intel.com>

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-07-08  5:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-08  5:48 [dts] [PATCH] disabled outer-ip hardware checksum offload when outer-ip is ipv6 Yong Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).