test suite reviews and discussions
 help / color / mirror / Atom feed
From: "zhiwei.he" <zhiwei.he@intel.com>
To: dts@dpdk.org
Cc: "zhiwei.he" <zhiwei.he@intel.com>
Subject: [dts] [PATCH V3] tests/TestSuite_nvgre:Change to no vec modele to cover IPV4detectandoffloadcase
Date: Thu, 29 Aug 2019 13:31:31 +0800	[thread overview]
Message-ID: <1567056691-37038-1-git-send-email-zhiwei.he@intel.com> (raw)

From: "zhiwei.he" <zhiwei.he@intel.com>

diff --git a/tests/TestSuite_nvgre.py b/tests/TestSuite_nvgre.py
index b0500cc..41fad85 100644
--- a/tests/TestSuite_nvgre.py
+++ b/tests/TestSuite_nvgre.py
@@ -93,8 +93,8 @@ class NvgreTestConfig(object):
         self.outer_ip_dst = '192.168.1.2'
         self.outer_ip_invalid = 0
 
-        self.outer_ip6_src = 'N/A'
-        self.outer_ip6_dst = 'N/A'
+        self.outer_ip6_src = 'FE80:0:0:0:0:0:0:0'
+        self.outer_ip6_dst = 'FE80:0:0:0:0:0:0:1'
         self.outer_ip6_invalid = 0
         """
         gre info
@@ -150,8 +150,8 @@ class NvgreTestConfig(object):
         self.inner_ip_dst = '192.168.2.2'
         self.inner_ip_invalid = 0
 
-        self.inner_ip6_src = 'N/A'
-        self.inner_ip6_dst = 'N/A'
+        self.inner_ip6_src = 'FE80:0:0:0:0:0:0:0'
+        self.inner_ip6_dst = 'FE80:0:0:0:0:0:0:1'
         self.inner_ip6_invalid = 0
 
         self.inner_l4_type = 'UDP'
@@ -361,10 +361,12 @@ class TestNvgre(TestCase):
         nvgre Prerequisites
         """
         # this feature only enable in FVL now
-        if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortville_25g", "fortpark_TLV", "cavium_a063", "cavium_a064", "carlsville"]:
+        if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortville_25g", "fortpark_TLV", "cavium_a063", "cavium_a064"]:
             self.compile_switch = 'CONFIG_RTE_LIBRTE_I40E_INC_VECTOR'
         elif self.nic in ["sageville", "sagepond"]:
             self.compile_switch = 'CONFIG_RTE_IXGBE_INC_VECTOR'
+        elif self.nic in ["columbiaville_25g","columbiaville_100g"]:
+           print "CVL support default none VECTOR"
         else:
             self.verify(False, "%s not support NVGRE case" % self.nic)
         # Based on h/w type, choose how many ports to use
@@ -616,19 +618,73 @@ class TestNvgre(TestCase):
         # verify saved pcap checksum same to expected checksum
         for key in chksums_default:
             self.verify(chksums[key] == chksums_default[key], "%s not matched to %s" % (key, chksums_default[key]))
