From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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. -- 2.25.1