From patchwork Wed Nov 30 06:38:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jin Ling X-Patchwork-Id: 120334 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 98B74A00C3; Wed, 30 Nov 2022 07:38:29 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 509B442D0D; Wed, 30 Nov 2022 07:38:29 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 8888C40151 for ; Wed, 30 Nov 2022 07:38:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669790307; x=1701326307; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xpVXMr/2KCj+60rBVAUASlQmNr68hD8NJ8KF+EuQOcc=; b=ZOm/6eGB/fzXF7B0OtlyRiqt/9x40+LUf9m6zMWJYpMOlDNA1Jl6ruKA FCDU1mkHauiyv2Vrhxmrlct0QQ9sRTEEztNwYbXWE71QPnZ3uaV3mHCvR zDcnW9Ci+qNcSW9xf/6eb5pLNTFjpa4w0Ql7zkcwxnwSFqeqnlXqIF9Mx 68eQuwn2HxyMMsvDN+3zEL5YNf9TxcWFkHiwOvFkYLzWDVKB6VydJeUD4 bSEJ2Mkwf0ZShYlgyhVxwDEGWYx/r2fw7MRZynuH6yq9M0Q491yrX8RgG e/8kbb6KhNZIEjYzG/nOmMQmKMlQTahPi99e8HccdD2fHg4k5XGhQqRLu A==; X-IronPort-AV: E=McAfee;i="6500,9779,10546"; a="379600373" X-IronPort-AV: E=Sophos;i="5.96,205,1665471600"; d="scan'208";a="379600373" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2022 22:38:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10546"; a="637882703" X-IronPort-AV: E=Sophos;i="5.96,205,1665471600"; d="scan'208";a="637882703" Received: from dpdk-lingjin.sh.intel.com ([10.67.115.8]) by orsmga007.jf.intel.com with ESMTP; 29 Nov 2022 22:38:24 -0800 From: Jin Ling To: dts@dpdk.org Cc: lijuan.tu@intel.com, yuan.peng@intel.com, Jin Ling Subject: [DTS][PATCH V2 2/3] test_plans/ice_disable_acl_filter: add ice_dcf_disable_acl_filter test plan Date: Wed, 30 Nov 2022 14:38:00 +0800 Message-Id: <20221130063801.4135296-3-jin.ling@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221130063801.4135296-1-jin.ling@intel.com> References: <20221130063801.4135296-1-jin.ling@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 The startup time of ACL engine is too long (6s+), so add a devargs that customers can use it to disable/enable ACL engine. add new test plan to test if ACL engine is disabled. Signed-off-by: Jin Ling --- .../ice_dcf_disable_acl_filter_test_plan.rst | 254 ++++++++++++++++++ 1 file changed, 254 insertions(+) create mode 100644 test_plans/ice_dcf_disable_acl_filter_test_plan.rst diff --git a/test_plans/ice_dcf_disable_acl_filter_test_plan.rst b/test_plans/ice_dcf_disable_acl_filter_test_plan.rst new file mode 100644 index 00000000..f8577b97 --- /dev/null +++ b/test_plans/ice_dcf_disable_acl_filter_test_plan.rst @@ -0,0 +1,254 @@ +.. Copyright (c) <2015-2017>, Intel Corporation + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + - Neither the name of Intel Corporation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + +========================== +ICE DCF DISABLE ACL engine +========================== + +Description +=========== + +Support disabling DCF ACL engine via devarg "acl=off" in cmdline, aiming to shorten the DCF startup time. +After disabling the ACL engine, some of the rules supported by the ACL engine will be created by the Switch engine and others will failed to be created, +as shown in the following table. + ++-----------+-------------------------------------------------------------------------+---------+---------+ +| Pattern | Input Set | ACL | Switch | ++===========+=========================================================================+=========+=========+ +| IPv4 | [Source MAC] | success | fail | ++-----------+-------------------------------------------------------------------------+---------+---------+ +| | [Dest MAC] | success | success | ++-----------+-------------------------------------------------------------------------+---------+---------+ +| | [Source IP] | success | success | ++-----------+-------------------------------------------------------------------------+---------+---------+ +| | [Dest IP] | success | success | ++-----------+-------------------------------------------------------------------------+---------+---------+ +| | [Source IP],[Dest IP] | success | success | ++-----------+-------------------------------------------------------------------------+---------+---------+ +| | [Source MAC],[Dest MAC],[Source IP],[Dest IP] | success | fail | ++-----------+-------------------------------------------------------------------------+---------+---------+ +| IPv4_TCP | [Source MAC] | success | fail | ++-----------+-------------------------------------------------------------------------+---------+---------+ +| | [Dest MAC] | success | success | ++-----------+-------------------------------------------------------------------------+---------+---------+ +| | [Source IP] | success | success | ++-----------+-------------------------------------------------------------------------+---------+---------+ +| | [Dest IP] | success | success | ++-----------+-------------------------------------------------------------------------+---------+---------+ +| | [Source port] | success | success | ++-----------+-------------------------------------------------------------------------+---------+---------+ +| | [Dest port] | success | success | ++-----------+-------------------------------------------------------------------------+---------+---------+ +| | [Source IP],[Dest IP],[Source port],[Dest port] | success | success | ++-----------+-------------------------------------------------------------------------+---------+---------+ +| | [Source MAC],[Dest MAC],[Source IP],[Dest IP],[Source port],[Dest port] | success | fail | ++-----------+-------------------------------------------------------------------------+---------+---------+ +| IPv4_UDP | [Source MAC] | success | fail | ++-----------+-------------------------------------------------------------------------+---------+---------+ +| | [Dest MAC] | success | success | ++-----------+-------------------------------------------------------------------------+---------+---------+ +| | [Source IP] | success | success | ++-----------+-------------------------------------------------------------------------+---------+---------+ +| | [Dest IP] | success | success | ++-----------+-------------------------------------------------------------------------+---------+---------+ +| | [Source port] | success | success | ++-----------+-------------------------------------------------------------------------+---------+---------+ +| | [Dest port] | success | success | ++-----------+-------------------------------------------------------------------------+---------+---------+ +| | [Source IP],[Dest IP],[Source port],[Dest port] | success | success | ++-----------+-------------------------------------------------------------------------+---------+---------+ +| | [Source MAC],[Dest MAC],[Source IP],[Dest IP],[Source port],[Dest port] | success | fail | ++-----------+-------------------------------------------------------------------------+---------+---------+ +| IPv4_SCTP | all input sets | success | fail | ++-----------+-------------------------------------------------------------------------+---------+---------+ + + +Prerequisites +============= + +Topology +-------- + + dut_port_0 <---> tester_port_0 + + dut_port_1 <---> tester_port_1 + +Hardware +-------- + + Supportted NICs: columbiaville_25g/columbiaville_100g + +Software +-------- + + dpdk: http://dpdk.org/git/dpdk + + scapy: http://www.secdev.org/projects/scapy/ + +General set up +-------------- + +1. Compile DPDK:: + + CC=gcc meson -Denable_kmods=True -Dlibdir=lib --default-library=static x86_64-native-linuxapp-gcc + ninja -C x86_64-native-linuxapp-gcc + +2. Get the pci device id of DUT, for example:: + + ./usertools/dpdk-devbind.py -s + + 0000:17:00.0 'Ethernet Controller E810-C for QSFP 1592' if=ens9 drv=ice unused=vfio-pci + +3. Generate 2 VFs on PF0:: + + echo 2 > /sys/bus/pci/devices/0000:17:00.0/sriov_numvfs + + ./usertools/dpdk-devbind.py -s + 0000:17:01.0 'Ethernet Adaptive Virtual Function 1889' drv=vfio-pci unused=iavf + 0000:17:01.1 'Ethernet Adaptive Virtual Function 1889' drv=vfio-pci unused=iavf + +4. Set VF0 as trust and set VF1 mac adress:: + + ip link set ens9 vf 0 trust on + ip link set enp9 vf 1 mac 00:01:23:45:67:89 + +5. Bind VFs to dpdk driver:: + + modprobe vfio-pci + ./usertools/dpdk-devbind.py -b vfio-pci 0000:17:01.0 0000:17:01.1 + +6. Start testpmd on VF0, VF0 request DCF mode and set `devargs` parameter "acl=off" to disable the ACL engine:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:17:01.0,cap=dcf,acl=off --file-prefix=vf0 --log-level="ice,7" -- -i + + Check that when starting testpmd, the application prints "ice_flow_init():Engine 4 disabled" + + Quit testpmd:: + + testpmd> quit + + Check that when quitting testpmd, the application prints "ice_flow_uninit():Engine 4 disabled skip it" + +Test Case +========= + +Test Case 1: Compare start-up time +----------------------------------- +It takes too much time to enable the ACL engine when starting testpmd, so the startup time should be shortened after disabling ACL. + +test steps +~~~~~~~~~~ + +1. Disable ACL, execute command and record the time "start_time_disable_acl":: + + echo quit | time ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:17:01.0,cap=dcf,acl=off --file-prefix=vf0 --log-level="ice,7" -- -i + +2. Enable ACL, execute command and record the time "start_time_enable_acl":: + + echo quit | time ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:17:01.0,cap=dcf --file-prefix=vf1 --log-level="ice,7" -- -i + +3. Repeat step 1~2 for at least 5 times to get the average time of "start_time_disable_acl" and "start_time_enable_acl". + + +expected result +~~~~~~~~~~~~~~~ + + Check that the average start-up time with "acl=off" is at least 6 seconds shorter than that without "acl=off". + +Test Case 2: disable ACL engine +------------------------------- + +test steps +~~~~~~~~~~ + +1. Start testpmd:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:17:01.0,cap=dcf,acl=off -a 17:01.1 --file-prefix=vf0 --log-level="ice,7" -- -i + +2. Create ACL rules on port 0:: + + Switch supported rules:: + + ipv4: + flow create 0 ingress pattern eth dst spec 00:11:22:33:44:55 dst mask ff:ff:ff:ff:ff:ff / ipv4 / end actions drop / end + flow create 0 ingress pattern eth / ipv4 src spec 192.168.0.1 src mask 255.255.255.0 / end actions drop / end + flow create 0 ingress pattern eth / ipv4 dst spec 192.168.0.2 dst mask 255.255.255.0 / end actions drop / end + flow create 0 ingress pattern eth / 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 + ipv4_tcp: + 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 + flow create 0 ingress pattern eth / ipv4 src spec 192.168.0.1 src mask 255.255.255.254 / tcp / end actions drop / end + flow create 0 ingress pattern eth / ipv4 dst spec 192.168.0.2 dst mask 255.255.255.243 / tcp / end actions drop / end + flow create 0 ingress pattern eth / ipv4 / tcp src spec 8010 src mask 65520 / end actions drop / end + flow create 0 ingress pattern eth / ipv4 / tcp dst spec 8010 dst mask 65520 / end actions drop / end + flow create 0 ingress pattern eth / 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 + ipvv4_udp: + 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 + flow create 0 ingress pattern eth / ipv4 src spec 192.168.0.1 src mask 255.255.255.254 / udp / end actions drop / end + flow create 0 ingress pattern eth / ipv4 dst spec 192.168.0.2 dst mask 255.255.255.243 / udp / end actions drop / end + flow create 0 ingress pattern eth / ipv4 / udp src spec 8010 src mask 65520 / end actions drop / end + flow create 0 ingress pattern eth / ipv4 / udp dst spec 8010 dst mask 65520 / end actions drop / end + flow create 0 ingress pattern eth / 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 + + Switch not supported rules:: + + ipv4: + flow create 0 ingress pattern eth src spec 00:11:22:33:44:55 src mask 00:ff:ff:ff:ff:ff / ipv4 / end actions drop / 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 + ipv4_tcp: + flow create 0 ingress pattern eth src spec 00:11:22:33:44:55 src mask ff:ff:ff:ff:ff:fe / ipv4 / tcp / end actions drop / 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 + ipvv4_udp: + flow create 0 ingress pattern eth src spec 00:11:22:33:44:55 src mask ff:ff:ff:ff:ff:fe / ipv4 / udp / end actions drop / 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 / udp src spec 8010 src mask 65520 dst spec 8017 dst mask 65520 / end actions drop / end + ipv4_sctp: + flow create 0 ingress pattern eth src spec 00:11:22:33:44:55 src mask ff:ff:ff:ff:ff:fe / ipv4 / sctp / end actions drop / end + flow create 0 ingress pattern eth dst spec 00:11:22:33:44:55 dst mask ff:ff:ff:ff:ff:00 / ipv4 / sctp / end actions drop / end + flow create 0 ingress pattern eth / ipv4 src spec 192.168.0.1 src mask 255.255.255.254 / sctp / end actions drop / end + flow create 0 ingress pattern eth / ipv4 dst spec 192.168.0.2 dst mask 255.255.255.243 / sctp / end actions drop / end + flow create 0 ingress pattern eth / ipv4 / sctp src spec 8010 src mask 65520 / end actions drop / end + flow create 0 ingress pattern eth / ipv4 / sctp dst spec 8010 dst mask 65520 / end actions drop / end + flow create 0 ingress pattern eth / 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 / sctp src spec 8010 src mask 65520 dst spec 8017 dst mask 65520 / end actions drop / 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 / sctp src spec 8010 src mask 65520 dst spec 8017 dst mask 65520 / end actions drop / end + +expected result +~~~~~~~~~~~~~~~ + + Check that Switch support rules will be created:: + + ice_flow_create(): Succeeded to create (2) flow + + Switch not support rules will be created failed:: + + ice_flow_create(): Failed to create flow + port_flow_complain(): Caught PMD error type 10 (item specification): cause: 0x7ffd63133730,Invalid input set: Invalid argument + + Both outputs mean that the ACL engine has been disabled.