From patchwork Mon Aug 16 15:45:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sun, QinX" X-Patchwork-Id: 96944 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E8405A0C47; Mon, 16 Aug 2021 09:12:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DFD924113D; Mon, 16 Aug 2021 09:12:50 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 0E0514003C for ; Mon, 16 Aug 2021 09:12:48 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10077"; a="279550939" X-IronPort-AV: E=Sophos;i="5.84,324,1620716400"; d="scan'208";a="279550939" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2021 00:12:48 -0700 X-IronPort-AV: E=Sophos;i="5.84,324,1620716400"; d="scan'208";a="530256053" Received: from unknown (HELO cvl_tetser_105.icx.intel.com) ([10.240.183.105]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2021 00:12:46 -0700 From: Qin Sun To: dts@dpdk.org Cc: xueqin.lin@intel.com, Qin Sun Date: Mon, 16 Aug 2021 15:45:19 +0000 Message-Id: <20210816154520.9805-2-qinx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210816154520.9805-1-qinx.sun@intel.com> References: <20210816154520.9805-1-qinx.sun@intel.com> Subject: [dts] [PATCH V1 1/2] test_plans/iavf_fdir: add gre inner fdir cases for iavf 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 Sender: "dts" as dpdk enable iavf GRE tunnel feature, so add iavf fdir inner related cases, supported pattern: IPV4/IPV6+GRE+IPV4/IPV6+TCP/UDP, total 12 new cases Signed-off-by: Qin Sun Acked-by: Xueqin Lin --- test_plans/iavf_fdir_test_plan.rst | 684 ++++++++++++++++++++++++++++- 1 file changed, 683 insertions(+), 1 deletion(-) diff --git a/test_plans/iavf_fdir_test_plan.rst b/test_plans/iavf_fdir_test_plan.rst index ac423903..c7b8bc97 100644 --- a/test_plans/iavf_fdir_test_plan.rst +++ b/test_plans/iavf_fdir_test_plan.rst @@ -39,6 +39,7 @@ Enable fdir filter for IPv4/IPv6 + TCP/UDP/SCTP (OS default package) Enable fdir filter for GTP (comm #1 package) Enable fdir filter for L2 Ethertype (comm #1 package) Enable fdir filter for PFCP (comm #1 package) +Enable fdir filter for IPv4/IPv6 + GRE + IPV4/IPV6 + TCP/UDP Description =========== @@ -147,6 +148,38 @@ Pattern and input set +------------------------------+------------------------------+-------------------------------------------------------------------+ | |MAC_IPV4_GTPU_EH_UL_IPV6_TCP | inner:[Source IPv6], [Dest IPv6], [Source Port], [Dest Port] | +------------------------------+------------------------------+-------------------------------------------------------------------+ + | IPV4/IPV6+GRE+IPV4/IPV6 |MAC_IPV4_GRE_IPV4 | [Inner Source IP], [Inner Dest IP], [Inner DSCP] | + +------------------------------+------------------------------+-------------------------------------------------------------------+ + | |MAC_IPV6_GRE_IPV4 | [Inner Source IP], [Inner Dest IP], [Inner DSCP] | + +------------------------------+------------------------------+-------------------------------------------------------------------+ + | |MAC_IPV4_GRE_IPV6 | [Inner Source IP], [Inner Dest IP], [Inner TC] | + +------------------------------+------------------------------+-------------------------------------------------------------------+ + | |MAC_IPV6_GRE_IPV6 | [Inner Source IP], [Inner Dest IP], [Inner TC] | + +------------------------------+------------------------------+-------------------------------------------------------------------+ + | IPV4/IPV6+GRE+IPV4/IPV6+TCP |MAC_IPV4_GRE_IPV4_TCP | [Inner Source IP], [Inner Dest IP], [Inner DSCP], | + | | | [Inner Source Port], [Inner Dest Port] | + +------------------------------+------------------------------+-------------------------------------------------------------------+ + | |MAC_IPV6_GRE_IPV4_TCP | [Inner Source IP], [Inner Dest IP], [Inner DSCP], | + | | | [Inner Source Port], [Inner Dest Port] | + +------------------------------+------------------------------+-------------------------------------------------------------------+ + | |MAC_IPV4_GRE_IPV6_TCP | [Inner Source IP], [Inner Dest IP], [Inner TC], | + | | | [Inner Source Port], [Inner Dest Port] | + +------------------------------+------------------------------+-------------------------------------------------------------------+ + | |MAC_IPV6_GRE_IPV6_TCP | [Inner Source IP], [Inner Dest IP], [Inner TC], | + | | | [Inner Source Port], [Inner Dest Port] | + +------------------------------+------------------------------+-------------------------------------------------------------------+ + | IPV4/IPV6+GRE+IPV4/IPV6+UDP |MAC_IPV4_GRE_IPV4_UDP | [Inner Source IP], [Inner Dest IP], [Inner DSCP], | + | | | [Inner Source Port], [Inner Dest Port] | + +------------------------------+------------------------------+-------------------------------------------------------------------+ + | |MAC_IPV6_GRE_IPV4_UDP | [Inner Source IP], [Inner Dest IP], [Inner DSCP], | + | | | [Inner Source Port], [Inner Dest Port] | + +------------------------------+------------------------------+-------------------------------------------------------------------+ + | |MAC_IPV4_GRE_IPV6_UDP | [Inner Source IP], [Inner Dest IP], [Inner TC], | + | | | [Inner Source Port], [Inner Dest Port] | + +------------------------------+------------------------------+-------------------------------------------------------------------+ + | |MAC_IPV6_GRE_IPV6_UDP | [Inner Source IP], [Inner Dest IP], [Inner TC], | + | | | [Inner Source Port], [Inner Dest Port] | + +------------------------------+------------------------------+-------------------------------------------------------------------+ Supported function type @@ -1006,6 +1039,69 @@ Send packets pkt16 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header()/GTPPDUSessionContainer(type=1)/IPv6(src="2001::2", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/Raw('x'*20) pkt17 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header()/GTPPDUSessionContainer(type=1)/IP()/UDP(sport=22, dport=23)/Raw('x'*20) +* MAC_IPV4_GRE_IPV4 + + matched packets:: + + sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(src="192.168.0.20",dst="192.168.0.21", tos=4)/Raw('x' * 80)],iface="enp134s0f1") + + mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(src="192.168.0.22",dst="192.168.0.21", tos=4)/Raw('x' * 80)],iface="enp134s0f1") + sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(src="192.168.0.20",dst="192.168.0.23", tos=4)/Raw('x' * 80)],iface="enp134s0f1") + sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(src="192.168.0.20",dst="192.168.0.21", tos=8)/Raw('x' * 80)],iface="enp134s0f1") + +* MAC_IPV6_GRE_IPV4 + + matched packets:: + + sendp([Ether(dst="00:11:22:33:44:55")/IPv6()/GRE()/IP(src="192.168.0.20",dst="192.168.0.21", tos=4)/Raw('x' * 80)],iface="enp134s0f1") + + mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:55")/IPv6()/GRE()/IP(src="192.168.0.22",dst="192.168.0.21", tos=4)/Raw('x' * 80)],iface="enp134s0f1") + sendp([Ether(dst="00:11:22:33:44:55")/IPv6()/GRE()/IP(src="192.168.0.20",dst="192.168.0.23", tos=4)/Raw('x' * 80)],iface="enp134s0f1") + sendp([Ether(dst="00:11:22:33:44:55")/IPv6()/GRE()/IP(src="192.168.0.20",dst="192.168.0.21", tos=8)/Raw('x' * 80)],iface="enp134s0f1") + +* MAC_IPV4_GRE_IPV6 + + matched packets:: + + sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::2", tc=1)/Raw('x' * 80)],iface="enp134s0f1") + + mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2021", src="2001::2", tc=1)/Raw('x' * 80)],iface="enp134s0f1") + sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::3", tc=1)/Raw('x' * 80)],iface="enp134s0f1") + sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::2", tc=2)/Raw('x' * 80)],iface="enp134s0f1") + +* MAC_IPV4_GRE_IPV4_TCP + + matched packets:: + + sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(src="192.168.0.20",dst="192.168.0.21", tos=4)/TCP(sport=22,dport=23)/Raw('x' * 80)],iface="enp134s0f1") + + mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(src="192.168.0.22",dst="192.168.0.21", tos=4)/TCP(sport=22,dport=23)/Raw('x' * 80)],iface="enp134s0f1") + sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(src="192.168.0.20",dst="192.168.0.23", tos=4)/TCP(sport=22,dport=23)/Raw('x' * 80)],iface="enp134s0f1") + sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(src="192.168.0.20",dst="192.168.0.21", tos=8)/TCP(sport=22,dport=23)/Raw('x' * 80)],iface="enp134s0f1") + sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(src="192.168.0.20",dst="192.168.0.21", tos=4)/TCP(sport=21,dport=23)/Raw('x' * 80)],iface="enp134s0f1") + sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(src="192.168.0.20",dst="192.168.0.21", tos=4)/TCP(sport=22,dport=24)/Raw('x' * 80)],iface="enp134s0f1") + +* MAC_IPV4_GRE_IPV6_TCP + + matched packets:: + + sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::2", tc=1)/TCP(sport=22,dport=23)/Raw('x' * 80)],iface="enp134s0f1") + + mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2021", src="2001::2", tc=1)/TCP(sport=22,dport=23)/Raw('x' * 80)],iface="enp134s0f1") + sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::3", tc=1)/TCP(sport=22,dport=23)/Raw('x' * 80)],iface="enp134s0f1") + sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::2", tc=2))/TCP(sport=22,dport=23)Raw('x' * 80)],iface="enp134s0f1") + sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::2", tc=1)/TCP(sport=21,dport=23)/Raw('x' * 80)],iface="enp134s0f1") + sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::2", tc=1)/TCP(sport=22,dport=24)/Raw('x' * 80)],iface="enp134s0f1") Test case: flow validation ========================== @@ -6429,4 +6525,590 @@ packets:: pkt11 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header()/GTPPDUSessionContainer(type=1)/IPv6(src="2001::2", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22, dport=23)/Raw('x'*20) pkt12 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header()/GTPPDUSessionContainer(type=1)/IPv6(src="2001::2", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22, dport=23)/Raw('x'*20) -repeat step 1-12 of subcase 1. \ No newline at end of file +repeat step 1-12 of subcase 1. + +Test case: MAC_IPV4_GRE_IPV4 pattern +==================================== + +Subcase 1: MAC_IPV4_GRE_IPV4 queue index +---------------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 / gre / ipv4 src is 192.168.0.20 dst is 192.168.0.21 tos is 4 / end actions queue index 1 / end + +2. send matched packets, check the packets are distributed to queue 1 without FDIR matched ID. + send mismatched packets, check the packets are not distributed to queue 1 without FDIR matched ID. + +3. verify rules can be listed and destroyed:: + + testpmd> flow list 0 + + check the rule listed. + destroy the rule:: + + testpmd> flow destroy 0 rule 0 + +4. verify matched packets are not distributed to queue 1 without FDIR matched ID. + check there is no rule listed. + +Subcase 2: MAC_IPV4_GRE_IPV4 rss queues +--------------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 / gre / ipv4 src is 192.168.0.20 dst is 192.168.0.21 tos is 4 / end actions rss queues 2 3 end / end + +2. send matched packets, check the packets are distributed to queue 2 or 3 without FDIR matched ID. + send mismatched packets, check the packets are not distributed to queue 2 or 3 without FDIR matched ID. + +3. repeat step 3 of subcase 1. + +4. verify matched packets are not distributed to queue 2 or 3 without FDIR matched ID. + check there is no rule listed. + +Subcase 3: MAC_IPV4_GRE_IPV4 passthru +------------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 / gre / ipv4 src is 192.168.0.20 dst is 192.168.0.21 tos is 4 / end actions passthru / end + +2. send matched packets, check the packets are distributed by RSS without FDIR matched ID. + send mismatched packets, check the packets are distributed by RSS without FDIR matched ID. + +3. repeat step 3 of subcase 1. + +4. verify matched packets are distributed to the same queue without FDIR matched ID=0x0. + check there is no rule listed. + +Subcase 4: MAC_IPV4_GRE_IPV4 drop +--------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 / gre / ipv4 src is 192.168.0.20 dst is 192.168.0.21 tos is 4 / end actions drop / end + +2. send matched packets, check the packets are dropped + send mismatched packets, check the packets are not dropped. + +3. repeat step 3 of subcase 1. + +4. verify matched packets are not dropped. + check there is no rule listed. + +Subcase 5: MAC_IPV4_GRE_IPV4 mark+rss +------------------------------------- +Note: This combined action is mark with RSS which is without queues specified. + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 / gre / ipv4 src is 192.168.0.20 dst is 192.168.0.21 tos is 4 / end actions mark / rss / end + +2. send matched packets, check the packets are distributed by RSS with FDIR matched ID=0x0 + send mismatched packets, check the packets are distributed by RSS without FDIR matched ID. + +3. repeat step 3 of subcase 1. + +4. verify matched packets are distributed to the same queue without FDIR matched ID. + check there is no rule listed. + +Subcase 6: MAC_IPV4_GRE_IPV4 mark +--------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 / gre / ipv4 src is 192.168.0.20 dst is 192.168.0.21 tos is 4 / end actions mark / end + +2. send matched packets, check the packets are distributed by RSS with FDIR matched ID=0x0. + send mismatched packets, check the packets are distributed by RSS without FDIR matched ID. + +3. repeat step 3 of subcase 1. + +4. verify matched packets are distributed to the same queue without FDIR matched ID. + check there is no rule listed. + +Test case: MAC_IPV6_GRE_IPV4 pattern +==================================== + +Subcase 1: MAC_IPV6_GRE_IPV4 queue index +---------------------------------------- + +Subcase 2: MAC_IPV6_GRE_IPV4 rss queues +--------------------------------------- + +Subcase 3: MAC_IPV6_GRE_IPV4 passthru +------------------------------------- + +Subcase 4: MAC_IPV6_GRE_IPV4 drop +--------------------------------- + +Subcase 5: MAC_IPV6_GRE_IPV4 mark+rss +------------------------------------- + +Subcase 6: MAC_IPV6_GRE_IPV4 mark +--------------------------------- + +each subcase is the same as the subcase of Test case: MAC_IPV4_GRE_IPV4 pattern, just only pattern is different, +replace it with 'eth / ipv6 / gre / ipv4' + +Test case: MAC_IPV4_GRE_IPV6 pattern +==================================== + +Subcase 1: MAC_IPV4_GRE_IPV6 queue index +---------------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 / gre / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 tc is 1 / end actions queue index 15 / mark / end + +2. send matched packets, check the packets is distributed to queue 15 with FDIR matched ID=0x0. + send mismatched packets, check the packets are distributed by RSS without FDIR matched ID. + +3. verify rules can be listed and destroyed:: + + testpmd> flow list 0 + + check the rule listed. + destroy the rule:: + + testpmd> flow destroy 0 rule 0 + +4. verify matched packet is distributed by RSS without FDIR matched ID. + check there is no rule listed. + +Subcase 2: MAC_IPV4_GRE_IPV6 rss queues +--------------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 / gre / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 tc is 1 / end actions rss queues 8 9 10 11 12 13 14 15 end / mark id 1/ end + +2. send matched packets, check the packets is distributed to queue 8-15 with FDIR matched ID=0x1. + send mismatched packets, check the packets are distributed by RSS without FDIR matched ID. + +3. repeat step 3 of subcase 1. + +4. verify matched packet is distributed by RSS without FDIR matched ID. + check there is no rule listed. + +Subcase 3: MAC_IPV4_GRE_IPV6 passthru +------------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 / gre / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 tc is 1 / end actions passthru / mark / end + +2. send matched packets, check the packets are distributed by RSS with FDIR matched ID=0x0. + send mismatched packets, check the packets are distributed by RSS without FDIR matched ID. + +3. repeat step 3 of subcase 1. + +4. verify matched packets are destributed to the same queue without FDIR matched ID . + check there is no rule listed. + +Subcase 4: MAC_IPV4_GRE_IPV6 drop +--------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 / gre / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 tc is 1 / end actions drop / end + +2. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +3. repeat step 3 of subcase 1. + +4. verify matched packet is dropped. + check there is no rule listed. + +Subcase 5: MAC_IPV4_GRE_IPV6 mark+rss +------------------------------------- +Note: This combined action is mark with RSS which is without queues specified. + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 / gre / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 tc is 1 / end actions mark / rss / end + +2. send matched packets, check the packets are distributed by RSS with FDIR matched ID=0x0 + send mismatched packets, check the packets are distributed by RSS without FDIR matched ID. + +3. repeat step 3 of subcase 1. + +4. verify matched packets are distributed to the same queue without FDIR matched ID. + check there is no rule listed. + +Subcase 6: MAC_IPV4_GRE_IPV6 mark +--------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 / gre / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 tc is 1 / end actions mark / end + +2. send matched packets, check the packets are distributed by RSS with FDIR matched ID=0x0. + send mismatched packets, check the packets are distributed by RSS without FDIR matched ID. + +3. repeat step 3 of subcase 1. + +4. verify matched packets are destributed to the same queue without FDIR matched ID . + check there is no rule listed. + +Test case: MAC_IPV6_GRE_IPV6 pattern +==================================== + +Subcase 1: MAC_IPV6_GRE_IPV6 queue index +---------------------------------------- + +Subcase 2: MAC_IPV6_GRE_IPV6 rss queues +--------------------------------------- + +Subcase 3: MAC_IPV6_GRE_IPV6 passthru +------------------------------------- + +Subcase 4: MAC_IPV6_GRE_IPV6 drop +--------------------------------- + +Subcase 5: MAC_IPV4_GRE_IPV6 mark+rss +------------------------------------- + +Subcase 6: MAC_IPV6_GRE_IPV6 mark +--------------------------------- + +each subcase is the same as the subcase of Test case: MAC_IPV4_GRE_IPV6 pattern, just only pattern is different, +replace it with 'eth / ipv6 / gre / ipv6' + +Test case: MAC_IPV4_GRE_IPV4_TCP pattern +======================================== + +Subcase 1: MAC_IPV4_GRE_IPV4_TCP queue index +-------------------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 / gre / ipv4 src is 192.168.0.20 dst is 192.168.0.21 tos is 4 / tcp src is 22 dst is 23 / end actions queue index 1 / mark id 0 / end + +2. send matched packets, check the packets is distributed to queue 1 with FDIR matched ID=0x0. + send mismatched packets, check the packets are distributed by RSS without FDIR matched ID. + +3. verify rules can be listed and destroyed:: + + testpmd> flow list 0 + + check the rule listed. + destroy the rule:: + + testpmd> flow destroy 0 rule 0 + +4. verify matched packet is distributed by RSS without FDIR matched ID. + check there is no rule listed. + +Subcase 2: MAC_IPV4_GRE_IPV4_TCP rss queues +------------------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 / gre / ipv4 src is 192.168.0.20 dst is 192.168.0.21 tos is 4 / tcp src is 22 dst is 23 / end actions rss queues 1 2 3 4 end / mark id 4294967294 / end + +2. send matched packets, check the packets is distributed to queue 1-4 with FDIR matched ID=0xfffffffe. + send mismatched packets, check the packets are distributed by RSS without FDIR matched ID. + +3. repeat step 3 of subcase 1. + +4. verify matched packet is distributed by RSS without FDIR matched ID. + check there is no rule listed. + +Subcase 3: MAC_IPV4_GRE_IPV4_TCP passthru +----------------------------------------- + +1. create filter rule with mark:: + + flow create 0 ingress pattern eth / ipv4 / gre / ipv4 src is 192.168.0.20 dst is 192.168.0.21 tos is 4 / tcp src is 22 dst is 23 / end actions passthru / mark id 1 / end + +2. send matched packets, check the packets are distributed by RSS with FDIR matched ID=0x1. + send mismatched packets, check the packets are distributed by RSS without FDIR matched ID. + +3. repeat step 3 of subcase 1. + +4. verify matched packets are distributed to the same queue without FDIR matched ID. + check there is no rule listed. + +Subcase 4: MAC_IPV4_GRE_IPV4_TCP drop +------------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 / gre / ipv4 src is 192.168.0.20 dst is 192.168.0.21 tos is 4 / tcp src is 22 dst is 23 / end actions drop / end + +2. send matched packet, check the packet is dropped. + send mismatched packets, check the packets are not dropped. + +3. repeat step 3 of subcase 1. + +4. verify matched packet is dropped. + check there is no rule listed. + +Subcase 5: MAC_IPV4_GRE_IPV4_TCP mark+rss +----------------------------------------- +Note: This combined action is mark with RSS which is without queues specified. + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 / gre / ipv4 src is 192.168.0.20 dst is 192.168.0.21 tos is 4 / tcp src is 22 dst is 23 / end actions mark id 2 / rss / end + +2. send matched packets, check the packets are distributed by RSS with FDIR matched ID=0x2 + send mismatched packets, check the packets are distributed by RSS without FDIR matched ID. + +3. repeat step 3 of subcase 1. + +4. verify matched packets are distributed to the same queue without FDIR matched ID. + check there is no rule listed. + +Subcase 6: MAC_IPV4_GRE_IPV4_TCP mark +------------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 / gre / ipv4 src is 192.168.0.20 dst is 192.168.0.21 tos is 4 / tcp src is 22 dst is 23 / end actions mark id 1 / end + +2. repeat the step 2-3 of in subcase 3, + get the same result. + +Test case: MAC_IPV6_GRE_IPV4_TCP pattern +======================================== + +Subcase 1: MAC_IPV6_GRE_IPV4_TCP queue index +-------------------------------------------- + +Subcase 2: MAC_IPV6_GRE_IPV4_TCP rss queues +------------------------------------------- + +Subcase 3: MAC_IPV6_GRE_IPV4_TCP passthru +----------------------------------------- + +Subcase 4: MAC_IPV6_GRE_IPV4_TCP drop +------------------------------------- + +Subcase 5: MAC_IPV6_GRE_IPV4_TCP mark+rss +----------------------------------------- + +Subcase 6: MAC_IPV6_GRE_IPV4_TCP mark +------------------------------------- + +each subcase is the same as the subcase of Test case: MAC_IPV4_GRE_IPV4_TCP pattern, just only pattern is different, +replace it with 'eth / ipv6 / gre / ipv4 / tcp' + +Test case: MAC_IPV4_GRE_IPV6_TCP pattern +======================================== + +Subcase 1: MAC_IPV4_GRE_IPV6_TCP queue index +-------------------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 / gre / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 tc is 1 / tcp src is 22 dst is 23 / end actions queue index 1 / mark id 0 / end + +2. send matched packets, check the packets is distributed to queue 1 with FDIR matched ID=0x0. + send mismatched packets, check the packets are distributed by RSS without FDIR matched ID. + +3. verify rules can be listed and destroyed:: + + testpmd> flow list 0 + + check the rule listed. + destroy the rule:: + + testpmd> flow destroy 0 rule 0 + +4. verify matched packet is distributed by RSS without FDIR matched ID. + check there is no rule listed. + +Subcase 2: MAC_IPV4_GRE_IPV6_TCP rss queues +------------------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 / gre / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 tc is 1 / tcp src is 22 dst is 23 / end actions rss queues 4 5 6 7 end / mark id 4294967294 / end + +2. send matched packets, check the packets is distributed to queue 4-7 with FDIR matched ID=0xfffffffe. + send mismatched packets, check the packets are distributed by RSS without FDIR matched ID. + +3. repeat step 3 of subcase 1. + +4. verify matched packet is distributed by RSS without FDIR matched ID. + check there is no rule listed. + +Subcase 3: MAC_IPV4_GRE_IPV6_TCP passthru +----------------------------------------- + +1. create filter rule with mark:: + + flow create 0 ingress pattern eth / ipv4 / gre / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 tc is 1 / tcp src is 22 dst is 23 / end actions passthru / mark id 1 / end + +2. send matched packets, check the packets are distributed by RSS with FDIR matched ID=0x1. + send mismatched packets, check the packets are distributed by RSS without FDIR matched ID. + +3. repeat step 3 of subcase 1. + +4. verify matched packets are distributed to the same queue without FDIR matched ID. + check there is no rule listed. + +Subcase 4: MAC_IPV4_GRE_IPV6_TCP drop +------------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 / gre / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 tc is 1 / tcp src is 22 dst is 23 / end actions drop / end + +2. send matched packet, check the packet is dropped. + send mismatched packets, check the packets are not dropped. + +3. repeat step 3 of subcase 1. + +4. verify matched packet is dropped. + check there is no rule listed. + +Subcase 5: MAC_IPV4_GRE_IPV6_TCP mark+rss +----------------------------------------- +Note: This combined action is mark with RSS which is without queues specified. + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 / gre / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 tc is 1 / tcp src is 22 dst is 23 / end actions mark id 2 / rss / end + +2. send matched packets, check the packets are distributed by RSS with FDIR matched ID=0x2 + send mismatched packets, check the packets are distributed by RSS without FDIR matched ID. + +3. repeat step 3 of subcase 1. + +4. verify matched packets are distributed to the same queue without FDIR matched ID. + check there is no rule listed. + +Subcase 6: MAC_IPV4_GRE_IPV6_TCP mark +------------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 / gre / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 tc is 1 / tcp src is 22 dst is 23 / end actions mark id 1 / end + +2. repeat the step 2-3 of in subcase 3, + get the same result. + +Test case: MAC_IPV6_GRE_IPV6_TCP pattern +======================================== + +Subcase 1: MAC_IPV6_GRE_IPV6_TCP queue index +-------------------------------------------- + +Subcase 2: MAC_IPV6_GRE_IPV6_TCP rss queues +------------------------------------------- + +Subcase 3: MAC_IPV6_GRE_IPV6_TCP passthru +----------------------------------------- + +Subcase 4: MAC_IPV6_GRE_IPV6_TCP drop +------------------------------------- + +Subcase 5: MAC_IPV6_GRE_IPV6_TCP mark+rss +----------------------------------------- + +Subcase 6: MAC_IPV6_GRE_IPV6_TCP mark +------------------------------------- + +each subcase is the same as the subcase of Test case: MAC_IPV4_GRE_IPV6_TCP pattern, just only pattern is different, +replace it with 'eth / ipv6 / gre / ipv6 / tcp' + +Test case: MAC_IPV4_GRE_IPV4_UDP pattern +======================================== + +Subcase 1: MAC_IPV4_GRE_IPV4_UDP queue index +-------------------------------------------- + +Subcase 2: MAC_IPV4_GRE_IPV4_UDP rss queues +------------------------------------------- + +Subcase 3: MAC_IPV4_GRE_IPV4_UDP passthru +----------------------------------------- + +Subcase 4: MAC_IPV4_GRE_IPV4_UDP drop +------------------------------------- + +Subcase 5: MAC_IPV4_GRE_IPV4_UDP mark+rss +----------------------------------------- + +Subcase 6: MAC_IPV4_GRE_IPV4_UDP mark +------------------------------------- + +each subcase is the same as the subcase of Test case: MAC_IPV4_GRE_IPV4_TCP pattern, just only pattern is different, +replace "tcp" with "udp" in all the subcases + +Test case: MAC_IPV4_GRE_IPV6_UDP pattern +======================================== + +Subcase 1: MAC_IPV4_GRE_IPV6_UDP queue index +-------------------------------------------- + +Subcase 2: MAC_IPV4_GRE_IPV6_UDP rss queues +------------------------------------------- + +Subcase 3: MAC_IPV4_GRE_IPV6_UDP passthru +----------------------------------------- + +Subcase 4: MAC_IPV4_GRE_IPV6_UDP drop +------------------------------------- + +Subcase 5: MAC_IPV4_GRE_IPV6_UDP mark+rss +----------------------------------------- + +Subcase 6: MAC_IPV4_GRE_IPV6_UDP mark +------------------------------------- + +each subcase is the same as the subcase of Test case: MAC_IPV4_GRE_IPV6_TCP pattern, just only pattern is different, +replace "tcp" with "udp" in all the subcases + +Test case: MAC_IPV6_GRE_IPV4_UDP pattern +======================================== + +Subcase 1: MAC_IPV6_GRE_IPV4_UDP queue index +-------------------------------------------- + +Subcase 2: MAC_IPV6_GRE_IPV4_UDP rss queues +------------------------------------------- + +Subcase 3: MAC_IPV6_GRE_IPV4_UDP passthru +----------------------------------------- + +Subcase 4: MAC_IPV6_GRE_IPV4_UDP drop +------------------------------------- + +Subcase 5: MAC_IPV6_GRE_IPV4_UDP mark+rss +----------------------------------------- + +Subcase 6: MAC_IPV6_GRE_IPV4_UDP mark +------------------------------------- + +each subcase is the same as the subcase of Test case: MAC_IPV6_GRE_IPV4_TCP pattern, just only pattern is different, +replace "tcp" with "udp" in all the subcases + +Test case: MAC_IPV6_GRE_IPV6_UDP pattern +======================================== + +Subcase 1: MAC_IPV6_GRE_IPV6_UDP queue index +-------------------------------------------- + +Subcase 2: MAC_IPV6_GRE_IPV6_UDP rss queues +------------------------------------------- + +Subcase 3: MAC_IPV6_GRE_IPV6_UDP passthru +----------------------------------------- + +Subcase 4: MAC_IPV6_GRE_IPV6_UDP drop +------------------------------------- + +Subcase 5: MAC_IPV6_GRE_IPV6_UDP mark+rss +----------------------------------------- + +Subcase 6: MAC_IPV6_GRE_IPV6_UDP mark +------------------------------------- + +each subcase is the same as the subcase of Test case: MAC_IPV6_GRE_IPV6_TCP pattern, just only pattern is different, +replace "tcp" with "udp" in all the subcases \ No newline at end of file From patchwork Mon Aug 16 15:45:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sun, QinX" X-Patchwork-Id: 96945 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2DCC0A0C46; Mon, 16 Aug 2021 09:12:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1D4E940143; Mon, 16 Aug 2021 09:12:53 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id BCE184003C for ; Mon, 16 Aug 2021 09:12:50 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10077"; a="279550944" X-IronPort-AV: E=Sophos;i="5.84,324,1620716400"; d="scan'208";a="279550944" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2021 00:12:50 -0700 X-IronPort-AV: E=Sophos;i="5.84,324,1620716400"; d="scan'208";a="530256060" Received: from unknown (HELO cvl_tetser_105.icx.intel.com) ([10.240.183.105]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2021 00:12:48 -0700 From: Qin Sun To: dts@dpdk.org Cc: xueqin.lin@intel.com, Qin Sun Date: Mon, 16 Aug 2021 15:45:20 +0000 Message-Id: <20210816154520.9805-3-qinx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210816154520.9805-1-qinx.sun@intel.com> References: <20210816154520.9805-1-qinx.sun@intel.com> Subject: [dts] [PATCH V1 2/2] tests/iavf_fdir: add gre inner fdir cases for iavf 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 Sender: "dts" according to test plan to add 12 new cases related gre inner for iavf fdir Signed-off-by: Qin Sun Tested-by: Qin Sun Acked-by: Xueqin Lin --- tests/TestSuite_iavf_fdir.py | 308 +++++++++++++++++++++++++++++++++++ 1 file changed, 308 insertions(+) diff --git a/tests/TestSuite_iavf_fdir.py b/tests/TestSuite_iavf_fdir.py index 805f35ac..56272c8e 100644 --- a/tests/TestSuite_iavf_fdir.py +++ b/tests/TestSuite_iavf_fdir.py @@ -996,6 +996,52 @@ MAC_IPV4_GTPU_EH_UL_IPV6_UDP_WITHOUT_INPUTSET = { 'Ether(dst="00:11:22:33:44:55")/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1)/IP()/UDP()/("X"*480)'] } +MAC_IPV4_GRE_IPV4 = { + "match": [ + 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(src="192.168.0.20",dst="192.168.0.21", tos=4)/Raw("x" * 80)'], + "mismatch": [ + 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(src="192.168.0.22",dst="192.168.0.21", tos=4)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(src="192.168.0.20",dst="192.168.0.22", tos=4)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(src="192.168.0.20",dst="192.168.0.21", tos=8)/Raw("x" * 80)', + ] +} + +MAC_IPV4_GRE_IPV4_TCP = { + "match": [ + 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(src="192.168.0.20",dst="192.168.0.21", tos=4)/TCP(sport=22,dport=23)/Raw("x" * 80)'], + "mismatch": [ + 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(src="192.168.0.22",dst="192.168.0.21", tos=4)/TCP(sport=22,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(src="192.168.0.20",dst="192.168.0.22", tos=4)/TCP(sport=22,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(src="192.168.0.20",dst="192.168.0.21", tos=8)/TCP(sport=22,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(src="192.168.0.20",dst="192.168.0.21", tos=4)/TCP(sport=21,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(src="192.168.0.20",dst="192.168.0.21", tos=4)/TCP(sport=22,dport=24)/Raw("x" * 80)' + ] +} + +MAC_IPV4_GRE_IPV6_TCP = { + "match": [ + 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::2",tc=1)/TCP(sport=22,dport=23)/Raw("x" * 80)'], + "mismatch": [ + 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2021", src="2001::2",tc=1)/TCP(sport=22,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::3",tc=1)/TCP(sport=22,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::2",tc=2)/TCP(sport=22,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::2",tc=1)/TCP(sport=21,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::2",tc=1)/TCP(sport=22,dport=24)/Raw("x" * 80)' + ] +} + +MAC_IPV6_GRE_IPV4 = eval(str(MAC_IPV4_GRE_IPV4).replace('IP()','IPv6()')) + +MAC_IPV4_GRE_IPV6 = { + "match": [ + 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::2",tc=1)/Raw("x" * 80)'], + "mismatch": [ + 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2021", src="2001::2",tc=1)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::3",tc=1)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::2",tc=2)/Raw("x" * 80)', + ] +} + tv_mac_ipv4_pay_queue_index = { "name": "test_mac_ipv4_pay_queue_index", "rule": "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions queue index 1 / end", @@ -6609,6 +6655,175 @@ tv_mac_ipv4_gtpu_eh_ul_ipv6_udp_without_inputset_mark_rss = { "check_param": {"port_id": 0, "passthru": 1, "mark_id": 0} } +#gre tunnel inner fdir +tv_mac_ipv4_gre_ipv4_queue_index = { + "name": "test_mac_ipv4_gre_ipv4_queue_index", + "rule": "flow create 0 ingress pattern eth / ipv4 / gre / ipv4 src is 192.168.0.20 dst is 192.168.0.21 tos is 4 / end actions queue index 1 / end", + "scapy_str": MAC_IPV4_GRE_IPV4, + "check_param": {"port_id": 0, "queue": 1} +} + +tv_mac_ipv4_gre_ipv4_rss_queue = { + "name": "mac_ipv4_gre_ipv4_rss_queue", + "rule": "flow create 0 ingress pattern eth / ipv4 / gre / ipv4 src is 192.168.0.20 dst is 192.168.0.21 tos is 4 / end actions rss queues 2 3 end / end", + "scapy_str": MAC_IPV4_GRE_IPV4, + "check_param": {"port_id": 0, "queue": [2,3]} +} + +tv_mac_ipv4_gre_ipv4_passthru = { + "name": "mac_ipv4_gre_ipv4_passthru", + "rule": "flow create 0 ingress pattern eth / ipv4 / gre / ipv4 src is 192.168.0.20 dst is 192.168.0.21 tos is 4 / end actions passthru / end", + "scapy_str": MAC_IPV4_GRE_IPV4, + "check_param": {"port_id": 0, "passthru": 1} +} + +tv_mac_ipv4_gre_ipv4_drop = { + "name": "mac_ipv4_gre_ipv4_drop", + "rule": "flow create 0 ingress pattern eth / ipv4 / gre / ipv4 src is 192.168.0.20 dst is 192.168.0.21 tos is 4 / end actions drop / end", + "scapy_str": MAC_IPV4_GRE_IPV4, + "check_param": {"port_id": 0, "drop":1} +} + +tv_mac_ipv4_gre_ipv4_mark_rss ={ + "name": "mac_ipv4_gre_ipv4_mark_rss", + "rule": "flow create 0 ingress pattern eth / ipv4 / gre / ipv4 src is 192.168.0.20 dst is 192.168.0.21 tos is 4 / end actions mark / rss / end", + "scapy_str": MAC_IPV4_GRE_IPV4, + "check_param": {"port_id": 0, "passthru": 1, "mark_id": 0} +} + +tv_mac_ipv4_gre_ipv4_mark = { + "name": "mac_ipv4_gre_ipv4_mark", + "rule": "flow create 0 ingress pattern eth / ipv4 / gre / ipv4 src is 192.168.0.20 dst is 192.168.0.21 tos is 4 / end actions mark id 5 / end", + "scapy_str": MAC_IPV4_GRE_IPV4, + "check_param": {"port_id": 0, "passthru": 1, "mark_id": 5} +} + +tv_mac_ipv4_gre_ipv6_queue_index = { + "name": "test_mac_ipv4_gre_ipv6_queue_index", + "rule": "flow create 0 ingress pattern eth / ipv4 / gre / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 tc is 1 / end actions queue index 15 / mark id 1 / end", + "scapy_str": MAC_IPV4_GRE_IPV6, + "check_param": {"port_id": 0, "queue": 15, "mark_id": 1} +} + +tv_mac_ipv4_gre_ipv6_drop = { + "name": "test_mac_ipv4_gre_ipv6_drop", + "rule": "flow create 0 ingress pattern eth / ipv4 / gre / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 tc is 1 / end actions drop / end", + "scapy_str": MAC_IPV4_GRE_IPV6, + "check_param": {"port_id": 0, "drop": 1} +} + +tv_mac_ipv4_gre_ipv6_rss_queue = { + "name": "test_mac_ipv4_gre_ipv6_rss_queue", + "rule": "flow create 0 ingress pattern eth / ipv4 / gre / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 tc is 1 / end actions rss queues 8 9 10 11 12 13 14 15 end / mark id 2 / end", + "scapy_str": MAC_IPV4_GRE_IPV6, + "check_param": {"port_id": 0, "queue": [8, 9, 10, 11, 12, 13, 14, 15], "mark_id": 2} +} + +tv_mac_ipv4_gre_ipv6_passthru = { + "name": "test_mac_ipv4_gre_ipv6_passthru", + "rule": "flow create 0 ingress pattern eth / ipv4 / gre / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 tc is 1 / end actions passthru / mark id 3 / end", + "scapy_str": MAC_IPV4_GRE_IPV6, + "check_param": {"port_id": 0, "passthru": 1, "mark_id": 3} +} + +tv_mac_ipv4_gre_ipv6_mark_rss = { + "name": "test_mac_ipv4_gre_ipv6_mark_rss", + "rule": "flow create 0 ingress pattern eth / ipv4 / gre / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 tc is 1 / end actions mark id 4 / rss / end", + "scapy_str": MAC_IPV4_GRE_IPV6, + "check_param": {"port_id": 0, "passthru": 1, "mark_id": 4} +} + +tv_mac_ipv4_gre_ipv6_mark = { + "name": "test_mac_ipv4_gre_ipv6_mark", + "rule": "flow create 0 ingress pattern eth / ipv4 / gre / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 tc is 1 / end actions mark id 5 / rss / end", + "scapy_str": MAC_IPV4_GRE_IPV6, + "check_param": {"port_id": 0, "passthru": 1, "mark_id": 5} +} + +tv_mac_ipv4_gre_ipv4_tcp_queue_index = { + "name": "test_mac_ipv4_gre_ipv4_tcp_queue_index", + "rule": "flow create 0 ingress pattern eth / ipv4 / gre / ipv4 src is 192.168.0.20 dst is 192.168.0.21 tos is 4 / tcp src is 22 dst is 23 / end actions queue index 1 / mark id 0 / end", + "scapy_str": MAC_IPV4_GRE_IPV4_TCP, + "check_param": {"port_id": 0, "queue": 1, "mark_id": 0} +} + +tv_mac_ipv4_gre_ipv4_tcp_rss_queue = { + "name": "mac_ipv4_gre_ipv4_tcp_rss_queue", + "rule": "flow create 0 ingress pattern eth / ipv4 / gre / ipv4 src is 192.168.0.20 dst is 192.168.0.21 tos is 4 / tcp src is 22 dst is 23 / end actions rss queues 1 2 3 4 end / mark id 4294967294 / end", + "scapy_str": MAC_IPV4_GRE_IPV4_TCP, + "check_param": {"port_id": 0, "queue": [1, 2, 3, 4], "mark_id": 4294967294 } +} + +tv_mac_ipv4_gre_ipv4_tcp_passthru = { + "name": "mac_ipv4_gre_ipv4_tcp_passthru", + "rule": "flow create 0 ingress pattern eth / ipv4 / gre / ipv4 src is 192.168.0.20 dst is 192.168.0.21 tos is 4 / tcp src is 22 dst is 23 / end actions passthru / mark id 1 / end", + "scapy_str": MAC_IPV4_GRE_IPV4_TCP, + "check_param": {"port_id": 0, "passthru": 1, "mark_id": 1 } +} + +tv_mac_ipv4_gre_ipv4_tcp_drop = { + "name": "mac_ipv4_gre_ipv4_tcp_drop", + "rule": "flow create 0 ingress pattern eth / ipv4 / gre / ipv4 src is 192.168.0.20 dst is 192.168.0.21 tos is 4 / tcp src is 22 dst is 23 / end actions drop / end", + "scapy_str": MAC_IPV4_GRE_IPV4_TCP, + "check_param": {"port_id": 0, "drop": 1 } +} + +tv_mac_ipv4_gre_ipv4_tcp_mark_rss = { + "name": "mac_ipv4_gre_ipv4_tcp_mark_rss", + "rule": "flow create 0 ingress pattern eth / ipv4 / gre / ipv4 src is 192.168.0.20 dst is 192.168.0.21 tos is 4 / tcp src is 22 dst is 23 / end actions mark id 2 / rss / end ", + "scapy_str": MAC_IPV4_GRE_IPV4_TCP, + "check_param": {"port_id": 0, "passthru": 1, "mark_id": 2} +} + +tv_mac_ipv4_gre_ipv4_tcp_mark = { + "name": "mac_ipv4_gre_ipv4_tcp_mark", + "rule": "flow create 0 ingress pattern eth / ipv4 / gre / ipv4 src is 192.168.0.20 dst is 192.168.0.21 tos is 4 / tcp src is 22 dst is 23 / end actions mark id 1 / end ", + "scapy_str": MAC_IPV4_GRE_IPV4_TCP, + "check_param": {"port_id": 0, "passthru": 1, "mark_id": 1} +} + +tv_mac_ipv4_gre_ipv6_tcp_queue_index = { + "name": "test_mac_ipv4_gre_ipv6_tcp_queue_index", + "rule": "flow create 0 ingress pattern eth / ipv4 / gre / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 tc is 1 / tcp src is 22 dst is 23 / end actions queue index 6 / mark id 4 / end", + "scapy_str": MAC_IPV4_GRE_IPV6_TCP, + "check_param": {"port_id": 0, "queue": 6, "mark_id": 4} +} + +tv_mac_ipv4_gre_ipv6_tcp_rss_queue = { + "name": "mac_ipv4_gre_ipv6_tcp_rss_queue", + "rule": "flow create 0 ingress pattern eth / ipv4 / gre / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 tc is 1 / tcp src is 22 dst is 23 / end actions rss queues 4 5 6 7 end / mark id 4294967294 / end", + "scapy_str": MAC_IPV4_GRE_IPV6_TCP, + "check_param": {"port_id": 0, "queue": [4, 5, 6, 7], "mark_id": 4294967294} +} + +tv_mac_ipv4_gre_ipv6_tcp_passthru = { + "name": "mac_ipv4_gre_ipv6_tcp_passthru", + "rule": "flow create 0 ingress pattern eth / ipv4 / gre / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 tc is 1 / tcp src is 22 dst is 23 / end actions passthru / mark id 7 / end", + "scapy_str": MAC_IPV4_GRE_IPV6_TCP, + "check_param": {"port_id": 0, "passthru": 1, "mark_id": 7} +} + +tv_mac_ipv4_gre_ipv6_tcp_drop = { + "name": "mac_ipv4_gre_ipv6_tcp_drop", + "rule": "flow create 0 ingress pattern eth / ipv4 / gre / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 tc is 1 / tcp src is 22 dst is 23 / end actions drop / end", + "scapy_str": MAC_IPV4_GRE_IPV6_TCP, + "check_param": {"port_id": 0, "drop": 1} +} + +tv_mac_ipv4_gre_ipv6_tcp_mark_rss = { + "name": "mac_ipv4_gre_ipv6_tcp_mark_rss", + "rule": "flow create 0 ingress pattern eth / ipv4 / gre / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 tc is 1 / tcp src is 22 dst is 23 / end actions mark id 6 / rss / end ", + "scapy_str": MAC_IPV4_GRE_IPV6_TCP, + "check_param": {"port_id": 0, "passthru": 1, "mark_id": 6} +} + +tv_mac_ipv4_gre_ipv6_tcp_mark = { + "name": "mac_ipv4_gre_ipv6_tcp_mark", + "rule": "flow create 0 ingress pattern eth / ipv4 / gre / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 tc is 1 / tcp src is 22 dst is 23 / end actions mark id 3 / end ", + "scapy_str": MAC_IPV4_GRE_IPV6_TCP, + "check_param": {"port_id": 0, "passthru": 1, "mark_id": 3} +} + vectors_ipv4_pay = [tv_mac_ipv4_pay_queue_index, tv_mac_ipv4_pay_mark_rss,tv_mac_ipv4_pay_passthru, tv_mac_ipv4_pay_drop, tv_mac_ipv4_pay_queue_group, tv_mac_ipv4_pay_mark] @@ -7099,6 +7314,63 @@ vectors_ipv4_gtpu_eh_ul_ipv6_udp = [tv_mac_ipv4_gtpu_eh_ul_ipv6_udp_inner_srcip_ tv_mac_ipv4_gtpu_eh_ul_ipv6_udp_without_inputset_passthru, tv_mac_ipv4_gtpu_eh_ul_ipv6_udp_without_inputset_drop, tv_mac_ipv4_gtpu_eh_ul_ipv6_udp_without_inputset_mark_rss] +#gre tunnel inner +vectors_ipv4_gre_ipv4 = [ + tv_mac_ipv4_gre_ipv4_queue_index, + tv_mac_ipv4_gre_ipv4_rss_queue, + tv_mac_ipv4_gre_ipv4_passthru, + tv_mac_ipv4_gre_ipv4_drop, + tv_mac_ipv4_gre_ipv4_mark_rss, + tv_mac_ipv4_gre_ipv4_mark + ] + +vectors_ipv6_gre_ipv4 = [eval(str(each).replace('ipv4_gre_ipv4','ipv6_gre_ipv4').replace('IP()','IPv6()') + .replace('eth / ipv4','eth / ipv6')) for each in vectors_ipv4_gre_ipv4] + +vectors_ipv4_gre_ipv6 = [ + tv_mac_ipv4_gre_ipv6_queue_index, + tv_mac_ipv4_gre_ipv6_rss_queue, + tv_mac_ipv4_gre_ipv6_passthru, + tv_mac_ipv4_gre_ipv6_drop, + tv_mac_ipv4_gre_ipv6_mark_rss, + tv_mac_ipv4_gre_ipv6_mark +] + +vectors_ipv6_gre_ipv6 = [eval(str(each).replace('ipv4_gre_ipv6','ipv6_gre_ipv6').replace('IP()','IPv6()') + .replace('eth / ipv4','eth / ipv6')) for each in vectors_ipv4_gre_ipv6] + +vectors_ipv4_gre_ipv4_tcp = [ + tv_mac_ipv4_gre_ipv4_tcp_queue_index, + tv_mac_ipv4_gre_ipv4_tcp_rss_queue, + tv_mac_ipv4_gre_ipv4_tcp_passthru, + tv_mac_ipv4_gre_ipv4_tcp_drop, + tv_mac_ipv4_gre_ipv4_tcp_mark_rss, + tv_mac_ipv4_gre_ipv4_tcp_mark +] + +vectors_ipv6_gre_ipv4_tcp = [eval(str(each).replace('ipv4_gre_ipv4','ipv6_gre_ipv4').replace('eth / ipv4','eth / ipv6') + .replace('IP()','IPv6()')) for each in vectors_ipv4_gre_ipv4_tcp] + +vectors_ipv4_gre_ipv6_tcp = [ + tv_mac_ipv4_gre_ipv6_tcp_queue_index, + tv_mac_ipv4_gre_ipv6_tcp_rss_queue, + tv_mac_ipv4_gre_ipv6_tcp_passthru, + tv_mac_ipv4_gre_ipv6_tcp_drop, + tv_mac_ipv4_gre_ipv6_tcp_mark_rss, + tv_mac_ipv4_gre_ipv6_tcp_mark + ] + +vectors_ipv6_gre_ipv6_tcp = [eval(str(each).replace('ipv4_gre_ipv6','ipv6_gre_ipv6').replace('eth / ipv4','eth / ipv6') + .replace('IP()','IPv6()'))for each in vectors_ipv4_gre_ipv6_tcp] + +vectors_ipv4_gre_ipv4_udp = [eval(str(each).replace('tcp','udp').replace('TCP','UDP')) for each in vectors_ipv4_gre_ipv4_tcp] + +vectors_ipv6_gre_ipv4_udp = [eval(str(each).replace('tcp','udp').replace('TCP','UDP')) for each in vectors_ipv6_gre_ipv4_tcp] + +vectors_ipv4_gre_ipv6_udp = [eval(str(each).replace('tcp','udp').replace('TCP','UDP')) for each in vectors_ipv4_gre_ipv6_tcp] + +vectors_ipv6_gre_ipv6_udp = [eval(str(each).replace('tcp','udp').replace('TCP','UDP')) for each in vectors_ipv6_gre_ipv6_tcp] + class TestIAVFFdir(TestCase): def rte_flow_process(self, vectors): @@ -9372,6 +9644,42 @@ class TestIAVFFdir(TestCase): self._create_check_conflict_rule(rules, pkts) + def test_mac_ipv4_gre_ipv4(self): + self.rte_flow_process(vectors_ipv4_gre_ipv4) + + def test_mac_ipv6_gre_ipv4(self): + self.rte_flow_process(vectors_ipv6_gre_ipv4) + + def test_mac_ipv4_gre_ipv6(self): + self.rte_flow_process(vectors_ipv4_gre_ipv6) + + def test_mac_ipv6_gre_ipv6(self): + self.rte_flow_process(vectors_ipv6_gre_ipv6) + + def test_mac_ipv4_gre_ipv4_tcp(self): + self.rte_flow_process(vectors_ipv4_gre_ipv4_tcp) + + def test_mac_ipv6_gre_ipv4_tcp(self): + self.rte_flow_process(vectors_ipv6_gre_ipv4_tcp) + + def test_mac_ipv4_gre_ipv6_tcp(self): + self.rte_flow_process(vectors_ipv4_gre_ipv6_tcp) + + def test_mac_ipv6_gre_ipv6_tcp(self): + self.rte_flow_process(vectors_ipv6_gre_ipv6_tcp) + + def test_mac_ipv4_gre_ipv4_udp(self): + self.rte_flow_process(vectors_ipv4_gre_ipv4_udp) + + def test_mac_ipv6_gre_ipv4_udp(self): + self.rte_flow_process(vectors_ipv6_gre_ipv4_udp) + + def test_mac_ipv4_gre_ipv6_udp(self): + self.rte_flow_process(vectors_ipv4_gre_ipv6_udp) + + def test_mac_ipv6_gre_ipv6_udp(self): + self.rte_flow_process(vectors_ipv6_gre_ipv6_udp) + def tear_down(self): # destroy all flow rule on port 0 self.dut.kill_all()