diff mbox series

[V1,2/3] test_plans/generic_flow_api: add two test cases

Message ID 20210825183034.63754-3-linglix.chen@intel.com (mailing list archive)
State Accepted
Headers show
Series generic_flow_api: add two test cases | expand

Commit Message

Chen, LingliX Aug. 25, 2021, 6:30 p.m. UTC
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(+)

Comments

Lin, Xueqin Aug. 30, 2021, 6:06 a.m. UTC | #1
> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Lingli Chen
> Sent: Thursday, August 26, 2021 2:31 AM
> To: dts@dpdk.org
> Cc: Chen, LingliX <linglix.chen@intel.com>
> Subject: [dts] [PATCH V1 2/3] test_plans/generic_flow_api: add two test
> cases
> 
> add new Test case: create same rule after destroy/ create different rule after
> destroy.
> 
> Signed-off-by: Lingli Chen <linglix.chen@intel.com>
Acked-by: Xueqin Lin <xueqin.lin@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
diff mbox series

Patch

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.