From patchwork Wed Aug 25 18:30:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lingli Chen X-Patchwork-Id: 97327 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 067A3A0C53; Wed, 25 Aug 2021 12:28:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F0626411DB; Wed, 25 Aug 2021 12:28:47 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 6098A411E4 for ; Wed, 25 Aug 2021 12:28:46 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10086"; a="204629115" X-IronPort-AV: E=Sophos;i="5.84,350,1620716400"; d="scan'208";a="204629115" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2021 03:28:46 -0700 X-IronPort-AV: E=Sophos;i="5.84,350,1620716400"; d="scan'208";a="464736213" Received: from unknown (HELO localhost.localdomain) ([10.240.183.77]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2021 03:28:44 -0700 From: Lingli Chen To: dts@dpdk.org Cc: Lingli Chen Date: Wed, 25 Aug 2021 18:30:33 +0000 Message-Id: <20210825183034.63754-3-linglix.chen@intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210825183034.63754-1-linglix.chen@intel.com> References: <20210825183034.63754-1-linglix.chen@intel.com> MIME-Version: 1.0 Subject: [dts] [PATCH V1 2/3] test_plans/generic_flow_api: add two test cases 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 Sender: "dts" add new Test case: create same rule after destroy/ create different rule after destroy. Signed-off-by: Lingli Chen Acked-by: Xueqin Lin --- test_plans/generic_flow_api_test_plan.rst | 46 +++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/test_plans/generic_flow_api_test_plan.rst b/test_plans/generic_flow_api_test_plan.rst index 71f16187..d1fa33bd 100644 --- a/test_plans/generic_flow_api_test_plan.rst +++ b/test_plans/generic_flow_api_test_plan.rst @@ -1996,3 +1996,49 @@ Test case: Dual vlan(QinQ) 3). send packet as step 2 with changed ivlan id, got hash value and queue value that output from the testpmd on DUT, the value should be different with the values in step 2 & step 1) & step 2). + +Test case: create same rule after destroy +========================================= + +1. Launch the app ``testpmd`` with the following arguments:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1,2,3,4,5,6,7,8 -n 4 -- -i --disable-rss --rxq=16 --txq=16 + testpmd> set fwd rxonly + testpmd> set verbose 1 + testpmd> start + +2. create same rule after destroy:: + + testpmd>flow create 0 ingress pattern eth / ipv4 / udp src is 32 / end actions queue index 2 / end + testpmd>flow destroy 0 rule 0 + testpmd>flow create 0 ingress pattern eth / ipv4 / udp src is 32 / end actions queue index 2 / end + +3. send match and mismatch packets to check if rule work:: + + pkt1 = Ether()/IP()/UDP(sport=32)/Raw('x' * 20) + pkt2 = Ether()/IP()/UDP(dport=32)/Raw('x' * 20) + + verify match pkt1 to queue 2, verify mismatch pkt2 to queue 0. + +Test case: create different rule after destroy +============================================== + +1. Launch the app ``testpmd`` with the following arguments:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1,2,3,4,5,6,7,8 -n 4 -- -i --disable-rss --rxq=16 --txq=16 + testpmd> set fwd rxonly + testpmd> set verbose 1 + testpmd> start + +2. create different rule after destroy:: + + testpmd>flow create 0 ingress pattern eth / ipv4 / udp src is 32 / end actions queue index 2 / end + testpmd>flow destroy 0 rule 0 + testpmd>flow create 0 ingress pattern eth / ipv4 / udp dst is 32 / end actions queue index 2 / end + +3. send match and mismatch packets to check if rule work:: + + pkt1 = Ether()/IP()/UDP(sport=32)/Raw('x' * 20) + pkt2 = Ether()/IP()/UDP(dport=32)/Raw('x' * 20) + + verify match pkt2 to queue 2, verify mismatch pkt1 to queue 0.