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 A19EFA0613 for ; Thu, 29 Aug 2019 09:42:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 70FD11D15C; Thu, 29 Aug 2019 09:42:16 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 157BC1D15A for ; Thu, 29 Aug 2019 09:42:14 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Aug 2019 00:42:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,442,1559545200"; d="scan'208";a="356374468" Received: from unknown (HELO dpdktestzhiwei.sh.intel.com) ([10.67.119.33]) by orsmga005.jf.intel.com with ESMTP; 29 Aug 2019 00:42:13 -0700 From: "zhiwei.he" To: dts@dpdk.org Cc: "zhiwei.he" Date: Thu, 29 Aug 2019 15:42:29 +0800 Message-Id: <1567064549-45272-1-git-send-email-zhiwei.he@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH] tests/TestSuite_nvgre: Enable CVL25Gand100gNIC and change no vec model configuration 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 | 86 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 73 insertions(+), 13 deletions(-) diff --git a/tests/TestSuite_nvgre.py b/tests/TestSuite_nvgre.py index b0500cc..58335f9 100644 --- a/tests/TestSuite_nvgre.py +++ b/tests/TestSuite_nvgre.py @@ -365,6 +365,8 @@ class TestNvgre(TestCase): 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