test suite reviews and discussions
 help / color / Atom feed
* [dts] [PATCH V1] test_plans: add test plan for cvl rteflow priority
@ 2019-11-29 15:41 qifu
  2019-12-04  5:53 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: qifu @ 2019-11-29 15:41 UTC (permalink / raw)
  To: dts; +Cc: qifu

add test plan for cvl rteflow priority.

Signed-off-by: qifu <qi.fu@intel.com>
---
 test_plans/rteflow_priority_test_plan.rst | 333 ++++++++++++++++++++++
 1 file changed, 333 insertions(+)
 create mode 100644 test_plans/rteflow_priority_test_plan.rst

diff --git a/test_plans/rteflow_priority_test_plan.rst b/test_plans/rteflow_priority_test_plan.rst
new file mode 100644
index 0000000..81d78d2
--- /dev/null
+++ b/test_plans/rteflow_priority_test_plan.rst
@@ -0,0 +1,333 @@
+.. Copyright (c) <2010-2017>, Intel Corporation
+   All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the
+     distribution.
+
+   - Neither the name of Intel Corporation nor the names of its
+     contributors may be used to endorse or promote products derived
+     from this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+   COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+   OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+===========================
+CVL Rte_flow Priority Tests
+===========================
+
+
+Description
+===========
+
+This document provides the plan for testing the Rte_flow Priority feature.
+this feature uses devargs as a hint to active flow priority or not.
+when priority is not active, flows are created on fdir then switch/ACL.
+when priority is active, flows are identified into 2 category: 
+High priority as permission stage that maps to switch/ACL,
+Low priority as distribution stage that maps to fdir,
+a no destination high priority rule is not acceptable, since it may be overwritten by a low priority rule due to cvl FXP behavior.
+
+
+Prerequisites
+=============
+
+If using vfio the kernel must be >= 3.6+ and VT-d must be enabled in bios.When
+using vfio, use the following commands to load the vfio driver and bind it
+to the device under test::
+
+   modprobe vfio
+   modprobe vfio-pci
+   usertools/dpdk-devbind.py --bind=vfio-pci device_bus_id
+
+bind the pf to dpdk driver::
+   ./usertools/dpdk-devbind.py -b vfio-pci af:00.0
+
+
+Test case: Setting Priority in non-pipeline mode
+===================================================
+
+Priority is not active in non-pipeline mode. The default value of priority is 0 but it will be ignored
+
+Start the ``testpmd`` application as follows::
+
+   ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w 0000:af:00.0 -- -i --txq=8 --rxq=8
+   set fwd rxonly
+   set verbose 1
+
+create a rule::
+
+   flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions queue index 2 / end
+
+check the flow can be created but it will map to fdir filter.
+
+create a rule::
+
+   flow create 0 priority 1 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions queue index 2 / end
+
+check the flow can not be created for the vallue of priority is 0 in non-pipeline mode.
+
+Start the ``testpmd`` application as follows::
+
+   ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w 0000:af:00.0,pipeline-mode-support=0 -- -i --txq=8 --rxq=8
+   set fwd rxonly
+   set verbose 1
+
+create a rule::
+
+   flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions queue index 2 / end
+
+check the flow can be created but it will map to fdir filter.
+
+create a rule::
+
+   flow create 0 priority 1 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions queue index 2 / end
+
+check the flow can not be created.
+
+
+Test case: Create flow rules with priority in pipeline mode
+=============================================================
+
+Priority is active in pipeline mode. 
+create flow rules and set priority 0/1 to map switch/fdir filter separately.
+
+Start the ``testpmd`` application as follows::
+
+   ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w 0000:af:00.0,pipeline-mode-support=1 -- -i --txq=8 --rxq=8
+   set fwd rxonly
+   set verbose 1
+   rx_vxlan_port add 4789 0 
+
+create switch filter rules::
+
+   MAC_IPV4_TCP
+   flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 25 dst is 23 / end actions queue index 1 / end
+
+   MAC_IPV4_VXLAN_IPV4_UDP_PAY
+   flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 25 dst is 23 / end actions queue index 2 / end
+
+create fdir filter rules::
+
+   MAC_IPV4_TCP
+   flow create 0 priority 1 ingress pattern eth / ipv4 src is 192.168.0.4 dst is 192.168.0.7 tos is 4 ttl is 20 / tcp src is 25 dst is 23 / end actions queue index 3 / end
+
+   MAC_IPV4_VXLAN_IPV4_UDP_PAY
+   flow create 0 priority 1 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.4 dst is 192.168.0.7 / udp src is 25 dst is 23 / end actions queue index 4 / end
+
+check flow list with commands "flow list 0", all flows are created correctly::
+    
+    ID      Group   Prio    Attr    Rule
+    0       0       0       i--     ETH IPV4 TCP => QUEUE
+    1       ...
+    2       ...
+    3       ...
+
+send packets according to the created rules, check the packets are recieved in right queues::
+
+   sendp([Ether(dst="00:00:00:00:11:00",src="11:22:33:44:55:66")/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=25,dport=23)/Raw('x'*80)],iface="enp134s0f0")
+   sendp([Ether(dst="00:00:00:00:11:00",src="11:22:33:44:55:66")/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=25,dport=23)/Raw('x'*80)],iface="enp134s0f0")
+   sendp([Ether(dst="00:00:00:00:11:00",src="11:22:33:44:55:66")/IP(src="192.168.0.4",dst="192.168.0.7",tos=4,ttl=20)/TCP(sport=25,dport=23)/Raw('x'*80)],iface="enp134s0f0")
+   sendp([Ether(dst="00:00:00:00:11:00",src="11:22:33:44:55:66")/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.4 ",dst="192.168.0.7")/UDP(sport=25,dport=23)/Raw('x'*80)],iface="enp134s0f0")
+
+create rules without priority::
+
+   flow create 0 ingress pattern eth / ipv4 src is 192.168.0.3 dst is 192.168.0.1 tos is 5 / tcp src is 25 dst is 23 / end actions queue index 1 / end
+   flow create 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 ttl is 20 / sctp src is 25 dst is 23 / end actions queue index 1 / end
+
+check only patterns supported by switch can be created for the default priorty is 0.
+So the first flow can be created and the second flow can not be created.
+
+
+Test case: Create no destination high priority flow rule
+=============================================================
+
+a no destination high priority rule is not acceptable. Destination here means exact actions.
+
+Start the ``testpmd`` application as follows::
+
+   ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w 0000:af:00.0,pipeline-mode-support=1 -- -i --txq=8 --rxq=8
+   set fwd rxonly
+   set verbose 1
+
+create a rule::
+
+   flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 25 dst is 23 / end actions / end
+   flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 25 dst is 23 / end 
+
+check the flows can not be created.
+
+
+Test case: Create flow rules only supported by fdir filter with priority 0
+===========================================================================
+
+create a rule only supported by fdir filter with priority 0, it is not acceptable.
+
+Start the ``testpmd`` application as follows::
+
+   ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w 0000:af:00.0,pipeline-mode-support=1 -- -i --txq=8 --rxq=8
+   set fwd rxonly
+   set verbose 1 
+
+create rules::
+
+   MAC_IPV6_SCTP
+   flow create 0 priority 0 ingress pattern eth / ipv6 src is 1111:2222:3333:4444:5555:6666:7777:8888 dst is 1111:2222:3333:4444:5555:6666:7777:9999 / sctp src is 25 dst is 23 / end actions queue index 1 / end
+
+   MAC_IPV4_SCTP
+   flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 ttl is 20 / sctp src is 25 dst is 23 / end actions queue index 1 / end
+
+check the flows can not be created.
+
+
+Test case: Create flow rules only supported by switch filter with priority 1
+=============================================================================
+
+create a rule only supported by fdir switch with priority 1, it is not acceptable.
+
+Start the ``testpmd`` application as follows::
+
+   ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w 0000:af:00.0,pipeline-mode-support=1 -- -i --txq=8 --rxq=8
+   set fwd rxonly
+   set verbose 1
+
+create rules::
+
+   MAC_IPV4_NVGRE_IPV4_FRAG
+   flow create 0 priority 1 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions queue index 3 / end
+
+   MAC_IPV4_NVGRE_IPV4_UDP_PAY
+   flow create 0 priority 1 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 25 dst is 23 / end actions queue index 3 / end
+
+check the flows can not be created. 
+
+
+Test case: Create flow rules with same parameter but differenet actions 
+==========================================================================
+
+It is acceptable to create same rules with differenet filter in pipeline mode.
+When fdir filter and switch filter has the same parameter rules, the flow will map to switch then fdir. 
+
+Start the ``testpmd`` application as follows::
+
+   ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w 0000:af:00.0,pipeline-mode-support=1 -- -i --txq=8 --rxq=8
+   set fwd rxonly
+   set verbose 1
+
+create switch rule::
+
+   flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 25 dst is 23 / end actions queue index 1 / end
+
+create fdir rule::
+
+   flow create 0 priority 1 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 25 dst is 23 / end actions queue index 3 / end
+
+check two flows can be created.
+
+send a pkt to check the packets are recieved in queue 1::
+
+   sendp([Ether(dst="00:00:00:00:11:00",src="11:22:33:44:55:66")/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=25,dport=23)/Raw('x'*80)],iface="enp134s0f0")
+
+remove the switch rule and send a pkt to check the packets are recieved in queue 3::
+   
+   flow destroy 0 rule 0
+
+   sendp([Ether(dst="00:00:00:00:11:00",src="11:22:33:44:55:66")/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=25,dport=23)/Raw('x'*80)],iface="enp134s0f0")
+
+restart the ``testpmd`` application as follows::
+
+   ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w 0000:af:00.0, pipeline-mode-support=1 -- -i --txq=8 --rxq=8
+   set fwd rxonly
+   set verbose 1
+
+create fdir rule::
+
+   flow create 0 priority 1 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 25 dst is 23 / end actions queue index 3 / end
+
+create switch rule::
+
+   flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 25 dst is 23 / end actions queue index 1 / end
+
+check two flows can be created.
+
+send a pkt to check the packets are recieved in queue 1::
+
+   sendp([Ether(dst="00:00:00:00:11:00",src="11:22:33:44:55:66")/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=25,dport=23)/Raw('x'*80)],iface="enp134s0f2")
+
+remove the switch rule and send a pkt to check the packets are recieved in queue 3::
+
+   flow destroy 0 rule 1
+
+   sendp([Ether(dst="00:00:00:00:11:00",src="11:22:33:44:55:66")/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=25,dport=23)/Raw('x'*80)],iface="enp134s0f2")
+
+
+Test case: stress all fdir rules 
+===================================
+
+the fdir tabel can contain 16K(16384) flow rules. Each port can use 14K rules, and 2K are shared equally to each port.
+that means, 1 port of 2*25G/2*100G can use 14+2/2=15K fdir rules, 1 port of 4*25G can use 14+2/4=14.5K fdir rules.
+in non-pipeline mode, we can create switch rules only after fill out fidr tabel. 
+in pipeline mode, these two tables are independent.
+
+Start the ``testpmd`` application as follows::
+
+   ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w 0000:af:00.0,pipeline-mode-support=1 -- -i --txq=8 --rxq=8
+   set fwd rxonly
+   set verbose 1
+
+create 10K switch rules with priority 0::
+
+   flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.0 dst is 192.1.0.0 tos is 4 / tcp src is 25 dst is 23 / end actions queue index 5 / end 
+   ......
+
+create 16K fdir rules with priority 1::
+
+   flow create 0 priority 1 ingress pattern eth / ipv4 src is 192.168.0.0 dst is 192.1.0.0 tos is 4 / tcp src is 25 dst is 23 / end actions queue index 3 / end 
+   ......
+
+check the flow rules can be created and sent packets which is match to these rules::
+
+   sendp([Ether(dst="00:00:00:00:01:00",src="11:22:33:44:55:66")/IP(src="192.168.0.0",dst="192.1.0.0",tos=4)/TCP(sport=25,dport=23)/Raw("x"*80)],iface="enp134s0f0") 
+   ......
+
+check the packets can be recieved by the right queues.
+
+restart the ``testpmd`` application as follows::
+
+   ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w 0000:af:00.0 -- -i --txq=8 --rxq=8
+   set fwd rxonly
+   set verbose 1
+
+check the ports number of nic, create 15K/14.5K fdir rules::
+
+   flow create 0 ingress pattern eth / ipv4 src is 192.168.0.0 dst is 192.1.0.0 tos is 4 / tcp src is 25 dst is 23 / end actions queue index 3 / end
+
+create 10K switch rules::
+
+   flow create 0 ingress pattern eth / ipv4 src is 192.168.0.0 dst is 192.1.0.0 tos is 4 / tcp src is 14 dst is 17 / end actions queue index 5 / end
+   
+check the flow rules can be created and sent packets which is match to these rules::
+
+   sendp([Ether(dst="00:00:00:00:01:00",src="11:22:33:44:55:66")/IP(src="192.168.0.0",dst="192.1.0.0",tos=4)/TCP(sport=25,dport=23)/Raw("x"*80)],iface="enp134s0f0") 
+   ......
+
+check the packets can be recieved by the right queues.
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dts] [PATCH V1] test_plans: add test plan for cvl rteflow priority
  2019-11-29 15:41 [dts] [PATCH V1] test_plans: add test plan for cvl rteflow priority qifu
