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 8620FA046B for ; Tue, 20 Aug 2019 04:05:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6AC911BE9D; Tue, 20 Aug 2019 04:05:42 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 449051BE90 for ; Tue, 20 Aug 2019 04:05:41 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Aug 2019 19:05:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,407,1559545200"; d="scan'208";a="168932619" Received: from unknown (HELO dpdktestzhiwei.sh.intel.com) ([10.67.119.33]) by orsmga007.jf.intel.com with ESMTP; 19 Aug 2019 19:05:39 -0700 From: "zhiwei.he" To: dts@dpdk.org Cc: "zhiwei.he" Date: Tue, 20 Aug 2019 10:05:43 +0800 Message-Id: <1566266743-107013-1-git-send-email-zhiwei.he@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH] /tests/TestSuite_nvgre : add ipv6 detect and ipv6checksum for CVL25gand100g nic Add ipv6 detect case and ipv6 checksum offload case for the CVL 25g and 100g nic test Add CVL25G and 100g nic support default none vector 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" From: "zhiwei.he" Signed-off-by: zhiwei.he --- tests/TestSuite_nvgre.py | 57 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 52 insertions(+), 5 deletions(-) diff --git a/tests/TestSuite_nvgre.py b/tests/TestSuite_nvgre.py index 62aac3a..2fd304a 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"]: + 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,7 +618,52 @@ 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 + """ + outer_l3_type = "IPv6" + inner_l3_type = "IPv6" + outer_ip6_src = 'FE80:0:0:0:0:0:0:0' + outer_ip6_dst = 'FE80:0:0:0:0:0:0:1' + inner_ip6_src = 'FE80:0:0:0:0:0:0:0' + inner_ip6_dst = 'FE80:0:0:0:0:0:0:1' + # check no nvgre packet + self.nvgre_detect(outer_l3_type = "IPv6", inner_l3_type="IPv6", outer_ip_proto=0xFF) + # check nvgre + IP inner packet + self.nvgre_detect(outer_l3_type = "IPv6", inner_l3_type="IPv6", inner_l4_type='None') + # check nvgre + udp 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 inner packet + self.nvgre_detect(outer_l3_type = "IPv6", inner_l3_type="IPv6", outer_vlan=1) + # check vlan nvgre + vlan inner 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): + outer_l3_type = "IPv6" + inner_l3_type = "IPv6" + outer_ip6_src = 'FE80:0:0:0:0:0:0:0' + outer_ip6_dst = 'FE80:0:0:0:0:0:0:1' + inner_ip6_src = 'FE80:0:0:0:0:0:0:0' + inner_ip6_dst = 'FE80:0:0:0:0:0:0:1' + # check nvgre packet + inner ip checksum invalid + self.nvgre_checksum(outer_l3_type = "IPv6", inner_l3_type="IPv6", inner_l4_invalid=1) + # check nvgre packet + inner tcp checksum invalid + self.nvgre_checksum(outer_l3_type = "IPv6", inner_l3_type="IPv6", inner_l4_invalid=1, inner_l4_type='TCP') + #check nvgre packet + inner sctp checksum invalid + self.nvgre_checksum(outer_l3_type = "IPv6", inner_l3_type="IPv6", inner_l4_invalid=1, inner_l4_type='SCTP') + # check vlan nvgre packet + inner vlan + inner udp checksum invalid + self.nvgre_checksum(outer_l3_type = "IPv6", inner_l3_type="IPv6", outer_vlan=1, inner_l4_invalid=1, inner_l4_type='UDP') + # check vlan nvgre packet + inner vlan + inner tcp checksum invalid + self.nvgre_checksum(outer_l3_type = "IPv6", inner_l3_type="IPv6", outer_vlan=1, inner_l4_invalid=1, inner_l4_type='TCP') + # check vlan nvgre packet + inner vlan + inner sctp checksum invalid + self.nvgre_checksum(outer_l3_type = "IPv6", inner_l3_type="IPv6", outer_vlan=1, inner_l4_invalid=1, inner_l4_type='SCTP') + def test_nvgre_ipv4(self): """ verify nvgre packet with ipv4 -- 1.8.3.1