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 3E47FA04F3; Thu, 2 Jan 2020 14:28:25 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EBD041C08E; Thu, 2 Jan 2020 14:28:24 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id C0F761C044 for ; Thu, 2 Jan 2020 14:28:22 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jan 2020 05:28:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,387,1571727600"; d="scan'208";a="419728570" Received: from unknown (HELO dpdktestzhiwei.sh.intel.com) ([10.67.119.33]) by fmsmga005.fm.intel.com with ESMTP; 02 Jan 2020 05:28:20 -0800 From: "zhiwei.he" To: dts@dpdk.org Cc: "zhiwei.he" Date: Thu, 2 Jan 2020 21:28:32 +0800 Message-Id: <1577971712-26414-1-git-send-email-zhiwei.he@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH V1] test_plans: add IPV4 IPV6 tcp udp switchfilter non pipline mode case for CVL 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 --- test_plans/cvl_switch_filter_test_plan.rst | 218 +++++++++++++++++++++++++++-- 1 file changed, 207 insertions(+), 11 deletions(-) diff --git a/test_plans/cvl_switch_filter_test_plan.rst b/test_plans/cvl_switch_filter_test_plan.rst index 6537a77..43f5930 100644 --- a/test_plans/cvl_switch_filter_test_plan.rst +++ b/test_plans/cvl_switch_filter_test_plan.rst @@ -64,28 +64,30 @@ Pattern and input set | Packet Types | Pattern +-------------------------------------------+-------------------------------------------+ | | | non-pipeline mode | pipeline mode | +=====================+===============================+===========================================+===========================================+ - | | MAC_IPV4_FRAG | | [Source IP], [Dest IP], | + | | MAC_IPV4_FRAG | N/A | [Source IP], [Dest IP], | | | | | [DSCP] | | +-------------------------------+-------------------------------------------+-------------------------------------------+ - | | MAC_IPV4_PAY | | [Source IP], [Dest IP], | + | | MAC_IPV4_PAY | [Source IP], [Dest IP],[TOS],[TTL] | [Source IP], [Dest IP], | | | | | [IP protocol], [DSCP] | | +-------------------------------+-------------------------------------------+-------------------------------------------+ - | | MAC_IPV4_UDP_PAY | | [Source IP], [Dest IP], | - | | | | [DSCP], | + | | MAC_IPV4_UDP_PAY | [Source IP], [Dest IP],[TOS],[TTL], | [Source IP], [Dest IP], | + | | | [Source Port],[Dest Port] | [DSCP], | | | | | [Source Port], [Dest Port] | | +-------------------------------+-------------------------------------------+-------------------------------------------+ - | IPv4/IPv6 + TCP/UDP | MAC_IPV4_TCP | | [Source IP], [Dest IP], | - | | | | [DSCP], | + | IPv4/IPv6 + TCP/UDP | MAC_IPV4_TCP | [Source IP], [Dest IP],[TOS],[TTL], | [Source IP], [Dest IP], | + | | | [Source Port],[Dest Port] | [DSCP], | | | | | [Source Port], [Dest Port] | | +-------------------------------+-------------------------------------------+-------------------------------------------+ - | | MAC_IPV6_FRAG | | [Source IP], [Dest IP], | + | | MAC_IPV6_FRAG | [Source IP], [Dest IP] | [Source IP], [Dest IP], | | | | | [TC] | | +-------------------------------+-------------------------------------------+-------------------------------------------+ - | | MAC_IPV6_UDP_PAY | | [Source IP], [Dest IP], | + | | MAC_IPV6_UDP_PAY | [Source IP], [Dest IP],[TOS],[TTL], | [Source IP], [Dest IP], | + | | | [Source Port],[Dest Port] | [Source IP], [Dest IP], | | | | | [TC], | | | | | [Source Port], [Dest Port] | | +-------------------------------+-------------------------------------------+-------------------------------------------+ - | | MAC_IPV6_TCP | | [Source IP], [Dest IP], | + | | MAC_IPV6_TCP | [Source IP], [Dest IP],[TOS],[TTL], | [Source IP], [Dest IP], | + | | | [Source Port],[Dest Port] | [Source IP], [Dest IP], | | | | | [TC], | | | | | [Source Port], [Dest Port] | +---------------------+-------------------------------+-------------------------------------------+-------------------------------------------+ @@ -3552,8 +3554,8 @@ verify this packet not dropped verify the rule does not exist, and send matched packets, the packets are not to the corresponding queues. -Test case: Non-tunnel pipeline mode -=================================== +Test case: IPv4/IPv6 + TCP/UDP pipeline mode +============================================ 1. create switch filter rules and verify @@ -4471,3 +4473,197 @@ verify this packet not dropped testpmd> flow list 0 verify the rule does not exist, and send matched packets, the packets are not to the corresponding queues. + +Test case: IPv4/IPv6 + TCP/UDP non-pipeline mode +================================================ + +1. create fdir rules to make the fdir table full, + which can be created as follows:: + + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.0 dst is 192.1.0.0 tos is 4 / tcp src is 25 dst is 23 / end actions queue index 5 / end + +2. create switch filter rules and verify + +* MAC_IPV4_PAY + +1) to queue action + +create a rule:: + + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 2 / end actions queue index 4 / end + +send matched packets:: + + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=2)/("X"*480)], iface="enp27s0f2", count=100) + +verify these 100 packets to queue 4 + +2) drop action + +create a rule:: + + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.3 tos is 4 ttl is 2 / end actions drop / end + +send matched packets:: + + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.3",tos=4,ttl=2)/("X"*480)], iface="enp27s0f2", count=100) + +verify theses 100 packets dropped + +* MAC_IPV4_UDP_PAY + +1) to queue action + +create a rule:: + + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions queue index 2 / end + +send matched packets:: + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/UDP(sport=25,dport=23)/("X"*480)], iface="enp27s0f2", count=100) + +verify these 100 packets to queue 2 + +2) drop action + +create a rule:: + + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.3 tos is 4 / udp src is 25 dst is 23 / end actions drop / end + +send matched packets:: + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.3",tos=4)/UDP(sport=25,dport=23)/("X"*480)], iface="enp27s0f2", count=100) + +verify theses 100 packets dropped + +* MAC_IPV4_TCP_PAY + +1) to queue action + +create a rule:: + + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.32 tos is 4 / tcp src is 25 dst is 23 / end actions queue index 3 / end + +send matched packets:: + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.32",tos=4)/TCP(sport=25,dport=23)/("X"*480)], iface="enp27s0f2", count=100) + +verify these 100 packets to queue 3 + +2) drop action + +create a rule:: + + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.3 tos is 4 / tcp src is 25 dst is 23 / end actions drop / end + +send matched packets:: + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.3",tos=4)/TCP(sport=25,dport=23)/("X"*480)], iface="enp27s0f2", count=100) + +verify theses 100 packets dropped + + +* MAC_IPV6_PAY + +1) to queue action + +create a rule:: + + testpmd> flow create 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions queue index 8 / end + +send matched packets:: + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)], iface="enp27s0f2", count=100) + +verify these 100 packets to queue 8 + +2) drop action + +create a rule:: + + testpmd> flow create 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1537 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions drop / end + +send matched packets:: + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)], iface="enp27s0f2", count=100) + +verify theses 100 packets dropped + +* MAC_IPV6_FRAG + +1) to queue action + +create a rule:: + + testpmd> flow create 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / end actions queue index 10 / end + +send matched packets:: + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/("X"*480)], iface="enp27s0f2", count=100) + +verify these 100 packets to queue 10 + +2) drop action + +create a rule:: + + testpmd> flow create 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2023 / end actions drop / end + +send matched packets:: + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/IPv6ExtHdrFragment()/("X"*480)], iface="enp27s0f2", count=100) + +verify theses 100 packets dropped + +* MAC_IPV6_UDP + +1) to queue action + +create a rule:: + + testpmd> flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is CDCD:910A:2222:5498:8475:1111:3900:1518 / udp src is 25 dst is 23 / end actions queue index 6 / end + +send matched packets:: + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=25,dport=23)/("X"*480)], iface="enp27s0f2", count=100) + +verify these 100 packets to queue 6 + +2) drop action + +create a rule:: + + testpmd> flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is CDCD:910A:2222:5498:8475:1111:3900:1528 / udp src is 25 dst is 23 / end actions drop / end + +send matched packets:: + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1528", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=25,dport=23)/("X"*480)], iface="enp27s0f2", count=100) + +verify theses 100 packets dropped + +* MAC_IPV6_TCP + +1) to queue action + +create a rule:: + + testpmd> flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is CDCD:910A:2222:5498:8475:1111:3900:1515 / tcp / end actions queue index 12 / end + +send matched packets:: + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP()/("X"*480)], iface="enp27s0f2", count=100) + +verify these 100 packets to queue 12 + +2) drop action + +create a rule:: + + testpmd> flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is CDCD:910A:2222:5498:8475:1111:3900:1516 / tcp / end actions drop / end + +send matched packets:: + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1516", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP()/("X"*480)], iface="enp27s0f2", count=100) + +verify theses 100 packets dropped + +3. verify rules can be listed and destroyed:: + + testpmd> flow list 0 + + verify the rule exists in the list. + destroy the rule, suppose the rule number is 0:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + verify the rule does not exist, and send matched packets, the packets are not to the corresponding queues. + -- 1.8.3.1