From patchwork Fri Jun 10 07:06:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu Jiang X-Patchwork-Id: 112643 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 B2916A0555; Fri, 10 Jun 2022 09:06:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A2BB2410E5; Fri, 10 Jun 2022 09:06:38 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id ED45E40689 for ; Fri, 10 Jun 2022 09:06:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654844797; x=1686380797; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=23HtEVCU/K3PDzclGUOa5XGHBZS0tOiCEKoxp8bYnaU=; b=On63gOUrNRExRB6CIW650QyfJ1F15LX8tmJ63pTRy1TITy7PzCjMn8GY 2v4Jfp3Ecb1h50fB/b0PsXc7p9tsUilDEUOQVzpoteIDxhSEl9AXUQILR 53CkeoaE1lXBYNGrpLVWE9M+P9JUJTyEAXv4MW7iEPXRk0DB5wX7duCTo 7BE2y15dRqSB1s0cx2dM0Xq01XSDcPKDsOnEfPWoGkrgjPXByrbntwJUz D/UA3/1ZDhxkPQnMh/bLJhbBZaGiVhvpG+9Ot38gZfIXOKf5FCG3ppVjE RpKsEewfsUxOJV8EZmszxzasNHVMDFMbsneWgNYJvFWJeD15Ow/j0YrzG Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10373"; a="257370826" X-IronPort-AV: E=Sophos;i="5.91,288,1647327600"; d="scan'208";a="257370826" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2022 00:06:36 -0700 X-IronPort-AV: E=Sophos;i="5.91,288,1647327600"; d="scan'208";a="637985291" Received: from unknown (HELO localhost.localdomain.localdomain) ([10.239.251.127]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2022 00:06:35 -0700 From: "Yu.Jiang" To: yuan.peng@intel.com, dts@dpdk.org Cc: Yu Jiang Subject: [dts][PATCH V1 1/2] test_plans/l3fwdacl: merge l3fwd-acl wtih l3fwd Date: Fri, 10 Jun 2022 15:06:20 +0800 Message-Id: <1654844781-6435-2-git-send-email-yux.jiang@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1654844781-6435-1-git-send-email-yux.jiang@intel.com> References: <1654844781-6435-1-git-send-email-yux.jiang@intel.com> 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 From: Yu Jiang According to dpdk22.07rc1 commit id 6de0ea50e("examples/l3fwd: merge l3fwd-acl example"), modify l3fwdacl test plan. Signed-off-by: Yu Jiang --- test_plans/l3fwdacl_test_plan.rst | 69 +++++++++++++++++++++---------- 1 file changed, 47 insertions(+), 22 deletions(-) diff --git a/test_plans/l3fwdacl_test_plan.rst b/test_plans/l3fwdacl_test_plan.rst index cf838ac0..34f978bc 100644 --- a/test_plans/l3fwdacl_test_plan.rst +++ b/test_plans/l3fwdacl_test_plan.rst @@ -12,6 +12,8 @@ This document contains the test plan and results for testing ``l3fwd-acl`` using the ACL library for access control and L3 forwarding. +Refer to http://git.dpdk.org/dpdk/tree/doc/guides/sample_app_ug/l3_forward.rst + The ``l3fwd-acl`` application uses an IPv4 5-tuple syntax for packet matching. The 5-tuple consist of source IP address, destination IP address, source port, destination port and a protocol identifier. @@ -44,12 +46,35 @@ Prerequisites insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko ./usertools/dpdk-devbind.py --bind=igb_uio 04:00.0 04:00.1 -Build dpdk and examples=l3fwd-acl: - CC=gcc meson -Denable_kmods=True -Dlibdir=lib --default-library=static - ninja -C - - meson configure -Dexamples=l3fwd-acl - ninja -C +3. Build dpdk and examples=l3fwd:: + + CC=gcc meson -Denable_kmods=True -Dlibdir=lib --default-library=static + ninja -C + meson configure -Dexamples=l3fwd + ninja -C + +4. Run l3fwd-acl by using "--lookup acl" on L3FWD:: + + The application has a number of command line options: + .//examples/dpdk-l3fwd [EAL options] -- -p PORTMASK + --rule_ipv4=FILE + --rule_ipv6=FILE + [-P] + [--lookup LOOKUP_METHOD] + --config(port,queue,lcore)[,(port,queue,lcore)] + [--eth-dest=X,MM:MM:MM:MM:MM:MM] + [--max-pkt-len PKTLEN] + [--no-numa] + [--hash-entry-num] + [--ipv6] + [--parse-ptype] + [--per-port-pool] + [--mode] + [--eventq-sched] + [--event-eth-rxqs] + [--event-vector [--event-vector-size SIZE] [--event-vector-tmo NS]] + [-E] + [-L] Test Case: packet match ACL rule ================================ @@ -63,7 +88,7 @@ Ipv4 packet match source ip address 200.10.0.1 will be dropped:: Add one default rule in rule file /root/rule_ipv6.db R0:0:0:0:0:0:0:0/0 0:0:0:0:0:0:0:0/0 0 : 65535 0 : 65535 0x00/0x00 0 - .//examples/dpdk-l3fwd-acl -c ff -n 3 -- -p 0x3 --config="(0,0,2),(1,0,3)" + .//examples/dpdk-l3fwd -c ff -n 3 -- -p 0x3 --lookup acl --parse-ptype --config="(0,0,2),(1,0,3)" --rule_ipv4="/root/rule_ipv4.db" --rule_ipv6="/root/rule_ipv6.db" Send one ipv4 packet with source ip address 200.10.0.1 will be dropped. @@ -78,7 +103,7 @@ Ipv4 packet match destination ip address 100.10.0.1 will be dropped:: Add one default rule in rule file /root/rule_ipv6.db R0:0:0:0:0:0:0:0/0 0:0:0:0:0:0:0:0/0 0 : 65535 0 : 65535 0x00/0x00 0 - .//examples/dpdk-l3fwd-acl -c ff -n 3 -- -p 0x3 --config="(0,0,2),(1,0,3)" + .//examples/dpdk-l3fwd -c ff -n 3 -- -p 0x3 --lookup acl --parse-ptype --config="(0,0,2),(1,0,3)" --rule_ipv4="/root/rule_ipv4.db" --rule_ipv6="/root/rule_ipv6.db" Send one ipv4 packet with destination ip address 100.10.0.1 will be dropped. @@ -93,7 +118,7 @@ Ipv4 packet match source port 11 will be dropped:: Add one default rule in rule file /root/rule_ipv6.db R0:0:0:0:0:0:0:0/0 0:0:0:0:0:0:0:0/0 0 : 65535 0 : 65535 0x00/0x00 0 - .//examples/dpdk-l3fwd-acl -c ff -n 3 -- -p 0x3 --config="(0,0,2),(1,0,3)" + .//examples/dpdk-l3fwd -c ff -n 3 -- -p 0x3 --lookup acl --parse-ptype --config="(0,0,2),(1,0,3)" --rule_ipv4="/root/rule_ipv4.db" --rule_ipv6="/root/rule_ipv6.db" Send one ipv4 packet with source port 11 will be dropped. @@ -108,7 +133,7 @@ Ipv4 packet match destination port 101 will be dropped:: Add one default rule in rule file /root/rule_ipv6.db R0:0:0:0:0:0:0:0/0 0:0:0:0:0:0:0:0/0 0 : 65535 0 : 65535 0x00/0x00 0 - .//examples/dpdk-l3fwd-acl -c ff -n 3 -- -p 0x3 --config="(0,0,2),(1,0,3)" + .//examples/dpdk-l3fwd -c ff -n 3 -- -p 0x3 --lookup acl --parse-ptype --config="(0,0,2),(1,0,3)" --rule_ipv4="/root/rule_ipv4.db" --rule_ipv6="/root/rule_ipv6.db" Send one ipv4 packet with destination port 101 will be dropped. @@ -123,7 +148,7 @@ Ipv4 packet match protocol TCP will be dropped:: Add one default rule in rule file /root/rule_ipv6.db R0:0:0:0:0:0:0:0/0 0:0:0:0:0:0:0:0/0 0 : 65535 0 : 65535 0x00/0x00 0 - .//examples/dpdk-l3fwd-acl -c ff -n 3 -- -p 0x3 --config="(0,0,2),(1,0,3)" + .//examples/dpdk-l3fwd -c ff -n 3 -- -p 0x3 --lookup acl --parse-ptype --config="(0,0,2),(1,0,3)" --rule_ipv4="/root/rule_ipv4.db" --rule_ipv6="/root/rule_ipv6.db" Send one TCP ipv4 packet will be dropped. @@ -138,7 +163,7 @@ Ipv4 packet match 5-tuple will be dropped:: Add one default rule in rule file /root/rule_ipv6.db R0:0:0:0:0:0:0:0/0 0:0:0:0:0:0:0:0/0 0 : 65535 0 : 65535 0x00/0x00 0 - .//examples/dpdk-l3fwd-acl -c ff -n 3 -- -p 0x3 --config="(0,0,2),(1,0,3)" + .//examples/dpdk-l3fwd -c ff -n 3 -- -p 0x3 --lookup acl --parse-ptype --config="(0,0,2),(1,0,3)" --rule_ipv4="/root/rule_ipv4.db" --rule_ipv6="/root/rule_ipv6.db" Send one TCP ipv4 packet with source ip address 200.10.0.1, @@ -158,7 +183,7 @@ Ipv6 packet match source ipv6 address 2001:0db8:85a3:08d3:1319:8a2e:0370:7344/12 Add one default rule in rule file /root/rule_ipv4.db R0.0.0.0/0 0.0.0.0/0 0 : 65535 0 : 65535 0x00/0x00 0 - .//examples/dpdk-l3fwd-acl -c ff -n 3 -- -p 0x3 --config="(0,0,2),(1,0,3)" + .//examples/dpdk-l3fwd -c ff -n 3 -- -p 0x3 --lookup acl --parse-ptype --config="(0,0,2),(1,0,3)" --rule_ipv4="/root/rule_ipv4.db" --rule_ipv6="/root/rule_ipv6.db" Send one ipv6 packet with source ip address 2001:0db8:85a3:08d3:1319:8a2e:0370:7344/128 will be dropped. @@ -173,7 +198,7 @@ Ipv6 packet match destination ipv6 address 2002:0db8:85a3:08d3:1319:8a2e:0370:73 Add one default rule in rule file /root/rule_ipv4.db R0.0.0.0/0 0.0.0.0/0 0 : 65535 0 : 65535 0x00/0x00 0 - .//examples/dpdk-l3fwd-acl -c ff -n 3 -- -p 0x3 --config="(0,0,2),(1,0,3)" + .//examples/dpdk-l3fwd -c ff -n 3 -- -p 0x3 --lookup acl --parse-ptype --config="(0,0,2),(1,0,3)" --rule_ipv4="/root/rule_ipv4.db" --rule_ipv6="/root/rule_ipv6.db" Send one ipv6 packet with destination ip address 2002:0db8:85a3:08d3:1319:8a2e:0370:7344/128 will be dropped. @@ -188,7 +213,7 @@ Ipv6 packet match source port 11 will be dropped:: Add one default rule in rule file /root/rule_ipv4.db R0.0.0.0/0 0.0.0.0/0 0 : 65535 0 : 65535 0x00/0x00 0 - .//examples/dpdk-l3fwd-acl -c ff -n 3 -- -p 0x3 --config="(0,0,2),(1,0,3)" + .//examples/dpdk-l3fwd -c ff -n 3 -- -p 0x3 --lookup acl --parse-ptype --config="(0,0,2),(1,0,3)" --rule_ipv4="/root/rule_ipv4.db" --rule_ipv6="/root/rule_ipv6.db" Send one ipv6 packet with source port 11 will be dropped. @@ -203,7 +228,7 @@ Ipv6 packet match destination port 101 will be dropped:: Add one default rule in rule file /root/rule_ipv4.db R0.0.0.0/0 0.0.0.0/0 0 : 65535 0 : 65535 0x00/0x00 0 - .//examples/dpdk-l3fwd-acl -c ff -n 3 -- -p 0x3 --config="(0,0,2),(1,0,3)" + .//examples/dpdk-l3fwd -c ff -n 3 -- -p 0x3 --lookup acl --parse-ptype --config="(0,0,2),(1,0,3)" --rule_ipv4="/root/rule_ipv4.db" --rule_ipv6="/root/rule_ipv6.db" Send one ipv6 packet with destination port 101 will be dropped. @@ -218,7 +243,7 @@ Ipv6 packet match protocol TCP will be dropped:: Add one default rule in rule file /root/rule_ipv4.db R0.0.0.0/0 0.0.0.0/0 0 : 65535 0 : 65535 0x00/0x00 0 - .//examples/dpdk-l3fwd-acl -c ff -n 3 -- -p 0x3 --config="(0,0,2),(1,0,3)" + .//examples/dpdk-l3fwd -c ff -n 3 -- -p 0x3 --lookup acl --parse-ptype --config="(0,0,2),(1,0,3)" --rule_ipv4="/root/rule_ipv4.db" --rule_ipv6="/root/rule_ipv6.db" Send one TCP ipv6 packet will be dropped. @@ -233,7 +258,7 @@ Ipv6 packet match 5-tuple will be dropped:: Add one default rule in rule file /root/rule_ipv4.db R0.0.0.0/0 0.0.0.0/0 0 : 65535 0 : 65535 0x00/0x00 0 - .//examples/dpdk-l3fwd-acl -c ff -n 3 -- -p 0x3 --config="(0,0,2),(1,0,3)" + .//examples/dpdk-l3fwd -c ff -n 3 -- -p 0x3 --lookup acl --parse-ptype --config="(0,0,2),(1,0,3)" --rule_ipv4="/root/rule_ipv4.db" --rule_ipv6="/root/rule_ipv6.db" Send one TCP ipv6 packet with source ip address 2001:0db8:85a3:08d3:1319:8a2e:0370:7344/128, @@ -259,7 +284,7 @@ Add two exact rule as below in rule_ipv6.db:: Start l3fwd-acl and send packet:: - .//examples/dpdk-l3fwd-acl -c ff -n 3 -- -p 0x3 --config="(0,0,2),(1,0,3)" + .//examples/dpdk-l3fwd -c ff -n 3 -- -p 0x3 --lookup acl --parse-ptype --config="(0,0,2),(1,0,3)" --rule_ipv4="/root/rule_ipv4.db" --rule_ipv6="/root/rule_ipv6.db" Send one TCP ipv4 packet with source ip address 200.10.0.1, destination @@ -290,7 +315,7 @@ Add two LPM rule as below in rule_ipv6.db:: Start l3fwd-acl and send packet:: - .//examples/dpdk-l3fwd-acl -c ff -n 3 -- -p 0x3 --config="(0,0,2),(1,0,3)" + .//examples/dpdk-l3fwd -c ff -n 3 -- -p 0x3 --lookup acl --parse-ptype --config="(0,0,2),(1,0,3)" --rule_ipv4="/root/rule_ipv4.db" --rule_ipv6="/root/rule_ipv6.db" Send one TCP ipv4 packet with destination ip address 1.1.1.1 will be forward to PORT0. @@ -311,7 +336,7 @@ Packet match 5-tuple will be dropped:: @2001:0db8:85a3:08d3:1319:8a2e:0370:7344/128 2002:0db8:85a3:08d3:1319:8a2e:0370:7344/101 11 : 11 101 : 101 0x06/0xff R0:0:0:0:0:0:0:0/0 0:0:0:0:0:0:0:0/0 0 : 65535 0 : 65535 0x00/0x00 0 - .//examples/dpdk-l3fwd-acl -c ff -n 3 -- -p 0x3 --config="(0,0,2),(1,0,3)" + .//examples/dpdk-l3fwd -c ff -n 3 -- -p 0x3 --lookup acl --parse-ptype --config="(0,0,2),(1,0,3)" --rule_ipv4="/root/rule_ipv4.db" --rule_ipv6="/root/rule_ipv6.db" --scalar Send one TCP ipv4 packet with source ip address 200.10.0.1, destination ip address 100.10.0.1, @@ -341,7 +366,7 @@ Add two ACL rule as below in rule_ipv6.db:: Start l3fwd-acl:: - .//examples/dpdk-l3fwd-acl -c ff -n 3 -- -p 0x3 --config="(0,0,2),(1,0,3)" + .//examples/dpdk-l3fwd -c ff -n 3 -- -p 0x3 --lookup acl --parse-ptype --config="(0,0,2),(1,0,3)" --rule_ipv4="/root/rule_ipv4.db" --rule_ipv6="/root/rule_ipv6.db" The l3fwdacl will not set up because of ivalid ACL rule. From patchwork Fri Jun 10 07:06:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu Jiang X-Patchwork-Id: 112644 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 C7503A0553; Fri, 10 Jun 2022 09:06:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C14EA42802; Fri, 10 Jun 2022 09:06:40 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id E4ACC42802 for ; Fri, 10 Jun 2022 09:06:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654844799; x=1686380799; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=I4nRrMbAurRzArhnZj4dfHJer+WXlocXi+CGGatz4pM=; b=dDdglgwzQs8dpl2eQxTbD4l9JHR0KYuJiuSy1bUYnTuwYBElzlAcPJy/ ivDqLx1ih5AKH9hCXoev4nmgIypw1GOGUUp8mJwCxnrr4rt5CrigEYX2U xCdcM/Qo+Tl6HYDYeoPr5K62ZxU01ffPePyQ1wXjuoLW/CwC43GE86CVn Y889su5OGwq6/5pekpkmXOmv1dOsd8FJwCoIWUFl0TIVSkebvdj+eypUK ODZgeL6jfrE7/CpUg6CruABH7CvtZm2+X0RnjZf0Ckd6KVpqb2ehcPYx+ pDuraTAkXu2Dupt1ty59COezHF1Adwqo9C4E5BANb0ovaYR8/89UeQp2u g==; X-IronPort-AV: E=McAfee;i="6400,9594,10373"; a="257370829" X-IronPort-AV: E=Sophos;i="5.91,288,1647327600"; d="scan'208";a="257370829" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2022 00:06:38 -0700 X-IronPort-AV: E=Sophos;i="5.91,288,1647327600"; d="scan'208";a="637985296" Received: from unknown (HELO localhost.localdomain.localdomain) ([10.239.251.127]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2022 00:06:36 -0700 From: "Yu.Jiang" To: yuan.peng@intel.com, dts@dpdk.org Cc: Yu Jiang , Lingli Chen Subject: [dts][PATCH V1 2/2] tests/l3fwdacl: merge l3fwd-acl wtih l3fwd and modify it to support different force-max-simd-bitwidth Date: Fri, 10 Jun 2022 15:06:21 +0800 Message-Id: <1654844781-6435-3-git-send-email-yux.jiang@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1654844781-6435-1-git-send-email-yux.jiang@intel.com> References: <1654844781-6435-1-git-send-email-yux.jiang@intel.com> 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 From: Yu Jiang 1, According to dpdk22.07rc1 commit id 6de0ea50e("examples/l3fwd: merge l3fwd-acl example"), modify l3fwdacl suite. 2, Since DTS commit "7eaf4b60 tests/l3fwdacl: modify pmd param for acl" has incorrect usage, modify script to support different force-max-simd-bitwidth para. Signed-off-by: Lingli Chen Signed-off-by: Yu Jiang --- conf/app_name.cfg | 3 +-- tests/TestSuite_l3fwdacl.py | 49 ++++++++++++++++++++++--------------- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/conf/app_name.cfg b/conf/app_name.cfg index 5d3244da..84f65c92 100644 --- a/conf/app_name.cfg +++ b/conf/app_name.cfg @@ -37,7 +37,6 @@ l2fwd-event=target/examples/dpdk-l2fwd-event l2fwd-jobstats=target/examples/dpdk-l2fwd-jobstats l2fwd-keepalive=target/examples/dpdk-l2fwd-keepalive l3fwd=target/examples/dpdk-l3fwd -l3fwd-acl=target/examples/dpdk-l3fwd-acl l3fwd-power=target/examples/dpdk-l3fwd-power link_status_interrupt=target/examples/dpdk-link_status_interrupt ntb=target/examples/dpdk-ntb @@ -68,4 +67,4 @@ node=target/examples/dpdk-efd_node server=target/examples/dpdk-efd_server testpmd_vf=target/app/dpdk-testpmd-vf vm_power_manager=target/examples/dpdk-vm_power_manager -guest_cli=target/examples/dpdk-guest_cli \ No newline at end of file +guest_cli=target/examples/dpdk-guest_cli diff --git a/tests/TestSuite_l3fwdacl.py b/tests/TestSuite_l3fwdacl.py index 0876b978..ebaa80ea 100644 --- a/tests/TestSuite_l3fwdacl.py +++ b/tests/TestSuite_l3fwdacl.py @@ -355,7 +355,7 @@ class TestL3fwdacl(TestCase): extra_args = '--alg="scalar"' cmdline = ( - '%s %s -- -p %s --config="(%d,0,2),(%d,0,3)" --rule_ipv4="%s" --rule_ipv6="%s" %s' + '%s %s -- -p %s --lookup acl --config="(%d,0,2),(%d,0,3)" --rule_ipv4="%s" --rule_ipv6="%s" %s --parse-ptype' % ( self.app_l3fwd_acl_path, self.eal_para, @@ -447,6 +447,9 @@ class TestL3fwdacl(TestCase): """ tx_interface = self.tester.get_interface(tx_port) rx_interface = self.tester.get_interface(rx_port) + # wait tester's interface up + for intfx in [tx_interface, rx_interface]: + self.tester.is_interface_up(intf=intfx) if rule["sIpAddr"] != "ALL": rule["sIpAddr"] = self.create_ipv4_ip_not_match(rule["sIpAddr"]) if rule["dIpAddr"] != "ALL": @@ -478,6 +481,9 @@ class TestL3fwdacl(TestCase): """ tx_interface = self.tester.get_interface(tx_port) rx_interface = self.tester.get_interface(rx_port) + # wait tester's interface up + for intfx in [tx_interface, rx_interface]: + self.tester.is_interface_up(intf=intfx) if rule["sIpAddr"] != "ALL": rule["sIpAddr"] = self.create_ipv6_ip_not_match(rule["sIpAddr"]) if rule["dIpAddr"] != "ALL": @@ -499,7 +505,6 @@ class TestL3fwdacl(TestCase): pkt = packet.Packet() pkt.append_pkt(ethernet_str) pkt.send_pkt(crb=self.tester, tx_port=tx_interface, timeout=30) - out = self.remove_dhcp_from_revpackets(inst) return len(out) @@ -509,6 +514,9 @@ class TestL3fwdacl(TestCase): """ tx_interface = self.tester.get_interface(tx_port) rx_interface = self.tester.get_interface(rx_port) + # wait tester's interface up + for intfx in [tx_interface, rx_interface]: + self.tester.is_interface_up(intf=intfx) etherStr = self.create_ipv4_rule_string(rule, "Ether") dst_filter = {"layer": "ether", "config": {"dst": "not ff:ff:ff:ff:ff:ff"}} @@ -526,6 +534,9 @@ class TestL3fwdacl(TestCase): """ tx_interface = self.tester.get_interface(tx_port) rx_interface = self.tester.get_interface(rx_port) + # wait tester's interface up + for intfx in [tx_interface, rx_interface]: + self.tester.is_interface_up(intf=intfx) etherStr = self.create_ipv6_rule_string(rule, "Ether") fil = [{"layer": "ether", "config": {"dst": "not ff:ff:ff:ff:ff:ff"}}] @@ -533,7 +544,6 @@ class TestL3fwdacl(TestCase): pkt = packet.Packet() pkt.append_pkt(etherStr) pkt.send_pkt(crb=self.tester, tx_port=tx_interface, timeout=30) - out = self.remove_dhcp_from_revpackets(inst) return len(out) @@ -807,7 +817,7 @@ class TestL3fwdacl(TestCase): self.create_acl_ipv4_db(rule_list) cmdline = ( - '%s %s -- -p %s --config="(%d,0,2),(%d,0,3)" --rule_ipv4="%s" --rule_ipv6="%s"' + '%s %s -- -p %s --lookup acl --config="(%d,0,2),(%d,0,3)" --rule_ipv4="%s" --rule_ipv6="%s" --parse-ptype' % ( self.app_l3fwd_acl_path, self.eal_para, @@ -834,7 +844,7 @@ class TestL3fwdacl(TestCase): self.create_acl_ipv6_db(rule_list) cmdline = ( - '%s %s -- -p %s --config="(%d,0,2),(%d,0,3)" --rule_ipv4="%s" --rule_ipv6="%s"' + '%s %s -- -p %s --lookup acl --config="(%d,0,2),(%d,0,3)" --rule_ipv4="%s" --rule_ipv6="%s" --parse-ptype' % ( self.app_l3fwd_acl_path, self.eal_para, @@ -867,14 +877,17 @@ class TestL3fwdacl(TestCase): cores = self.get_core_list() self.verify(cores is not None, "Insufficient cores for speed testing") - self.eal_para = self.dut.create_eal_parameters( - cores=self.get_core_list(), other_eal_param="force-max-simd-bitwidth" - ) + self.eal_para = self.dut.create_eal_parameters(cores=self.get_core_list()) self.core_mask = utils.create_mask(cores) print("Core mask: %s" % self.core_mask) - - if self.dut.dpdk_version >= "20.11.0": - self.eal_para += " --force-max-simd-bitwidth=0" + # When execution.cfg set rx_mode=xxx, it should have priority. + if "force-max-simd-bitwidth" in self.eal_para: + print("eal_para".format(self.eal_para)) + pass + else: + # DTS commit 68bb1b92("tests/l3fwdacl: try to use highest available method") when dpdk > 20.11.0 by konstantin.ananyev@intel.com + if self.dut.dpdk_version >= "20.11.0": + self.eal_para += " --force-max-simd-bitwidth=0" valid_ports = [port for port in ports if self.tester.get_local_port(port) != -1] self.verify( @@ -889,11 +902,8 @@ class TestL3fwdacl(TestCase): TestL3fwdacl.default_rule["Port"] = self.dut_ports[1] - # compile l3fwd-acl - out = self.dut.build_dpdk_apps("examples/l3fwd-acl") - self.app_l3fwd_acl_path = self.dut.apps_name["l3fwd-acl"] - self.verify("Error" not in out, "compilation error 1") - self.verify("No such file" not in out, "compilation error 2") + # dpdk22.07-rc1 commit 6de0ea50("examples/l3fwd: merge l3fwd-acl example"), compile l3fwd example. + self.app_l3fwd_acl_path = self.dut.build_dpdk_apps("examples/l3fwd") def test_l3fwdacl_acl_rule(self): """ @@ -1025,8 +1035,7 @@ class TestL3fwdacl(TestCase): TestL3fwdacl.lpm_rule_list_ipv6[1], tx_port, rx_port ) - self.dut.send_expect("^C", "#", 20) - + self.dut.send_expect("^C", "#", 30) self.verify(out1 >= 1, "Rx port0 not receive expected packet") self.verify(out2 >= 1, "Rx port1 not receive expected packet") @@ -1103,7 +1112,7 @@ class TestL3fwdacl(TestCase): self.create_acl_ipv4_db(rule_list_ipv4) cmdline = ( - '%s %s -- -p %s --config="(%d,0,2),(%d,0,3)" --rule_ipv4="%s" --rule_ipv6="%s" --alg="scalar"' + '%s %s -- -p %s --lookup acl --config="(%d,0,2),(%d,0,3)" --rule_ipv4="%s" --rule_ipv6="%s" --alg="scalar" --parse-ptype' % ( self.app_l3fwd_acl_path, self.eal_para, @@ -1123,7 +1132,7 @@ class TestL3fwdacl(TestCase): self.create_acl_ipv6_db(rule_list_ipv6) cmdline = ( - '%s %s -- -p %s --config="(%d,0,2),(%d,0,3)" --rule_ipv4="%s" --rule_ipv6="%s" --alg="scalar"' + '%s %s -- -p %s --lookup acl --config="(%d,0,2),(%d,0,3)" --rule_ipv4="%s" --rule_ipv6="%s" --alg="scalar" --parse-ptype' % ( self.app_l3fwd_acl_path, self.eal_para,