From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2FB7AA0352; Fri, 17 Dec 2021 10:35:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 16F6E40143; Fri, 17 Dec 2021 10:35:23 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 25B8A4013F for ; Fri, 17 Dec 2021 10:35:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1639733722; x=1671269722; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=YNYmkuzXM+7ZO1q2PSnsebL+w6yLjAtnn6xp6ahMRU4=; b=bwFMHPS7EWNjAV2vnCNWPR0rZcJfXtNPoU2BGMrzvyOGwALQB9c8O1IO FpKYdt5kqdoM/55fjNxia8Ov5AYQ2L/CaeQ2dYt/HBvJ1YEXW7oIKnOun tcJzpE7RFGUAkr4qzlgH3IshabEjGxXT6RadRUEN/MaAbS3dzA0WSH8Uq zmNZQA+JUquNFFUUj//6MudQIC2+Dd9QJRg9+yrfZWOk0YHq42GEErP56 Szzfx8PlpYD7yTNus25NBNkzaV8U1j+YkuozhI5uq8b5tCSuO6zeKCdku +2vqUTe3FhhJeGGj2ZCIa5R/qzNUtLNWLwMhwsMDEwQlV+l8aL3xrYSmz Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10200"; a="219735021" X-IronPort-AV: E=Sophos;i="5.88,213,1635231600"; d="scan'208";a="219735021" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Dec 2021 01:35:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,213,1635231600"; d="scan'208";a="519676519" Received: from dpdk-yaqi.sh.intel.com ([10.67.119.78]) by orsmga008.jf.intel.com with ESMTP; 17 Dec 2021 01:35:09 -0800 From: Yaqi Tang To: dts@dpdk.org Cc: Yaqi Tang Subject: [dts][PATCH V2] tests/cvl_qinq: add test cases for cvl qinq switch filter support l4 Date: Fri, 17 Dec 2021 17:33:17 +0000 Message-Id: <20211217173317.619306-1-yaqi.tang@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 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 CVL Support l4 for QinQ switch filter in DCF driver, and port can support as eth / vlan / vlan / IP / tcp|udp. Signed-off-by: Yaqi Tang Tested-by: Yaqi Tang < yaqi.tang@intel.com> --- tests/TestSuite_cvl_qinq.py | 91 ++++++++++++++++++++++++++++++++++++- 1 file changed, 90 insertions(+), 1 deletion(-) diff --git a/tests/TestSuite_cvl_qinq.py b/tests/TestSuite_cvl_qinq.py index 39d590f6..58b900e2 100644 --- a/tests/TestSuite_cvl_qinq.py +++ b/tests/TestSuite_cvl_qinq.py @@ -215,6 +215,77 @@ mac_qinq_pppoe_ipv6_dest_mac = { mac_qinq_pppoe_ipv6 = [mac_qinq_pppoe_ipv6_src_ip, mac_qinq_pppoe_ipv6_dst_ip, mac_qinq_pppoe_ipv6_dest_mac] +#Non-pipeline mode +tv_mac_qinq_ipv4 = { + 'name': 'tv_mac_qinq_ipv4', + 'rule': 'flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 2 / vlan tci is 1 / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions vf id 1 / end', + 'scapy_str': {'matched': ['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/("X"*80)'], + 'mismatched': ['Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/("X"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/("X"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x2,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/("X"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP(src="192.168.1.3", dst="192.168.1.2")/("X"*80)']}, + 'check_param': {'port_id': 1} +} + +tv_mac_qinq_ipv6 = { + 'name': 'tv_mac_qinq_ipv6', + 'rule': 'flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 2 / vlan tci is 1 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions vf id 1 / end', + 'scapy_str': {'matched': ['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*80)'], + 'mismatched': ['Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x2,type=0x0800)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/("X"*80)']}, + 'check_param': {'port_id': 1} +} + +tv_mac_qinq_ipv4_udp = { + 'name': 'tv_mac_qinq_ipv4_udp', + 'rule': 'flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 2 / vlan tci is 1 / ipv4 / udp src is 50 dst is 23 / end actions vf id 1 / end', + 'scapy_str': {'matched': ['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP()/UDP(sport=50,dport=23)/("X"*80)'], + 'mismatched': ['Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP()/UDP(sport=50,dport=23)/("X"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP()/UDP(sport=50,dport=23)/("X"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x2,type=0x0800)/IP()/UDP(sport=50,dport=23)/("X"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP()/UDP(sport=50,dport=22)/("X"*80)']}, + 'check_param': {'port_id': 1} +} + +tv_mac_qinq_ipv4_tcp = { + 'name': 'tv_mac_qinq_ipv4_tcp', + 'rule': 'flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 2 / vlan tci is 1 / ipv4 / tcp src is 50 dst is 23 / end actions vf id 1 / end', + 'scapy_str': {'matched': ['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP()/TCP(sport=50,dport=23)/("X"*80)'], + 'mismatched': ['Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP()/TCP(sport=50,dport=23)/("X"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP()/TCP(sport=50,dport=23)/("X"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x2,type=0x0800)/IP()/TCP(sport=50,dport=23)/("X"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP()/TCP(sport=50,dport=22)/("X"*80)']}, + 'check_param': {'port_id': 1} +} + +tvs_mac_l4_qinq_dcf_non_pipeline_mode = [tv_mac_qinq_ipv4, tv_mac_qinq_ipv6, tv_mac_qinq_ipv4_udp, tv_mac_qinq_ipv4_tcp] + +#Pipeline mode +tv_mac_qinq_ipv6_udp = { + 'name': 'tv_mac_qinq_ipv6_udp', + 'rule': 'flow create 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 2 / vlan tci is 1 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / udp src is 50 dst is 23 / end actions vf id 1 / end', + 'scapy_str': {'matched': ['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=50,dport=23)/("X"*80)'], + 'mismatched': ['Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=50,dport=23)/("X"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=50,dport=23)/("X"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x2,type=0x0800)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=50,dport=23)/("X"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=50,dport=22)/("X"*80)']}, + 'check_param': {'port_id': 1} +} + +tv_mac_qinq_ipv6_tcp = { + 'name': 'tv_mac_qinq_ipv6_tcp', + 'rule': 'flow create 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 2 / vlan tci is 1 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / tcp src is 50 dst is 23 / end actions vf id 1 / end', + 'scapy_str': {'matched': ['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=50,dport=23)/("X"*80)'], + 'mismatched': ['Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=50,dport=23)/("X"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=50,dport=23)/("X"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x2,type=0x0800)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=50,dport=23)/("X"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=50,dport=22)/("X"*80)']}, + 'check_param': {'port_id': 1} +} + +tvs_mac_l4_qinq_dcf_pipeline_mode = [tv_mac_qinq_ipv6_udp, tv_mac_qinq_ipv6_tcp] class TestCvlQinq(TestCase): @@ -505,6 +576,24 @@ class TestCvlQinq(TestCase): self.launch_testpmd() self._rte_flow_validate_pattern(mac_qinq_pppoe_ipv6) + @skip_unsupported_pkg('os default') + def test_mac_l4_qinq_dcf_non_pipeline_mode(self): + """ + DCF switch for MAC_L4_QINQ + """ + self.setup_pf_vfs_env() + self.launch_testpmd() + self._rte_flow_validate_pattern(tvs_mac_l4_qinq_dcf_non_pipeline_mode) + + @skip_unsupported_pkg('os default') + def test_mac_l4_qinq_dcf_pipeline_mode(self): + """ + DCF switch for MAC_L4_QINQ_IPV6 + """ + self.setup_pf_vfs_env() + self.launch_testpmd() + self._rte_flow_validate_pattern(tvs_mac_l4_qinq_dcf_pipeline_mode) + def reset_vf(self): self.pmd_output.execute_cmd("port stop 2") self.pmd_output.execute_cmd("port reset 2") @@ -875,4 +964,4 @@ class TestCvlQinq(TestCase): self.destroy_iavf() def tear_down_all(self): - self.dut.send_expect('ethtool --set-priv-flags %s vf-vlan-prune-disable off' % self.pf_interface, '#') \ No newline at end of file + self.dut.send_expect('ethtool --set-priv-flags %s vf-vlan-prune-disable off' % self.pf_interface, '#') -- 2.25.1