@ 2019-12-04  5:53 ` Tu, Lijuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2019-12-04  5:53 UTC (permalink / raw)
  To: Fu, Qi, dts; +Cc: Fu, Qi

Hi Qi,

Could you please add the expectation when you check output or results. It's better to have an output example.

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of qifu
> Sent: Friday, November 29, 2019 11:42 PM
> To: dts@dpdk.org
> Cc: Fu, Qi <qi.fu@intel.com>
> Subject: [dts] [PATCH V1] test_plans: add test plan for cvl rteflow priority
> 
> add test plan for cvl rteflow priority.
> 
> Signed-off-by: qifu <qi.fu@intel.com>
> ---
>  test_plans/rteflow_priority_test_plan.rst | 333 ++++++++++++++++++++++
>  1 file changed, 333 insertions(+)
>  create mode 100644 test_plans/rteflow_priority_test_plan.rst
> 
> diff --git a/test_plans/rteflow_priority_test_plan.rst
> b/test_plans/rteflow_priority_test_plan.rst
> new file mode 100644
> index 0000000..81d78d2
> --- /dev/null
> +++ b/test_plans/rteflow_priority_test_plan.rst
> @@ -0,0 +1,333 @@
> +.. Copyright (c) <2010-2017>, Intel Corporation
> +   All rights reserved.
> +
> +   Redistribution and use in source and binary forms, with or without
> +   modification, are permitted provided that the following conditions
> +   are met:
> +
> +   - Redistributions of source code must retain the above copyright
> +     notice, this list of conditions and the following disclaimer.
> +
> +   - Redistributions in binary form must reproduce the above copyright
> +     notice, this list of conditions and the following disclaimer in
> +     the documentation and/or other materials provided with the
> +     distribution.
> +
> +   - Neither the name of Intel Corporation nor the names of its
> +     contributors may be used to endorse or promote products derived
> +     from this software without specific prior written permission.
> +
> +   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
> CONTRIBUTORS
> +   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> +   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
> FITNESS
> +   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
> +   COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
> INDIRECT,
> +   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
> +   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
> GOODS OR
> +   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> +   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
> CONTRACT,
> +   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
> +   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
> ADVISED
> +   OF THE POSSIBILITY OF SUCH DAMAGE.
> +
> +
> +===========================
> +CVL Rte_flow Priority Tests
> +===========================
> +
> +
> +Description
> +===========
> +
> +This document provides the plan for testing the Rte_flow Priority feature.
> +this feature uses devargs as a hint to active flow priority or not.
> +when priority is not active, flows are created on fdir then switch/ACL.
> +when priority is active, flows are identified into 2 category:
> +High priority as permission stage that maps to switch/ACL, Low priority
> +as distribution stage that maps to fdir, a no destination high priority
> +rule is not acceptable, since it may be overwritten by a low priority rule due
> to cvl FXP behavior.
> +
> +
> +Prerequisites
> +=============
> +
> +If using vfio the kernel must be >= 3.6+ and VT-d must be enabled in
> +bios.When using vfio, use the following commands to load the vfio
> +driver and bind it to the device under test::
> +
> +   modprobe vfio
> +   modprobe vfio-pci
> +   usertools/dpdk-devbind.py --bind=vfio-pci device_bus_id
> +
> +bind the pf to dpdk driver::
> +   ./usertools/dpdk-devbind.py -b vfio-pci af:00.0
> +
> +
> +Test case: Setting Priority in non-pipeline mode
> +===================================================
> +
> +Priority is not active in non-pipeline mode. The default value of
> +priority is 0 but it will be ignored
> +
> +Start the ``testpmd`` application as follows::
> +
> +   ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w 0000:af:00.0 -- -i
> --txq=8 --rxq=8
> +   set fwd rxonly
> +   set verbose 1
> +
> +create a rule::
> +
> +   flow create 0 priority 0 ingress pattern eth / ipv4 src is
> + 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions queue index 2 /
> + end
> +
> +check the flow can be created but it will map to fdir filter.
> +
> +create a rule::
> +
> +   flow create 0 priority 1 ingress pattern eth / ipv4 src is
> + 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions queue index 2 /
> + end
> +
> +check the flow can not be created for the vallue of priority is 0 in non-
> pipeline mode.
> +
> +Start the ``testpmd`` application as follows::
> +
> +   ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w
> 0000:af:00.0,pipeline-mode-support=0 -- -i --txq=8 --rxq=8
> +   set fwd rxonly
> +   set verbose 1
> +
> +create a rule::
> +
> +   flow create 0 priority 0 ingress pattern eth / ipv4 src is
> + 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions queue index 2 /
> + end
> +
> +check the flow can be created but it will map to fdir filter.
> +
> +create a rule::
> +
> +   flow create 0 priority 1 ingress pattern eth / ipv4 src is
> + 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions queue index 2 /
> + end
> +
> +check the flow can not be created.
> +
> +
> +Test case: Create flow rules with priority in pipeline mode
> +=============================================================
> +
> +Priority is active in pipeline mode.
> +create flow rules and set priority 0/1 to map switch/fdir filter separately.
> +
> +Start the ``testpmd`` application as follows::
> +
> +   ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w
> 0000:af:00.0,pipeline-mode-support=1 -- -i --txq=8 --rxq=8
> +   set fwd rxonly
> +   set verbose 1
> +   rx_vxlan_port add 4789 0
> +
> +create switch filter rules::
> +
> +   MAC_IPV4_TCP
> +   flow create 0 priority 0 ingress pattern eth / ipv4 src is
> + 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 25 dst is 23 /
> + end actions queue index 1 / end
> +
> +   MAC_IPV4_VXLAN_IPV4_UDP_PAY
> +   flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan /
> + eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is
> + 25 dst is 23 / end actions queue index 2 / end
> +
> +create fdir filter rules::
> +
> +   MAC_IPV4_TCP
> +   flow create 0 priority 1 ingress pattern eth / ipv4 src is
> + 192.168.0.4 dst is 192.168.0.7 tos is 4 ttl is 20 / tcp src is 25 dst
> + is 23 / end actions queue index 3 / end
> +
> +   MAC_IPV4_VXLAN_IPV4_UDP_PAY
> +   flow create 0 priority 1 ingress pattern eth / ipv4 / udp / vxlan /
> + eth / ipv4 src is 192.168.0.4 dst is 192.168.0.7 / udp src is 25 dst
> + is 23 / end actions queue index 4 / end
> +
> +check flow list with commands "flow list 0", all flows are created correctly::
> +
> +    ID      Group   Prio    Attr    Rule
> +    0       0       0       i--     ETH IPV4 TCP => QUEUE
> +    1       ...
> +    2       ...
> +    3       ...
> +
> +send packets according to the created rules, check the packets are recieved
> in right queues::
> +
> +
> sendp([Ether(dst="00:00:00:00:11:00",src="11:22:33:44:55:66")/IP(src="192.1
> 68.0.2",dst="192.168.0.3",tos=4)/TCP(sport=25,dport=23)/Raw('x'*80)],iface
> ="enp134s0f0")
> +
> sendp([Ether(dst="00:00:00:00:11:00",src="11:22:33:44:55:66")/IP()/UDP()/V
> XLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=25,
> dport=23)/Raw('x'*80)],iface="enp134s0f0")
> +
> sendp([Ether(dst="00:00:00:00:11:00",src="11:22:33:44:55:66")/IP(src="192.1
> 68.0.4",dst="192.168.0.7",tos=4,ttl=20)/TCP(sport=25,dport=23)/Raw('x'*80)]
> ,iface="enp134s0f0")
> +
> + sendp([Ether(dst="00:00:00:00:11:00",src="11:22:33:44:55:66")/IP()/UDP
> + ()/VXLAN()/Ether()/IP(src="192.168.0.4
> + ",dst="192.168.0.7")/UDP(sport=25,dport=23)/Raw('x'*80)],iface="enp134
> + s0f0")
> +
> +create rules without priority::
> +
> +   flow create 0 ingress pattern eth / ipv4 src is 192.168.0.3 dst is 192.168.0.1
> tos is 5 / tcp src is 25 dst is 23 / end actions queue index 1 / end
> +   flow create 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is
> + 192.168.0.3 tos is 4 ttl is 20 / sctp src is 25 dst is 23 / end
> + actions queue index 1 / end
> +
> +check only patterns supported by switch can be created for the default
> priorty is 0.
> +So the first flow can be created and the second flow can not be created.
> +
> +
> +Test case: Create no destination high priority flow rule
> +=============================================================
> +
> +a no destination high priority rule is not acceptable. Destination here means
> exact actions.
> +
> +Start the ``testpmd`` application as follows::
> +
> +   ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w
> 0000:af:00.0,pipeline-mode-support=1 -- -i --txq=8 --rxq=8
> +   set fwd rxonly
> +   set verbose 1
> +
> +create a rule::
> +
> +   flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is
> 192.168.0.3 tos is 4 / tcp src is 25 dst is 23 / end actions / end
> +   flow create 0 priority 0 ingress pattern eth / ipv4 src is
> + 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 25 dst is 23 /
> + end
> +
> +check the flows can not be created.
> +
> +
> +Test case: Create flow rules only supported by fdir filter with
> +priority 0
> +===============================================================
> ========
> +====
> +
> +create a rule only supported by fdir filter with priority 0, it is not acceptable.
> +
> +Start the ``testpmd`` application as follows::
> +
> +   ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w
> 0000:af:00.0,pipeline-mode-support=1 -- -i --txq=8 --rxq=8
> +   set fwd rxonly
> +   set verbose 1
> +
> +create rules::
> +
> +   MAC_IPV6_SCTP
> +   flow create 0 priority 0 ingress pattern eth / ipv6 src is
> + 1111:2222:3333:4444:5555:6666:7777:8888 dst is
> + 1111:2222:3333:4444:5555:6666:7777:9999 / sctp src is 25 dst is 23 /
> + end actions queue index 1 / end
> +
> +   MAC_IPV4_SCTP
> +   flow create 0 priority 0 ingress pattern eth / ipv4 src is
> + 192.168.0.2 dst is 192.168.0.3 tos is 4 ttl is 20 / sctp src is 25 dst
> + is 23 / end actions queue index 1 / end
> +
> +check the flows can not be created.
> +
> +
> +Test case: Create flow rules only supported by switch filter with
> +priority 1
> +===============================================================
> ========
> +======
> +
> +create a rule only supported by fdir switch with priority 1, it is not
> acceptable.
> +
> +Start the ``testpmd`` application as follows::
> +
> +   ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w
> 0000:af:00.0,pipeline-mode-support=1 -- -i --txq=8 --rxq=8
> +   set fwd rxonly
> +   set verbose 1
> +
> +create rules::
> +
> +   MAC_IPV4_NVGRE_IPV4_FRAG
> +   flow create 0 priority 1 ingress pattern eth / ipv4 / nvgre / eth /
> + ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions
> + queue index 3 / end
> +
> +   MAC_IPV4_NVGRE_IPV4_UDP_PAY
> +   flow create 0 priority 1 ingress pattern eth / ipv4 / nvgre / eth /
> + ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 25
> + dst is 23 / end actions queue index 3 / end
> +
> +check the flows can not be created.
> +
> +
> +Test case: Create flow rules with same parameter but differenet actions
> +===============================================================
> ========
> +===
> +
> +It is acceptable to create same rules with differenet filter in pipeline mode.
> +When fdir filter and switch filter has the same parameter rules, the flow will
> map to switch then fdir.
> +
> +Start the ``testpmd`` application as follows::
> +
> +   ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w
> 0000:af:00.0,pipeline-mode-support=1 -- -i --txq=8 --rxq=8
> +   set fwd rxonly
> +   set verbose 1
> +
> +create switch rule::
> +
> +   flow create 0 priority 0 ingress pattern eth / ipv4 src is
> + 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 25 dst is 23 /
> + end actions queue index 1 / end
> +
> +create fdir rule::
> +
> +   flow create 0 priority 1 ingress pattern eth / ipv4 src is
> + 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 25 dst is 23 /
> + end actions queue index 3 / end
> +
> +check two flows can be created.
> +
> +send a pkt to check the packets are recieved in queue 1::
> +
> +
> + sendp([Ether(dst="00:00:00:00:11:00",src="11:22:33:44:55:66")/IP(src="
> + 192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=25,dport=23)/Raw('x'*8
> + 0)],iface="enp134s0f0")
> +
> +remove the switch rule and send a pkt to check the packets are recieved in
> queue 3::
> +
> +   flow destroy 0 rule 0
> +
> +
> + sendp([Ether(dst="00:00:00:00:11:00",src="11:22:33:44:55:66")/IP(src="
> + 192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=25,dport=23)/Raw('x'*8
> + 0)],iface="enp134s0f0")
> +
> +restart the ``testpmd`` application as follows::
> +
> +   ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w 0000:af:00.0,
> pipeline-mode-support=1 -- -i --txq=8 --rxq=8
> +   set fwd rxonly
> +   set verbose 1
> +
> +create fdir rule::
> +
> +   flow create 0 priority 1 ingress pattern eth / ipv4 src is
> + 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 25 dst is 23 /
> + end actions queue index 3 / end
> +
> +create switch rule::
> +
> +   flow create 0 priority 0 ingress pattern eth / ipv4 src is
> + 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 25 dst is 23 /
> + end actions queue index 1 / end
> +
> +check two flows can be created.
> +
> +send a pkt to check the packets are recieved in queue 1::
> +
> +
> + sendp([Ether(dst="00:00:00:00:11:00",src="11:22:33:44:55:66")/IP(src="
> + 192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=25,dport=23)/Raw('x'*8
> + 0)],iface="enp134s0f2")
> +
> +remove the switch rule and send a pkt to check the packets are recieved in
> queue 3::
> +
> +   flow destroy 0 rule 1
> +
> +
> + sendp([Ether(dst="00:00:00:00:11:00",src="11:22:33:44:55:66")/IP(src="
> + 192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=25,dport=23)/Raw('x'*8
> + 0)],iface="enp134s0f2")
> +
> +
> +Test case: stress all fdir rules
> +===================================
> +
> +the fdir tabel can contain 16K(16384) flow rules. Each port can use 14K rules,
> and 2K are shared equally to each port.
> +that means, 1 port of 2*25G/2*100G can use 14+2/2=15K fdir rules, 1 port
> of 4*25G can use 14+2/4=14.5K fdir rules.
> +in non-pipeline mode, we can create switch rules only after fill out fidr tabel.
> +in pipeline mode, these two tables are independent.
> +
> +Start the ``testpmd`` application as follows::
> +
> +   ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w
> 0000:af:00.0,pipeline-mode-support=1 -- -i --txq=8 --rxq=8
> +   set fwd rxonly
> +   set verbose 1
> +
> +create 10K switch rules with priority 0::
> +
> +   flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.0 dst is
> 192.1.0.0 tos is 4 / tcp src is 25 dst is 23 / end actions queue index 5 / end
> +   ......
> +
> +create 16K fdir rules with priority 1::
> +
> +   flow create 0 priority 1 ingress pattern eth / ipv4 src is 192.168.0.0 dst is
> 192.1.0.0 tos is 4 / tcp src is 25 dst is 23 / end actions queue index 3 / end
> +   ......
> +
> +check the flow rules can be created and sent packets which is match to
> these rules::
> +
> +
> sendp([Ether(dst="00:00:00:00:01:00",src="11:22:33:44:55:66")/IP(src="192.1
> 68.0.0",dst="192.1.0.0",tos=4)/TCP(sport=25,dport=23)/Raw("x"*80)],iface="
> enp134s0f0")
> +   ......
> +
> +check the packets can be recieved by the right queues.
> +
> +restart the ``testpmd`` application as follows::
> +
> +   ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w 0000:af:00.0 -- -i
> --txq=8 --rxq=8
> +   set fwd rxonly
> +   set verbose 1
> +
> +check the ports number of nic, create 15K/14.5K fdir rules::
> +
> +   flow create 0 ingress pattern eth / ipv4 src is 192.168.0.0 dst is
> + 192.1.0.0 tos is 4 / tcp src is 25 dst is 23 / end actions queue index
> + 3 / end
> +
> +create 10K switch rules::
> +
> +   flow create 0 ingress pattern eth / ipv4 src is 192.168.0.0 dst is
> + 192.1.0.0 tos is 4 / tcp src is 14 dst is 17 / end actions queue index
> + 5 / end
> +
> +check the flow rules can be created and sent packets which is match to
> these rules::
> +
> +
> sendp([Ether(dst="00:00:00:00:01:00",src="11:22:33:44:55:66")/IP(src="192.1
> 68.0.0",dst="192.1.0.0",tos=4)/TCP(sport=25,dport=23)/Raw("x"*80)],iface="
> enp134s0f0")
> +   ......
> +
> +check the packets can be recieved by the right queues.
> --
> 2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-29 15:41 [dts] [PATCH V1] test_plans: add test plan for cvl rteflow priority qifu
2019-12-04  5:53 ` Tu, Lijuan

test suite reviews and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ http://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/ public-inbox