-
+    def test_nvgre_ipv6(self):
+        """
+        verify nvgre packet with ipv6
+        """
+        # check no nvgre packet
+        self.nvgre_detect(outer_l3_type = "IPv6", outer_ip_proto=0xFF)
+        # check nvgre + IPv6 inner packet
+        self.nvgre_detect(outer_l3_type = "IPv6", inner_l3_type="IPv6", inner_l4_type='None')
+        # check nvgre + TCP inner packet
+        self.nvgre_detect(outer_l3_type = "IPv6", inner_l3_type="IPv6", inner_l4_type='TCP')
+        # check nvgre + SCTP inner packet
+        self.nvgre_detect(outer_l3_type = "IPv6", inner_l3_type="IPv6", inner_l4_type='SCTP')
+        # check nvgre + UDP inner packet
+        self.nvgre_detect(outer_l3_type = "IPv6", inner_l3_type="IPv6", inner_l4_type='UDP')
+        # check nvgre + vlan outer packet
+        self.nvgre_detect(outer_l3_type = "IPv6", inner_l3_type="IPv6", outer_vlan=1)
+        # check vlan nvgre + vlan inner and outer packet
+        self.nvgre_detect(outer_l3_type = "IPv6", inner_l3_type="IPv6", outer_vlan=1, inner_vlan=1)
+
+    def test_nvgre_ipv6_checksum_offload(self):
+        # check nvgre packet + inner IPv6 + inner L4  invalid
+        self.nvgre_checksum(inner_l3_type = "IPv6", inner_l4_invalid=1)
+        # check nvgre packet + outer IPv6 + inner L4  invalid
+        self.nvgre_checksum(outer_l3_type = "IPv6", inner_l4_invalid=1)
+        # check nvgre packet + inner + outer ipv6 + inner L4  invalid
+        self.nvgre_checksum(outer_l3_type = "IPv6", inner_l3_type= "IPv6", inner_l4_invalid=1)
+        # check nvgre packet + inner IPv6 + tcp checksum invalid
+        self.nvgre_checksum(inner_l3_type = "IPv6", inner_l4_invalid=1, inner_l4_type='TCP')
+        #check nvgre packet + inner IPv6 + sctp checksum invalid
+        self.nvgre_checksum(inner_l3_type = "IPv6", inner_l4_invalid=1, inner_l4_type='SCTP')
+        #check nvgre packet + inner IPv6 + UDP checksum invalid
+        self.nvgre_checksum(inner_l3_type = "IPv6", inner_l4_invalid=1, inner_l4_type='UDP')
+        # check nvgre packet + outer IPv6 + inner tcp checksum invalid
+        self.nvgre_checksum(outer_l3_type = "IPv6", inner_l4_invalid=1, inner_l4_type='TCP')
+        #check nvgre packet + outer IPv6 + inner sctp checksum invalid
+        self.nvgre_checksum(outer_l3_type = "IPv6", inner_l4_invalid=1, inner_l4_type='SCTP')
+        #check nvgre packet + outer IPv6 + inner UDP checksum invalid
+        self.nvgre_checksum(outer_l3_type = "IPv6", inner_l4_invalid=1, inner_l4_type='UDP')
+        # check vlan nvgre packet + inner vlan + inner udp checksum invalid
+        self.nvgre_checksum(inner_l3_type="IPv6", inner_vlan=1, inner_l4_invalid=1, inner_l4_type='UDP')
+        # check vlan nvgre packet + outer vlan + inner udp checksum invalid
+        self.nvgre_checksum(outer_l3_type="IPv6", outer_vlan=1, inner_l4_invalid=1, inner_l4_type='UDP')
+        # check vlan nvgre packet + outer vlan + inner tcp checksum invalid
+        self.nvgre_checksum(outer_l3_type="IPv6", outer_vlan=1, inner_l4_invalid=1, inner_l4_type='TCP')
+        # check vlan nvgre packet + inner vlan + inner tcp checksum invalid
+        self.nvgre_checksum(inner_l3_type="IPv6", inner_vlan=1, inner_l4_invalid=1, inner_l4_type='TCP')
+        # check vlan nvgre packet + inner vlan + inner sctp checksum invalid
+        self.nvgre_checksum(inner_l3_type="IPv6", inner_vlan=1, inner_l4_invalid=1, inner_l4_type='SCTP')
+        # check vlan nvgre packet + outer vlan + inner sctp checksum invalid
+        self.nvgre_checksum(outer_l3_type="IPv6", outer_vlan=1, inner_l4_invalid=1, inner_l4_type='SCTP')
+ 
     def test_nvgre_ipv4(self):
         """
         verify nvgre packet with ipv4
         """
         # packet type detect must used without VECTOR pmd
-        out = self.dut.send_expect("cat config/common_base", "]# ", 10)
-        src_vec_model = re.findall("%s=." % self.compile_switch, out)[0][-1]
-        if src_vec_model == 'y':
-            self.dut.send_expect("sed -i -e 's/%s=.*$/" % self.compile_switch
+        if self.nic in ["columbiaville_25g","columbiaville_100g"]:
+           print "CVL support default none VECTOR"
+           src_vec_model = 'n'
+        else:
+           out = self.dut.send_expect("cat config/common_base", "]# ", 10)
+           src_vec_model = re.findall("%s=." % self.compile_switch, out)[0][-1]  
+           if src_vec_model == 'y':
+              self.dut.send_expect("sed -i -e 's/%s=.*$/" % self.compile_switch
                                 + "%s=n/' config/common_base" % self.compile_switch, "# ", 30)
-            self.dut.skip_setup = False
-            self.dut.build_install_dpdk(self.target)
+              self.dut.skip_setup = False
+              self.dut.build_install_dpdk(self.target)
 
         # check no nvgre packet
         self.nvgre_detect(outer_ip_proto=0xFF)
@@ -642,13 +698,17 @@ class TestNvgre(TestCase):
         self.nvgre_detect(outer_vlan=1)
         # check vlan nvgre + vlan inner packet
         self.nvgre_detect(outer_vlan=1, inner_vlan=1)
-        out = self.dut.send_expect("cat config/common_base", "]# ", 10)
-        dst_vec_model = re.findall("%s=." % self.compile_switch, out)[0][-1]
-        if src_vec_model != dst_vec_model:
-            self.dut.send_expect("sed -i -e 's/%s=.*$/" % self.compile_switch
+        if self.nic in ["columbiaville_25g","columbiaville_100g"]:
+           print "CVL support default none VECTOR"
+           src_vec_model = 'n'
+        else:
+           out = self.dut.send_expect("cat config/common_base", "]# ", 10)
+           dst_vec_model = re.findall("%s=." % self.compile_switch, out)[0][-1]
+           if src_vec_model != dst_vec_model:
+              self.dut.send_expect("sed -i -e 's/%s=.*$/" % self.compile_switch
                                 + "%s=%s/' config/common_base" % (self.compile_switch, src_vec_model), "# ", 30)
-            self.dut.skip_setup = False
-            self.dut.build_install_dpdk(self.target)
+              self.dut.skip_setup = False
+              self.dut.build_install_dpdk(self.target)
     def test_tunnel_filter(self):
 
         # verify tunnel filter feature
-- 
1.8.3.1


             reply	other threads:[~2019-08-29  5:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-29  5:31 zhiwei.he [this message]
2019-08-29  6:39 ` Mo, YufengX

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1567056691-37038-1-git-send-email-zhiwei.he@intel.com \
    --to=zhiwei.he@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).