test suite reviews and discussions
 help / color / mirror / Atom feed
From: Lingli Chen <linglix.chen@intel.com>
To: dts@dpdk.org
Cc: Lingli Chen <linglix.chen@intel.com>
Subject: [dts] [PATCH V1 2/3] test_plans/generic_flow_api: add two test cases
Date: Wed, 25 Aug 2021 18:30:33 +0000	[thread overview]
Message-ID: <20210825183034.63754-3-linglix.chen@intel.com> (raw)
In-Reply-To: <20210825183034.63754-1-linglix.chen@intel.com>

add new Test case: create same rule after destroy/ create different rule after destroy.

Signed-off-by: Lingli Chen <linglix.chen@intel.com>
---
 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.
-- 
2.32.0


  parent reply	other threads:[~2021-08-25 10:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25 18:30 [dts] [PATCH V1 0/3] generic_flow_api: " Lingli Chen
2021-08-25 18:30 ` [dts] [PATCH V1 1/3] conf/test_case_checklist: add two cases about nic not support Lingli Chen
2021-08-25 18:30 ` Lingli Chen [this message]
2021-08-30  6:06   ` [dts] [PATCH V1 2/3] test_plans/generic_flow_api: add two test cases Lin, Xueqin
2021-08-25 18:30 ` [dts] [PATCH V1 3/3] tests/generic_flow_api: " Lingli Chen
2021-08-30  6:06   ` Lin, Xueqin
2021-08-26  2:14 ` [dts] [PATCH V1 0/3] generic_flow_api: " Chen, LingliX
2021-09-03  4:51   ` Tu, Lijuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210825183034.63754-3-linglix.chen@intel.com \
    --to=linglix.chen@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).