From patchwork Wed Nov 30 03:53:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ke Xu X-Patchwork-Id: 120309 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 F2644A00C2; Wed, 30 Nov 2022 04:55:11 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EE0C340693; Wed, 30 Nov 2022 04:55:11 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 6BCBB4014F for ; Wed, 30 Nov 2022 04:55:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669780510; x=1701316510; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bzC5OMP7RpSLQJTCcIRgCym2emmQVTAk7Nqde9y+4g8=; b=AmveFLX2FhsA7MQi15IAujGSU3/jJg8z6wqlIKnBf8XToLLdWqVrYuJT IDSG2WlPmNO9DPL2drQ85UyfFnMmGoARzmD6Djo8Fct+2N2IVpHUQ8vNZ 0pkIJ7jdLbgcgHIdp8tmEhlbdC1DLLvw3nVHD0YHHYzNsFfC169gfFHRm Ibo4FRtOZyXQHSmLVzak4YDYBwMmGJXcNKPJrJLwuVSCHTI25Yoo/TlXs u9P6ahFYPqNNywv+QQXMYdv7V8Xf5GKVV2dWPhHJpZI1GR/fM6OwJM+Fm wbMFTHjtXTOJ5SAYMxqzwCYv6PECdeor9JFYcpUGO/FQYEaaz3Edw09iL w==; X-IronPort-AV: E=McAfee;i="6500,9779,10546"; a="295660519" X-IronPort-AV: E=Sophos;i="5.96,205,1665471600"; d="scan'208";a="295660519" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2022 19:55:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10546"; a="594517776" X-IronPort-AV: E=Sophos;i="5.96,205,1665471600"; d="scan'208";a="594517776" Received: from dpdk-xuke-lab.sh.intel.com ([10.67.114.198]) by orsmga003.jf.intel.com with ESMTP; 29 Nov 2022 19:55:08 -0800 From: Ke Xu To: dts@dpdk.org Cc: lijuan.tu@intel.com, Ke Xu , Jin Ling Subject: [DTS][PATCH V1 1/3] test_plans/ice_dcf_acl_filter: update test plan to support represented port action from deprecated vf action Date: Wed, 30 Nov 2022 11:53:56 +0800 Message-Id: <20221130035358.98410-2-ke1.xu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221130035358.98410-1-ke1.xu@intel.com> References: <20221130035358.98410-1-ke1.xu@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 A new API is introduced to replace the VF actions in DPDK 22.11. To support This new API, several modifications are made. Testpmd args are modified to support appyling representors for the new API. Rules are modified for the old API being deprecated, changing to the new API. Ports id are modified corresponding to the port representors and modified API. Signed-off-by: Jin Ling Signed-off-by: Ke Xu --- test_plans/ice_dcf_acl_filter_test_plan.rst | 62 ++++++++++----------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/test_plans/ice_dcf_acl_filter_test_plan.rst b/test_plans/ice_dcf_acl_filter_test_plan.rst index a6d038a0..f047598d 100644 --- a/test_plans/ice_dcf_acl_filter_test_plan.rst +++ b/test_plans/ice_dcf_acl_filter_test_plan.rst @@ -90,7 +90,7 @@ Prerequisites or launch one testpmd on VF0 and VF1:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:86:01.0,cap=dcf -a 86:01.1 --file-prefix=vf0 --log-level="ice,7" -- -i + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:86:01.0,cap=dcf,representor=vf[1] -a 86:01.1 --file-prefix=vf0 --log-level="ice,7" -- -i Common steps of basic cases =========================== @@ -134,9 +134,9 @@ Then the ACL filter can filter the packet with dst mac address. 1. rule:: - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 / end actions vf id 1 / end - flow create 0 ingress pattern eth dst is 00:11:22:33:44:66 / ipv4 / end actions vf id 1 / end - flow create 0 ingress pattern eth dst is 00:11:22:33:66:55 / ipv4 / end actions vf id 1 / end + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 / end actions represented_port ethdev_port_id 1 / end + flow create 0 ingress pattern eth dst is 00:11:22:33:44:66 / ipv4 / end actions represented_port ethdev_port_id 1 / end + flow create 0 ingress pattern eth dst is 00:11:22:33:66:55 / ipv4 / end actions represented_port ethdev_port_id 1 / end flow create 0 ingress pattern eth dst spec 00:11:22:33:44:55 dst mask ff:ff:ff:ff:ff:00 / ipv4 / end actions drop / end 2. matched packets:: @@ -223,9 +223,9 @@ Subcase 6: src mac + dst mac + src ipv4 + dst ipv4(only 2port NIC support) -------------------------------------------------------------------------- 1. rule:: - flow create 0 ingress pattern eth dst is 33:00:00:00:00:01 / ipv4 / end actions vf id 1 / end - flow create 0 ingress pattern eth dst is 33:00:00:00:00:02 / ipv4 / end actions vf id 1 / end - flow create 0 ingress pattern eth dst is 33:00:00:00:00:03 / ipv4 / end actions vf id 1 / end + flow create 0 ingress pattern eth dst is 33:00:00:00:00:01 / ipv4 / end actions represented_port ethdev_port_id 1 / end + flow create 0 ingress pattern eth dst is 33:00:00:00:00:02 / ipv4 / end actions represented_port ethdev_port_id 1 / end + flow create 0 ingress pattern eth dst is 33:00:00:00:00:03 / ipv4 / end actions represented_port ethdev_port_id 1 / end flow create 0 ingress pattern eth src spec 00:11:22:33:44:55 src mask ff:ff:ff:ff:ff:00 dst spec 33:00:00:00:00:02 dst mask ff:ff:ff:ff:ff:fe \ / ipv4 src spec 192.168.0.1 src mask 255.255.255.0 dst spec 192.168.0.2 dst mask 255.255.0.255 / end actions drop / end @@ -277,9 +277,9 @@ Then the ACL filter can filter the packet with dst mac address. 1. rule:: - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 / tcp / end actions vf id 1 / end - flow create 0 ingress pattern eth dst is 00:11:22:33:44:66 / ipv4 / tcp / end actions vf id 1 / end - flow create 0 ingress pattern eth dst is 00:11:22:33:66:55 / ipv4 / tcp / end actions vf id 1 / end + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 / tcp / end actions represented_port ethdev_port_id 1 / end + flow create 0 ingress pattern eth dst is 00:11:22:33:44:66 / ipv4 / tcp / end actions represented_port ethdev_port_id 1 / end + flow create 0 ingress pattern eth dst is 00:11:22:33:66:55 / ipv4 / tcp / end actions represented_port ethdev_port_id 1 / end flow create 0 ingress pattern eth dst spec 00:11:22:33:44:55 dst mask ff:ff:ff:ff:ff:00 / ipv4 / tcp / end actions drop / end 2. matched packets:: @@ -383,9 +383,9 @@ Subcase 8: src mac + dst mac + src ip + dst ip + src port + dst port(only 2ports --------------------------------------------------------------------------------------------- 1. rule:: - flow create 0 ingress pattern eth dst is 00:01:23:45:67:89 / ipv4 / tcp / end actions vf id 1 / end - flow create 0 ingress pattern eth dst is 5E:8E:8B:4D:89:06 / ipv4 / tcp / end actions vf id 1 / end - flow create 0 ingress pattern eth dst is 5E:8E:8B:4D:90:05 / ipv4 / tcp / end actions vf id 1 / end + flow create 0 ingress pattern eth dst is 00:01:23:45:67:89 / ipv4 / tcp / end actions represented_port ethdev_port_id 1 / end + flow create 0 ingress pattern eth dst is 5E:8E:8B:4D:89:06 / ipv4 / tcp / end actions represented_port ethdev_port_id 1 / end + flow create 0 ingress pattern eth dst is 5E:8E:8B:4D:90:05 / ipv4 / tcp / end actions represented_port ethdev_port_id 1 / end flow create 0 ingress pattern eth src spec 00:11:22:33:44:55 src mask ff:ff:ff:ff:ff:00 dst spec 00:01:23:45:67:89 dst mask ff:ff:ff:ff:00:ff \ / ipv4 src spec 192.168.0.1 src mask 255.255.255.0 dst spec 192.168.0.2 dst mask 255.255.0.255 \ / tcp src spec 8010 src mask 65520 dst spec 8017 dst mask 65520 / end actions drop / end @@ -878,15 +878,15 @@ Test Case 11: switch/acl/fdir/rss rules combination 2. create rules:: - flow create 0 ingress pattern eth / ipv4 src is 192.168.0.1 dst is 192.168.0.20 / tcp / end actions vf id 1 / end - flow create 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.20 / tcp / end actions vf id 1 / end - flow create 0 ingress pattern eth / ipv4 src is 192.168.0.3 dst is 192.168.0.20 / tcp / end actions vf id 1 / end - flow create 0 ingress pattern eth / ipv4 src is 192.168.0.4 dst is 192.168.0.20 / tcp / end actions vf id 1 / end + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.1 dst is 192.168.0.20 / tcp / end actions represented_port ethdev_port_id 1 / end + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.20 / tcp / end actions represented_port ethdev_port_id 1 / end + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.3 dst is 192.168.0.20 / tcp / end actions represented_port ethdev_port_id 1 / end + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.4 dst is 192.168.0.20 / tcp / end actions represented_port ethdev_port_id 1 / end flow create 0 ingress pattern eth / ipv4 src spec 192.168.0.2 src mask 255.255.255.254 / tcp / end actions drop / end flow create 0 ingress pattern eth / ipv4 dst spec 192.168.0.21 dst mask 255.255.0.255 / tcp / end actions drop / end - flow create 1 ingress pattern eth / ipv4 src is 192.168.0.1 dst is 192.168.0.20 / tcp src is 22 dst is 23 / end actions queue index 3 / mark / end - flow create 1 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.20 / tcp src is 22 dst is 23 / end actions queue index 3 / mark / end - flow create 1 ingress pattern eth / ipv4 src is 192.168.1.1 dst is 192.168.0.20 / tcp src is 22 dst is 23 / end actions queue index 3 / mark / end + flow create 2 ingress pattern eth / ipv4 src is 192.168.0.1 dst is 192.168.0.20 / tcp src is 22 dst is 23 / end actions queue index 3 / mark / end + flow create 2 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.20 / tcp src is 22 dst is 23 / end actions queue index 3 / mark / end + flow create 2 ingress pattern eth / ipv4 src is 192.168.1.1 dst is 192.168.0.20 / tcp src is 22 dst is 23 / end actions queue index 3 / mark / end 3. check the rule list:: @@ -898,7 +898,7 @@ Test Case 11: switch/acl/fdir/rss rules combination 3 0 0 i-- ETH IPV4 TCP => VF 4 0 0 i-- ETH IPV4 TCP => DROP 5 0 0 i-- ETH IPV4 TCP => DROP - testpmd> flow list 1 + testpmd> flow list 2 ID Group Prio Attr Rule 0 0 0 i-- ETH IPV4 TCP => QUEUE MARK 1 0 0 i-- ETH IPV4 TCP => QUEUE MARK @@ -915,14 +915,14 @@ Test Case 11: switch/acl/fdir/rss rules combination sendp(Ether(src="00:11:22:33:44:55", dst="00:01:23:45:67:89")/IP(src="192.168.1.1", dst="192.168.0.20")/TCP(sport=22,dport=23)/Raw(load="x"*30), iface="enp216s0f0") sendp(Ether(src="00:11:22:33:44:55", dst="00:01:23:45:67:89")/IP(src="192.168.1.1", dst="192.168.0.21")/TCP(sport=22,dport=23)/Raw(load="x"*30), iface="enp216s0f0") -5. check packet 1 is received by port 1 and redirected to queue 3 with FDIR matched ID=0x0. - packet 2 is received by port 1 and distributed by RSS without mark ID. - packet 3 is dropped by port 1. - packet 4 is dropped by port 1. - packet 5 is received by port 1 and distributed by RSS without mark ID. - packet 6 is can't received by port 0 and port 1. - packet 7 is received by port 1 and redirected to queue 3 with FDIR matched ID=0x0. - packet 8 is dropped by port 1. +5. check packet 1 is received by port 2 and redirected to queue 3 with FDIR matched ID=0x0. + packet 2 is received by port 2 and distributed by RSS without mark ID. + packet 3 is dropped by port 2. + packet 4 is dropped by port 2. + packet 5 is received by port 2 and distributed by RSS without mark ID. + packet 6 is can't received by port 0 and port 2. + packet 7 is received by port 2 and redirected to queue 3 with FDIR matched ID=0x0. + packet 8 is dropped by port 2. 6. delete rule ID 4 from port 0 and list the rules:: @@ -941,5 +941,5 @@ Test Case 11: switch/acl/fdir/rss rules combination sendp(Ether(src="00:11:22:33:44:55", dst="00:01:23:45:67:88")/IP(src="192.168.0.2", dst="192.168.0.20")/TCP(sport=22,dport=23)/Raw(load="x"*30), iface="enp216s0f0") sendp(Ether(src="00:11:22:33:44:55", dst="00:01:23:45:67:88")/IP(src="192.168.0.3", dst="192.168.0.20")/TCP(sport=22,dport=23)/Raw(load="x"*30), iface="enp216s0f0") -8. check packet 1 is received by port 1 and redirected to queue 3 with FDIR matched ID=0x0. - packet 2 is received by port 1 and distributed by RSS without mark ID. +8. check packet 1 is received by port 2 and redirected to queue 3 with FDIR matched ID=0x0. + packet 2 is received by port 2 and distributed by RSS without mark ID. From patchwork Wed Nov 30 03:53:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ke Xu X-Patchwork-Id: 120310 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 2651FA00C2; Wed, 30 Nov 2022 04:55:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2200242BD9; Wed, 30 Nov 2022 04:55:13 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 0091542D0C for ; Wed, 30 Nov 2022 04:55:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669780512; x=1701316512; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=oQHDm+fZVJsr87E5fHRegdUksvbRQGH+K+n6m9RW2Ec=; b=n2vRJ3JE27vvBU0u3OOJNaZgdW/jiw77rNW9i4IZGj+/8OkTtOV3pLdO AyqUfnIiCH9RJGEN6sHGCiNfBHznWETdr04g5ZGLLZyThR9wYngLvMImR slJ5PJmbdLVfMseZiXmUxm4SeLFbHXYWa05yRTgyYAMoirTcX86ee3+br PqrSaS8W5bmHE1bhErSF8qMy81fV9gJyW3hmFpu8Z4jkRQZGyDHI/973c 4NTL9jidAS3XAIsAJJR4eAcC/7Ffi800Pwvj/Z+Fi8+nNz1t1VLJCCKTe DM2Pvkx85qteJTf76rFzirponTftVpb9tn9KNMNR5/bn3W8a0Nm4Lv0pj g==; X-IronPort-AV: E=McAfee;i="6500,9779,10546"; a="295660525" X-IronPort-AV: E=Sophos;i="5.96,205,1665471600"; d="scan'208";a="295660525" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2022 19:55:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10546"; a="594517783" X-IronPort-AV: E=Sophos;i="5.96,205,1665471600"; d="scan'208";a="594517783" Received: from dpdk-xuke-lab.sh.intel.com ([10.67.114.198]) by orsmga003.jf.intel.com with ESMTP; 29 Nov 2022 19:55:10 -0800 From: Ke Xu To: dts@dpdk.org Cc: lijuan.tu@intel.com, Ke Xu , Jin Ling Subject: [DTS][PATCH V1 2/3] test_plans/ice_dcf_acl_filter: remove redundant white space Date: Wed, 30 Nov 2022 11:53:57 +0800 Message-Id: <20221130035358.98410-3-ke1.xu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221130035358.98410-1-ke1.xu@intel.com> References: <20221130035358.98410-1-ke1.xu@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 Signed-off-by: Jin Ling Signed-off-by: Ke Xu --- test_plans/ice_dcf_acl_filter_test_plan.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test_plans/ice_dcf_acl_filter_test_plan.rst b/test_plans/ice_dcf_acl_filter_test_plan.rst index f047598d..893c1078 100644 --- a/test_plans/ice_dcf_acl_filter_test_plan.rst +++ b/test_plans/ice_dcf_acl_filter_test_plan.rst @@ -522,14 +522,14 @@ while we can create 256 ipv4-udp/ipv4-tcp/ipv4-sctp rules at most. sendp([Ether(dst="00:01:23:45:67:89")/IP(src="192.168.1.0", dst="192.168.100.2")/UDP(sport=8010,dport=8017)/Raw(load='X'*30)], iface="enp134s0f1") check the packet can't be received by VF1. stop the forward:: - + ---------------------- Forward statistics for port 1 ---------------------- RX-packets: 0 RX-dropped: 0 RX-total: 0 TX-packets: 0 TX-dropped: 0 TX-total: 0 ---------------------------------------------------------------------------- 8. delete the rule 256 and 257:: - + flow destroy 0 rule 256 flow destroy 0 rule 257 @@ -542,7 +542,7 @@ while we can create 256 ipv4-udp/ipv4-tcp/ipv4-sctp rules at most. 9. create the rule in the step6 again, check the rule can be created as acl rule successfully. list the rules, there are rule 0-256 listed. - + 10.send packet2 again, check the packet dropped. stop the forward:: ---------------------- Forward statistics for port 1 ---------------------- @@ -565,7 +565,7 @@ Test Case 6: max entry number ipv4-other flow create 0 ingress pattern eth / ipv4 src spec 192.168.0.1 src mask 255.255.255.255 / end actions drop / end 3. create 64 ipv4-other ACL rules:: - + flow create 0 ingress pattern eth / ipv4 src spec 192.168.1.1 src mask 255.255.0.255 / end actions drop / end flow create 0 ingress pattern eth / ipv4 src spec 192.168.1.2 src mask 255.255.0.255 / end actions drop / end flow create 0 ingress pattern eth / ipv4 src spec 192.168.1.3 src mask 255.255.0.255 / end actions drop / end @@ -599,12 +599,12 @@ Test Case 6: max entry number ipv4-other sendp([Ether(dst="00:01:23:45:67:89")/IP(src="192.168.0.2", dst="192.168.1.2")/Raw(load='X'*30)], iface="enp134s0f1") check the packet can't be received by vf1. stop forward:: - + ---------------------- Forward statistics for port 1 ---------------------- RX-packets: 0 RX-dropped: 0 RX-total: 0 TX-packets: 0 TX-dropped: 0 TX-total: 0 ---------------------------------------------------------------------------- - + 8. delete the rule 64 and 65:: flow destroy 0 rule 64 From patchwork Wed Nov 30 03:53:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ke Xu X-Patchwork-Id: 120311 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 45E71A00C2; Wed, 30 Nov 2022 04:55:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4142742D11; Wed, 30 Nov 2022 04:55:16 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id E15A14014F for ; Wed, 30 Nov 2022 04:55:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669780514; x=1701316514; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=o2fJWBVU5hwcWWVCHsZgOJcaFkL4gmj7CS5qImneV60=; b=NZAK7GOcve7lVAKbrFMDCuThE1/KkddxyvYLFBwn1ZhnoYa+lZmD6aiy +nhOeyc+1TfPqYFayciXCWJ5c5E+2hzDDXnuUgRBsKJNMSPL4bi8esres zbHWUm7XLw5vh1hrLKJQuOGVfRmVv7RpjCzLAS+Rn6Ucihwc1TNX3PyeR gfNl/IbhE8oxynJYEL3epRHuq5qZxwjYZPiLIUPu+aj+3oFLuLCTX0Ivd yg/Ee9cqUKy2Wnv7Vhoe9UpFz71Xz7QshsYiGb33cRc+6zl2ILd0crQPQ RWOeKQbxC+u0aUen9nZUMr2X/fgyUnSElaOARd8FHkfq0DLAA3xA0mWo+ A==; X-IronPort-AV: E=McAfee;i="6500,9779,10546"; a="295660528" X-IronPort-AV: E=Sophos;i="5.96,205,1665471600"; d="scan'208";a="295660528" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2022 19:55:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10546"; a="594517791" X-IronPort-AV: E=Sophos;i="5.96,205,1665471600"; d="scan'208";a="594517791" Received: from dpdk-xuke-lab.sh.intel.com ([10.67.114.198]) by orsmga003.jf.intel.com with ESMTP; 29 Nov 2022 19:55:11 -0800 From: Ke Xu To: dts@dpdk.org Cc: lijuan.tu@intel.com, Ke Xu , Jin Ling Subject: [DTS][PATCH V1 3/3] tests/ice_dcf_acl_filter: update test plan to support represented port action from deprecated vf action Date: Wed, 30 Nov 2022 11:53:58 +0800 Message-Id: <20221130035358.98410-4-ke1.xu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221130035358.98410-1-ke1.xu@intel.com> References: <20221130035358.98410-1-ke1.xu@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 A new API is introduced to replace the VF actions in DPDK 22.11. To support This new API, several modifications are made. Methods create_testpmd_command, launch_testpmd and common_process are updated to support appyling representor to the existing testpmd setup. Testpmd args are modified to support appyling representors for the new API. Rules are modified for the old API being deprecated, changing to the new API. Ports id are modified corresponding to the port representors and modified API. Signed-off-by: Jin Ling Signed-off-by: Ke Xu --- tests/TestSuite_ice_dcf_acl_filter.py | 104 ++++++++++++++------------ 1 file changed, 57 insertions(+), 47 deletions(-) diff --git a/tests/TestSuite_ice_dcf_acl_filter.py b/tests/TestSuite_ice_dcf_acl_filter.py index 4fcca800..6c1ff54e 100644 --- a/tests/TestSuite_ice_dcf_acl_filter.py +++ b/tests/TestSuite_ice_dcf_acl_filter.py @@ -540,9 +540,9 @@ tv_mac_ipv4_pay_src_mac = { tv_mac_ipv4_pay_dst_mac = { "name": "test_mac_ipv4_pay_dst_mac", "rules": [ - "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 / end actions vf id 1 / end", - "flow create 0 ingress pattern eth dst is 00:11:22:33:44:66 / ipv4 / end actions vf id 1 / end", - "flow create 0 ingress pattern eth dst is 00:11:22:33:66:55 / ipv4 / end actions vf id 1 / end", + "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 / end actions represented_port ethdev_port_id 1 / end", + "flow create 0 ingress pattern eth dst is 00:11:22:33:44:66 / ipv4 / end actions represented_port ethdev_port_id 1 / end", + "flow create 0 ingress pattern eth dst is 00:11:22:33:66:55 / ipv4 / end actions represented_port ethdev_port_id 1 / end", "flow create 0 ingress pattern eth dst spec 00:11:22:33:44:55 dst mask ff:ff:ff:ff:ff:00 / ipv4 / end actions drop / end", ], "scapy_str": MAC_IPV4_PAY_DST_MAC, @@ -573,9 +573,9 @@ tv_mac_ipv4_pay_src_dst_ip = { tv_mac_ipv4_pay_src_dst_mac_src_dst_ip = { "name": "test_mac_ipv4_pay_src_dst_mac_src_dst_ip", "rules": [ - "flow create 0 ingress pattern eth dst is 33:00:00:00:00:01 / ipv4 / end actions vf id 1 / end", - "flow create 0 ingress pattern eth dst is 33:00:00:00:00:02 / ipv4 / end actions vf id 1 / end", - "flow create 0 ingress pattern eth dst is 33:00:00:00:00:03 / ipv4 / end actions vf id 1 / end", + "flow create 0 ingress pattern eth dst is 33:00:00:00:00:01 / ipv4 / end actions represented_port ethdev_port_id 1 / end", + "flow create 0 ingress pattern eth dst is 33:00:00:00:00:02 / ipv4 / end actions represented_port ethdev_port_id 1 / end", + "flow create 0 ingress pattern eth dst is 33:00:00:00:00:03 / ipv4 / end actions represented_port ethdev_port_id 1 / end", "flow create 0 ingress pattern eth src spec 00:11:22:33:44:55 src mask ff:ff:ff:ff:ff:00 dst spec 33:00:00:00:00:02 dst mask ff:ff:ff:ff:ff:fe / ipv4 src spec 192.168.0.1 src mask 255.255.255.0 dst spec 192.168.0.2 dst mask 255.255.0.255 / end actions drop / end", ], "scapy_str": MAC_IPV4_PAY_SRC_DST_MAC_SRC_DST_IP, @@ -592,9 +592,9 @@ tv_mac_ipv4_tcp_src_mac = { tv_mac_ipv4_tcp_dst_mac = { "name": "test_mac_ipv4_tcp_dst_mac", "rules": [ - "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 / tcp / end actions vf id 1 / end", - "flow create 0 ingress pattern eth dst is 00:11:22:33:44:66 / ipv4 / tcp / end actions vf id 1 / end", - "flow create 0 ingress pattern eth dst is 00:11:22:33:66:55 / ipv4 / tcp / end actions vf id 1 / end", + "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 / tcp / end actions represented_port ethdev_port_id 1 / end", + "flow create 0 ingress pattern eth dst is 00:11:22:33:44:66 / ipv4 / tcp / end actions represented_port ethdev_port_id 1 / end", + "flow create 0 ingress pattern eth dst is 00:11:22:33:66:55 / ipv4 / tcp / end actions represented_port ethdev_port_id 1 / end", "flow create 0 ingress pattern eth dst spec 00:11:22:33:44:55 dst mask ff:ff:ff:ff:ff:00 / ipv4 / tcp / end actions drop / end", ], "scapy_str": MAC_IPV4_TCP_DST_MAC, @@ -639,9 +639,9 @@ tv_mac_ipv4_tcp_src_dst_ip_src_dst_port = { tv_mac_ipv4_tcp_src_dst_mac_src_dst_ip_src_dst_port = { "name": "test_mac_ipv4_tcp_src_dst_mac_src_dst_ip_src_dst_port", "rules": [ - "flow create 0 ingress pattern eth dst is 33:00:00:00:00:01 / ipv4 / end actions vf id 1 / end", - "flow create 0 ingress pattern eth dst is 33:00:00:00:00:02 / ipv4 / end actions vf id 1 / end", - "flow create 0 ingress pattern eth dst is 33:00:00:00:00:03 / ipv4 / end actions vf id 1 / end", + "flow create 0 ingress pattern eth dst is 33:00:00:00:00:01 / ipv4 / end actions represented_port ethdev_port_id 1 / end", + "flow create 0 ingress pattern eth dst is 33:00:00:00:00:02 / ipv4 / end actions represented_port ethdev_port_id 1 / end", + "flow create 0 ingress pattern eth dst is 33:00:00:00:00:03 / ipv4 / end actions represented_port ethdev_port_id 1 / end", "flow create 0 priority 0 ingress pattern eth src spec 00:11:22:33:44:55 src mask ff:ff:ff:ff:ff:00 dst spec 33:00:00:00:00:02 dst mask ff:ff:ff:ff:ff:fe / ipv4 src spec 192.168.0.1 src mask 255.255.255.0 dst spec 192.168.0.2 dst mask 255.255.0.255 / tcp src spec 8010 src mask 65520 dst spec 8017 dst mask 65520 / end actions drop / end", ], "scapy_str": MAC_IPV4_TCP_SRC_DST_MAC_SRC_DST_IP_SRC_DST_PORT, @@ -658,9 +658,9 @@ tv_mac_ipv4_udp_src_mac = { tv_mac_ipv4_udp_dst_mac = { "name": "test_mac_ipv4_udp_dst_mac", "rules": [ - "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 / udp / end actions vf id 1 / end", - "flow create 0 ingress pattern eth dst is 00:11:22:33:44:66 / ipv4 / udp / end actions vf id 1 / end", - "flow create 0 ingress pattern eth dst is 00:11:22:33:66:55 / ipv4 / udp / end actions vf id 1 / end", + "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 / udp / end actions represented_port ethdev_port_id 1 / end", + "flow create 0 ingress pattern eth dst is 00:11:22:33:44:66 / ipv4 / udp / end actions represented_port ethdev_port_id 1 / end", + "flow create 0 ingress pattern eth dst is 00:11:22:33:66:55 / ipv4 / udp / end actions represented_port ethdev_port_id 1 / end", "flow create 0 ingress pattern eth dst spec 00:11:22:33:44:55 dst mask ff:ff:ff:ff:ff:00 / ipv4 / udp / end actions drop / end", ], "scapy_str": MAC_IPV4_UDP_DST_MAC, @@ -705,9 +705,9 @@ tv_mac_ipv4_udp_src_dst_ip_src_dst_port = { tv_mac_ipv4_udp_src_dst_mac_src_dst_ip_src_dst_port = { "name": "test_mac_ipv4_udp_src_dst_mac_src_dst_ip_src_dst_port", "rules": [ - "flow create 0 ingress pattern eth dst is 33:00:00:00:00:01 / ipv4 / udp / end actions vf id 1 / end", - "flow create 0 ingress pattern eth dst is 33:00:00:00:00:02 / ipv4 / udp / end actions vf id 1 / end", - "flow create 0 ingress pattern eth dst is 33:00:00:00:00:03 / ipv4 / udp / end actions vf id 1 / end", + "flow create 0 ingress pattern eth dst is 33:00:00:00:00:01 / ipv4 / udp / end actions represented_port ethdev_port_id 1 / end", + "flow create 0 ingress pattern eth dst is 33:00:00:00:00:02 / ipv4 / udp / end actions represented_port ethdev_port_id 1 / end", + "flow create 0 ingress pattern eth dst is 33:00:00:00:00:03 / ipv4 / udp / end actions represented_port ethdev_port_id 1 / end", "flow create 0 priority 0 ingress pattern eth src spec 00:11:22:33:44:55 src mask ff:ff:ff:ff:ff:00 dst spec 33:00:00:00:00:03 dst mask ff:ff:ff:ff:ff:fe / ipv4 src spec 192.168.0.1 src mask 255.255.255.0 dst spec 192.168.0.2 dst mask 255.255.0.255 / udp src spec 8010 src mask 65520 dst spec 8017 dst mask 65520 / end actions drop / end", ], "scapy_str": MAC_IPV4_UDP_SRC_DST_MAC_SRC_DST_IP_SRC_DST_PORT, @@ -930,28 +930,36 @@ class ICEDCFACLFilterTest(TestCase): Run before each test case. """ - def create_testpmd_command(self, param): + def create_testpmd_command(self,param="",repre_vf=False): """ Create testpmd command """ - # Prepare testpmd EAL and parameters - all_eal_param = self.dut.create_eal_parameters( + if repre_vf: + all_eal_param = self.dut.create_eal_parameters( cores="1S/4C/1T", ports=[self.vf0_pci, self.vf1_pci], - port_options={self.vf0_pci: "cap=dcf"}, + port_options={self.vf0_pci: "cap=dcf,representor=vf[1]"}, ) + else: + # Prepare testpmd EAL and parametes + all_eal_param = self.dut.create_eal_parameters( + cores="1S/4C/1T", + ports=[self.vf0_pci, self.vf1_pci], + port_options={self.vf0_pci: "cap=dcf"}, + ) command = self.path + all_eal_param + "--log-level='ice,7'" + " -- -i" + param return command - def launch_testpmd(self, param=""): + def launch_testpmd(self, param="",repre_vf=False,): """ launch testpmd with the command """ time.sleep(5) - command = self.create_testpmd_command(param) + command = self.create_testpmd_command(param,repre_vf) + port_id = 2 if repre_vf else 1 out = self.dut.send_expect(command, "testpmd> ", 20) self.testpmd_status = "running" - self.dut.send_expect("set portlist 1", "testpmd> ", 15) + self.dut.send_expect("set portlist {}".format(port_id), "testpmd> ", 15) self.dut.send_expect("set fwd rxonly", "testpmd> ", 15) self.dut.send_expect("set verbose 1", "testpmd> ", 15) self.pmd_output.execute_cmd("start") @@ -1115,15 +1123,17 @@ class ICEDCFACLFilterTest(TestCase): else: return destroy_list - def common_process(self, vectors, launch_testpmd=True): + def common_process(self, vectors,launch_testpmd=True,repre_vf=False): if launch_testpmd: # launch testpmd - self.launch_testpmd() + self.launch_testpmd(repre_vf=repre_vf) test_results = {} for test_vector in vectors: try: + if repre_vf: + test_vector["check_param"]["port_id"] = 2 self.dut.send_expect("flow flush 0", "testpmd> ", 120) # create a rule @@ -1169,19 +1179,19 @@ class ICEDCFACLFilterTest(TestCase): if self.nic == "ICE_25G-E810C_SFP": self.common_process(vectors_ipv4_pay_4ports) else: - self.common_process(vectors_ipv4_pay_2ports) + self.common_process(vectors_ipv4_pay_2ports,repre_vf=True) def test_mac_ipv4_tcp(self): if self.nic == "ICE_25G-E810C_SFP": self.common_process(vectors_ipv4_tcp_4ports) else: - self.common_process(vectors_ipv4_tcp_2ports) + self.common_process(vectors_ipv4_tcp_2ports,repre_vf=True) def test_mac_ipv4_udp(self): if self.nic == "ICE_25G-E810C_SFP": self.common_process(vectors_ipv4_udp_4ports) else: - self.common_process(vectors_ipv4_udp_2ports) + self.common_process(vectors_ipv4_udp_2ports,repre_vf=True) def test_mac_ipv4_sctp(self): if self.nic == "ICE_25G-E810C_SFP": @@ -1289,7 +1299,7 @@ class ICEDCFACLFilterTest(TestCase): # start testpmd with creating 512 ACL rules param = " --cmdline-file=%s" % (self.dut_file_dir + src_file) - out_testpmd = self.launch_testpmd(param) + out_testpmd = self.launch_testpmd(param=param) self.check_dcf_status(out_testpmd, stats=True) rule_list = self.dut.send_expect("flow list 0", "testpmd> ", 15) self.verify("159" in rule_list, "160 rules failed to be created") @@ -1341,7 +1351,7 @@ class ICEDCFACLFilterTest(TestCase): # start testpmd with creating 255 ACL rules param = " --cmdline-file=%s" % (self.dut_file_dir + src_file) - out_testpmd = self.launch_testpmd(param) + out_testpmd = self.launch_testpmd(param=param) self.check_dcf_status(out_testpmd, stats=True) rule_list = self.dut.send_expect("flow list 0", "testpmd> ", 15) self.verify("254" in rule_list, "255 rules failed to be created") @@ -1636,23 +1646,23 @@ class ICEDCFACLFilterTest(TestCase): create switch, acl and fdir rules simultaneously. """ param = " --rxq=16 --txq=16" - out_testpmd = self.launch_testpmd(param) + out_testpmd = self.launch_testpmd(repre_vf=True,param=param) self.check_dcf_status(out_testpmd, stats=True) rules = { "switch": [ - "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.1 dst is 192.168.0.20 / tcp / end actions vf id 1 / end", - "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.20 / tcp / end actions vf id 1 / end", - "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.3 dst is 192.168.0.20 / tcp / end actions vf id 1 / end", - "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.4 dst is 192.168.0.20 / tcp / end actions vf id 1 / end", + "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.1 dst is 192.168.0.20 / tcp / end actions represented_port ethdev_port_id 1 / end", + "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.20 / tcp / end actions represented_port ethdev_port_id 1 / end", + "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.3 dst is 192.168.0.20 / tcp / end actions represented_port ethdev_port_id 1 / end", + "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.4 dst is 192.168.0.20 / tcp / end actions represented_port ethdev_port_id 1 / end", ], "acl": [ "flow create 0 ingress pattern eth / ipv4 src spec 192.168.0.2 src mask 255.255.255.254 / tcp / end actions drop / end", "flow create 0 ingress pattern eth / ipv4 dst spec 192.168.0.21 dst mask 255.255.0.255 / tcp / end actions drop / end", ], "fdir": [ - "flow create 1 ingress pattern eth / ipv4 src is 192.168.0.1 dst is 192.168.0.20 / tcp src is 22 dst is 23 / end actions queue index 3 / mark / end", - "flow create 1 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.20 / tcp src is 22 dst is 23 / end actions queue index 3 / mark / end", - "flow create 1 ingress pattern eth / ipv4 src is 192.168.1.1 dst is 192.168.0.20 / tcp src is 22 dst is 23 / end actions queue index 3 / mark / end", + "flow create 2 ingress pattern eth / ipv4 src is 192.168.0.1 dst is 192.168.0.20 / tcp src is 22 dst is 23 / end actions queue index 3 / mark / end", + "flow create 2 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.20 / tcp src is 22 dst is 23 / end actions queue index 3 / mark / end", + "flow create 2 ingress pattern eth / ipv4 src is 192.168.1.1 dst is 192.168.0.20 / tcp src is 22 dst is 23 / end actions queue index 3 / mark / end", ], } switch_rule_list = self.create_other_filter_rule( @@ -1662,7 +1672,7 @@ class ICEDCFACLFilterTest(TestCase): acl_rule_list = self.create_acl_filter_rule(rules["acl"], check_stats=True) self.check_filter_rule_list(0, switch_rule_list + acl_rule_list) fdir_rule_list = self.create_other_filter_rule(rules["fdir"], check_stats=True) - self.check_filter_rule_list(1, fdir_rule_list) + self.check_filter_rule_list(2, fdir_rule_list) packets = { "drop": [ @@ -1687,7 +1697,7 @@ class ICEDCFACLFilterTest(TestCase): rfc.check_drop( out_drop, pkt_num=len(packets["drop"]), - check_param={"port_id": 1, "drop": 1}, + check_param={"port_id": 2, "drop": 1}, stats=True, ) @@ -1695,19 +1705,19 @@ class ICEDCFACLFilterTest(TestCase): rfc.check_iavf_fdir_mark( out_mark, pkt_num=len(packets["mark"]), - check_param={"port_id": 1, "queue": 3, "mark_id": 0}, + check_param={"port_id": 2, "queue": 3, "mark_id": 0}, ) out_rss = self.send_pkts_getouput(pkts=packets["rss"]) rfc.check_iavf_fdir_mark( out_rss, pkt_num=len(packets["rss"]), - check_param={"port_id": 1, "passthru": 1}, + check_param={"port_id": 2, "passthru": 1}, ) out_noreceived = self.send_pkts_getouput(pkts=packets["noreceived"]) rfc.check_iavf_fdir_mark( - out_noreceived, pkt_num=0, check_param={"port_id": 1, "passthru": 1} + out_noreceived, pkt_num=0, check_param={"port_id": 2, "passthru": 1} ) self.dut.send_expect("flow destroy 0 rule 4", "testpmd> ", 15) @@ -1719,12 +1729,12 @@ class ICEDCFACLFilterTest(TestCase): out_mark = self.send_pkts_getouput(pkts=packets["mark"]) rfc.check_iavf_fdir_mark( - out_mark, pkt_num=1, check_param={"port_id": 1, "queue": 3, "mark_id": 0} + out_mark, pkt_num=1, check_param={"port_id": 2, "queue": 3, "mark_id": 0} ) out_rss = self.send_pkts_getouput(pkts=packets["rss"]) rfc.check_iavf_fdir_mark( - out_rss, pkt_num=1, check_param={"port_id": 1, "passthru": 1} + out_rss, pkt_num=1, check_param={"port_id": 2, "passthru": 1} ) def check_dcf_status(self, out_testpmd, stats=True):