From patchwork Fri Jul 29 07:11:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 114415 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 E25E4A0540; Fri, 29 Jul 2022 09:11:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 785E242C0C; Fri, 29 Jul 2022 09:11:20 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 237BE42C06 for ; Fri, 29 Jul 2022 09:11:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659078679; x=1690614679; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0SD3Uj/cDADHXuPvsyNWynfBgHKQpypV2GKjS2MqUpI=; b=IDZLVk7QhKiGz+wh0n/50eFeLsI++MlJ03c2G06WIr3an7GHHnrUKGOq LUQfoxYSUi/jjThdjjA6BYqsq6ot9Dxjbs2JObsH+qp9ex0HZLuxGLY4e 1x//qfDWBn/GhN0KXeYwH8tEIma+b1DQHrXcJJNjkTuUzzfGk0nZFDnLm R4eNI8ctMIGue1lrg03EUaJjs0R9wspGogu3y/WDTKc9AZLQt6IHa0T8B 3PdWpIyWo3H9VU5Hl2m5ehas9DU+e/k6yAp7fpMfgskBxKc/ORf7/kaYO 0KiCSDnjOGDmfka2KOIRjub8PIpb6osu0A/UbynSMnhq7piEdMemEH/+C w==; X-IronPort-AV: E=McAfee;i="6400,9594,10422"; a="350415826" X-IronPort-AV: E=Sophos;i="5.93,200,1654585200"; d="scan'208";a="350415826" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2022 00:11:17 -0700 X-IronPort-AV: E=Sophos;i="5.93,200,1654585200"; d="scan'208";a="660124706" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2022 00:11:16 -0700 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li Subject: [dts][PATCH V2 3/4] test_plans/ice_iavf_fdir: add new testplan Date: Fri, 29 Jul 2022 15:11:13 +0800 Message-Id: <20220729071114.10788-3-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220729071114.10788-1-weiyuanx.li@intel.com> References: <20220729071114.10788-1-weiyuanx.li@intel.com> MIME-Version: 1.0 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 Add DPDK22.07 new feature testplan. Signed-off-by: Weiyuan Li --- v2: -modify the ice_iavf_fdir scipt tear_down method and destroy environment first. test_plans/ice_iavf_fdir_test_plan.rst | 319 +++++++++++++++++++++++++ 1 file changed, 319 insertions(+) diff --git a/test_plans/ice_iavf_fdir_test_plan.rst b/test_plans/ice_iavf_fdir_test_plan.rst index b485f899..b253e6b8 100644 --- a/test_plans/ice_iavf_fdir_test_plan.rst +++ b/test_plans/ice_iavf_fdir_test_plan.rst @@ -230,6 +230,7 @@ Default parameters VF00 MAC:: [Dest MAC]: 00:11:22:33:44:55 + [Multicast Dest MAC]: 11:22:33:44:55:66 VF01 MAC:: @@ -247,6 +248,7 @@ Default parameters [Source IP]: 192.168.0.20 [Dest IP]: 192.168.0.21 + [Multicast Dest IPv4]: 224.0.0.1 [IP protocol]: 255 [TTL]: 2 [DSCP]: 4 @@ -255,6 +257,7 @@ Default parameters [Source IPv6]: 2001::2 [Dest IPv6]: CDCD:910A:2222:5498:8475:1111:3900:2020 + [Multicast Dest IPv6]: ff01::2 [IP protocol]: 0 [TTL]: 2 [TC]: 1 @@ -297,6 +300,21 @@ Send packets sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", proto=255, ttl=3, tos=4) / Raw('x' * 80)],iface="enp134s0f1") sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", proto=255, ttl=2, tos=9) / Raw('x' * 80)],iface="enp134s0f1") +* MAC_IPV4_PAY multicast + + matched packets:: + + sendp([Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=255, ttl=2, tos=4) / Raw('x' * 80)],iface="enp134s0f1") + sendp([Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=255, ttl=2, tos=4)/UDP(sport=22,dport=23)/Raw('x' * 80)],iface="enp134s0f1") + + mismatched packets:: + + sendp([Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.22",dst="224.0.0.1", proto=255, ttl=2, tos=4) / Raw('x' * 80)],iface="enp134s0f1") + sendp([Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.2", proto=255, ttl=2, tos=4) / Raw('x' * 80)],iface="enp134s0f1") + sendp([Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=1, ttl=2, tos=4) / Raw('x' * 80)],iface="enp134s0f1") + sendp([Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=255, ttl=3, tos=4) / Raw('x' * 80)],iface="enp134s0f1") + sendp([Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=255, ttl=2, tos=9) / Raw('x' * 80)],iface="enp134s0f1") + * MAC_IPV4_UDP matched packets:: @@ -360,6 +378,21 @@ Send packets sendp([Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::2", nh=0, tc=2, hlim=2)/("X"*480)], iface="enp134s0f1") sendp([Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::2", nh=0, tc=1, hlim=5)/("X"*480)], iface="enp134s0f1") +* MAC_IPV6_PAY multicast + + matched packets:: + + sendp([Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", src="2001::2", nh=0, tc=1, hlim=2)/("X"*480)], iface="enp134s0f1") + sendp([Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", src="2001::2", nh=0, tc=1, hlim=2)/UDP(sport=22,dport=23)/("X"*480)], iface="enp134s0f1") + + mismatched packets:: + + sendp([Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::1", src="2001::2", nh=0, tc=1, hlim=2)/("X"*480)], iface="enp134s0f1") + sendp([Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", src="2001::1", nh=0, tc=1, hlim=2)/("X"*480)], iface="enp134s0f1") + sendp([Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", src="2001::2", nh=2, tc=1, hlim=2)/("X"*480)], iface="enp134s0f1") + sendp([Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", src="2001::2", nh=0, tc=2, hlim=2)/("X"*480)], iface="enp134s0f1") + sendp([Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", src="2001::2", nh=0, tc=1, hlim=5)/("X"*480)], iface="enp134s0f1") + * MAC_IPV6_UDP matched packets:: @@ -7260,3 +7293,289 @@ 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 + +Test case: MAC_IPV4_PAY pattern multicast +========================================= +Enable vf-true-promisc-support flag to on before start testpmd:: + + ethtool --set-priv-flags ens25f0 vf-true-promisc-support on + +Enable VF port to trust on before start testpmd:: + + ip link set ens25f0 vf 0 trust on + +Enable all multicast mode in the testpmd:: + + testpmd> set allmulti all on + + +Subcase 1: MAC_IPV4_PAY queue index +----------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 224.0.0.1 proto is 255 ttl is 2 tos is 4 / end actions queue index 1 / mark / end + +2. send multicast matched packets, check the packets are distributed to queue 1 without FDIR matched ID. + send multicast 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_PAY rss queues +---------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 224.0.0.1 proto is 255 ttl is 2 tos is 4 / end actions rss queues 2 3 end / mark / end + +2. send multicast matched packets, check the packets are distributed to queue 2 or 3 without without FDIR matched ID. + send multicast 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_PAY passthru +-------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 224.0.0.1 proto is 255 ttl is 2 tos is 4 / end actions passthru / mark / end + +2. send multicast matched packets, check the packets are distributed by RSS without FDIR matched ID. + send multicast 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_PAY drop +---------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 224.0.0.1 proto is 255 ttl is 2 tos is 4 / end actions drop / mark / end + +2. send multicast matched packets, check the packets are dropped + send multicast 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_PAY 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 src is 192.168.0.20 dst is 224.0.0.1 proto is 255 ttl is 2 tos is 4 / end actions mark / rss / end + +2. send multicast matched packets, check the packets are distributed by RSS with FDIR matched ID=0x0 + send multicast 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_PAY mark +---------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 224.0.0.1 proto is 255 ttl is 2 tos is 4 / end actions mark / end + +2. send multicast matched packets, check the packets are distributed by RSS with FDIR matched ID=0x0. + send multicast 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 7: MAC_IPV4_PAY protocal +-------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 dst is 224.0.0.1 proto is 1 / end actions queue index 1 / mark id 1 / end + flow create 0 ingress pattern eth / ipv4 dst is 224.0.0.1 proto is 17 / end actions passthru / mark id 3 / end + +2. send matched packets:: + + pkt1 = Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=1)/Raw('x' * 80) + pkt2 = Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.19",dst="224.0.0.1", proto=1)/Raw('x' * 80) + pkt3 = Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", ttl=2, tos=4)/UDP(sport=22,dport=23)/Raw('x' * 80) + pkt4 = Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=17)/UDP(sport=22,dport=23)/Raw('x' * 80) + pkt5 = Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=17, ttl=2, tos=4)/Raw('x' * 80) + pkt6 = Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", frag=1, proto=17, ttl=2, tos=4)/Raw('x' * 80) + + check the pkt1 and pkt2 are redirected to queue 1 with FDIR matched ID=0x1. + check the pkt3-pkt6 are distributed by RSS with FDIR matched ID=0x3. + send mismatched packets:: + + pkt7 = Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.2", proto=1)/Raw('x' * 80) + pkt8 = Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=6)/UDP(sport=22,dport=23)/Raw('x' * 80) + pkt9 = Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1")/TCP(sport=22,dport=23)/Raw('x' * 80) + pkt10 = Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", ttl=2, tos=4)/TCP(sport=22,dport=23)/Raw('x' * 80) + + check the packets received have not FDIR matched ID. + +3. repeat step 3 of subcase 1. + +4. verify matched packets have not FDIR matched ID. + check there is no rule listed. + +Test case: MAC_IPV6_PAY pattern multicast +========================================= +Enable vf-true-promisc-support flag to on before start testpmd:: + + ethtool --set-priv-flags ens25f0 vf-true-promisc-support on + +Enable VF port to trust on before start testpmd:: + + ip link set ens25f0 vf 0 trust on + +Enable all multicast mode in the testpmd:: + + testpmd> set allmulti all on + + +Subcase 1: MAC_IPV6_PAY queue index +----------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv6 dst is ff01::2 src is 2001::2 proto is 0 hop is 2 tc is 1 / end actions queue index 15 / mark / end + +2. send multicast matched packets, check the packets is distributed to queue 15 with FDIR matched ID=0x0. + send multicast 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_IPV6_PAY rss queues +---------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv6 dst is ff01::2 src is 2001::2 proto is 0 hop is 2 tc is 1 / end actions rss queues 8 9 10 11 12 13 14 15 end / mark / end + +2. send multicast matched packets, check the packets is distributed to queue 8-15 with FDIR matched ID=0x0. + send multicast 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_IPV6_PAY passthru +-------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv6 dst is ff01::2 src is 2001::2 proto is 0 hop is 2 tc is 1 / end actions passthru / mark / end + +2. send multicast matched packets, check the packets are distributed by RSS with FDIR matched ID=0x0. + send multicast 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_IPV6_PAY drop +---------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv6 dst is ff01::2 src is 2001::2 proto is 0 hop is 2 tc is 1 / end actions drop / mark / end + +2. send multicast matched packets, check the packets are dropped. + send multicast 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_IPV6_PAY 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 / ipv6 dst is ff01::2 src is 2001::2 proto is 0 hop is 2 tc is 1 / end actions mark / rss / end + +2. send multicast matched packets, check the packets are distributed by RSS with FDIR matched ID=0x0 + send multicast 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_IPV6_PAY mark +---------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv6 dst is ff01::2 src is 2001::2 proto is 0 hop is 2 tc is 1 / end actions mark / end + +2. repeat the steps of passthru with mark part in subcase 3, + get the same result. + +Subcase 7: MAC_IPV6_PAY protocal +-------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv6 dst is ff01::2 proto is 17 / end actions rss queues 5 6 end / mark id 0 / end + flow create 0 ingress pattern eth / ipv6 dst is ff01::2 proto is 6 / end actions mark id 2 / rss / end + +2. send matched packets:: + + pkt1 = Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", src="2001::2", nh=17, tc=1, hlim=2)/("X"*480) + pkt2 = Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2")/UDP(sport=22,dport=23)/("X"*480) + pkt3 = Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", nh=17)/TCP(sport=22,dport=23)/("X"*480) + pkt4 = Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2")/UDP(sport=22,dport=23)/TCP(sport=22,dport=23)/("X"*480) + pkt5 = Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", nh=6)/("X"*480) + pkt6 = Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2")/TCP(sport=22,dport=23)/("X"*480) + + check pkt1-pkt4 are redirected to queue 5 or queue 6 with FDIR matched ID=0x0. + check pkt5 and pkt6 are distributed by RSS with FDIR matched ID=0x2. + send mismatched packets:: + + pkt7 = Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::3", nh=1)/("X"*480) + pkt8 = Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2")/SCTP()/("X"*480) + pkt9 = Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", nh=1)/TCP(sport=22,dport=23)/("X"*480) + + check the packets are received without FDIR matched ID. + +3. repeat step 3 of subcase 1. + +4. verify matched packets are received without FDIR matched ID. + check there is no rule listed.