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 415A3A04EF; Mon, 1 Jun 2020 16:49:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1FF8B1C118; Mon, 1 Jun 2020 16:49:30 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 99C2F1BF74 for ; Mon, 1 Jun 2020 16:49:27 +0200 (CEST) IronPort-SDR: K6fWka0jwpUBpV5JXDM2vFyRSiScGFBotPks7g2LrYY5+V2MV5GpQq9I1OhYuGqnCz07gXWURe tzMETMVu5xKA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jun 2020 07:49:26 -0700 IronPort-SDR: unrDRoj/3spPOmoSgSPtBgLgRmG/ueme6AGpQrRfK7ZrLmNM4eh+nQuDm8vdLbLdra+GKIN6J8 jeIrP2D6P3KQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,461,1583222400"; d="scan'208";a="470347884" Received: from dpdk-qifu-cxl.sh.intel.com ([10.67.119.67]) by fmsmga005.fm.intel.com with ESMTP; 01 Jun 2020 07:49:25 -0700 From: Fu Qi To: dts@dpdk.org Cc: Fu Qi Date: Mon, 1 Jun 2020 19:40:46 -0400 Message-Id: <20200601234046.81967-1-qi.fu@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1]test_plans/cvl_dcf_switch_filter_test_plan: add l2tp and esp to dcf switch filter 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" Add l2tpv3 and esp patterns to cvl dcf switch filter. Signed-off-by: Fu Qi --- .../cvl_dcf_switch_filter_test_plan.rst | 276 +++++++++++++++++- 1 file changed, 274 insertions(+), 2 deletions(-) diff --git a/test_plans/cvl_dcf_switch_filter_test_plan.rst b/test_plans/cvl_dcf_switch_filter_test_plan.rst index e22f090..9d415f7 100644 --- a/test_plans/cvl_dcf_switch_filter_test_plan.rst +++ b/test_plans/cvl_dcf_switch_filter_test_plan.rst @@ -153,8 +153,24 @@ Pattern and input set +---------------------+-------------------------------+-------------------------------------------+ | VLAN filter | VLAN filter | [VLAN] | +---------------------+-------------------------------+-------------------------------------------+ + | | MAC_IPV4_L2TPv3 | [Source IP], [Dest IP], [Session_id] | + | L2TPv3 +-------------------------------+-------------------------------------------+ + | | MAC_IPV6_L2TPv3 | [Source IP], [Dest IP], [Session_id] | + +---------------------+-------------------------------+-------------------------------------------+ + | | MAC_IPV4_ESP | [Source IP], [Dest IP], [SPI] | + | +-------------------------------+-------------------------------------------+ + | | MAC_IPV6_ESP | [Source IP], [Dest IP], [SPI] | + | +-------------------------------+-------------------------------------------+ + | | MAC_IPV4_AH | [Source IP], [Dest IP], [SPI] | + | ESP +-------------------------------+-------------------------------------------+ + | | MAC_IPV6_AH | [Source IP], [Dest IP], [SPI] | + | +-------------------------------+-------------------------------------------+ + | | MAC_IPV4_NAT-T-ESP | [Source IP], [Dest IP], [SPI] | + | +-------------------------------+-------------------------------------------+ + | | MAC_IPV6_NAT-T-ESP | [Source IP], [Dest IP], [SPI] | + +---------------------+-------------------------------+-------------------------------------------+ - + Supported function type ----------------------- @@ -1755,6 +1771,262 @@ Test case: VLAN filter send matched packets, check the packets are not to port 1. +Test case: MAC_IPV4_L2TPv3 +========================== + +1. create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / l2tpv3oip session_id is 1 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +2. send matched packets:: + + sendp([Ether(dst='00:11:22:33:44:12')/IP(src='192.168.0.2', proto=115)/L2TP('\x00\x00\x00\x01')/('X'*480)], iface="enp27s0f0", count=1) + + check port 1 receive the packet. + send mismatched packets:: + + sendp([Ether(dst='00:11:22:33:44:12')/IP(src='192.168.0.2', proto=115)/L2TP('\x00\x00\x00\x02')/('X'*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst='00:11:22:33:44:12')/IP(src='192.168.1.2', proto=115)/L2TP('\x00\x00\x00\x01')/('X'*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst='00:11:22:33:44:12')/IP(dst='192.168.0.2', proto=115)/L2TP('\x00\x00\x00\x01')/('X'*480)], iface="enp27s0f0", count=1) + + check the packets are not to port 1. + +3. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + + +Test case: MAC_IPV6_L2TPv3 +========================== + +1. create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is 1111:2222:3333:4444:5555:6666:7777:8888 / l2tpv3oip session_id is 1 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +2. send matched packets:: + + sendp([Ether(dst='00:11:22:33:44:13')/IPv6(dst='1111:2222:3333:4444:5555:6666:7777:8888', nh=115)/L2TP('\x00\x00\x00\x01')/('X'*480)], iface="enp27s0f0", count=1) + + check port 1 receive the packet. + send mismatched packets:: + + sendp([Ether(dst='00:11:22:33:44:13')/IPv6(dst='1111:2222:3333:4444:5555:6666:7777:8888', nh=115)/L2TP('\x00\x00\x00\x02')/('X'*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst='00:11:22:33:44:13')/IPv6(dst='1111:2222:3333:4444:5555:6666:7777:9999', nh=115)/L2TP('\x00\x00\x00\x01')/('X'*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst='00:11:22:33:44:13')/IPv6(src='1111:2222:3333:4444:5555:6666:7777:8888', nh=115)/L2TP('\x00\x00\x00\x01')/('X'*480)], iface="enp27s0f0", count=1) + + check the packets are not to port 1. + +3. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + + +Test case: MAC_IPV4_ESP +======================= + +1. create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / esp spi is 1 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +2. send matched packets:: + + sendp([Ether(dst="00:11:22:33:44:13")/IP(src="192.168.0.2", proto=50)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + + check port 1 receive the packet. + send mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:13")/IP(src="192.168.0.2", proto=50)/ESP(spi=2)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:13")/IP(src="192.168.1.2", proto=50)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:13")/IP(dst="192.168.0.2", proto=50)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + + check the packets are not to port 1. + +3. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + + +Test case: MAC_IPV6_ESP +======================= + +1. create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is 1111:2222:3333:4444:5555:6666:7777:8888 / esp spi is 1 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +2. send matched packets:: + + sendp([Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888", nh=50)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + + check port 1 receive the packet. + send mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888", nh=50)/ESP(spi=2)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:9999", nh=50)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:13")/IPv6(src="1111:2222:3333:4444:5555:6666:7777:8888", nh=50)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + + check the packets are not to port 1. + +3. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + + +Test case: MAC_IPV4_AH +====================== + +1. create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / ah spi is 1 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +2. send matched packets:: + + sendp([Ether(dst="00:11:22:33:44:13")/IP(src="192.168.0.2", proto=51)/AH(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + + check port 1 receive the packet. + send mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:13")/IP(src="192.168.0.2", proto=51)/AH(spi=2)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:13")/IP(src="192.168.1.2", proto=51)/AH(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:13")/IP(dst="192.168.0.2", proto=51)/AH(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + + check the packets are not to port 1. + +3. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + + +Test case: MAC_IPV6_AH +====================== + +1. create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is 1111:2222:3333:4444:5555:6666:7777:8888 / ah spi is 1 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +2. send matched packets:: + + sendp([Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888", nh=51)/AH(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + + check port 1 receive the packet. + send mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888", nh=51)/AH(spi=2)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:9999", nh=51)/AH(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:13")/IPv6(src="1111:2222:3333:4444:5555:6666:7777:8888", nh=51)/AH(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + + check the packets are not to port 1. + +3. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + + +Test case: MAC_IPV4_NAT-T-ESP +============================= + +1. create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / udp / esp spi is 1 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +2. send matched packets:: + + sendp([Ether(dst="00:11:22:33:44:13")/IP(src="192.168.0.2")/UDP(dport=4500)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + + check port 1 receive the packet. + send mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:13")/IP(src="192.168.0.2")/UDP(dport=4500)/ESP(spi=2)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:13")/IP(src="192.168.1.2")/UDP(dport=4500)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:13")/IP(dst="192.168.0.2")/UDP(dport=4500)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + + check the packets are not to port 1. + +3. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + + +Test case: MAC_IPV6_NAT-T-ESP +============================= + +1. create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is 1111:2222:3333:4444:5555:6666:7777:8888 / udp / esp spi is 1 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +2. send matched packets:: + + sendp([Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport=4500)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + + check port 1 receive the packet. + send mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport=4500)/ESP(spi=2)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:9999")/UDP(dport=4500)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:13")/IPv6(src="1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport=4500)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + + check the packets are not to port 1. + +3. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + + Test case: negative cases ========================= @@ -1831,7 +2103,7 @@ Subcase 4: unsupported pattern in os default, but supported in comms check the rule not exists in the list. -5. repeat step 2-5 with also not supported pattern MAC_IPV4_PFCP_NODE, get the same result. +5. repeat step 2-5 with also not supported pattern MAC_IPV4_PFCP_NODE/MAC_IPV4_L2TPv3/MAC_IPV4_ESP, get the same result. Subcase 5: unsupported input set -------------------------------- -- 2.17.1