* [dts] [PATCH v1]test_plans: rework case structure
@ 2020-03-26 10:23 Yuan Peng
2020-03-31 3:04 ` Tu, Lijuan
0 siblings, 1 reply; 2+ messages in thread
From: Yuan Peng @ 2020-03-26 10:23 UTC (permalink / raw)
To: dts; +Cc: Peng Yuan
From: Peng Yuan <yuan.peng@intel.com>
1/ rework the case stucture.
2/ add stress cases.
3/ add validate cases.
Signed-off-by: Peng Yuan <yuan.peng@intel.com>
diff --git a/test_plans/cvl_fdir_test_plan.rst b/test_plans/cvl_fdir_test_plan.rst
index fe95c17..1a0845c 100644
--- a/test_plans/cvl_fdir_test_plan.rst
+++ b/test_plans/cvl_fdir_test_plan.rst
@@ -90,6 +90,7 @@ Notes: 1. Enable fdir filter for UDP tunnel: Vxlan / NVGRE (OS default package)
Function type
-------------
+ validate
create
list
destroy
@@ -113,6 +114,7 @@ Prerequisites
1. Hardware:
columbiaville_25g/columbiaville_100g
+ design the cases with 2 ports card.
2. Software:
DPDK: http://dpdk.org/git/dpdk
@@ -127,7 +129,7 @@ Prerequisites
5. Launch the app ``testpmd`` with the following arguments::
- ./testpmd -c 0xff -n 6 -w 86:00.0 -- -i --portmask=0xff --rxq=64 --txq=64 --port-topology=loop
+ ./testpmd -c 0xff -n 6 -w 86:00.0,,flow-mark-support=1 -- -i --portmask=0xff --rxq=64 --txq=64 --port-topology=loop
testpmd> set fwd rxonly
testpmd> set verbose 1
@@ -138,11 +140,7 @@ Prerequisites
Notes: if need two ports environment, launch ``testpmd`` with the following arguments::
- ./testpmd -c 0xff -n 6 -w 86:00.0 -w 86:00.1 -- -i --portmask=0xff --rxq=64 --txq=64 --port-topology=loop
-
- If create rules with mark actions, please add the following parameters in testpmd command line::
-
- -w 86:00.0,flow-mark-support=1 -w 86:00.1,flow-mark-support=1
+ ./testpmd -c 0xff -n 6 -w 86:00.0,flow-mark-support=1 -w 86:00.1,flow-mark-support=1 -- -i --portmask=0xff --rxq=64 --txq=64 --port-topology=loop
Default parameters
@@ -397,691 +395,686 @@ Send packets
matched packets::
- p_gtpu1 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP()/Raw('x'*20)
- p_gtpu2 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(frag=1)/Raw('x'*20)
- p_gtpu3 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP()/UDP()/Raw('x'*20)
- p_gtpu4 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP( dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP()/TCP(sport=22, dport=23)/Raw('x'*20)
- p_gtpu5 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP()/ICMP()/Raw('x'*20)
- p_gtpu6 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6()/Raw('x'*20)
- p_gtpu7 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6()/IPv6ExtHdrFragment(1000)/Raw('x'*20)
- p_gtpu8 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6()/UDP()/Raw('x'*20)
- p_gtpu9 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP( dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6()/TCP(sport=22, dport=23)/Raw('x'*20)
- p_gtpu10 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6()/ICMP()/Raw('x'*20)
+ p_gtpu1 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP()/Raw('x'*20)
+ p_gtpu2 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(frag=1)/Raw('x'*20)
+ p_gtpu3 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP()/UDP()/Raw('x'*20)
+ p_gtpu4 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP( dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP()/TCP(sport=22, dport=23)/Raw('x'*20)
+ p_gtpu5 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP()/ICMP()/Raw('x'*20)
+ p_gtpu6 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6()/Raw('x'*20)
+ p_gtpu7 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6()/IPv6ExtHdrFragment(1000)/Raw('x'*20)
+ p_gtpu8 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6()/UDP()/Raw('x'*20)
+ p_gtpu9 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP( dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6()/TCP(sport=22, dport=23)/Raw('x'*20)
+ p_gtpu10 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6()/ICMP()/Raw('x'*20)
mismatched packets::
- p_gtpu11 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP()/SCTP()/Raw('x'*20)
- p_gtpu12 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6()/SCTP()/Raw('x'*20)
- p_gtpu13 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x1234567)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP()/Raw('x'*20)
- p_gtpu14 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x35)/IP()/Raw('x'*20)
- p_gtpu15 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IP()/Raw('x'*20)
- p_gtpu16 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/Raw('x'*20)
+ p_gtpu11 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP()/SCTP()/Raw('x'*20)
+ p_gtpu12 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6()/SCTP()/Raw('x'*20)
+ p_gtpu13 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x1234567)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP()/Raw('x'*20)
+ p_gtpu14 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x35)/IP()/Raw('x'*20)
+ p_gtpu15 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IP()/Raw('x'*20)
+ p_gtpu16 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/Raw('x'*20)
* MAC_IPV4_GTPU
matched packets::
- p_gtpu1 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IP()/Raw('x'*20)
- p_gtpu2 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IP(frag=1)/Raw('x'*20)
- p_gtpu3 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IP()/UDP()/Raw('x'*20)
- p_gtpu4 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP( dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IP()/TCP(sport=22, dport=23)/Raw('x'*20)
- p_gtpu5 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IP()/ICMP()/Raw('x'*20)
- p_gtpu6 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IPv6()/Raw('x'*20)
- p_gtpu7 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IPv6()/IPv6ExtHdrFragment(1000)/Raw('x'*20)
- p_gtpu8 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IPv6()/UDP()/Raw('x'*20)
- p_gtpu9 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP( dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IPv6()/TCP(sport=22, dport=23)/Raw('x'*20)
- p_gtpu10 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IPv6()/ICMP()/Raw('x'*20)
- p_gtpu11 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x35)/IP()/Raw('x'*20)
+ p_gtpu1 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IP()/Raw('x'*20)
+ p_gtpu2 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IP(frag=1)/Raw('x'*20)
+ p_gtpu3 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IP()/UDP()/Raw('x'*20)
+ p_gtpu4 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP( dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IP()/TCP(sport=22, dport=23)/Raw('x'*20)
+ p_gtpu5 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IP()/ICMP()/Raw('x'*20)
+ p_gtpu6 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IPv6()/Raw('x'*20)
+ p_gtpu7 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IPv6()/IPv6ExtHdrFragment(1000)/Raw('x'*20)
+ p_gtpu8 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IPv6()/UDP()/Raw('x'*20)
+ p_gtpu9 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP( dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IPv6()/TCP(sport=22, dport=23)/Raw('x'*20)
+ p_gtpu10 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IPv6()/ICMP()/Raw('x'*20)
+ p_gtpu11 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x35)/IP()/Raw('x'*20)
mismatched packets::
- p_gtpu12 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/Raw('x'*20)
- p_gtpu13 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IP()/SCTP()/Raw('x'*20)
- p_gtpu14 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IPv6()/SCTP()/Raw('x'*20)
- p_gtpu15 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x1234567)/IP()/Raw('x'*20)
-
-Test case: MAC_IPV4_PAY queue index
-===================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions queue index 1 / end
-
-2. send matched packets, check the packets are distributed to queue 1.
- send mismatched packets, check the packets are not distributed to queue 1.
-
-3. verify rules can be listed and destroyed::
+ p_gtpu12 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/Raw('x'*20)
+ p_gtpu13 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IP()/SCTP()/Raw('x'*20)
+ p_gtpu14 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IPv6()/SCTP()/Raw('x'*20)
+ p_gtpu15 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x1234567)/IP()/Raw('x'*20)
- testpmd> flow list 0
- check the existing rule.
- destroy the rule::
+Test case: flow validation
+==========================
- testpmd> flow destroy 0 rule 0
+1. validate MAC_IPV4_PAY with queue index action::
- verify matched packets are not distributed to queue 1.
- check there is no rule listed.
+ flow validate 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions queue index 1 / end
-Test case: MAC_IPV4_PAY selected inputset queue index
-=====================================================
+ get the message::
-1. create filter rules::
+ Flow rule validated
- flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 proto is 1 / end actions queue index 1 / end
- flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 proto is 17 / end actions queue index 2 / end
+2. repeat step 1 with all patterns in pattern and input set table,
+ get the same result.
-2. send matched packets::
+3. repeat step 1-2 with action rss queues/drop/passthru/mark/mark+rss,
+ get the same result.
- pkt1 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", proto=1) / Raw('x' * 80)
- pkt2 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", frag=1, proto=1) / Raw('x' * 80)
- pkt3 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", ttl=2, tos=4) /UDP(sport=22,dport=23)/Raw('x' * 80)
- pkt4 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", frag=1, ttl=2, tos=4) /UDP(sport=22,dport=23)/Raw('x' * 80)
- pkt5 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", proto=17, ttl=2, tos=4)/Raw('x' * 80)
- pkt6 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", frag=1, proto=17, ttl=2, tos=4)/Raw('x' * 80)
+4. validate combined use of actions::
- check the pkt1 and pkt2 are redirected to queue 1.
- check the pkt3-pkt6 are redirected to queue 2
- send mismatched packets::
+ flow validate 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions queue index 1 / mark / count / end
+ flow validate 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions rss queues 0 1 end / mark id 1 / count identifier 0x1234 shared on / end
+ flow validate 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions passthru / mark id 2 / count identifier 0x34 shared off / end
+ flow validate 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions mark id 3 / rss / count shared on / end
+ flow validate 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions drop / count shared off / end
- pkt7 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.22", proto=1) / Raw('x' * 80)
- pkt8 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", proto=6) / Raw('x' * 80)
- pkt9 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/TCP(sport=22,dport=23)/ Raw('x' * 80)
- pkt10 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", frag=1)/TCP(sport=22,dport=23)/ Raw('x' * 80)
+ get the message::
- check the packets are not distributed to queue 1 or queue 2.
+ Flow rule validated
-3. verify rules can be listed and destroyed::
+5. check the flow list::
testpmd> flow list 0
- check the existing rule.
- destroy the rule::
+ there is no rule listed.
- testpmd> flow flush 0
+Test case: negative validation
+==============================
- verify matched packets are not distributed to expected queue.
- check there is no rule listed.
+1. only count action::
-Test case: MAC_IPV4_UDP queue index
-===================================
+ flow validate 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions count / end
-1. create filter rules::
+ get the error message::
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end actions queue index 1 / end
+ Invalid input action: Invalid argument
-2. send matched packets, check the packets is distributed to queue 1.
- send mismatched packets, check the packets are not distributed to queue 1.
+2. void action::
-3. verify rules can be listed and destroyed::
+ flow validate 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / and actions end
- testpmd> flow list 0
+ get the message::
- check the existing rule.
- destroy the rule::
+ Invalid argument
- testpmd> flow destroy 0 rule 0
+3. conflict action::
- verify matched packet is not distributed to queue 1.
- check there is no rule listed.
+ flow validate 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss queues 2 3 end / rss / end
-Test case: MAC_IPV4_TCP queue index
-===================================
+ get the message::
-1. create filter rules::
+ Unsupported action combination: Invalid argument
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / tcp src is 22 dst is 23 / end actions queue index 63 / end
+4. invalid mark id::
-2. send matched packets, check the packets is distributed to queue 63.
- send mismatched packets, check the packets are not distributed to queue 63.
+ flow validate 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions passthru / mark id 4294967296 / end
-3. verify rules can be listed and destroyed::
+ get the message::
- testpmd> flow list 0
+ Bad arguments
- check the existing rule.
- destroy the rule::
+5. invalid input set::
- testpmd> flow destroy 0 rule 0
+ flow validate 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tc is 4 / end actions queue index 1 / end
- verify matched packet is not distributed to queue 63.
- check there is no rule listed.
+ get the message::
-Test case: MAC_IPV4_SCTP queue index
-====================================
+ Bad arguments
-1. create filter rules::
+6. invalid queue index::
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / sctp src is 22 dst is 23 tag is 1 / end actions queue index 2 / end
+ flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions queue index 64 / end
-2. send matched packets, check the packets is distributed to queue 2.
- send mismatched packets, check the packets are not distributed to queue 2.
+ get the message::
-3. verify rules can be listed and destroyed::
+ Invalid input action: Invalid argument
- testpmd> flow list 0
+7. invalid rss queues parameter
- check the existing rule.
- destroy the rule::
+ Invalid number of queues::
- testpmd> flow destroy 0 rule 0
+ flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss queues 1 2 3 end / end
+ flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss queues 0 end / end
+ flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss queues end / end
- verify matched packet is not distributed to queue 2.
- check there is no rule listed
+ get the message::
-Test case: MAC_IPV6_PAY queue index
-===================================
+ Invalid input action: Invalid argument
-1. create filter rules::
+ Discontinuous queues::
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 0 hop is 2 tc is 1 / end actions queue index 1 / end
+ flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss queues 1 2 3 5 end / end
-2. send matched packets, check the packets is distributed to queue 1.
- send mismatched packets, check the packets are not distributed to queue 1.
+ get the message::
-3. verify rules can be listed and destroyed::
+ Discontinuous queue region: Invalid argument
- testpmd> flow list 0
+ invalid rss queues index::
- check the existing rule.
- destroy the rule::
+ flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss queues 63 64 end / end
- testpmd> flow destroy 0 rule 0
+ get the message::
- verify matched packet is not distributed to queue 1.
- check there is no rule listed.
+ Invalid queue region indexes.: Invalid argument
-Test case: MAC_IPV6_PAY selected inputset queue index
-=====================================================
+8. Invalid value of input set::
-1. create filter rules::
+ flow validate 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x100 / end actions queue index 1 / end
+ flow validate 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x100000000 / gtp_psc qfi is 0x5 / end actions queue index 2 / end
+ flow validate 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x100000000 / end actions queue index 1 / end
- flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 44 / end actions queue index 1 / end
- flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 6 / end actions queue index 2 / end
+ get the message::
-2. send matched packets::
+ Bad arguments
- pkt1 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::2", nh=44, tc=1, hlim=2)/("X"*480)
- pkt2 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/IPv6ExtHdrFragment(1000)/("X"*480)
- pkt3 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=44)/TCP(sport=22,dport=23)/("X"*480)
- pkt4 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/IPv6ExtHdrFragment(1000)/TCP(sport=22,dport=23)/("X"*480)
- pkt5 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/("X"*480)
- pkt6 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22,dport=23)/("X"*480)
+9. unsupported pattern,validate GTPU rule with OS default package::
- check pkt1-pkt4 are redirected to queue 1.
- check pkt5 and pkt6 are redirected to queue 2.
- send mismatched packets::
+ flow validate 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x34 / end actions drop / end
- pkt7 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2021", nh=44)/("X"*480)
- pkt8 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)
- pkt9 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=17)/("X"*480)
+ get the message::
- check the packets are not distributed to queue 1 or queue 2.
+ Bad arguments
-3. verify rules can be listed and destroyed::
+10. check the flow list::
testpmd> flow list 0
- check the existing rule.
- destroy the rule::
+ there is no rule listed.
- testpmd> flow destroy 0 rule 0
- verify matched packet are not distributed to expected queue.
- check there is no rule listed.
+Test case: MAC_IPV4_PAY pattern
+===============================
-Test case: MAC_IPV6_UDP queue index
-===================================
+Subcase 1: MAC_IPV4_PAY queue index
+-----------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / udp src is 22 dst is 23 / end actions queue index 1 / end
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions queue index 1 / end
-2. send matched packets, check the packets is distributed to queue 1.
- send mismatched packets, check the packets are not distributed to queue 1.
+2. send matched packets, check the packets are distributed to queue 1 without FDIR matched ID.
+ send mismatched packets, check the packets are not distributed to queue 1 without FDIR matched ID.
3. verify rules can be listed and destroyed::
testpmd> flow list 0
- check the existing rule.
+ check the rule listed.
destroy the rule::
testpmd> flow destroy 0 rule 0
- verify matched packet is not distributed to queue 1.
+4. verify matched packets are not distributed to queue 1 without FDIR matched ID.
check there is no rule listed.
-Test case: MAC_IPV6_TCP queue index
-===================================
+Subcase 2: MAC_IPV4_PAY rss queues
+----------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / tcp src is 22 dst is 23 / end actions queue index 1 / end
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss queues 2 3 end / end
-2. send matched packets, check the packets is distributed to queue 1.
- send mismatched packets, check the packets are not distributed to queue 1.
+2. send matched packets, check the packets are distributed to queue 2 or 3 without without FDIR matched ID.
+ send mismatched packets, check the packets are not distributed to queue 2 or 3 without FDIR matched ID.
-3. verify rules can be listed and destroyed::
+3. repeat step 3 of subcase 1.
- testpmd> flow list 0
+4. verify matched packets are not distributed to queue 2 or 3 without FDIR matched ID.
+ check there is no rule listed.
- check the existing rule.
- destroy the rule::
+Subcase 3: MAC_IPV4_PAY passthru
+--------------------------------
- testpmd> flow destroy 0 rule 0
+1. create filter rules::
- verify matched packet is not distributed to queue 1.
- check there is no rule listed.
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions passthru / end
-Test case: MAC_IPV6_SCTP queue index
-====================================
+2. send matched packets, check the packets are distributed by RSS without FDIR matched ID.
+ send mismatched packets, check the packets are distributed by RSS without FDIR matched ID.
-1. create filter rules::
+3. repeat step 3 of subcase 1.
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / sctp src is 22 dst is 23 / end actions queue index 1 / end
+4. verify matched packets are distributed to the same queue without FDIR matched ID=0x0.
+ check there is no rule listed.
-2. send matched packets, check the packets is distributed to queue 1.
- send mismatched packets, check the packets are not distributed to queue 1.
+Subcase 4: MAC_IPV4_PAY drop
+----------------------------
-3. verify rules can be listed and destroyed::
+1. create filter rules::
- testpmd> flow list 0
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions drop / end
- check the existing rule.
- destroy the rule::
+2. send matched packets, check the packets are dropped
+ send mismatched packets, check the packets are not dropped.
- testpmd> flow destroy 0 rule 0
+3. repeat step 3 of subcase 1.
- verify matched packet is not distributed to queue 1.
+4. verify matched packets are not dropped.
check there is no rule listed.
-Test case: MAC_IPV4_TUN_IPV4_PAY queue index
-============================================
+Subcase 5: MAC_IPV4_PAY mark+rss
+--------------------------------
+Note: This combined action is mark with RSS which is without queues specified.
1. create filter rules::
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions queue index 1 / end
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions mark / rss / end
-2. send matched packets, check the packets are distributed to queue 1.
- send mismatched packets, check the packets are not distributed to queue 1.
+2. send matched packets, check the packets are distributed by RSS with FDIR matched ID=0x0
+ send mismatched packets, check the packets are distributed by RSS without FDIR matched ID.
-3. verify rules can be listed and destroyed::
+3. repeat step 3 of subcase 1.
- testpmd> flow list 0
+4. verify matched packets are distributed to the same queue without FDIR matched ID.
+ check there is no rule listed.
- check the existing rule.
- destroy the rule::
+Subcase 6: MAC_IPV4_PAY mark
+----------------------------
- testpmd> flow destroy 0 rule 0
+1. create filter rules::
- verify the packets hit rule are not distributed to queue 1.
- check there is no rule listed.
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions mark id 1 / end
-Test case: MAC_IPV4_TUN_IPV4_UDP queue index
-============================================
+2. repeat the steps of passthru with mark part in subcase 3,
+ get the same result.
+
+Subcase 7: MAC_IPV4_PAY protocal
+--------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue index 1 / end
+ flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 proto is 1 / end actions queue index 1 / mark id 1 / end
+ flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 proto is 17 / end actions passthru / mark id 3 / end
-2. send matched packets, check the packets are distributed to queue 1.
- send mismatched packets, check the packets are not distributed to queue 1.
+2. send matched packets::
-3. verify rules can be listed and destroyed::
+ pkt1 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", proto=1) / Raw('x' * 80)
+ pkt2 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", frag=1, proto=1) / Raw('x' * 80)
+ pkt3 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", ttl=2, tos=4) /UDP(sport=22,dport=23)/Raw('x' * 80)
+ pkt4 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", frag=1, ttl=2, tos=4) /UDP(sport=22,dport=23)/Raw('x' * 80)
+ pkt5 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", proto=17, ttl=2, tos=4)/Raw('x' * 80)
+ pkt6 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", frag=1, proto=17, ttl=2, tos=4)/Raw('x' * 80)
- testpmd> flow list 0
+ check the pkt1 and pkt2 are redirected to queue 1 with FDIR matched ID=0x1.
+ check the pkt3-pkt6 are distributed by RSS with FDIR matched ID=0x3.
+ send mismatched packets::
- check the existing rule.
- destroy the rule::
+ pkt7 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.22", proto=1) / Raw('x' * 80)
+ pkt8 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", proto=6) / Raw('x' * 80)
+ pkt9 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/TCP(sport=22,dport=23)/ Raw('x' * 80)
+ pkt10 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", frag=1)/TCP(sport=22,dport=23)/ Raw('x' * 80)
- testpmd> flow destroy 0 rule 0
+ check the packets received have not FDIR matched ID.
- verify the packets hit rule are not distributed to queue 1.
+3. repeat step 3 of subcase 1.
+
+4. verify matched packets have not FDIR matched ID.
check there is no rule listed.
-Test case: MAC_IPV4_TUN_IPV4_TCP queue index
-============================================
+
+Test case: MAC_IPV4_UDP pattern
+===============================
+
+Subcase 1: MAC_IPV4_UDP queue index
+-----------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions queue index 1 / end
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end actions queue index 63 / mark id 0 / end
-2. send matched packets, check the packets are distributed to queue 1.
- send mismatched packets, check the packets are not distributed to queue 1.
+2. send matched packets, check the packets is distributed to queue 63 with FDIR matched ID=0x0.
+ send mismatched packets, check the packets are received without FDIR matched ID.
3. verify rules can be listed and destroyed::
testpmd> flow list 0
- check the existing rule.
+ check the rule listed.
destroy the rule::
testpmd> flow destroy 0 rule 0
- verify the packets hit rule are not distributed to queue 1.
+4. verify matched packet is received without FDIR matched ID.
check there is no rule listed.
-Test case: MAC_IPV4_TUN_IPV4_SCTP queue index
-=============================================
+Subcase 2: MAC_IPV4_UDP rss queues
+----------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions queue index 1 / end
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end actions rss queues 0 1 2 3 end / mark id 4294967294 / end
-2. send matched packets, check the packets are distributed to queue 1.
- send mismatched packets, check the packets are not distributed to queue 1.
+2. send matched packets, check the packets is distributed to queue 0-3 with FDIR matched ID=0xfffffffe.
+ send mismatched packets, check the packets are received without FDIR matched ID.
-3. verify rules can be listed and destroyed::
+3. repeat step 3 of subcase 1.
- testpmd> flow list 0
+4. verify matched packet is not received without FDIR matched ID.
+ check there is no rule listed.
- check the existing rule.
- destroy the rule::
+Subcase 3: MAC_IPV4_UDP passthru
+--------------------------------
- testpmd> flow destroy 0 rule 0
+1. create filter rule with mark::
- verify the packets hit rule are not distributed to queue 1.
- check there is no rule listed.
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end actions passthru / mark id 1 / end
-Test case: MAC_IPV4_TUN_MAC_IPV4_PAY queue index
-================================================
+2. send matched packets, check the packets are distributed by RSS with FDIR matched ID=0x1.
+ send mismatched packets, check the packets are distributed by RSS without FDIR matched ID.
-1. create filter rules::
+3. repeat step 3 of subcase 1.
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions queue index 1 / end
+4. verify matched packets are distributed to the same queue without FDIR matched ID.
+ check there is no rule listed.
-2. send matched packets, check the packets are distributed to queue 1.
- send mismatched packets, check the packets are not distributed to queue 1.
+Subcase 4: MAC_IPV4_UDP drop
+----------------------------
-3. verify rules can be listed and destroyed::
+1. create filter rules::
- testpmd> flow list 0
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end actions drop / end
- check the existing rule.
- destroy the rule::
+2. send matched packet, check the packet is dropped.
+ send mismatched packets, check the packets are not dropped.
- testpmd> flow destroy 0 rule 0
+3. repeat step 3 of subcase 1.
- verify the packets hit rule are not distributed to queue 1.
+4. verify matched packet is dropped.
check there is no rule listed.
-Test case: MAC_IPV4_TUN_MAC_IPV4_UDP queue index
-================================================
+Subcase 5: MAC_IPV4_UDP mark+rss
+--------------------------------
+Note: This combined action is mark with RSS which is without queues specified.
1. create filter rules::
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue index 1 / end
-
-2. send matched packets, check the packets are distributed to queue 1.
- send mismatched packets, check the packets are not distributed to queue 1.
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end actions mark id 2 / rss / end
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
+2. send matched packets, check the packets are distributed by RSS with FDIR matched ID=0x2
+ send mismatched packets, check the packets are distributed by RSS without FDIR matched ID.
- testpmd> flow destroy 0 rule 0
+3. repeat step 3 of subcase 1.
- verify the packets hit rule are not distributed to queue 1.
+4. verify matched packets are distributed to the same queue without FDIR matched ID.
check there is no rule listed.
-Test case: MAC_IPV4_TUN_MAC_IPV4_TCP queue index
-================================================
+Subcase 6: MAC_IPV4_UDP mark
+----------------------------
1. create filter rules::
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions queue index 1 / end
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end actions mark id 1 / end
-2. send matched packets, check the packets are distributed to queue 1.
- send mismatched packets, check the packets are not distributed to queue 1.
+2. repeat the step 2-3 of in subcase 3,
+ get the same result.
-3. verify rules can be listed and destroyed::
+Test case: MAC_IPV4_TCP pattern
+===============================
- testpmd> flow list 0
+1. replace "udp" with "tcp" in all the subcases of MAC_IPV4_UDP pattern.
+2. Then repeat all the steps in all the subcases of MAC_IPV4_UDP pattern.
+3. get the same result.
- check the existing rule.
- destroy the rule::
+Test case: MAC_IPV4_SCTP pattern
+================================
- testpmd> flow destroy 0 rule 0
+1. replace "udp" with "sctp" in all the subcases of MAC_IPV4_UDP pattern.
+2. Then repeat all the steps in all the subcases of MAC_IPV4_UDP pattern.
+3. get the same result.
- verify the packets hit rule are not distributed to queue 1.
- check there is no rule listed.
-Test case: MAC_IPV4_TUN_MAC_IPV4_SCTP queue index
-=================================================
+Test case: MAC_IPV6_PAY pattern
+===============================
+
+Subcase 1: MAC_IPV6_PAY queue index
+-----------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions queue index 1 / end
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 0 hop is 2 tc is 1 / end actions queue index 1 / mark / end
-2. send matched packets, check the packets are distributed to queue 1.
- send mismatched packets, check the packets are not distributed to queue 1.
+2. send matched packets, check the packets is distributed to queue 1 with FDIR matched ID=0x0.
+ send mismatched packets, check the packets are received without FDIR matched ID.
3. verify rules can be listed and destroyed::
testpmd> flow list 0
- check the existing rule.
+ check the rule listed.
destroy the rule::
testpmd> flow destroy 0 rule 0
- verify the packets hit rule are not distributed to queue 1.
+4. verify matched packet is received without FDIR matched ID.
check there is no rule listed.
-Test case: queue index wrong parameters
-=======================================
+Subcase 2: MAC_IPV6_PAY rss queues
+----------------------------------
-1. invalid parameters::
-
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions queue index 64 / end
+1. create filter rules::
- failed to be created.
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 0 hop is 2 tc is 1 / end \
+ actions rss queues 56 57 58 59 60 61 62 63 end / mark / end
-2. same pattern items, different action::
+2. send matched packets, check the packets is distributed to queue 56-63 with FDIR matched ID=0x0.
+ send mismatched packets, check the packets are not distributed to queue 56-63 with FDIR matched ID=0x0.
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions queue index 1 / end
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions queue index 2 / end
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions drop / end
+3. repeat step 3 of subcase 1.
- flow 1 can be created successfully,
- flow 2 and flow 3 failed to be created cause of confliction.
+4. verify matched packet is received without FDIR matched ID=0x0.
+ check there is no rule listed.
-Test case: MAC_IPV4_PAY passthru/count
-======================================
+Subcase 3: MAC_IPV6_PAY passthru
+--------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions passthru / count / end
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 0 hop is 2 tc is 1 / end actions passthru / mark / end
-2. send matched packets, check the packets are redirected by RSS
- send mismatched packets, check the packets are redirected by RSS
- check the count number::
+2. send matched packets, check the packets are distributed by RSS with FDIR matched ID=0x0.
+ send mismatched packets, check the packets are distributed by RSS without FDIR matched ID.
- flow query 0 0 count
- count:
- hits_set: 1
- bytes_set: 0
- hits: 2
- bytes: 0
+3. repeat step 3 of subcase 1.
-3. verify rules can be listed and destroyed::
+4. verify matched packets are destributed to the same queue without FDIR matched ID .
+ check there is no rule listed.
- testpmd> flow list 0
+Subcase 4: MAC_IPV6_PAY drop
+----------------------------
- check the existing rule.
- destroy the rule::
+1. create filter rules::
- testpmd> flow destroy 0 rule 0
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 0 hop is 2 tc is 1 / end actions drop / end
+
+2. send matched packets, check the packets are dropped.
+ send mismatched packets, check the packets are not dropped.
+
+3. repeat step 3 of subcase 1.
- verify matched packets are redirected to the same queue.
+4. verify matched packet is dropped.
check there is no rule listed.
-Test case: MAC_IPV4_PAY passthru/mark
-=====================================
+Subcase 5: MAC_IPV6_PAY mark+rss
+--------------------------------
+Note: This combined action is mark with RSS which is without queues specified.
1. create filter rules::
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions passthru / mark / end
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 0 hop is 2 tc is 1 / end actions mark / rss / end
-2. send matched packets, check the packets are redirected by RSS with FDIR ID.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID.
+2. send matched packets, check the packets are distributed by RSS with FDIR matched ID=0x0
+ send mismatched packets, check the packets are distributed by RSS without FDIR matched ID.
-3. verify rules can be listed and destroyed::
+3. repeat step 3 of subcase 1.
- testpmd> flow list 0
+4. verify matched packets are distributed to the same queue without FDIR matched ID.
+ check there is no rule listed.
- check the existing rule.
- destroy the rule::
+Subcase 6: MAC_IPV6_PAY mark
+----------------------------
- testpmd> flow destroy 0 rule 0
+1. create filter rules::
- verify matched packets are redirected to the same queue without FDIR ID.
- check there is no rule listed.
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 0 hop is 2 tc is 1 / end actions mark / end
-Test case: MAC_IPV4_UDP passthru/mark
-=====================================
+2. repeat the steps of passthru in subcase 3,
+ get the same result.
+
+Subcase 7: MAC_IPV6_PAY protocal
+--------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end actions passthru / end
+ flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is ABAB:910A:2222:5498:8475:1111:3900:1010 proto is 44 / end actions rss queues 5 6 end / mark id 1 / end
+ flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 6 / end actions mark id 2 / rss / end
-2. send matched packets, check the packets are redirected by RSS.
- send mismatched packets, check the packets are redirected by RSS.
+2. send matched packets::
-3. verify rules can be listed and destroyed::
+ pkt1 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="ABAB:910A:2222:5498:8475:1111:3900:1010", nh=44, tc=1, hlim=2)/("X"*480)
+ pkt2 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="ABAB:910A:2222:5498:8475:1111:3900:1010")/IPv6ExtHdrFragment(1000)/("X"*480)
+ pkt3 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="ABAB:910A:2222:5498:8475:1111:3900:1010", nh=44)/TCP(sport=22,dport=23)/("X"*480)
+ pkt4 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="ABAB:910A:2222:5498:8475:1111:3900:1010")/IPv6ExtHdrFragment(1000)/TCP(sport=22,dport=23)/("X"*480)
+ pkt5 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/("X"*480)
+ pkt6 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22,dport=23)/("X"*480)
- testpmd> flow list 0
+ check pkt1-pkt4 are redirected to queue 5 or queue 6 with FDIR matched ID=0x1.
+ check pkt5 and pkt6 are distributed by RSS with FDIR matched ID=0x2.
+ send mismatched packets::
- check the existing rule.
- destroy the rule::
+ pkt7 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="ABAB:910A:2222:5498:8475:1111:3900:1011", nh=44)/("X"*480)
+ pkt8 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)
+ pkt9 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=17)/("X"*480)
- testpmd> flow destroy 0 rule 0
+ check the packets received have not FDIR matched ID.
+
+3. repeat step 3 of subcase 1.
- verify matched packet is redirected to the same queue.
+4. verify matched packets have not FDIR matched.
check there is no rule listed.
-Test case: MAC_IPV4_TCP passthru/mark
-=====================================
+
+Test case: MAC_IPV6_UDP pattern
+===============================
+
+Subcase 1: MAC_IPV6_UDP queue index
+-----------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / tcp src is 22 dst is 23 / end actions passthru / mark / end
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / udp src is 22 dst is 23 / end actions queue index 1 / mark / end
-2. send matched packets, check the packets are redirected by RSS with FDIR ID.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID.
+2. send matched packets, check the packets is distributed to queue 1 with FDIR matched ID=0x0.
+ send mismatched packets, check the packets are received without FDIR matched ID=0x0.
3. verify rules can be listed and destroyed::
testpmd> flow list 0
- check the existing rule.
+ check the rule listed.
destroy the rule::
testpmd> flow destroy 0 rule 0
- verify matched packet is redirected to the same queue without FDIR ID.
+4. verify matched packet is received without FDIR matched ID=0x0.
check there is no rule listed.
-Test case: MAC_IPV4_SCTP passthru/mark
-======================================
+Subcase 2: MAC_IPV6_UDP rss queues
+----------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / sctp src is 22 dst is 23 tag is 1 / end actions passthru / mark / end
+ flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / udp src is 22 dst is 23 / end actions rss / end
-2. send matched packets, check the packets are redirected by RSS with FDIR ID.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID.
+2. send matched packets, check the packets is distributed by RSS.
+ send mismatched packets, check the packets are distributed by RSS too.
-3. verify rules can be listed and destroyed::
+3. repeat step 3 of subcase 1.
- testpmd> flow list 0
+4. verify matched packet is destributed to the same queue.
+ check there is no rule listed.
- check the existing rule.
- destroy the rule::
+Subcase 3: MAC_IPV6_UDP passthru
+--------------------------------
- testpmd> flow destroy 0 rule 0
+1. create filter rules::
- verify matched packet is redirected to the same queue without FDIR ID.
- check there is no rule listed.
+ flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / udp src is 22 dst is 23 / end actions passthru / mark / end
-Test case: MAC_IPV6_PAY passthru/mark
-=====================================
+2. send matched packets, check the packets are distributed by RSS with FDIR matched ID=0x0.
+ send mismatched packets, check the packets are distributed by RSS without FDIR matched ID.
-1. create filter rules::
+3. repeat step 3 of subcase 1.
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 1 hop is 2 tc is 1 / end actions passthru / mark / end
+4. verify matched packets are destributed to the same queue without FDIR matched ID .
+ check there is no rule listed.
-2. send matched packets, check the packets are redirected by RSS with FDIR ID.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID.
+Subcase 4: MAC_IPV6_UDP drop
+----------------------------
-3. verify rules can be listed and destroyed::
+1. create filter rules::
- testpmd> flow list 0
+ flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / udp src is 22 dst is 23 / end actions drop / end
- check the existing rule.
- destroy the rule::
+2. send matched packets, check the packets are dropped.
+ send mismatched packets, check the packets are not dropped.
- testpmd> flow destroy 0 rule 0
+3. repeat step 3 of subcase 1.
- verify matched packet is redirected to the same queue without FDIR ID.
+4. verify matched packet is dropped.
check there is no rule listed.
-Test case: MAC_IPV6_UDP passthru/mark
-=====================================
+Subcase 5: MAC_IPV6_UDP mark+rss
+--------------------------------
+Note: This combined action is mark with RSS which is without queues specified.
1. create filter rules::
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / udp src is 22 dst is 23 / end actions passthru / mark / end
+ flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / udp src is 22 dst is 23 / end actions mark / rss / end
-2. send matched packets, check the packets are redirected by RSS with FDIR ID.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID.
+2. send matched packets, check the packets are distributed by RSS with FDIR matched ID=0x0
+ send mismatched packets, check the packets are distributed by RSS without FDIR matched ID.
-3. verify rules can be listed and destroyed::
+3. repeat step 3 of subcase 1.
- testpmd> flow list 0
+4. verify matched packets are distributed to the same queue without FDIR matched ID.
+ check there is no rule listed.
- check the existing rule.
- destroy the rule::
+Subcase 6: MAC_IPV6_UDP mark
+----------------------------
- testpmd> flow destroy 0 rule 0
+1. create filter rules::
- verify matched packet is redirected to the same queue without FDIR ID.
- check there is no rule listed.
+ flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / udp src is 22 dst is 23 / end actions mark / end
-Test case: MAC_IPV6_TCP passthru/mark
-=====================================
+2. repeat the steps of passthru in subcase 3,
+ get the same result.
-1. create filter rules::
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / tcp src is 22 dst is 23 / end actions passthru / mark / end
+Test case: MAC_IPV6_TCP pattern
+===============================
-2. send matched packets, check the packets are redirected by RSS with FDIR ID.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID.
+1. replace "udp" with "tcp" in all the subcases of MAC_IPV6_UDP pattern.
+2. Then repeat all the steps in all the subcases of MAC_IPV6_UDP pattern.
+3. get the same result.
-3. verify rules can be listed and destroyed::
+Test case: MAC_IPV6_SCTP pattern
+================================
- testpmd> flow list 0
+1. replace "udp" with "sctp" in all the subcases of MAC_IPV6_UDP pattern.
+2. Then repeat all the steps in all the subcases of MAC_IPV6_UDP pattern.
+3. get the same result.
- check the existing rule.
- destroy the rule::
- testpmd> flow destroy 0 rule 0
- verify matched packet is redirected to the same queue without FDIR ID.
- check there is no rule listed.
-Test case: MAC_IPV6_SCTP passthru/mark
-======================================
+Test case: MAC_IPV4_TUN_IPV4_PAY pattern
+========================================
+
+Subcase 1: MAC_IPV4_TUN_IPV4_PAY queue index
+--------------------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / sctp src is 22 dst is 23 / end actions passthru / mark / end
+ flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions queue index 1 / end
-2. send matched packets, check the packets are redirected by RSS with FDIR ID.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID.
+2. send matched packets, check the packets are distributed to queue 1 without FDIR matched ID.
+ send mismatched packets, check the packets are not distributed to queue 1 without FDIR matched ID.
3. verify rules can be listed and destroyed::
@@ -1092,84 +1085,92 @@ Test case: MAC_IPV6_SCTP passthru/mark
testpmd> flow destroy 0 rule 0
- verify matched packet is redirected to the same queue without FDIR ID.
+ verify the packets hit rule are not distributed to queue 1 without FDIR matched ID.
check there is no rule listed.
-Test case: MAC_IPV4_TUN_IPV4_PAY passthru/mark
-==============================================
+Subcase 2: MAC_IPV4_TUN_IPV4_PAY rss queues
+-------------------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions passthru / mark / end
+ flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions rss queues 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 end / mark / end
-2. send matched packets, check the packets are redirected by RSS with FDIR ID.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID.
+2. send matched packets, check the packets are distributed to queue group with FDIR matched ID=0x0.
+ send mismatched packets, check the packets are received without FDIR matched ID.
-3. verify rules can be listed and destroyed::
+3. repeat step 3 of subcase 1.
- testpmd> flow list 0
+4. verify the packets hit rule are received without FDIR matched ID.
+ check there is no rule listed.
- check the existing rule.
- destroy the rule::
+Subcase 3: MAC_IPV4_TUN_IPV4_PAY passthru
+-----------------------------------------
- testpmd> flow destroy 0 rule 0
+1. create filter rules::
+
+ flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions passthru / mark / end
- verify matched packet is redirected to the same queue without FDIR ID.
+2. send matched packets, check the packets are redirected by RSS with FDIR matched ID=0x0.
+ send mismatched packets, check the packets are redirected by RSS without FDIR matched ID.
+
+3. repeat step 3 of subcase 1.
+
+4. verify the packets hit rule are received without FDIR matched ID.
check there is no rule listed.
-Test case: MAC_IPV4_TUN_IPV4_UDP passthru/mark
-==============================================
+Subcase 4: MAC_IPV4_TUN_IPV4_PAY drop
+-------------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions passthru / mark / end
+ flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions drop / end
-2. send matched packets, check the packets are redirected by RSS with FDIR ID.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID.
+2. send matched packets, check the packets dropped.
+ send mismatched packets, check the packets are not dropped.
-3. verify rules can be listed and destroyed::
+3. repeat step 3 of subcase 1.
- testpmd> flow list 0
+4. check there is no rule listed.
+ verify the packets hit the rule are not dropped.
- check the existing rule.
- destroy the rule::
+Subcase 5: MAC_IPV4_TUN_IPV4_PAY mark/rss
+-----------------------------------------
- testpmd> flow destroy 0 rule 0
+1. create filter rules::
- verify matched packet is redirected to the same queue without FDIR ID.
- check there is no rule listed.
+ flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions mark / rss / end
-Test case: MAC_IPV4_TUN_IPV4_TCP passthru/mark
-==============================================
+2. send matched packets, check the packets are redirected by RSS with FDIR matched ID=0x0.
+ send mismatched packets, check the packets are redirected by RSS without FDIR matched ID.
-1. create filter rules::
+3. repeat step 3 of subcase 1.
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions passthru / mark / end
+4. verify matched packet is redirected to the same queue without FDIR matched ID.
+ check there is no rule listed.
-2. send matched packets, check the packets are redirected by RSS with FDIR ID.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID.
+Subcase 6: MAC_IPV4_TUN_IPV4_PAY mark
+-------------------------------------
-3. verify rules can be listed and destroyed::
+1. create filter rules::
- testpmd> flow list 0
+ flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions mark / end
- check the existing rule.
- destroy the rule::
+2. repeat the steps of passthru in subcase 3,
+ get the same result.
- testpmd> flow destroy 0 rule 0
- verify matched packet is redirected to the same queue without FDIR ID.
- check there is no rule listed.
+Test case: MAC_IPV4_TUN_IPV4_UDP pattern
+========================================
-Test case: MAC_IPV4_TUN_IPV4_SCTP passthru/mark
-===============================================
+Subcase 1: MAC_IPV4_TUN_IPV4_UDP queue index
+--------------------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions passthru / mark / end
+ flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue index 1 / mark id 1 / end
-2. send matched packets, check the packets are redirected by RSS with FDIR ID.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID.
+2. send matched packets, check the packets are distributed to queue 1 with FDIR matched ID=0x1.
+ send mismatched packets, check the packets are received without FDIR matched ID.
3. verify rules can be listed and destroyed::
@@ -1180,106 +1181,106 @@ Test case: MAC_IPV4_TUN_IPV4_SCTP passthru/mark
testpmd> flow destroy 0 rule 0
- verify matched packet is redirected to the same queue without FDIR ID.
+4. verify the packets hit rule are received without FDIR matched ID.
check there is no rule listed.
-Test case: MAC_IPV4_TUN_MAC_IPV4_PAY passthru/mark
-==================================================
+Subcase 2: MAC_IPV4_TUN_IPV4_UDP rss queues
+-------------------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions passthru / mark / end
+ flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions rss queues 38 39 40 41 end / mark id 1 / end
-2. send matched packets, check the packets are redirected by RSS with FDIR ID.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID.
+2. send matched packets, check the packets are distributed to queue group with FDIR matched ID=0x1.
+ send mismatched packets, check the packets are received without FDIR matched ID.
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
+3. repeat step 3 of subcase 1.
- verify matched packet is redirected to the same queue without FDIR ID.
+4. verify the packets hit rule are received without FDIR matched ID.
check there is no rule listed.
-Test case: MAC_IPV4_TUN_MAC_IPV4_UDP passthru/mark
-==================================================
+Subcase 3: MAC_IPV4_TUN_IPV4_UDP passthru
+-----------------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions passthru / mark / end
+ flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions passthru / mark id 1 / end
-2. send matched packets, check the packets are redirected by RSS with FDIR ID.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID.
+2. send matched packets, check the packets are distributed by RSS with FDIR matched ID=0x1.
+ send mismatched packets, check the packets are distributed by RSS without FDIR matched ID.
-3. verify rules can be listed and destroyed::
+3. repeat step 3 of subcase 1.
- testpmd> flow list 0
+4. verify the packets hit rule are distributed to the same queue without FDIR matched ID.
+ check there is no rule listed.
- check the existing rule.
- destroy the rule::
+Subcase 4: MAC_IPV4_TUN_IPV4_UDP drop
+-------------------------------------
- testpmd> flow destroy 0 rule 0
+1. create filter rules::
- verify matched packet is redirected to the same queue without FDIR ID.
- check there is no rule listed.
+ flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions drop / end
-Test case: MAC_IPV4_TUN_MAC_IPV4_TCP passthru/mark
-==================================================
+2. send matched packets, check the packets are dropped.
+ send mismatched packets, check the packets are received without FDIR matched ID.
-1. create filter rules::
+3. repeat step 3 of subcase 1.
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions passthru / mark / end
+4. verify the packets hit rule are received without FDIR matched ID.
-2. send matched packets, check the packets are redirected by RSS with FDIR ID.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID.
+Subcase 5: MAC_IPV4_TUN_IPV4_UDP mark/rss
+-----------------------------------------
-3. verify rules can be listed and destroyed::
+1. create filter rules::
- testpmd> flow list 0
+ flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions mark id 1 / rss / end
- check the existing rule.
- destroy the rule::
+2. send matched packets, check the packets are distributed by RSS with FDIR matched ID=0x1.
+ send mismatched packets, check the packets are distributed by RSS without FDIR matched ID.
- testpmd> flow destroy 0 rule 0
+3. repeat step 3 of subcase 1.
- verify matched packet is redirected to the same queue without FDIR ID.
+4. verify the packets hit rule are distributed to the same queue without FDIR matched ID.
check there is no rule listed.
-Test case: MAC_IPV4_TUN_MAC_IPV4_SCTP passthru/mark
-===================================================
+Subcase 6: MAC_IPV4_TUN_IPV4_UDP mark
+-------------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions passthru / mark / end
+ flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions mark id 1 / end
-2. send matched packets, check the packets are redirected by RSS with FDIR ID.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID.
+2. repeat the steps of passthru in subcase 3,
+ get the same result.
-3. verify rules can be listed and destroyed::
- testpmd> flow list 0
+Test case: MAC_IPV4_TUN_IPV4_TCP pattern
+========================================
- check the existing rule.
- destroy the rule::
+1. replace "udp" with "tcp" in all the subcases of MAC_IPV4_TUN_IPV4_UDP pattern.
+2. Then repeat all the steps in all the subcases of MAC_IPV4_TUN_IPV4_UDP pattern.
+3. get the same result.
- testpmd> flow destroy 0 rule 0
+Test case: MAC_IPV4_TUN_IPV4_SCTP pattern
+=========================================
- verify matched packet is redirected to the same queue without FDIR ID.
- check there is no rule listed.
+1. replace "udp" with "sctp" in all the subcases of MAC_IPV4_TUN_IPV4_UDP pattern.
+2. Then repeat all the steps in all the subcases of MAC_IPV4_TUN_IPV4_UDP pattern.
+3. get the same result.
-Test case: MAC_IPV4_PAY mark/rss
-================================
+
+Test case: MAC_IPV4_TUN_MAC_IPV4_PAY pattern
+============================================
+
+Subcase 1: MAC_IPV4_TUN_MAC_IPV4_PAY queue index
+------------------------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions mark id 1 / rss / end
+ flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions queue index 0 / end
-2. send matched packets, check the packets are redirected by RSS with FDIR ID 1.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID 1.
+2. send matched packets, check the packets are distributed to queue 0 without FDIR matched ID.
+ send mismatched packets, check the packets are not distributed to queue 0 without FDIR matched ID.
3. verify rules can be listed and destroyed::
@@ -1290,84 +1291,91 @@ Test case: MAC_IPV4_PAY mark/rss
testpmd> flow destroy 0 rule 0
- verify matched packets are redirected to the same queue without FDIR ID.
+4. verify the packets hit rule are not distributed to queue 0 without FDIR matched ID.
check there is no rule listed.
-Test case: MAC_IPV4_UDP mark/rss
-================================
+Subcase 2: MAC_IPV4_TUN_MAC_IPV4_PAY rss queues
+-----------------------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end actions mark / rss / end
+ flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions rss queues 0 1 end / end
-2. send matched packets, check the packets are redirected by RSS with FDIR ID 0.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID 0.
+2. send matched packets, check the packets are distributed to queue group without FDIR matched ID.
+ send mismatched packets, check the packets are not distributed to queue group without FDIR matched ID.
-3. verify rules can be listed and destroyed::
+3. repeat step 3 of subcase 1.
- testpmd> flow list 0
+4. verify the packets hit rule are not distributed to queue group without FDIR matched ID.
+ check there is no rule listed.
- check the existing rule.
- destroy the rule::
+Subcase 3: MAC_IPV4_TUN_MAC_IPV4_PAY passthru
+---------------------------------------------
- testpmd> flow destroy 0 rule 0
+1. create filter rules::
- verify matched packet is redirected to the same queue without FDIR ID.
- check there is no rule listed.
+ flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions passthru / end
-Test case: MAC_IPV4_TCP mark/rss
-================================
+2. send matched packets, check the packets are distributed by RSS without FDIR matched ID.
+ send mismatched packets, check the packets are distributed by RSS without FDIR matched ID.
-1. create filter rules::
+3. repeat step 3 of subcase 1.
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / tcp src is 22 dst is 23 / end actions mark id 1 / rss / end
+4. verify the packets hit rule are distributed to same queue without FDIR matched ID.
+ check there is no rule listed.
-2. send matched packets, check the packets are redirected by RSS with FDIR ID 1.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID 1.
+Subcase 4: MAC_IPV4_TUN_MAC_IPV4_PAY drop
+-----------------------------------------
-3. verify rules can be listed and destroyed::
+1. create filter rules::
- testpmd> flow list 0
+ flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions drop / end
- check the existing rule.
- destroy the rule::
+2. send matched packets, check the packets are dropped.
+ send mismatched packets, check the packets are not dropped.
- testpmd> flow destroy 0 rule 0
+3. repeat step 3 of subcase 1.
- verify matched packet is redirected to the same queue without FDIR ID.
+4. verify the packets hit rule are not dropped.
check there is no rule listed.
-Test case: MAC_IPV4_SCTP mark/rss
-=================================
+Subcase 5: MAC_IPV4_TUN_MAC_IPV4_PAY mark/rss
+---------------------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / sctp src is 22 dst is 23 tag is 1 / end actions mark id 1 / rss / end
+ flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions mark / rss / end
-2. send matched packets, check the packets are redirected by RSS with FDIR ID 1.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID 1.
+2. send matched packets, check the packets are distributed by RSS with FDIR matched ID=0x0.
+ send mismatched packets, check the packets are distributed by RSS without FDIR matched ID.
-3. verify rules can be listed and destroyed::
+3. repeat step 3 of subcase 1.
- testpmd> flow list 0
+4. verify the packets hit rule are distributed to same queue without FDIR matched ID.
+ check there is no rule listed.
- check the existing rule.
- destroy the rule::
+Subcase 6: MAC_IPV4_TUN_MAC_IPV4_PAY mark
+-----------------------------------------
- testpmd> flow destroy 0 rule 0
+1. create filter rules::
- verify matched packet is redirected to the same queue without FDIR ID.
- check there is no rule listed.
+ flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions mark / end
-Test case: MAC_IPV6_PAY mark/rss
-================================
+2. repeat the steps of passthru in subcase 3,
+ get the same result.
+
+Test case: MAC_IPV4_TUN_MAC_IPV4_UDP pattern
+============================================
+
+Subcase 1: MAC_IPV4_TUN_MAC_IPV4_UDP queue index
+------------------------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 1 hop is 2 tc is 1 / end actions mark id 1 / rss / end
+ flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue index 15 / mark id 1 / end
-2. send matched packets, check the packets are redirected by RSS with FDIR ID 1.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID 1.
+2. send matched packets, check the packets are distributed to queue 15 with FDIR matched ID=0x1.
+ send mismatched packets, check the packets are received without FDIR matched ID.
3. verify rules can be listed and destroyed::
@@ -1378,106 +1386,106 @@ Test case: MAC_IPV6_PAY mark/rss
testpmd> flow destroy 0 rule 0
- verify matched packet is redirected to the same queue without FDIR ID.
+4. verify the packets hit rule are distributed by RSS without FDIR matched ID.
check there is no rule listed.
-Test case: MAC_IPV6_UDP mark/rss
-================================
+Subcase 2: MAC_IPV4_TUN_MAC_IPV4_UDP rss queues
+-----------------------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / udp src is 22 dst is 23 / end actions mark id 1 / rss / end
+ flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions rss queues 0 1 2 3 end / mark id 1 / end
-2. send matched packets, check the packets are redirected by RSS with FDIR ID 1.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID 1.
+2. send matched packets, check the packets are distributed to queue group with FDIR matched ID=0x1.
+ send mismatched packets, check the packets are distributed by RSS without FDIR matched ID.
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
+3. repeat step 3 of subcase 1.
- verify matched packet is redirected to the same queue without FDIR ID.
+4. verify the packets hit rule are distributed by RSS without FDIR matched ID.
check there is no rule listed.
-Test case: MAC_IPV6_TCP mark/rss
-================================
+Subcase 3: MAC_IPV4_TUN_MAC_IPV4_UDP passthru
+---------------------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / tcp src is 22 dst is 23 / end actions mark id 1 / rss / end
+ flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions passthru / mark id 1 / end
-2. send matched packets, check the packets are redirected by RSS with FDIR ID 1.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID 1.
+2. send matched packets, check the packets are distributed by RSS with FDIR matched ID=0x1.
+ send mismatched packets, check the packets are distributed by RSS without FDIR matched ID.
-3. verify rules can be listed and destroyed::
+3. repeat step 3 of subcase 1.
- testpmd> flow list 0
+4. verify the packets hit rule are distributed by RSS without FDIR matched ID.
+ check there is no rule listed.
- check the existing rule.
- destroy the rule::
+Subcase 4: MAC_IPV4_TUN_MAC_IPV4_UDP drop
+-----------------------------------------
- testpmd> flow destroy 0 rule 0
+1. create filter rules::
- verify matched packet is redirected to the same queue without FDIR ID.
- check there is no rule listed.
+ flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions drop / mark id 1 / end
-Test case: MAC_IPV6_SCTP mark/rss
-=================================
+2. send matched packets, check the packets are dropped.
+ send mismatched packets, check the packets are distributed by RSS without FDIR matched ID.
-1. create filter rules::
+3. repeat step 3 of subcase 1.
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / sctp src is 22 dst is 23 / end actions mark id 1 / rss / end
+4. verify the packets hit rule are distributed by RSS without FDIR matched ID.
+ check there is no rule listed.
-2. send matched packets, check the packets are redirected by RSS with FDIR ID 1.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID 1.
+Subcase 5: MAC_IPV4_TUN_MAC_IPV4_UDP mark/rss
+---------------------------------------------
-3. verify rules can be listed and destroyed::
+1. create filter rules::
- testpmd> flow list 0
+ flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions rss / mark id 1 / end
- check the existing rule.
- destroy the rule::
+2. send matched packets, check the packets are distributed by RSS with FDIR matched ID=0x1.
+ send mismatched packets, check the packets are distributed by RSS without FDIR matched ID.
- testpmd> flow destroy 0 rule 0
+3. repeat step 3 of subcase 1.
- verify matched packet is redirected to the same queue without FDIR ID.
+4. verify the packets hit rule are distributed to same queue without FDIR matched ID.
check there is no rule listed.
-Test case: MAC_IPV4_TUN_IPV4_PAY mark/rss
-=========================================
+Subcase 6: MAC_IPV4_TUN_MAC_IPV4_UDP mark
+-----------------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions mark / rss / end
+ flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions mark id 1 / end
-2. send matched packets, check the packets are redirected by RSS with FDIR ID 0.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID 0.
+2. repeat the steps of passthru in subcase 3,
+ get the same result.
-3. verify rules can be listed and destroyed::
- testpmd> flow list 0
+Test case: MAC_IPV4_TUN_MAC_IPV4_TCP pattern
+============================================
- check the existing rule.
- destroy the rule::
+1. replace "udp" with "tcp" in all the subcases of MAC_IPV4_TUN_MAC_IPV4_UDP pattern.
+2. Then repeat all the steps in all the subcases of MAC_IPV4_TUN_MAC_IPV4_UDP pattern.
+3. get the same result.
- testpmd> flow destroy 0 rule 0
+Test case: MAC_IPV4_TUN_MAC_IPV4_SCTP pattern
+=============================================
- verify matched packet is redirected to the same queue without FDIR ID.
- check there is no rule listed.
+1. replace "udp" with "sctp" in all the subcases of MAC_IPV4_TUN_MAC_IPV4_UDP pattern.
+2. Then repeat all the steps in all the subcases of MAC_IPV4_TUN_MAC_IPV4_UDP pattern.
+3. get the same result.
-Test case: MAC_IPV4_TUN_IPV4_UDP mark/rss
-=========================================
+Test case: MAC_IPV4_GTPU_EH pattern
+===================================
+
+Subcase 1: MAC_IPV4_GTPU_EH queue index
+---------------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions mark id 1 / rss / end
+ flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x34 / end actions queue index 1 / mark id 1 / end
-2. send matched packets, check the packets are redirected by RSS with FDIR ID 1.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID 1.
+2. send matched packets, check the packets are distributed to queue 1 with FDIR matched ID=0x1.
+ send mismatched packets, check the packets are not distributed to queue 1 without FDIR matched ID.
3. verify rules can be listed and destroyed::
@@ -1488,128 +1496,131 @@ Test case: MAC_IPV4_TUN_IPV4_UDP mark/rss
testpmd> flow destroy 0 rule 0
- verify matched packet is redirected to the same queue without FDIR ID.
- check there is no rule listed.
+4. verify matched packets are not distributed to queue 1 without FDIR matched ID.
+ Then check there is no rule listed.
-Test case: MAC_IPV4_TUN_IPV4_TCP mark/rss
-=========================================
+Subcase 2: MAC_IPV4_GTPU_EH queue group
+---------------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions mark id 1 / rss / end
+ flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x34 / end actions rss queues 0 1 2 3 end / mark id 1 / end
-2. send matched packets, check the packets are redirected by RSS with FDIR ID 1.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID 1.
+2. send matched packets, check the packets are distributed to queue group with FDIR matched ID=0x1.
+ send mismatched packets, check the packets are not distributed to queue group without FDIR matched ID.
-3. verify rules can be listed and destroyed::
+3. repeat step 3 of subcase 1.
- testpmd> flow list 0
+4. verify matched packets are not distributed to queue group without FDIR matched ID.
+ Then check there is no rule listed.
- check the existing rule.
- destroy the rule::
+Subcase 3: MAC_IPV4_GTPU_EH passthru
+------------------------------------
- testpmd> flow destroy 0 rule 0
+1. create filter rules::
- verify matched packet is redirected to the same queue without FDIR ID.
- check there is no rule listed.
+ flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x34 / end actions passthru / mark id 1 / end
-Test case: MAC_IPV4_TUN_IPV4_SCTP mark/rss
-==========================================
+2. send matched packets, check the packets are redirected by RSS with FDIR matched ID=0x1.
+ send mismatched packets, check the packets are redirected by RSS without FDIR matched ID.
-1. create filter rules::
+3. repeat step 3 of subcase 1.
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions mark id 1 / rss / end
+4. verify matched packets are redirected to the same queue without FDIR ID.
+ check there is no rule listed.
-2. send matched packets, check the packets are redirected by RSS with FDIR ID 1.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID 1.
+Subcase 4: MAC_IPV4_GTPU_EH drop
+--------------------------------
-3. verify rules can be listed and destroyed::
+1. create filter rules::
- testpmd> flow list 0
+ flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x34 / end actions drop / end
- check the existing rule.
- destroy the rule::
+2. send matched packets, check the packets are dropped.
+ send mismatched packets, check the packets are not dropped without FDIR matched ID.
- testpmd> flow destroy 0 rule 0
+3. repeat step 3 of subcase 1.
- verify matched packet is redirected to the same queue without FDIR ID.
- check there is no rule listed.
+4. verify matched packets are not dropped without FDIR matched ID.
+ Then check there is no rule listed.
-Test case: MAC_IPV4_TUN_MAC_IPV4_PAY mark/rss
-=============================================
+Subcase 5: MAC_IPV4_GTPU_EH mark/rss
+------------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions mark id 1 / rss / end
+ flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x34 / end actions mark id 1 / rss / end
-2. send matched packets, check the packets are redirected by RSS with FDIR ID 1.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID 1.
+2. send matched packets, check the packets are redirected by RSS with FDIR matched ID=0x1.
+ send mismatched packets, check the packets are redirected by RSS without FDIR matched ID.
-3. verify rules can be listed and destroyed::
+3. repeat step 3 of subcase 1.
- testpmd> flow list 0
+4. verify matched packets are redirected to the same queue without FDIR matched ID.
+ check there is no rule listed.
- check the existing rule.
- destroy the rule::
+Subcase 6: MAC_IPV4_GTPU_EH mark
+--------------------------------
- testpmd> flow destroy 0 rule 0
+1. create filter rules::
- verify matched packet is redirected to the same queue without FDIR ID.
- check there is no rule listed.
+ flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x34 / end actions mark id 1 / end
-Test case: MAC_IPV4_TUN_MAC_IPV4_UDP mark/rss
-=============================================
+2. repeat the steps of passthru in subcase 3,
+ get the same result.
-1. create filter rules::
+Subcase 7: MAC_IPV4_GTPU_EH QFI queue index / mark
+--------------------------------------------------
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions mark id 1 / rss / end
+1. create filter rules on port 0::
-2. send matched packets, check the packets are redirected by RSS with FDIR ID 1.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID 1.
+ flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc qfi is 0x34 / end actions queue index 1 / mark id 3 / end
-3. verify rules can be listed and destroyed::
+2. send matched packets, check the packet is redirected to queue 1 with FDIR matched ID=0x3::
- testpmd> flow list 0
+ p_gtpu1 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP()/TCP()/Raw('x'*20)
- check the existing rule.
- destroy the rule::
+ send mismatched packets, check the packet received has not FDIR::
- testpmd> flow destroy 0 rule 0
+ p_gtpu2 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x35)/IP()/Raw('x'*20)
- verify matched packet is redirected to the same queue without FDIR ID.
- check there is no rule listed.
+3. repeat step 3 of subcase 1.
-Test case: MAC_IPV4_TUN_MAC_IPV4_TCP mark/rss
-=============================================
+4. verify matched packet received has not FDIR.
+ Then check there is no rule listed.
-1. create filter rules::
+Subcase 8: MAC_IPV4_GTPU_EH without QFI rss queues / mark
+---------------------------------------------------------
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions mark id 1 / rss / end
+1. create filter rules on port 0::
-2. send matched packets, check the packets are redirected by RSS with FDIR ID 1.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID 1.
+ flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc / end actions rss queues 2 3 end / mark id 1 / end
-3. verify rules can be listed and destroyed::
+2. send matched packets, check the packet is distributed to queue 2 or queue 3 with FDIR matched ID=0x3::
- testpmd> flow list 0
+ p_gtpu1 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0)/IP()/TCP()/Raw('x'*20)
- check the existing rule.
- destroy the rule::
+ send mismatched packets, check the packet received has no FDIR::
- testpmd> flow destroy 0 rule 0
+ p_gtpu2 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x1234567)/GTP_PDUSession_ExtensionHeader(pdu_type=0)/IP()/TCP()/Raw('x'*20)
- verify matched packet is redirected to the same queue without FDIR ID.
- check there is no rule listed.
+3. repeat step 3 of subcase 1.
+
+4. verify matched packet received has not FDIR.
+ Then check there is no rule listed.
+
+Test case: MAC_IPV4_GTPU pattern
+================================
-Test case: MAC_IPV4_TUN_MAC_IPV4_SCTP mark/rss
-==============================================
+Subcase 1: MAC_IPV4_GTPU queue index
+------------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions mark id 1 / rss / end
+ flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / end actions queue index 1 / mark / end
-2. send matched packets, check the packets are redirected by RSS with FDIR ID 1.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID 1.
+2. send matched packets, check the packets are distributed to queue 1 with FDIR matched ID=0x0.
+ send mismatched packets, check the packets are not distributed to queue 1 without FDIR matched ID.
3. verify rules can be listed and destroyed::
@@ -1620,1263 +1631,383 @@ Test case: MAC_IPV4_TUN_MAC_IPV4_SCTP mark/rss
testpmd> flow destroy 0 rule 0
- verify matched packet is redirected to the same queue without FDIR ID.
- check there is no rule listed.
+4. verify matched packets are not distributed to queue 1 without FDIR matched ID.
+ Then check there is no rule listed.
-Test case: mark/rss wrong parameters
-====================================
+Subcase 2: MAC_IPV4_GTPU queue group
+------------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end actions rss / end
+ flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / end actions rss queues 0 1 end / mark / end
-2. The rule failed to be created, report proper error message.
+2. send matched packets, check the packets are distributed to queue group with FDIR matched ID=0x0.
+ send mismatched packets, check the packets are not distributed to queue group without FDIR matched ID.
-3. list the flow::
-
- testpmd> flow list 0
+3. repeat step 3 of subcase 1.
- there is no flow listed.
+4. verify matched packets are not distributed to queue group without FDIR matched ID.
+ Then check there is no rule listed.
-Test case: MAC_IPV4_PAY drop
-============================
+Subcase 3: MAC_IPV4_GTPU passthru
+---------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions drop / end
+ flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / end actions passthru / mark / end
-2. send matched packets, check the packets dropped.
- send mismatched packets, check the packets are not dropped.
+2. send matched packets, check the packets are redirected by RSS with FDIR matched ID=0x0.
+ send mismatched packets, check the packets are redirected by RSS without FDIR matched ID.
-3. verify rules can be listed and destroyed::
+3. repeat step 3 of subcase 1.
- testpmd> flow list 0
+4. verify matched packets are distributed to same queue without FDIR matched ID.
+ Then check there is no rule listed.
- check the existing rule.
- destroy the rule::
+Subcase 4: MAC_IPV4_GTPU drop
+-----------------------------
- testpmd> flow destroy 0 rule 0
+1. create filter rules::
- check there is no rule listed.
- verify matched packets are not dropped.
+ flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / end actions drop / end
-Test case: MAC_IPV4_UDP drop
-============================
+2. send matched packets, check the packets are dropped.
+ send mismatched packets, check the packets are not dropped.
-1. create filter rules::
+3. repeat step 3 of subcase 1.
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end actions drop / end
+4. verify matched packets are not dropped without FDIR matched ID.
+ Then check there is no rule listed.
-2. send matched packets, check the packet dropped.
- send mismatched packets, check the packets are not dropped.
+Subcase 5: MAC_IPV4_GTPU mark/rss
+---------------------------------
-3. verify rules can be listed and destroyed::
+1. create filter rules::
- testpmd> flow list 0
+ flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / end actions mark / rss / end
- check the existing rule.
- destroy the rule::
+2. send matched packets, check the packets are redirected by RSS with FDIR matched ID=0x0.
+ send mismatched packets, check the packets are redirected by RSS without FDIR matched ID.
- testpmd> flow destroy 0 rule 0
+3. repeat step 3 of subcase 1.
- check there is no rule listed.
- verify the packet hit the rule is not dropped.
+4. verify matched packets are distributed to same queue without FDIR matched ID.
+ Then check there is no rule listed.
-Test case: MAC_IPV4_TCP drop
-============================
+Subcase 6: MAC_IPV4_GTPU mark
+-----------------------------
1. create filter rules::
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / tcp src is 22 dst is 23 / end actions drop / end
+ flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / end actions mark / end
-2. send matched packets, check the packet dropped.
- send mismatched packets, check the packets are not dropped.
+2. repeat the steps of passthru in subcase 3,
+ get the same result.
-3. verify rules can be listed and destroyed::
- testpmd> flow list 0
+Test case: negative cases
+=========================
- check the existing rule.
- destroy the rule::
+Subcase 1: invalid parameters of queue index
+--------------------------------------------
- testpmd> flow destroy 0 rule 0
+1. Invalid parameters::
- check there is no rule listed.
- verify the packet hit the rule is not dropped.
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions queue index 64 / end
-Test case: MAC_IPV4_SCTP drop
-=============================
+ Failed to create flow, report message::
-1. create filter rules::
+ Invalid queue for FDIR.: Invalid argument
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / sctp src is 22 dst is 23 / end actions drop / end
+2. check there is no rule listed.
-2. send matched packets, check the packet dropped.
- send mismatched packets, check the packets are not dropped.
+Subcase 2: invalid parameters of rss queues
+-------------------------------------------
-3. verify rules can be listed and destroyed::
+1. Invalid number of queues::
- testpmd> flow list 0
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss queues 1 2 3 end / end
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss queues 0 end / end
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss queues end / end
- check the existing rule.
- destroy the rule::
+ Failed to create flow, report message::
- testpmd> flow destroy 0 rule 0
+ Invalid input action: Invalid argument
- check there is no rule listed.
- verify the packet hit the rule is not dropped.
+2. Discontinuous queues::
-Test case: MAC_IPV6_PAY drop
-============================
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss queues 1 2 3 5 end / end
-1. create filter rules::
+ Failed to create flow, report message::
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 1 hop is 2 tc is 1 \
- / end actions drop / end
+ Discontinuous queue region: Invalid argument
-2. send matched packets, check the packets dropped.
- send mismatched packets, check the packets are not dropped.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- check there is no rule listed.
- verify the packet hit the rule is not dropped.
-
-Test case: MAC_IPV6_UDP drop
-============================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / udp src is 22 dst is 23 / end actions drop / end
-
-2. send matched packets, check the packet dropped.
- send mismatched packets, check the packets are not dropped.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- check there is no rule listed.
- verify the packet hit the rule is not dropped.
-
-Test case: MAC_IPV6_TCP drop
-============================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / tcp src is 22 dst is 23 / end actions drop / end
-
-2. send matched packets, check the packet dropped.
- send mismatched packets, check the packets are not dropped.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- check there is no rule listed.
- verify the packet hit the rule is not dropped.
-
-Test case: MAC_IPV6_SCTP drop
-=============================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / sctp src is 22 dst is 23 / end actions drop / end
-
-2. send matched packets, check the packet dropped.
- send mismatched packets, check the packets are not dropped.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- check there is no rule listed.
- verify the packet hit the rule is not dropped.
-
-Test case: MAC_IPV4_TUN_IPV4_PAY drop
-=====================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions drop / end
-
-2. send matched packets, check the packets dropped.
- send mismatched packets, check the packets are not dropped.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- check there is no rule listed.
- verify the packets hit the rule are not dropped.
-
-Test case: MAC_IPV4_TUN_IPV4_UDP drop
-=====================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions drop / end
-
-2. send matched packets, check the packets dropped.
- send mismatched packets, check the packets are not dropped.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- check there is no rule listed.
- verify the packets hit the rule are not dropped.
-
-Test case: MAC_IPV4_TUN_IPV4_TCP drop
-=====================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions drop / end
-
-2. send matched packets, check the packets dropped.
- send mismatched packets, check the packets are not dropped.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- check there is no rule listed.
- verify the packets hit the rule are not dropped.
-
-Test case: MAC_IPV4_TUN_IPV4_SCTP drop
-======================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions drop / end
-
-2. send matched packets, check the packets dropped.
- send mismatched packets, check the packets are not dropped.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- check there is no rule listed.
- verify the packets hit the rule are not dropped.
-
-Test case: MAC_IPV4_TUN_MAC_IPV4_PAY drop
-=========================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions drop / end
-
-2. send matched packets, check the packets dropped.
- send mismatched packets, check the packets are not dropped.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- check there is no rule listed.
- verify the packets hit the rule are not dropped.
-
-Test case: MAC_IPV4_TUN_MAC_IPV4_UDP drop
-=========================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions drop / end
-
-2. send matched packets, check the packets dropped.
- send mismatched packets, check the packets are not dropped.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- check there is no rule listed.
- verify the packets hit the rule are not dropped.
-
-Test case: MAC_IPV4_TUN_MAC_IPV4_TCP drop
-=========================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions drop / end
-
-2. send matched packets, check the packets dropped.
- send mismatched packets, check the packets are not dropped.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- check there is no rule listed.
- verify the packets hit the rule are not dropped.
-
-Test case: MAC_IPV4_TUN_MAC_IPV4_SCTP drop
-==========================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions drop / end
-
-2. send matched packets, check the packets dropped.
- send mismatched packets, check the packets are not dropped.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- check there is no rule listed.
- verify the packets hit the rule are not dropped.
-
-Test case: MAC_IPV4_PAY queue group
-===================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss queues 0 1 end / end
-
-2. send matched packets, check the packets are distributed to queue 0 or 1.
- send mismatched packets, check the packets are not distributed to queue 0 or 1.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify pkt1 and pkt2 are not distributed to queue 0 or 1.
- check there is no rule listed.
-
-Test case: MAC_IPV4_UDP queue group
-===================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end actions rss queues 1 2 3 4 end / end
-
-2. send matched packets, check the packets are distributed to queue group.
- send mismatched packets, check the packets are not distributed to queue group.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify the packets hit rule are not distributed to queue group.
- check there is no rule listed.
-
-Test case: MAC_IPV4_TCP queue group
-===================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / tcp src is 22 dst is 23 / end actions rss queues 56 57 58 59 60 61 62 63 end / end
-
-2. send matched packets, check the packets are distributed to queue group.
- send mismatched packets, check the packets are not distributed to queue group.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify the packets hit rule are not distributed to queue group.
- check there is no rule listed.
-
-Test case: MAC_IPV4_SCTP queue group
-====================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / sctp src is 22 dst is 23 tag is 1 / end actions rss queues 0 1 2 3 end / end
-
-2. send matched packets, check the packets are distributed to queue group.
- send mismatched packets, check the packets are not distributed to queue group.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify the packets hit rule are not distributed to queue group.
- check there is no rule listed.
-
-Test case: MAC_IPV6_PAY queue group
-===================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 1 hop is 2 tc is 1 / end actions rss queues 1 2 end / end
-
-2. send matched packets, check the packets are distributed to queue group.
- send mismatched packets, check the packets are not distributed to queue group.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify the packets hit rule are not distributed to queue group.
- check there is no rule listed.
-
-Test case: MAC_IPV6_UDP queue group
-===================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / udp src is 22 dst is 23 / end actions rss queues 1 2 end / end
-
-2. send matched packets, check the packets are distributed to queue group.
- send mismatched packets, check the packets are not distributed to queue group.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify the packets hit rule are not distributed to queue group.
- check there is no rule listed.
-
-Test case: MAC_IPV6_TCP queue group
-===================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / tcp src is 22 dst is 23 / end actions rss queues 1 2 end / end
-
-2. send matched packets, check the packets are distributed to queue group.
- send mismatched packets, check the packets are not distributed to queue group.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify the packets hit rule are not distributed to queue group.
- check there is no rule listed.
-
-Test case: MAC_IPV6_SCTP queue group
-====================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / sctp src is 22 dst is 23 / end actions rss queues 1 2 end / end
-
-2. send matched packets, check the packets are distributed to queue group.
- send mismatched packets, check the packets are not distributed to queue group.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify the packets hit rule are not distributed to queue group.
- check there is no rule listed.
-
-Test case: MAC_IPV4_TUN_IPV4_PAY queue group
-============================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions rss queues 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 end / end
-
-2. send matched packets, check the packets are distributed to queue group.
- send mismatched packets, check the packets are not distributed to queue group.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify the packets hit rule are not distributed to queue group.
- check there is no rule listed.
-
-Test case: MAC_IPV4_TUN_IPV4_UDP queue group
-============================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions rss queues 38 39 40 41 end / end
-
-2. send matched packets, check the packets are distributed to queue group.
- send mismatched packets, check the packets are not distributed to queue group.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify the packets hit rule are not distributed to queue group.
- check there is no rule listed.
-
-Test case: MAC_IPV4_TUN_IPV4_TCP queue group
-============================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions rss queues 1 2 end / end
-
-2. send matched packets, check the packets are distributed to queue group.
- send mismatched packets, check the packets are not distributed to queue group.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify the packets hit rule are not distributed to queue group.
- check there is no rule listed.
-
-Test case: MAC_IPV4_TUN_IPV4_SCTP queue group
-=============================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions rss queues 1 2 end / end
-
-2. send matched packets, check the packets are distributed to queue group.
- send mismatched packets, check the packets are not distributed to queue group.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify the packets hit rule are not distributed to queue group.
- check there is no rule listed.
-
-Test case: MAC_IPV4_TUN_MAC_IPV4_PAY queue group
-================================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions rss queues 1 2 end / end
-
-2. send matched packets, check the packets are distributed to queue group.
- send mismatched packets, check the packets are not distributed to queue group.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify the packets hit rule are not distributed to queue group.
- check there is no rule listed.
-
-Test case: MAC_IPV4_TUN_MAC_IPV4_UDP queue group
-================================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions rss queues 1 2 end / end
-
-2. send matched packets, check the packets are distributed to queue group.
- send mismatched packets, check the packets are not distributed to queue group.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify the packets hit rule are not distributed to queue group.
- check there is no rule listed.
-
-Test case: MAC_IPV4_TUN_MAC_IPV4_TCP queue group
-================================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions rss queues 1 2 end / end
-
-2. send matched packets, check the packets are distributed to queue group.
- send mismatched packets, check the packets are not distributed to queue group.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify the packets hit rule are not distributed to queue group.
- check there is no rule listed.
-
-Test case: MAC_IPV4_TUN_MAC_IPV4_SCTP queue group
-=================================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions rss queues 1 2 end / end
-
-2. send matched packets, check the packets are distributed to queue group.
- send mismatched packets, check the packets are not distributed to queue group.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify the packets hit rule are not distributed to queue group.
- check there is no rule listed.
-
-Test case: queue group wrong parameters
-=======================================
-
-1. invalid number of queues::
-
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss queues 0 1 2 end / end
-
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss queues 0 end / end
-
-2. Discontinuous queues::
-
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss queues 1 2 3 5 end / end
-
-3. invalid queue index::
+3. invalid queue index::
flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss queues 63 64 end / end
-4. "--rxq=32 --txq=32", set queue group 64 queues::
-
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions rss queues 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 end / end
-
-all the above five rules are failed to created.
-
-5. "--rxq=64 --txq=64", set queue group 64 queues,
- create the 64 queues flow successfully.
- send matched packets, check the packets are distributed to queue 0-63.
- send mismatched packets, check the packets are distributed to queue 0-63 too.
-
-Test case: MAC_IPV4_GTPU_EH queue index
-=======================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x34 / end actions queue index 1 / end
-
-2. send matched packets, check the packets are distributed to queue 1.
- send mismatched packets, check the packets are not distributed to queue 1.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify matched packets are not distributed to queue 1.
- Then check there is no rule listed.
-
-Test case: MAC_IPV4_GTPU_EH passthru/mark
-=========================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x34 / end actions passthru / mark / end
-
-2. send matched packets, check the packets are redirected by RSS with FDIR ID.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify matched packets are redirected to the same queue without FDIR ID.
- check there is no rule listed.
-
-Test case: MAC_IPV4_GTPU_EH mark/rss
-====================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x34 / end actions mark id 1 / rss / end
-
-2. send matched packets, check the packets are redirected by RSS with FDIR ID 1.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID 1.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify matched packets are redirected to the same queue without FDIR ID.
- check there is no rule listed.
-
-Test case: MAC_IPV4_GTPU_EH drop
-================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x34 / end actions drop / end
-
-2. send matched packets, check the packets are dropped.
- send mismatched packets, check the packets are not dropped.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify matched packets are not dropped.
- Then check there is no rule listed.
-
-Test case: MAC_IPV4_GTPU_EH queue group
-=======================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x34 / end actions rss queues 0 1 end / end
-
-2. send matched packets, check the packets are distributed to queue group.
- send mismatched packets, check the packets are not distributed to queue group.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify matched packets are not distributed to queue group.
- Then check there is no rule listed.
-
-Test case: MAC_IPV4_GTPU queue index
-====================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / end actions queue index 1 / end
-
-2. send matched packets, check the packets are distributed to queue 1.
- send mismatched packets, check the packets are not distributed to queue 1.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify matched packets are not distributed to queue 1.
- Then check there is no rule listed.
-
-Test case: MAC_IPV4_GTPU passthru/mark
-======================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / end actions passthru / mark / end
-
-2. send matched packets, check the packets are redirected by RSS with FDIR ID.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify matched packets are redirected to the same queue without FDIR ID.
- check there is no rule listed.
-
-Test case: MAC_IPV4_GTPU mark/rss
-=================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / end actions mark id 1 / rss / end
-
-2. send matched packets, check the packets are redirected by RSS with FDIR ID 1.
- send mismatched packets, check the packets are redirected by RSS without FDIR ID 1.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify matched packets are redirected to the same queue without FDIR ID.
- check there is no rule listed.
-
-Test case: MAC_IPV4_GTPU drop
-=============================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / end actions drop / end
+ Failed to create flow, report message::
-2. send matched packets, check the packets are dropped.
- send mismatched packets, check the packets are not dropped.
-
-3. verify rules can be listed and destroyed::
+ Invalid queue region indexes.: Invalid argument
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
+4. "--rxq=7 --txq=7", set queue group 8 queues::
- testpmd> flow destroy 0 rule 0
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions rss queues 0 1 2 3 4 5 6 7 end / end
- verify matched packets are not dropped.
- Then check there is no rule listed.
+ Failed to create flow, report message::
-Test case: MAC_IPV4_GTPU queue group
-====================================
+ Invalid queue region indexes.: Invalid argument
-1. create filter rules::
+5. check there is no rule listed.
- flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / end actions rss queues 0 1 end / end
+6. "--rxq=8 --txq=8", set queue group 8 queues,
+ create the 8 queues flow successfully.
+ send matched packets, check the packets are distributed to queue 0-7.
+ send mismatched packets, check the packets are distributed to queue 0-7 too.
-2. send matched packets, check the packets are distributed to queue group.
- send mismatched packets, check the packets are not distributed to queue group.
+Subcase 3: Invalid parameters of input set
+------------------------------------------
-3. verify rules can be listed and destroyed::
+1. Invalid value of teid and qfi::
- testpmd> flow list 0
+ flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x100 / end actions queue index 1 / end
+ flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x100000000 / gtp_psc qfi is 0x5 / end actions queue index 2 / end
+ flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x100000000 / end actions queue index 1 / end
- check the existing rule.
- destroy the rule::
+ Failed to create flow, report message "Bad arguments"
- testpmd> flow destroy 0 rule 0
+2. check there is no rule listed.
- verify matched packets are not distributed to queue group.
- Then check there is no rule listed.
+Subcase 4: Invalid parameters of mark ID
+----------------------------------------
-Test case: MAC_IPV4_GTPU_EH mark/count/query
-============================================
1. create filter rules::
- flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x34 / end actions queue index 2 / mark id 2 / count / end
-
-2. send matched packets, check the packets are distributed to queue 2, the FDIR=0x2.
- send mismatched packets, check the packets are not distributed to queue 2, no FDIR.
- check the count number::
-
- flow query 0 0 count
- count:
- hits_set: 1
- bytes_set: 0
- hits: 10
- bytes: 0
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify matched packets are not distributed to queue 2, and no FDIR.
- Then check there is no rule listed.
-
-Test case: MAC_IPV4_GTPU mark/count/query
-=========================================
-
-1. create filter rules on port 1::
-
- flow create 1 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / end actions rss queues 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 end / mark id 100 / count / end
-
-2. send matched packets, check the packets are distributed to queue in 0-63, the FDIR=0x64::
-
- p_gtpu1 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x35)/IP()/Raw('x'*20)
- p_gtpu2 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IP()/Raw('x'*20)
-
- send mismatched packets, check the packets have not FDIR::
-
- p_gtpu2 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x1234567)/IP()/Raw('x'*20)
-
- check the count number::
-
- flow query 1 0 count
- count:
- hits_set: 1
- bytes_set: 0
- hits: 2
- bytes: 0
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 / end actions queue index 1 / mark id 4294967296 / end
-3. verify rules can be listed and destroyed::
+ Failed to create flow, report message "Bad arguments"
- testpmd> flow list 1
+2. check there is no rule listed.
- check the existing rule.
- destroy the rule::
+Subcase 5: Duplicated rules
+---------------------------
- testpmd> flow destroy 1 rule 0
+1. Create a FDIR rule::
- verify matched packets are distributed to queue in 0-63, and no FDIR.
- Then check there is no rule listed.
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 1 / end
-Test case: MAC_IPV4_GTPU_EH QFI mark/count/query
-================================================
+ the rule is created successfully.
-1. create filter rules on port 1::
+2. Create the same rule again, Failed to create flow, report message::
- flow create 1 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc qfi is 0x34 / end actions drop / mark id 3 / count / end
+ Rule already exists!: File exists
-2. send matched packets, check the packets are dropped::
+3. check there is only one rule listed.
- p_gtpu1 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP()/TCP()/Raw('x'*20)
+Subcase 6: conflicted rules
+---------------------------
- send mismatched packets, check the packets are not dropped, no FDIR::
+1. Create a FDIR rule::
- p_gtpu2 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x35)/IP()/Raw('x'*20)
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 1 / end
- check the count number::
+ the rule is created successfully.
- flow query 1 0 count
- count:
- hits_set: 1
- bytes_set: 0
- hits: 1
- bytes: 0
+2. Create a rule with same input set but different action::
-3. verify rules can be listed and destroyed::
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 2 / end
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions drop / end
- testpmd> flow list 1
+ Failed to create the two flows, report message::
- check the existing rule.
- destroy the rule::
+ Rule already exists!: File exists
- testpmd> flow destroy 1 rule 0
+3. check there is only one rule listed.
- verify matched packets are not dropped, and no FDIR.
- Then check there is no rule listed.
+Subcase 7: conflicted actions
+-----------------------------
-Test case: MAC_IPV4_GTPU_EH without QFI mark/count/query
-========================================================
+1. Create a rule with two conflicted actions::
-1. create filter rules on port 0::
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 1 / rss queues 2 3 end / end
- flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc / end actions queue index 15 / mark id 3 / count / end
+ Failed to create flow, report message::
-2. send matched packets, check the packets are distributed to queue 15, the FDIR=0x3::
+ Invalid input action: Invalid argument
- p_gtpu1 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0)/IP()/TCP()/Raw('x'*20)
+2. check there is no rule listed.
- send mismatched packets, check the packets are not distributed to queue 15, no FDIR::
+Subcase 8: void action
+----------------------
- p_gtpu2 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x1234567)/GTP_PDUSession_ExtensionHeader(pdu_type=0)/IP()/TCP()/Raw('x'*20)
+1. Create a rule with void action::
- check the count number::
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions end
- flow query 0 0 count
- count:
- hits_set: 1
- bytes_set: 0
- hits: 1
- bytes: 0
+ Failed to create flow, report message::
-3. verify rules can be listed and destroyed::
+ Invalid input action: Invalid argument
- testpmd> flow list 0
+2. check there is no rule listed.
- check the existing rule.
- destroy the rule::
+Subcase 9: unsupported action
+-----------------------------
- testpmd> flow destroy 0 rule 0
+1. Create a rule with count action only::
- verify matched packets are not distributed to queue 15, and no FDIR.
- Then check there is no rule listed.
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions count / end
-Test case: MAC_IPV4_GTPU_EH multirules
-======================================
+ Failed to create flow, report message::
-1. create filter rules on port 0::
+ Invalid input action: Invalid argument
- flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x34 / end actions queue index 1 / end
- flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x35 / end actions queue index 2 / end
- flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x1234567 / gtp_psc qfi is 0x35 / end actions queue index 3 / end
+2. check there is no rule listed.
- the three rules are created successfully.
- then create the following rules::
+Subcase 10: delete a non-existent rule
+--------------------------------------
- flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x1234567 / gtp_psc qfi is 0x35 / end actions queue index 3 / end
- flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x1234567 / gtp_psc qfi is 0x35 / end actions queue index 4 / end
- flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x1234567 / gtp_psc qfi is 0x75 / end actions queue index 4 / end
+1. show the rule list of port 0::
- the three rules are failed to created.
- then create the following rule::
+ flow list 0
- flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x1234567 / gtp_psc qfi is 0x34 / end actions queue index 3 / end
+ There is no rule listed.
- the rule is created successfully.
+2. destroy rule 0 of port 0::
-2. send matched packets::
+ flow destroy 0 rule 0
- p_gtpu1 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP()/Raw('x'*20)
- p_gtpu2 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x1234567)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP()/Raw('x'*20)
- p_gtpu3 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x35)/IP()/Raw('x'*20)
- p_gtpu4 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x1234567)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x35)/IP()/Raw('x'*20)
+ There is no error message reported.
- check the packets, p_gtpu1 to queue 1, p_gtpu2 to queue 3, p_gtpu3 to queue 2, p_gtpu4 to queue 3.
- send mismatched packets, check the packets are not distributed to queue 1-3::
+3. check there is no rule listed.
- p_gtpu5 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x1234567)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x36)/IP()/Raw('x'*20)
+4. flush rules of port 0::
-3. verify rules can be listed and destroyed::
+ flow flush 0
- testpmd> flow list 0
+ There is no error message reported.
- check the existing rule.
- destroy the rule::
+5. check there is no rule listed.
- testpmd> flow flush 0
+Subcase 11: unsupported input set field
+---------------------------------------
- verify matched packets are not distributed to same queue.
- Then check there is no rule listed.
+1. Create a IPV4_PAY rule with TC input set::
-Test case: MAC_IPV4_GTPU_EH two ports
-=====================================
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 tc is 2 / end actions queue index 1 / end
-1. create filter rules on two ports::
+ Failed to create flow, report message::
- flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x34 / end actions queue index 1 / end
- flow create 1 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x34 / end actions queue index 1 / end
+ Bad arguments
- send matched packets::
+2. check there is no rule listed.
- p_gtpu1 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP()/Raw('x'*20)
+Subcase 12: unsupported pattern
+-------------------------------
- send the packet to two ports, both are distributed to queue 1.
+1. Create a GTPU rule with OS default package::
-2. create filter rules on two ports::
+ flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x34 / end actions drop / end
- flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x35 / end actions queue index 2 / end
- flow create 1 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x35 / end actions queue index 3 / end
+ Failed to create flow, report error message.
- send matched packets::
+2. check there is no rule listed.
- p_gtpu2 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x35)/IP()/Raw('x'*20)
+Subcase 13: conflict patterns
+-----------------------------
- send the packet to two ports, both are distributed to expected queue.
+Note: MAC_IPV4_UDP packet can match MAC_IPV4_PAY rule if ip address can match.
+so if there is a MAC_IPV4_PAY rule existing,
+MAC_IPV4_UDP rule will be set to switch rule.
+set "--log-level=ice,7", then check::
-3. flush the rules::
+ ice_flow_create(): Succeeded to create (1) flow -> FDIR
+ ice_flow_create(): Succeeded to create (2) flow -> switch
- flow flush 0
- flow flush 1
+1. set MAC_IPV4_PAY rule firstly::
-4. create filter rules on two ports::
+ flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / end actions queue index 1 / end
- flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x34 / end actions queue index 1 / end
- flow create 1 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / end actions queue index 2 / end
+ the first flow rule is set to fdir filter, send matched packet::
- send matched packets::
+ sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/Raw('x' * 80)],iface="enp175s0f0", count=10)
+ sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21") /UDP(sport=22, dport=23)/ Raw('x' * 80)],iface="enp175s0f0", count=10)
- p_gtpu2 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x35)/IP()/Raw('x'*20)
- p_gtpu3 = Ether(src="a4:bf:01:51:27:ca", dst="00:00:00:00:01:03")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP()/Raw('x'*20)
+ the two packets are both redirected to queue 1.
+ then create MAC_IPV4_UDP flow, it is set to switch filter::
- send the packets to two ports,
- p_gtpu2 is not distributed to queue 1 of port 0, it is distributed to queue 2 of port 1.
- p_gtpu3 is distributed to queue 2 of port 1, it is distributed to queue 1 of port 0.
+ flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue index 2 / end
-5. verify rules can be listed and destroyed::
+ send same packets, MAC_IPV4_PAY packet to queue 1, MAC_IPV4_UDP packet to queue 2.
- testpmd> flow list 0
- testpmd> flow list 1
+2. flush the rules.
- check the existing rules.
- destroy the rule::
+3. set MAC_IPV4_UDP rule firstly::
- testpmd> flow destroy 0 rule 0
- testpmd> flow destroy 1 rule 0
+ flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue index 2 / end
- verify matched packets are not distributed to expected queue.
- Then check there is no rule listed.
+ the first rule is set to fdir filter, send matched packet::
-Test case: MAC_IPV4_GTPU_EH wrong parameters
-============================================
+ sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21") /UDP(sport=22, dport=23)/ Raw('x' * 80)],iface="enp175s0f0", count=10)
-1. create filter rules on port 0::
+ the packet is redirected to queue 2.
+ then create MAC_IPV4_PAY rule, it is set to switch filter::
- flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x100 / end actions queue index 1 / end
- flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x100000000 / gtp_psc qfi is 0x5 / end actions queue index 2 / end
+ flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / end actions queue index 1 / end
- the two flows can not be created successfully, report proper error message.
+ send same packet, it is redirected to queue 1, because the packet match switch filter first.
-2. list the flow::
- testpmd> flow list 0
+Test case: count/query
+======================
- there is no flow listed.
+Subcase 1: count for 1 rule of 1 port
+-------------------------------------
-Test case: MAC_IPV4_GTPU wrong parameters
-=========================================
+1. create filter rules::
-1. create filter rules on port 0::
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions queue index 1 / count / end
- flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x100000000 / end actions queue index 1 / end
+2. send matched packets, check the packets are redirected to queue 1.
+ send mismatched packets, check the packets are redirected by RSS.
+ check the count number::
- the flow can not be created successfully.
+ flow query 0 0 count
+ count:
+ hits_set: 1
+ bytes_set: 0
+ hits: 2
+ bytes: 0
-2. list the flow::
+3. verify rules can be listed and destroyed::
testpmd> flow list 0
- there is no flow listed.
+ check the existing rule.
+ destroy the rule::
+
+ testpmd> flow destroy 0 rule 0
+
+ verify matched packets are redirected by RSS.
+ check there is no rule listed.
+
+4. check the count number::
-Test case: count query identifier share
-=======================================
+ testpmd> flow query 0 0 count
+ Flow rule #0 not found
+
+Subcase 2: count query identifier share
+---------------------------------------
1. create filter rules::
flow create 0 ingress pattern eth / ipv4 src is 192.168.0.1 / end actions queue index 1 / count identifier 0x1234 shared on / end
- flow create 0 ingress pattern eth / ipv4 src is 192.168.0.2 / end actions queue index 2 / count identifier 0x1234 shared on / end
- flow create 0 ingress pattern eth / ipv4 src is 192.168.0.3 / end actions queue index 3 / count identifier 0x1234 shared off / end
- flow create 0 ingress pattern eth / ipv4 src is 192.168.0.4 / end actions queue index 4 / count identifier 0x1234 / end
+ flow create 0 ingress pattern eth / ipv4 src is 192.168.0.2 / end actions rss queues 2 3 end / count identifier 0x1234 shared on / end
+ flow create 0 ingress pattern eth / ipv4 src is 192.168.0.3 / end actions passthru / mark / count identifier 0x1234 shared off / end
+ flow create 0 ingress pattern eth / ipv4 src is 192.168.0.4 / end actions mark id 1 / rss / count identifier 0x1234 / end
flow create 0 ingress pattern eth / ipv4 src is 192.168.0.5 / end actions queue index 5 / count shared on / end
flow create 0 ingress pattern eth / ipv4 src is 192.168.0.6 / end actions drop / count shared on / end
flow create 0 ingress pattern eth / ipv4 src is 192.168.0.7 / end actions drop / count identifier 0x1235 shared on / end
+ flow create 0 ingress pattern eth / ipv4 src is 192.168.0.8 / end actions rss / count / end
2. send matched packets::
@@ -2887,10 +2018,15 @@ Test case: count query identifier share
sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.5",dst="192.168.0.21") / Raw('x' * 80)],iface="enp175s0f0", count=10)
sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.6",dst="192.168.0.21") / Raw('x' * 80)],iface="enp175s0f0", count=10)
sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.7",dst="192.168.0.21") / Raw('x' * 80)],iface="enp175s0f0", count=10)
+ sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.8",dst="192.168.0.21") / Raw('x' * 80)],iface="enp175s0f0", count=10)
check the packets,
- packet 1 to queue 1, packet 2 to queue 2, packet 3 to queue 3, packet 4 to queue 4, packet 5 to queue 5,
+ packet 1 to queue 1, packet 2 to queue 2 or queue 3,
+ packet 3 is distributed by RSS with FDIR matched ID=0x0,
+ packet 4 is distributed by RSS with FDIR matched ID=0x1,
+ packet 5 to queue 5,
packet 6 dropped, packet 7 dropped.
+ packet 8 is distributed by RSS.
3. query count::
@@ -2936,6 +2072,12 @@ Test case: count query identifier share
bytes_set: 0
hits: 10
bytes: 0
+ testpmd> flow query 0 7 count
+ COUNT:
+ hits_set: 1
+ bytes_set: 0
+ hits: 10
+ bytes: 0
4. verify rules can be listed and destroyed::
@@ -2946,21 +2088,23 @@ Test case: count query identifier share
testpmd> flow flush 0
- verify matched packet are not distributed to same queue.
- check there is no rule listed.
+5. check there is no rule listed,
+ send matched packets, query count, flow rule not found.
-Test case: multi patterns count query
-=====================================
+Subcase 3: multi patterns mark count query
+------------------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions queue index 1 / count / end
- flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions drop / count / end
- flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions rss queues 62 63 end / count / end
- flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 / end actions queue index 1 / count / end
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue index 3 / count / end
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 / tcp dst is 23 / end actions queue index 4 / count / end
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions queue index 5 / count / end
+ flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions queue index 1 / mark id 0 / count / end
+ flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions drop / mark id 1 / count / end
+ flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions rss queues 62 63 end / mark id 2 / count / end
+ flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 / end actions queue index 1 / mark id 3 / count / end
+ flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue index 3 / mark id 4 / count / end
+ flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 / tcp dst is 23 / end actions queue index 4 / count / mark id 5 / end
+ flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions queue index 5 / mark id 6 / count / end
+ flow create 1 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / end actions rss queues 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 \
+ 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 end / mark id 100 / count / end
2. send matched packets::
@@ -2971,10 +2115,12 @@ Test case: multi patterns count query
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=4790)/VXLAN(flags=0xc)/IP(dst="192.168.0.21", src="192.168.0.20")/UDP(sport=22,dport=23)/("X"*480)], iface="enp175s0f0", count=10)
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP()/VXLAN(vni=2)/Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20")/TCP(dport=23)/("X"*480)], iface="enp175s0f0", count=10)
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP()/VXLAN(vni=2)/Ether()/IP(src='192.168.0.20', dst='192.168.0.21')/SCTP(sport=22,dport=23)/("X"*480)], iface="enp175s0f0", count=10)
+ sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345678)/IP()/Raw('x'*20)], iface="enp175s0f0", count=10)
check the packets,
packet 1 to queue 1, packet 2 dropped, packet 3 to queue 62-63, packet 4 to queue 1, packet 5 to queue 3,
- packet 6 to queue 4, packet 7 to queue 5.
+ packet 6 to queue 4, packet 7 to queue 5, packet 8 is distributed by RSS.
+ all the packets are received with FDIR matched ID.
3. query count::
@@ -3020,630 +2166,423 @@ Test case: multi patterns count query
bytes_set: 0
hits: 10
bytes: 0
+ testpmd> flow query 0 7 count
+ COUNT:
+ hits_set: 1
+ bytes_set: 0
+ hits: 10
+ bytes: 0
-4. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- There are 7 rules listed.
- destroy the rule 0::
-
- testpmd> flow destroy 0 rule 0
-
- verify the packet matching rule 0 is not distributed to queue 1.
- check rule 1-6 listed.
-
-5. destroy the rule 6::
-
- testpmd> flow destroy 0 rule 6
-
- verify the packet matching rule 6 is not distributed to queue 5.
- check rule 1-5 listed.
-
-6. destroy the rule 3::
-
- testpmd> flow destroy 0 rule 3
-
- verify the packet matching rule 3 is not distributed to queue 1.
- check rule 1/2/4/5 listed.
-
-7. flush the all the rules::
-
- testpmd> flow flush 0
-
- verify the matched packets are not distributed to the same queue.
- check no rule listed.
-
-Test case: two ports multi patterns count query
-===============================================
-
-1. create filter rules::
-
- flow create 1 ingress pattern eth / ipv4 dst is 192.168.0.21 proto is 255 tos is 4 / end actions queue index 1 / count / end
- flow create 1 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / sctp src is 22 dst is 23 / end actions rss queues 6 7 end / count / end
- flow create 1 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / udp src is 22 dst is 23 / end actions rss queues 6 7 end / count / end
- flow create 1 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / tcp src is 22 dst is 23 / end actions queue index 2 / count / end
- flow create 1 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions drop / count / end
- flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 tos is 4 / tcp src is 22 dst is 23 / end actions drop / count / end
- flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 / end actions queue index 1 / count / end
-
-2. send matched packets::
-
- sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", proto=255, ttl=2, tos=4) / Raw('x' * 80)],iface="enp175s0f1", count=10)
- sendp([Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::2", tc=1, hlim=2)/SCTP(sport=22,dport=23)/("X"*480)], iface="enp175s0f1", count=10)
- sendp([Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::2", tc=1, hlim=2)/UDP(sport=22,dport=23)/("X"*480)], iface="enp175s0f1", count=10)
- sendp([Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::2", tc=1, hlim=2)/TCP(sport=22,dport=23)/("X"*480)], iface="enp175s0f1", count=10)
- sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP()/VXLAN()/Ether()/IP(src='192.168.0.20', dst='192.168.0.21')/("X"*480)], iface="enp175s0f1", count=10)
- sendp([Ether(dst="00:11:22:33:44:55")/IP(dst="192.168.0.21", ttl=2, tos=4)/TCP(sport=22,dport=23)/Raw(load="X"*480)], iface="enp175s0f0", count=10)
- sendp([Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::2", nh=0, tc=1, hlim=2)/("X"*480)], iface="enp175s0f0", count=10)
- sendp([Ether(dst="00:11:22:33:44:55")/IP(dst="192.168.0.21", ttl=2, tos=4)/TCP(sport=22,dport=23)/Raw(load="X"*480)], iface="enp175s0f1", count=10)
-
- check the packets,
- packet 1 to queue 1 of port 1, packet 2 to queue 6-7 of port 1, packet 3 to queue 6-7 of port 1,
- packet 4 to queue 2 of port 1, packet 5 dropped of port 1,
- packet 6 to dropped of port 0, packet 7 to queue 1 of port 0.
- packet 8 received by port 1.
-
-3. query count::
-
- testpmd> flow query 1 0 count
- COUNT:
- hits_set: 1
- bytes_set: 0
- hits: 10
- bytes: 0
- testpmd> flow query 1 1 count
- COUNT:
- hits_set: 1
- bytes_set: 0
- hits: 10
- bytes: 0
- testpmd> flow query 1 2 count
- COUNT:
- hits_set: 1
- bytes_set: 0
- hits: 10
- testpmd> flow query 1 3 count
- COUNT:
- hits_set: 1
- bytes_set: 0
- hits: 10
- bytes: 0
- testpmd> flow query 1 4 count
- COUNT:
- hits_set: 1
- bytes_set: 0
- hits: 10
- bytes: 0
- testpmd> flow query 0 0 count
- COUNT:
- hits_set: 1
- bytes_set: 0
- hits: 10
- testpmd> flow query 0 1 count
- COUNT:
- hits_set: 1
- bytes_set: 0
- hits: 10
-
-4. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
- testpmd> flow list 1
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow flush 0
- testpmd> flow flush 1
-
- verify matched packet are not distributed to same queue.
- check there is no rule listed::
-
- testpmd> flow list 0
- testpmd> flow list 1
-
-Test case: max count
-====================
-
-1. create 257 flows with count::
-
- flow create 0 ingress pattern eth / ipv4 src is 192.168.0.1 / end actions drop / count / end
- flow create 0 ingress pattern eth / ipv4 src is 192.168.0.2 / end actions drop / count / end
- ……
- flow create 0 ingress pattern eth / ipv4 src is 192.168.1.1 / end actions drop / count / end
- flow create 0 ingress pattern eth / ipv4 src is 192.168.1.2 / end actions drop / count / end
-
- the last one failed to create.
-
-2. send matched packets::
-
- sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.1.1",dst="192.168.0.21") / Raw('x' * 80)],iface="enp175s0f0", count=10)
-
- check the packet dropped.
-
-3. query count::
-
- testpmd> flow query 0 255 count
- COUNT:
- hits_set: 1
- bytes_set: 0
- hits: 10
- bytes: 0
-
-4. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow flush 0
-
- verify matched packet are not dropped.
- check there is no rule listed.
-
-Test case: MAC_IPV4_PAY queue index mark
-========================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions queue index 1 / mark id 0 / end
-
-2. send 1 matched packet, check the packets are distributed to queue 1 with "FDIR matched ID=0x0" printed.
- send 1 mismatched packet, check the packets are not distributed to queue 1 without "FDIR matched" printed.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify matched packets are distributed to different queue without "FDIR matched" printed.
- Then check there is no rule listed.
-
-Test case: MAC_IPV4_UDP queue index mark
-========================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end actions queue index 0 / mark id 1 / end
-
-2. send 1 matched packet, check the packets are distributed to queue 0 with "FDIR matched ID=0x1" printed.
- send 1 mismatched packet, check the packets are not distributed to queue 0 without "FDIR matched" printed.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify matched packets are distributed to different queue without "FDIR matched" printed.
- Then check there is no rule listed.
-
-Test case: MAC_IPV4_TCP queue index mark
-========================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / tcp src is 22 dst is 23 / end actions queue index 1 / mark id 4294967294 / end
-
-2. send 1 matched packet, check the packets are distributed to queue 1 with "FDIR matched ID=0xfffffffe" printed.
- send 1 mismatched packet, check the packets are not distributed to queue 1 without "FDIR matched" printed.
-
-3. verify rules can be listed and destroyed::
+4. verify rules can be listed and destroyed::
testpmd> flow list 0
check the existing rule.
destroy the rule::
- testpmd> flow destroy 0 rule 0
-
- verify matched packets are distributed to different queue without "FDIR matched" printed.
- Then check there is no rule listed.
-
-Test case: MAC_IPV4_SCTP drop mark
-==================================
-
-1. create filter rules::
+ testpmd> flow flush 0
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / sctp src is 22 dst is 23 tag is 1 / end actions drop / mark id 1 / end
+5. check there is no rule listed,
+ send matched packets, query count, flow rule not found.
-2. send 1 matched packet, check the packets are dropped.
- send 1 mismatched packet, check the packets are not dropped without "FDIR matched" printed.
+Subcase 4: max count number
+---------------------------
-3. verify rules can be listed and destroyed::
+1. create 257 flows with count::
- testpmd> flow list 0
+ flow create 0 ingress pattern eth / ipv4 src is 192.168.0.1 / end actions drop / count / end
+ flow create 0 ingress pattern eth / ipv4 src is 192.168.0.2 / end actions drop / count / end
+ ……
+ flow create 0 ingress pattern eth / ipv4 src is 192.168.0.255 / end actions drop / count / end
+ flow create 0 ingress pattern eth / ipv4 src is 192.168.1.1 / end actions drop / count / end
+ flow create 0 ingress pattern eth / ipv4 src is 192.168.1.2 / end actions drop / count / end
- check the existing rule.
- destroy the rule::
+ the last one failed to create, report the error message::
- testpmd> flow destroy 0 rule 0
+ No free counter found
- verify matched packets are distributed to different queue without "FDIR matched" printed.
- Then check there is no rule listed.
+2. send matched packets::
-Test case: MAC_IPV6_PAY queue index mark
-========================================
+ sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.1.1",dst="192.168.0.21") / Raw('x' * 80)],iface="enp175s0f0", count=10)
-1. create filter rules::
+ check the packet dropped.
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 1 hop is 2 tc is 1 / end actions queue index 1 / mark id 1 / end
+3. query count::
-2. send 1 matched packet, check the packets are distributed to queue 1 with "FDIR matched ID=0x1" printed.
- send 1 mismatched packet, check the packets are not distributed to queue 1 without "FDIR matched" printed.
+ testpmd> flow query 0 255 count
+ COUNT:
+ hits_set: 1
+ bytes_set: 0
+ hits: 10
+ bytes: 0
-3. verify rules can be listed and destroyed::
+4. verify rules can be listed and destroyed::
testpmd> flow list 0
- check the existing rule.
+ check that 256 rules listed.
destroy the rule::
- testpmd> flow destroy 0 rule 0
-
- verify matched packets are distributed to different queue without "FDIR matched" printed.
- Then check there is no rule listed.
-
-Test case: MAC_IPV6_UDP queue index mark
-========================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / udp src is 22 dst is 23 / end actions queue index 1 / mark id 1 / end
-
-2. send 1 matched packet, check the packets are distributed to queue 1 with "FDIR matched ID=0x1" printed.
- send 1 mismatched packet, check the packets are not distributed to queue 1 without "FDIR matched" printed.
-
-3. verify rules can be listed and destroyed::
+ testpmd> flow flush 0
- testpmd> flow list 0
+ verify matched packet are not dropped.
+ check there is no rule listed.
- check the existing rule.
- destroy the rule::
+Test case: two ports
+====================
- testpmd> flow destroy 0 rule 0
+Subcase 1: same rule on two ports
+---------------------------------
- verify matched packets are distributed to different queue without "FDIR matched" printed.
- Then check there is no rule listed.
+1. create filter rules on two ports::
-Test case: MAC_IPV6_TCP queue index mark
-========================================
+ flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x34 / end actions queue index 1 / mark / end
+ flow create 1 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x34 / end actions queue index 1 / mark / end
-1. create filter rules::
+ send matched packets::
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / tcp src is 22 dst is 23 / end actions queue index 1 / mark id 1 / end
+ p_gtpu1 = Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.21")/UDP(dport=2152) \
+ /GTP_U_Header(gtp_type=255, teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP()/Raw('x'*20)
-2. send 1 matched packet, check the packets are distributed to queue 1 with "FDIR matched ID=0x1" printed.
- send 1 mismatched packet, check the packets are not distributed to queue 1 without "FDIR matched" printed.
+ send the packet to two ports, both are distributed to queue 1 with FDIR matched ID=0x0.
-3. verify rules can be listed and destroyed::
+2. list the rules on two ports::
testpmd> flow list 0
+ ID Group Prio Attr Rule
+ 0 0 0 i-- ETH IPV4 UDP GTPU GTP_PSC => QUEUE MARK
+ testpmd> flow list 1
+ ID Group Prio Attr Rule
+ 0 0 0 i-- ETH IPV4 UDP GTPU GTP_PSC => QUEUE MARK
- check the existing rule.
- destroy the rule::
+3. destroy rule 0 on port 0::
testpmd> flow destroy 0 rule 0
+ Flow rule #0 destroyed
- verify matched packets are distributed to different queue without "FDIR matched" printed.
- Then check there is no rule listed.
-
-Test case: MAC_IPV6_SCTP queue index mark
-=========================================
-
-1. create filter rules::
-
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / sctp src is 22 dst is 23 / end actions queue index 1 / mark id 1 / end
-
-2. send 1 matched packet, check the packets are distributed to queue 1 with "FDIR matched ID=0x1" printed.
- send 1 mismatched packet, check the packets are not distributed to queue 1 without "FDIR matched" printed.
-
-3. verify rules can be listed and destroyed::
+ list the rules on two ports::
testpmd> flow list 0
+ testpmd> flow list 1
+ ID Group Prio Attr Rule
+ 0 0 0 i-- ETH IPV4 UDP GTPU GTP_PSC => QUEUE MARK
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify matched packets are distributed to different queue without "FDIR matched" printed.
- Then check there is no rule listed.
-
-Test case: MAC_IPV4_TUN_IPV4_PAY queue index mark
-=================================================
-
-1. create filter rules::
+4. send the matched packet to port 0, it is redirected by RSS without FDIR matched ID.
+ send the matched packet to port 1, it is still redirected to queue 1 with FDIR matched ID=0x0.
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions queue index 1 / mark id 1 / end
+5. destroy rule 0 on port 1::
-2. send 1 matched packet, check the packets are distributed to queue 1 with "FDIR matched ID=0x1" printed.
- send 1 mismatched packet, check the packets are not distributed to queue 1 without "FDIR matched" printed.
+ testpmd> flow destroy 1 rule 0
+ Flow rule #0 destroyed
-3. verify rules can be listed and destroyed::
+ list the rules on two ports::
testpmd> flow list 0
+ testpmd> flow list 1
- check the existing rule.
- destroy the rule::
+ there is no rule listed on both ports.
+ send the matched packet to port 0/1, it is redirected by RSS without FDIR matched ID.
- testpmd> flow destroy 0 rule 0
+Subcase 2: same input set, different actions on two ports
+---------------------------------------------------------
- verify matched packets are distributed to different queue without "FDIR matched" printed.
- Then check there is no rule listed.
+1. create filter rules on two ports::
-Test case: MAC_IPV4_TUN_IPV4_UDP queue group mark
-=================================================
+ flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions queue index 1 / mark id 1 / end
+ flow create 1 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions rss queues 2 3 end / mark id 1 / end
-1. create filter rules::
+ send matched packets to two ports::
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions rss queues 1 2 end / mark id 1 / end
+ pkt = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/TCP(sport=22,dport=23)/Raw('x' * 80)
-2. send 1 matched packet, check the packets are distributed to queue 1-2 with "FDIR matched ID=0x1" printed.
- send 1 mismatched packet, check the packets are not distributed to queue 1-2 without "FDIR matched" printed.
+ the packet sent to port 0 is redirected to queue 1 with FDIR matched ID=0x1,
+ the packet sent to port 1 is redirected to queue 2 or queue 3 with FDIR matched ID=0x1.
-3. verify rules can be listed and destroyed::
+2. destroy rule 0 on both ports::
- testpmd> flow list 0
+ testpmd> flow flush 0
+ testpmd> flow flush 1
- check the existing rule.
- destroy the rule::
+ list the rules on two ports::
- testpmd> flow destroy 0 rule 0
+ testpmd> flow list 0
+ testpmd> flow list 1
- verify matched packets are distributed to different queue without "FDIR matched" printed.
- Then check there is no rule listed.
+ there is no rule listed on both ports.
+ send the matched packet to port 0/1, it is redirected by RSS without FDIR matched ID.
-Test case: MAC_IPV4_TUN_IPV4_TCP drop mark
-==========================================
+Subcase 3: two ports multi patterns count query
+-----------------------------------------------
1. create filter rules::
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions drop / mark id 1 / end
-
-2. send 1 matched packet, check the packets are dropped.
- send 1 mismatched packet, check the packets are not dropped without "FDIR matched" printed.
-
-3. verify rules can be listed and destroyed::
-
- testpmd> flow list 0
-
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
+ flow create 1 ingress pattern eth / ipv4 dst is 192.168.0.21 proto is 255 tos is 4 / end actions queue index 1 / mark id 1 / count identifier 0x1234 shared on / end
+ flow create 1 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / sctp src is 22 dst is 23 / end actions rss queues 6 7 end / mark id 2 / count identifier 0x1234 shared on / end
+ flow create 1 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / udp src is 22 dst is 23 / end actions rss queues 6 7 end / mark id 1 / count / end
+ flow create 1 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / tcp src is 22 dst is 23 / end actions queue index 2 / mark / count / end
+ flow create 1 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions drop / count / end
+ flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 tos is 4 / tcp src is 22 dst is 23 / end actions drop / count / end
+ flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 / end actions queue index 1 / mark id 1 / count identifier 0x1234 shared on / end
- verify matched packets are dropped without "FDIR matched" printed.
- Then check there is no rule listed.
+2. send matched packets::
-Test case: MAC_IPV4_TUN_IPV4_SCTP queue index mark
-==================================================
+ sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", proto=255, ttl=2, tos=4) / Raw('x' * 80)],iface="enp175s0f1", count=10)
+ sendp([Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::2", tc=1, hlim=2)/SCTP(sport=22,dport=23)/("X"*480)], iface="enp175s0f1", count=10)
+ sendp([Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::2", tc=1, hlim=2)/UDP(sport=22,dport=23)/("X"*480)], iface="enp175s0f1", count=10)
+ sendp([Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::2", tc=1, hlim=2)/TCP(sport=22,dport=23)/("X"*480)], iface="enp175s0f1", count=10)
+ sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP()/VXLAN()/Ether()/IP(src='192.168.0.20', dst='192.168.0.21')/("X"*480)], iface="enp175s0f1", count=10)
+ sendp([Ether(dst="00:11:22:33:44:55")/IP(dst="192.168.0.21", ttl=2, tos=4)/TCP(sport=22,dport=23)/Raw(load="X"*480)], iface="enp175s0f0", count=10)
+ sendp([Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::2", nh=0, tc=1, hlim=2)/("X"*480)], iface="enp175s0f0", count=10)
+ sendp([Ether(dst="00:11:22:33:44:55")/IP(dst="192.168.0.21", ttl=2, tos=4)/TCP(sport=22,dport=23)/Raw(load="X"*480)], iface="enp175s0f1", count=10)
-1. create filter rules::
+ check the packets,
+ packet 1 to queue 1 of port 1, packet 2 to queue 6-7 of port 1, packet 3 to queue 6-7 of port 1,
+ packet 4 to queue 2 of port 1, packet 5 dropped of port 1,
+ packet 6 to dropped of port 0, packet 7 to queue 1 of port 0.
+ packet 8 received by port 1.
+ all the received packets have specified FDIR matched ID.
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions queue index 1 / mark id 1 / end
+3. query count::
-2. send 1 matched packet, check the packets are distributed to queue 1 with "FDIR matched ID=0x1" printed.
- send 1 mismatched packet, check the packets are not distributed to queue 1 without "FDIR matched" printed.
+ testpmd> flow query 1 0 count
+ COUNT:
+ hits_set: 1
+ bytes_set: 0
+ hits: 20
+ bytes: 0
+ testpmd> flow query 1 1 count
+ COUNT:
+ hits_set: 1
+ bytes_set: 0
+ hits: 20
+ bytes: 0
+ testpmd> flow query 1 2 count
+ COUNT:
+ hits_set: 1
+ bytes_set: 0
+ hits: 10
+ testpmd> flow query 1 3 count
+ COUNT:
+ hits_set: 1
+ bytes_set: 0
+ hits: 10
+ bytes: 0
+ testpmd> flow query 1 4 count
+ COUNT:
+ hits_set: 1
+ bytes_set: 0
+ hits: 10
+ bytes: 0
+ testpmd> flow query 0 0 count
+ COUNT:
+ hits_set: 1
+ bytes_set: 0
+ hits: 10
+ testpmd> flow query 0 1 count
+ COUNT:
+ hits_set: 1
+ bytes_set: 0
+ hits: 10
-3. verify rules can be listed and destroyed::
+4. verify rules can be listed correctly::
testpmd> flow list 0
+ testpmd> flow list 1
- check the existing rule.
- destroy the rule::
+5. destroy the rule::
- testpmd> flow destroy 0 rule 0
+ testpmd> flow flush 0
+ testpmd> flow flush 1
- verify matched packets are distributed to different queue without "FDIR matched" printed.
- Then check there is no rule listed.
+ verify matched packet are received without FDIR matched ID.
+ check there is no rule listed::
-Test case: MAC_IPV4_TUN_MAC_IPV4_PAY queue index mark
-=====================================================
+ testpmd> flow list 0
+ testpmd> flow list 1
-1. create filter rules::
+ query the count number, all reported::
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions queue index 1 / mark id 1 / end
+ Flow rule #[ID] not found
-2. send 1 matched packet, check the packets are distributed to queue 1 with "FDIR matched ID=0x1" printed.
- send 1 mismatched packet, check the packets are not distributed to queue 1 without "FDIR matched" printed.
+Test case: Stress test
+======================
-3. verify rules can be listed and destroyed::
+Subcase 1: port stop/port start/port reset
+------------------------------------------
- testpmd> flow list 0
+1. create a rule::
- check the existing rule.
- destroy the rule::
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions queue index 1 / mark / end
- testpmd> flow destroy 0 rule 0
+2. list the rule and send matched packet::
- verify matched packets are distributed to different queue without "FDIR matched" printed.
- Then check there is no rule listed.
+ sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21") / Raw('x' * 80)],iface="enp175s0f0")
-Test case: MAC_IPV4_TUN_MAC_IPV4_UDP queue index mark
-=====================================================
+ check the packet are redirected to queue 1 with FDIR matched ID=0x0
-1. create filter rules::
+3. stop the port, then start the port::
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue index 1 / mark id 1 / end
+ testpmd> port stop 0
+ testpmd> port start 0
-2. send 1 matched packet, check the packets are distributed to queue 1 with "FDIR matched ID=0x1" printed.
- send 1 mismatched packet, check the packets are not distributed to queue 1 without "FDIR matched" printed.
+4. show the rule list, the rule is still there.
-3. verify rules can be listed and destroyed::
+5. verify matched packet can be still redirected to queue 1 with FDIR matched ID=0x0.
- testpmd> flow list 0
+6. reset pf::
- check the existing rule.
- destroy the rule::
+ testpmd> port stop 0
+ testpmd> port reset 0
+ testpmd> port start 0
- testpmd> flow destroy 0 rule 0
+7. show the rule list, the rule is still there.
- verify matched packets are distributed to different queue without "FDIR matched" printed.
- Then check there is no rule listed.
+8. verify matched packet can be still redirected to queue 1 with FDIR matched ID=0x0.
+Subcase 2: add/delete rules
+---------------------------
-Test case: MAC_IPV4_TUN_MAC_IPV4_TCP queue index mark
-=====================================================
+1. create two rules::
-1. create filter rules::
+ flow create 0 ingress pattern eth / ipv4 proto is 255 / end actions queue index 1 / mark / end
+ flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions rss queues 2 3 end / mark id 1 / end
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions queue index 1 / mark id 1 / end
+ return the message::
-2. send 1 matched packet, check the packets are distributed to queue 1 with "FDIR matched ID=0x1" printed.
- send 1 mismatched packet, check the packets are not distributed to queue 1 without "FDIR matched" printed.
+ Flow rule #0 created
+ Flow rule #1 created
-3. verify rules can be listed and destroyed::
+ list the rules::
testpmd> flow list 0
+ ID Group Prio Attr Rule
+ 0 0 0 i-- ETH IPV4 => QUEUE MARK
+ 1 0 0 i-- ETH IPV4 TCP => RSS MARK
- check the existing rule.
- destroy the rule::
-
- testpmd> flow destroy 0 rule 0
-
- verify matched packets are distributed to different queue without "FDIR matched" printed.
- Then check there is no rule listed.
-
-Test case: MAC_IPV4_TUN_MAC_IPV4_SCTP queue index mark
-======================================================
+2. delete the rules::
-1. create filter rules::
+ testpmd> flow flush 0
- flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions queue index 1 / mark id 1 / end
+3. repeate the create and delete operations in step1-2 15360 times.
-2. send 1 matched packet, check the packets are distributed to queue 1 with "FDIR matched ID=0x1" printed.
- send 1 mismatched packet, check the packets are not distributed to queue 1 without "FDIR matched" printed.
+4. create the two rules one more time, check the rules listed.
-3. verify rules can be listed and destroyed::
+5. send matched packet::
- testpmd> flow list 0
+ sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", proto=255)/Raw('x' * 80)],iface="enp175s0f0")
+ sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/TCP(sport=22,dport=23)/Raw('x' * 80)],iface="enp175s0f0")
- check the existing rule.
- destroy the rule::
+ check packet 1 is redirected to queue 1 with FDIR matched ID=0x0
+ check packet 2 is redirected to queue 2 or queue 3 with FDIR matched ID=0x1
- testpmd> flow destroy 0 rule 0
+Subcase 3: delete rules
+-----------------------
- verify matched packets are distributed to different queue without "FDIR matched" printed.
- Then check there is no rule listed.
+1. create 3 rules and destory the first rule::
-Test case: multirules mark
-==========================
+ flow create 0 ingress pattern eth / ipv4 src is 192.168.56.0 dst is 192.1.0.0 tos is 4 / tcp src is 22 dst is 23 / end actions queue index 1 / mark / end
+ flow create 0 ingress pattern eth / ipv4 src is 192.168.56.0 dst is 192.1.0.0 tos is 4 / tcp src is 22 dst is 24 / end actions queue index 2 / mark / end
+ flow create 0 ingress pattern eth / ipv4 src is 192.168.56.0 dst is 192.1.0.0 tos is 4 / tcp src is 22 dst is 25 / end actions queue index 3 / mark / end
-1. create filter rules::
+ there are rule 0/1/2 listed::
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end actions queue index 1 / mark id 1 / end
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / tcp src is 22 dst is 23 / end actions queue index 2 / mark id 1 / end
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / sctp src is 22 dst is 23 / end actions queue index 1 / mark id 2 / count / end
+ flow list 0
-2. send matched packet::
+ send packets match rule 0, rule 1 and rule 2,
+ Verify all packets can be redirected to expected queue and mark.
+ destory the first rule::
- sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", ttl=2, tos=4) /UDP(sport=22,dport=23)/Raw('x' * 80)],iface="enp175s0f0")
- sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", ttl=2, tos=4) /TCP(sport=22,dport=23)/Raw('x' * 80)],iface="enp175s0f0")
- sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", ttl=2, tos=4) /SCTP(sport=22,dport=23)/Raw('x' * 80)],iface="enp175s0f0")
+ flow destroy 0 rule 0
- check packet 1 to queue 1 with "FDIR matched ID=0x1" printed.
- packet 2 to queue 2 with "FDIR matched ID=0x1" printed.
- packet 3 to queue 1 with "FDIR matched ID=0x2" printed.
+ list the rules, verify there are only rule 1 and rule 2 listed.
+ send packet matched rule 0, verify it is received without FDIR matched ID.
+ send packets matched rule 1 and rule 2, Verify all packets be redirected and mark.
+ flush rules::
-3. query count::
+ flow flush 0
- testpmd> flow query 0 2 count
- COUNT:
- hits_set: 1
- bytes_set: 0
- hits: 1
- bytes: 0
+ send packets match rule 0, rule 1 and rule 2, verify all packets can not mark.
-4. verify rules can be listed and destroyed::
+2. create 3 rules and destory the second rule::
- testpmd> flow list 0
+ flow create 0 ingress pattern eth / ipv4 src is 192.168.56.0 dst is 192.1.0.0 tos is 4 / tcp src is 22 dst is 23 / end actions queue index 1 / mark / end
+ flow create 0 ingress pattern eth / ipv4 src is 192.168.56.0 dst is 192.1.0.0 tos is 4 / tcp src is 22 dst is 24 / end actions queue index 2 / mark / end
+ flow create 0 ingress pattern eth / ipv4 src is 192.168.56.0 dst is 192.1.0.0 tos is 4 / tcp src is 22 dst is 25 / end actions queue index 3 / mark / end
- check 3 rules listed.
- destroy the rule 0::
+ there are rule 0/1/2 listed::
- testpmd> flow destroy 0 rule 0
+ flow list 0
- verify packet 1 is distributed to different queue without "FDIR matched" printed.
- Then check there is 2 rules listed.
- packet 2 to queue 2 with "FDIR matched ID=0x1" printed.
- packet 3 to queue 1 with "FDIR matched ID=0x2" printed.
- query count::
+ send packets match rule 0, rule 1 and rule 2,
+ Verify all packets can be redirected to expected queue and mark.
+ destory the second rule::
- testpmd> flow query 0 2 count
- COUNT:
- hits_set: 1
- bytes_set: 0
- hits: 2
- bytes: 0
+ flow destroy 0 rule 1
+ list the rules, verify there are only rule 0 and rule 2 listed.
+ send packet matched rule 1, verify it is received without FDIR matched ID.
+ send packets matched rule 0 and rule 2, Verify all packets be redirected and mark.
flush rules::
- testpmd> flow flush 0
+ flow flush 0
- verify matched packets are distributed to different queue without "FDIR matched" printed.
- Then check there is no rule listed, and no count exist.
+ send packets match rule 0, rule 1 and rule 2, verify all packets can not mark.
-Test case: mark wrong parameters
-================================
+3. create 3 rules and destory the third rule::
-1. create filter rules::
+ flow create 0 ingress pattern eth / ipv4 src is 192.168.56.0 dst is 192.1.0.0 tos is 4 / tcp src is 22 dst is 23 / end actions queue index 1 / mark / end
+ flow create 0 ingress pattern eth / ipv4 src is 192.168.56.0 dst is 192.1.0.0 tos is 4 / tcp src is 22 dst is 24 / end actions queue index 2 / mark / end
+ flow create 0 ingress pattern eth / ipv4 src is 192.168.56.0 dst is 192.1.0.0 tos is 4 / tcp src is 22 dst is 25 / end actions queue index 3 / mark / end
- flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 / end actions queue index 1 / mark id 4294967296 / end
+ there are rule 0/1/2 listed::
- the flow failed to be created.
+ flow list 0
-2. list the flow::
+ send packets match rule 0, rule 1 and rule 2,
+ Verify all packets can be redirected to expected queue and mark.
+ destory the last rule::
- testpmd> flow list 0
+ flow destroy 0 rule 2
- Then check there is no rule listed.
+ list the rules, verify there are only rule 0 and rule 1 listed.
+ send packet matched rule 2, verify it is received without FDIR matched ID.
+ send packets matched rule 0 and rule 1, Verify all packets be redirected and mark.
+ flush rules::
-Test case: pattern conflict flow
-================================
+ flow flush 0
-MAC_IPV4_PAY and MAC_IPV4_UDP are conflict patterns.
-so if create one, then create the other one, the second flow will be
-set to switch filer.
-IPV4_UDP packet can match MAC_IPV4_PAY rule.
-but IPV4_PAY packet cannot match MAC_IPV4_UDP rule.
+ send packets match rule 0, rule 1 and rule 2, verify all packets can not mark.
-1. set MAC_IPV4_PAY firstly::
+Subcase 4: max rules
+--------------------
- flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / end actions queue index 1 / end
+1. create 15360 rules on port 0::
- the first flow is set to fdir filter, send matched packet::
+ flow create 0 ingress pattern eth / ipv4 src is 192.168.100.20 dst is 192.168.0.0 / end actions queue index 1 / mark / end
+ flow create 0 ingress pattern eth / ipv4 src is 192.168.100.20 dst is 192.168.0.1 / end actions queue index 1 / mark / end
+ ......
+ flow create 0 ingress pattern eth / ipv4 src is 192.168.100.20 dst is 192.168.59.255 / end actions queue index 1 / mark / end
- sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/Raw('x' * 80)],iface="enp175s0f0", count=10)
- sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21") /UDP(sport=22, dport=23)/ Raw('x' * 80)],iface="enp175s0f0", count=10)
+ all the rules are created successfully.
- the two type packets both to queue 1.
- then create MAC_IPV4_UDP flow, it is set to switch filer::
+2. create one more rule::
- flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue index 2 / end
+ flow create 0 ingress pattern eth / ipv4 src is 192.168.100.20 dst is 192.168.60.0 / end actions queue index 1 / mark / end
- send same packets, IPV4_PAY packet to queue 1, IPV4_UDP packet to queue 2.
+ the rule failed to create. return the error message::
-2. set MAC_IPV4_UDP firstly::
+ Failed to create flow
- flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue index 2 / end
+3. check the rule list, there are 15360 rules listed.
- send matched packet::
+4. send matched packets for rule 0 and rule 15359::
- sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21") /UDP(sport=22, dport=23)/ Raw('x' * 80)],iface="enp175s0f0", count=10)
+ sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.100.20",dst="192.168.0.0")/Raw('x' * 80)],iface="enp175s0f0")
+ sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.100.20",dst="192.168.59.255")/Raw('x' * 80)],iface="enp175s0f0")
- packet to queue 2.
- then create MAC_IPV4_PAY flow::
+ check all packets are redirected to expected queue with FDIR matched ID=0x0
- flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / end actions queue index 1 / end
+5. flush all the rules, check the rule list,
+ there is no rule listed.
- send same packet, packet to queue 1, because the packet match switch filter first.
+6. verify matched packets for rule 0 and rule 15359 received without FDIR matched ID.
--
2.7.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dts] [PATCH v1]test_plans: rework case structure
2020-03-26 10:23 [dts] [PATCH v1]test_plans: rework case structure Yuan Peng
@ 2020-03-31 3:04 ` Tu, Lijuan
0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2020-03-31 3:04 UTC (permalink / raw)
To: Peng, Yuan, dts; +Cc: Peng, Yuan
Applied failed, could you please rework it.
error: patch failed: test_plans/cvl_fdir_test_plan.rst:397
error: test_plans/cvl_fdir_test_plan.rst: patch does not apply
Patch failed at 0001 test_plans: rework case structure
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Yuan Peng
> Sent: Thursday, March 26, 2020 6:24 PM
> To: dts@dpdk.org
> Cc: Peng, Yuan <yuan.peng@intel.com>
> Subject: [dts] [PATCH v1]test_plans: rework case structure
>
> From: Peng Yuan <yuan.peng@intel.com>
>
> 1/ rework the case stucture.
> 2/ add stress cases.
> 3/ add validate cases.
>
> Signed-off-by: Peng Yuan <yuan.peng@intel.com>
>
> diff --git a/test_plans/cvl_fdir_test_plan.rst
> b/test_plans/cvl_fdir_test_plan.rst
> index fe95c17..1a0845c 100644
> --- a/test_plans/cvl_fdir_test_plan.rst
> +++ b/test_plans/cvl_fdir_test_plan.rst
> @@ -90,6 +90,7 @@ Notes: 1. Enable fdir filter for UDP tunnel: Vxlan /
> NVGRE (OS default package)
> Function type
> -------------
>
> + validate
> create
> list
> destroy
> @@ -113,6 +114,7 @@ Prerequisites
>
> 1. Hardware:
> columbiaville_25g/columbiaville_100g
> + design the cases with 2 ports card.
>
> 2. Software:
> DPDK: http://dpdk.org/git/dpdk
> @@ -127,7 +129,7 @@ Prerequisites
>
> 5. Launch the app ``testpmd`` with the following arguments::
>
> - ./testpmd -c 0xff -n 6 -w 86:00.0 -- -i --portmask=0xff --rxq=64 --txq=64 --
> port-topology=loop
> + ./testpmd -c 0xff -n 6 -w 86:00.0,,flow-mark-support=1 -- -i --
> portmask=0xff --rxq=64 --txq=64 --port-topology=loop
> testpmd> set fwd rxonly
> testpmd> set verbose 1
>
> @@ -138,11 +140,7 @@ Prerequisites
>
> Notes: if need two ports environment, launch ``testpmd`` with the
> following arguments::
>
> - ./testpmd -c 0xff -n 6 -w 86:00.0 -w 86:00.1 -- -i --portmask=0xff --rxq=64 -
> -txq=64 --port-topology=loop
> -
> - If create rules with mark actions, please add the following parameters in
> testpmd command line::
> -
> - -w 86:00.0,flow-mark-support=1 -w 86:00.1,flow-mark-support=1
> + ./testpmd -c 0xff -n 6 -w 86:00.0,flow-mark-support=1 -w 86:00.1,flow-
> mark-support=1 -- -i --portmask=0xff --rxq=64 --txq=64 --port-topology=loop
>
>
> Default parameters
> @@ -397,691 +395,686 @@ Send packets
>
> matched packets::
>
> - p_gtpu1 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP()/Raw('x'*20)
> - p_gtpu2 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(frag=1)/Raw('x'*20)
> - p_gtpu3 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP()/UDP()/Raw('x'*20)
> - p_gtpu4 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP( dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP()/TCP(sport=22, dport=23)/Raw('x'*20)
> - p_gtpu5 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP()/ICMP()/Raw('x'*20)
> - p_gtpu6 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6()/Raw('x'*20)
> - p_gtpu7 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6()/IPv6ExtHdrFragment(1000)/Raw('x'*20)
> - p_gtpu8 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6()/UDP()/Raw('x'*20)
> - p_gtpu9 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP( dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6()/TCP(sport=22, dport=23)/Raw('x'*20)
> - p_gtpu10 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6()/ICMP()/Raw('x'*20)
> + p_gtpu1 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP()/Raw('x'*20)
> + p_gtpu2 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(frag=1)/Raw('x'*20)
> + p_gtpu3 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP()/UDP()/Raw('x'*20)
> + p_gtpu4 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP( dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP()/TCP(sport=22, dport=23)/Raw('x'*20)
> + p_gtpu5 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP()/ICMP()/Raw('x'*20)
> + p_gtpu6 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6()/Raw('x'*20)
> + p_gtpu7 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6()/IPv6ExtHdrFragment(1000)/Raw('x'*20)
> + p_gtpu8 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6()/UDP()/Raw('x'*20)
> + p_gtpu9 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP( dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6()/TCP(sport=22, dport=23)/Raw('x'*20)
> + p_gtpu10 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6()/ICMP()/Raw('x'*20)
>
> mismatched packets::
>
> - p_gtpu11 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP()/SCTP()/Raw('x'*20)
> - p_gtpu12 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6()/SCTP()/Raw('x'*20)
> - p_gtpu13 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x1234567)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP()/Raw('x'*20)
> - p_gtpu14 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x35)/IP()/Raw('x'*20)
> - p_gtpu15 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IP()/Raw('x'*20)
> - p_gtpu16 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/Raw('x'*20)
> + p_gtpu11 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP()/SCTP()/Raw('x'*20)
> + p_gtpu12 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6()/SCTP()/Raw('x'*20)
> + p_gtpu13 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x1234567)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP()/Raw('x'*20)
> + p_gtpu14 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x35)/IP()/Raw('x'*20)
> + p_gtpu15 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IP()/Raw('x'*20)
> + p_gtpu16 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/Raw('x'*20)
>
> * MAC_IPV4_GTPU
>
> matched packets::
>
> - p_gtpu1 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IP()/Raw('x'*20)
> - p_gtpu2 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IP(frag=1)/Raw('x'*20)
> - p_gtpu3 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IP()/UDP()/Raw('x'*20)
> - p_gtpu4 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP( dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IP()/TCP(sport=22, dport=23)/Raw('x'*20)
> - p_gtpu5 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IP()/ICMP()/Raw('x'*20)
> - p_gtpu6 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IPv6()/Raw('x'*20)
> - p_gtpu7 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IPv6()/IPv6ExtHdrFragment(1000)/Raw('x'*20)
> - p_gtpu8 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IPv6()/UDP()/Raw('x'*20)
> - p_gtpu9 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP( dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IPv6()/TCP(sport=22, dport=23)/Raw('x'*20)
> - p_gtpu10 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IPv6()/ICMP()/Raw('x'*20)
> - p_gtpu11 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x35)/IP()/Raw('x'*20)
> + p_gtpu1 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IP()/Raw('x'*20)
> + p_gtpu2 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IP(frag=1)/Raw('x'*20)
> + p_gtpu3 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IP()/UDP()/Raw('x'*20)
> + p_gtpu4 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP( dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IP()/TCP(sport=22, dport=23)/Raw('x'*20)
> + p_gtpu5 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IP()/ICMP()/Raw('x'*20)
> + p_gtpu6 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IPv6()/Raw('x'*20)
> + p_gtpu7 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IPv6()/IPv6ExtHdrFragment(1000)/Raw('x'*20)
> + p_gtpu8 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IPv6()/UDP()/Raw('x'*20)
> + p_gtpu9 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP( dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IPv6()/TCP(sport=22, dport=23)/Raw('x'*20)
> + p_gtpu10 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IPv6()/ICMP()/Raw('x'*20)
> + p_gtpu11 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x35)/IP()/Raw('x'*20)
>
> mismatched packets::
>
> - p_gtpu12 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/Raw('x'*20)
> - p_gtpu13 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IP()/SCTP()/Raw('x'*20)
> - p_gtpu14 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IPv6()/SCTP()/Raw('x'*20)
> - p_gtpu15 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x1234567)/IP()/Raw('x'*20)
> -
> -Test case: MAC_IPV4_PAY queue index
> -===================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions
> queue index 1 / end
> -
> -2. send matched packets, check the packets are distributed to queue 1.
> - send mismatched packets, check the packets are not distributed to queue
> 1.
> -
> -3. verify rules can be listed and destroyed::
> + p_gtpu12 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/Raw('x'*20)
> + p_gtpu13 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IP()/SCTP()/Raw('x'*20)
> + p_gtpu14 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IPv6()/SCTP()/Raw('x'*20)
> + p_gtpu15 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x1234567)/IP()/Raw('x'*20)
>
> - testpmd> flow list 0
>
> - check the existing rule.
> - destroy the rule::
> +Test case: flow validation
> +==========================
>
> - testpmd> flow destroy 0 rule 0
> +1. validate MAC_IPV4_PAY with queue index action::
>
> - verify matched packets are not distributed to queue 1.
> - check there is no rule listed.
> + flow validate 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is
> 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions queue index 1 / end
>
> -Test case: MAC_IPV4_PAY selected inputset queue index
> -=====================================================
> + get the message::
>
> -1. create filter rules::
> + Flow rule validated
>
> - flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 proto is 1 / end
> actions queue index 1 / end
> - flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 proto is 17 /
> end actions queue index 2 / end
> +2. repeat step 1 with all patterns in pattern and input set table,
> + get the same result.
>
> -2. send matched packets::
> +3. repeat step 1-2 with action rss queues/drop/passthru/mark/mark+rss,
> + get the same result.
>
> - pkt1 =
> Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21",
> proto=1) / Raw('x' * 80)
> - pkt2 =
> Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21",
> frag=1, proto=1) / Raw('x' * 80)
> - pkt3 =
> Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21",
> ttl=2, tos=4) /UDP(sport=22,dport=23)/Raw('x' * 80)
> - pkt4 =
> Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21",
> frag=1, ttl=2, tos=4) /UDP(sport=22,dport=23)/Raw('x' * 80)
> - pkt5 =
> Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21",
> proto=17, ttl=2, tos=4)/Raw('x' * 80)
> - pkt6 =
> Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21",
> frag=1, proto=17, ttl=2, tos=4)/Raw('x' * 80)
> +4. validate combined use of actions::
>
> - check the pkt1 and pkt2 are redirected to queue 1.
> - check the pkt3-pkt6 are redirected to queue 2
> - send mismatched packets::
> + flow validate 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is
> 192.168.0.21 / end actions queue index 1 / mark / count / end
> + flow validate 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is
> 192.168.0.21 / end actions rss queues 0 1 end / mark id 1 / count identifier
> 0x1234 shared on / end
> + flow validate 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is
> 192.168.0.21 / end actions passthru / mark id 2 / count identifier 0x34 shared
> off / end
> + flow validate 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is
> 192.168.0.21 / end actions mark id 3 / rss / count shared on / end
> + flow validate 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is
> 192.168.0.21 / end actions drop / count shared off / end
>
> - pkt7 =
> Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.22",
> proto=1) / Raw('x' * 80)
> - pkt8 =
> Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21",
> proto=6) / Raw('x' * 80)
> - pkt9 =
> Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/T
> CP(sport=22,dport=23)/ Raw('x' * 80)
> - pkt10 =
> Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21",
> frag=1)/TCP(sport=22,dport=23)/ Raw('x' * 80)
> + get the message::
>
> - check the packets are not distributed to queue 1 or queue 2.
> + Flow rule validated
>
> -3. verify rules can be listed and destroyed::
> +5. check the flow list::
>
> testpmd> flow list 0
>
> - check the existing rule.
> - destroy the rule::
> + there is no rule listed.
>
> - testpmd> flow flush 0
> +Test case: negative validation
> +==============================
>
> - verify matched packets are not distributed to expected queue.
> - check there is no rule listed.
> +1. only count action::
>
> -Test case: MAC_IPV4_UDP queue index
> -===================================
> + flow validate 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is
> 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions count / end
>
> -1. create filter rules::
> + get the error message::
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end
> actions queue index 1 / end
> + Invalid input action: Invalid argument
>
> -2. send matched packets, check the packets is distributed to queue 1.
> - send mismatched packets, check the packets are not distributed to queue
> 1.
> +2. void action::
>
> -3. verify rules can be listed and destroyed::
> + flow validate 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is
> 192.168.0.21 proto is 255 ttl is 2 tos is 4 / and actions end
>
> - testpmd> flow list 0
> + get the message::
>
> - check the existing rule.
> - destroy the rule::
> + Invalid argument
>
> - testpmd> flow destroy 0 rule 0
> +3. conflict action::
>
> - verify matched packet is not distributed to queue 1.
> - check there is no rule listed.
> + flow validate 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is
> 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss queues 2 3 end / rss
> / end
>
> -Test case: MAC_IPV4_TCP queue index
> -===================================
> + get the message::
>
> -1. create filter rules::
> + Unsupported action combination: Invalid argument
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / tcp src is 22 dst is 23 / end
> actions queue index 63 / end
> +4. invalid mark id::
>
> -2. send matched packets, check the packets is distributed to queue 63.
> - send mismatched packets, check the packets are not distributed to queue
> 63.
> + flow validate 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is
> 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions passthru / mark id
> 4294967296 / end
>
> -3. verify rules can be listed and destroyed::
> + get the message::
>
> - testpmd> flow list 0
> + Bad arguments
>
> - check the existing rule.
> - destroy the rule::
> +5. invalid input set::
>
> - testpmd> flow destroy 0 rule 0
> + flow validate 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is
> 192.168.0.21 proto is 255 ttl is 2 tc is 4 / end actions queue index 1 / end
>
> - verify matched packet is not distributed to queue 63.
> - check there is no rule listed.
> + get the message::
>
> -Test case: MAC_IPV4_SCTP queue index
> -====================================
> + Bad arguments
>
> -1. create filter rules::
> +6. invalid queue index::
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / sctp src is 22 dst is 23 tag is 1
> / end actions queue index 2 / end
> + flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions
> queue index 64 / end
>
> -2. send matched packets, check the packets is distributed to queue 2.
> - send mismatched packets, check the packets are not distributed to queue
> 2.
> + get the message::
>
> -3. verify rules can be listed and destroyed::
> + Invalid input action: Invalid argument
>
> - testpmd> flow list 0
> +7. invalid rss queues parameter
>
> - check the existing rule.
> - destroy the rule::
> + Invalid number of queues::
>
> - testpmd> flow destroy 0 rule 0
> + flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss
> queues 1 2 3 end / end
> + flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss
> queues 0 end / end
> + flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss
> queues end / end
>
> - verify matched packet is not distributed to queue 2.
> - check there is no rule listed
> + get the message::
>
> -Test case: MAC_IPV6_PAY queue index
> -===================================
> + Invalid input action: Invalid argument
>
> -1. create filter rules::
> + Discontinuous queues::
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 0 hop is 2
> tc is 1 / end actions queue index 1 / end
> + flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss
> queues 1 2 3 5 end / end
>
> -2. send matched packets, check the packets is distributed to queue 1.
> - send mismatched packets, check the packets are not distributed to queue
> 1.
> + get the message::
>
> -3. verify rules can be listed and destroyed::
> + Discontinuous queue region: Invalid argument
>
> - testpmd> flow list 0
> + invalid rss queues index::
>
> - check the existing rule.
> - destroy the rule::
> + flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss
> queues 63 64 end / end
>
> - testpmd> flow destroy 0 rule 0
> + get the message::
>
> - verify matched packet is not distributed to queue 1.
> - check there is no rule listed.
> + Invalid queue region indexes.: Invalid argument
>
> -Test case: MAC_IPV6_PAY selected inputset queue index
> -=====================================================
> +8. Invalid value of input set::
>
> -1. create filter rules::
> + flow validate 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc qfi is 0x100 / end actions queue index 1 / end
> + flow validate 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x100000000
> / gtp_psc qfi is 0x5 / end actions queue index 2 / end
> + flow validate 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x100000000
> / end actions queue index 1 / end
>
> - flow create 0 ingress pattern eth / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 44 / end actions queue
> index 1 / end
> - flow create 0 ingress pattern eth / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 6 / end actions queue
> index 2 / end
> + get the message::
>
> -2. send matched packets::
> + Bad arguments
>
> - pkt1 =
> Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3
> 900:2020", src="2001::2", nh=44, tc=1, hlim=2)/("X"*480)
> - pkt2 =
> Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3
> 900:2020")/IPv6ExtHdrFragment(1000)/("X"*480)
> - pkt3 =
> Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3
> 900:2020", nh=44)/TCP(sport=22,dport=23)/("X"*480)
> - pkt4 =
> Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3
> 900:2020")/IPv6ExtHdrFragment(1000)/TCP(sport=22,dport=23)/("X"*480)
> - pkt5 =
> Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3
> 900:2020", nh=6)/("X"*480)
> - pkt6 =
> Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3
> 900:2020")/TCP(sport=22,dport=23)/("X"*480)
> +9. unsupported pattern,validate GTPU rule with OS default package::
>
> - check pkt1-pkt4 are redirected to queue 1.
> - check pkt5 and pkt6 are redirected to queue 2.
> - send mismatched packets::
> + flow validate 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc qfi is 0x34 / end actions drop / end
>
> - pkt7 =
> Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3
> 900:2021", nh=44)/("X"*480)
> - pkt8 =
> Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3
> 900:2020")/UDP(sport=22,dport=23)/("X"*480)
> - pkt9 =
> Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3
> 900:2020", nh=17)/("X"*480)
> + get the message::
>
> - check the packets are not distributed to queue 1 or queue 2.
> + Bad arguments
>
> -3. verify rules can be listed and destroyed::
> +10. check the flow list::
>
> testpmd> flow list 0
>
> - check the existing rule.
> - destroy the rule::
> + there is no rule listed.
>
> - testpmd> flow destroy 0 rule 0
>
> - verify matched packet are not distributed to expected queue.
> - check there is no rule listed.
> +Test case: MAC_IPV4_PAY pattern
> +===============================
>
> -Test case: MAC_IPV6_UDP queue index
> -===================================
> +Subcase 1: MAC_IPV4_PAY queue index
> +-----------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 /
> udp src is 22 dst is 23 / end actions queue index 1 / end
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions
> queue index 1 / end
>
> -2. send matched packets, check the packets is distributed to queue 1.
> - send mismatched packets, check the packets are not distributed to queue
> 1.
> +2. send matched packets, check the packets are distributed to queue 1
> without FDIR matched ID.
> + send mismatched packets, check the packets are not distributed to queue
> 1 without FDIR matched ID.
>
> 3. verify rules can be listed and destroyed::
>
> testpmd> flow list 0
>
> - check the existing rule.
> + check the rule listed.
> destroy the rule::
>
> testpmd> flow destroy 0 rule 0
>
> - verify matched packet is not distributed to queue 1.
> +4. verify matched packets are not distributed to queue 1 without FDIR
> matched ID.
> check there is no rule listed.
>
> -Test case: MAC_IPV6_TCP queue index
> -===================================
> +Subcase 2: MAC_IPV4_PAY rss queues
> +----------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / tcp
> src is 22 dst is 23 / end actions queue index 1 / end
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss
> queues 2 3 end / end
>
> -2. send matched packets, check the packets is distributed to queue 1.
> - send mismatched packets, check the packets are not distributed to queue
> 1.
> +2. send matched packets, check the packets are distributed to queue 2 or 3
> without without FDIR matched ID.
> + send mismatched packets, check the packets are not distributed to queue
> 2 or 3 without FDIR matched ID.
>
> -3. verify rules can be listed and destroyed::
> +3. repeat step 3 of subcase 1.
>
> - testpmd> flow list 0
> +4. verify matched packets are not distributed to queue 2 or 3 without FDIR
> matched ID.
> + check there is no rule listed.
>
> - check the existing rule.
> - destroy the rule::
> +Subcase 3: MAC_IPV4_PAY passthru
> +--------------------------------
>
> - testpmd> flow destroy 0 rule 0
> +1. create filter rules::
>
> - verify matched packet is not distributed to queue 1.
> - check there is no rule listed.
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions
> passthru / end
>
> -Test case: MAC_IPV6_SCTP queue index
> -====================================
> +2. send matched packets, check the packets are distributed by RSS without
> FDIR matched ID.
> + send mismatched packets, check the packets are distributed by RSS
> without FDIR matched ID.
>
> -1. create filter rules::
> +3. repeat step 3 of subcase 1.
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 /
> sctp src is 22 dst is 23 / end actions queue index 1 / end
> +4. verify matched packets are distributed to the same queue without FDIR
> matched ID=0x0.
> + check there is no rule listed.
>
> -2. send matched packets, check the packets is distributed to queue 1.
> - send mismatched packets, check the packets are not distributed to queue
> 1.
> +Subcase 4: MAC_IPV4_PAY drop
> +----------------------------
>
> -3. verify rules can be listed and destroyed::
> +1. create filter rules::
>
> - testpmd> flow list 0
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions drop
> / end
>
> - check the existing rule.
> - destroy the rule::
> +2. send matched packets, check the packets are dropped
> + send mismatched packets, check the packets are not dropped.
>
> - testpmd> flow destroy 0 rule 0
> +3. repeat step 3 of subcase 1.
>
> - verify matched packet is not distributed to queue 1.
> +4. verify matched packets are not dropped.
> check there is no rule listed.
>
> -Test case: MAC_IPV4_TUN_IPV4_PAY queue index
> -============================================
> +Subcase 5: MAC_IPV4_PAY mark+rss
> +--------------------------------
> +Note: This combined action is mark with RSS which is without queues
> specified.
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / end actions queue index 1 / end
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions
> mark / rss / end
>
> -2. send matched packets, check the packets are distributed to queue 1.
> - send mismatched packets, check the packets are not distributed to queue
> 1.
> +2. send matched packets, check the packets are distributed by RSS with FDIR
> matched ID=0x0
> + send mismatched packets, check the packets are distributed by RSS
> without FDIR matched ID.
>
> -3. verify rules can be listed and destroyed::
> +3. repeat step 3 of subcase 1.
>
> - testpmd> flow list 0
> +4. verify matched packets are distributed to the same queue without FDIR
> matched ID.
> + check there is no rule listed.
>
> - check the existing rule.
> - destroy the rule::
> +Subcase 6: MAC_IPV4_PAY mark
> +----------------------------
>
> - testpmd> flow destroy 0 rule 0
> +1. create filter rules::
>
> - verify the packets hit rule are not distributed to queue 1.
> - check there is no rule listed.
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions
> mark id 1 / end
>
> -Test case: MAC_IPV4_TUN_IPV4_UDP queue index
> -============================================
> +2. repeat the steps of passthru with mark part in subcase 3,
> + get the same result.
> +
> +Subcase 7: MAC_IPV4_PAY protocal
> +--------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue
> index 1 / end
> + flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 proto is 1 / end
> actions queue index 1 / mark id 1 / end
> + flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 proto is 17 /
> end actions passthru / mark id 3 / end
>
> -2. send matched packets, check the packets are distributed to queue 1.
> - send mismatched packets, check the packets are not distributed to queue
> 1.
> +2. send matched packets::
>
> -3. verify rules can be listed and destroyed::
> + pkt1 =
> Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21",
> proto=1) / Raw('x' * 80)
> + pkt2 =
> Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21",
> frag=1, proto=1) / Raw('x' * 80)
> + pkt3 =
> Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21",
> ttl=2, tos=4) /UDP(sport=22,dport=23)/Raw('x' * 80)
> + pkt4 =
> Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21",
> frag=1, ttl=2, tos=4) /UDP(sport=22,dport=23)/Raw('x' * 80)
> + pkt5 =
> Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21",
> proto=17, ttl=2, tos=4)/Raw('x' * 80)
> + pkt6 =
> Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21",
> frag=1, proto=17, ttl=2, tos=4)/Raw('x' * 80)
>
> - testpmd> flow list 0
> + check the pkt1 and pkt2 are redirected to queue 1 with FDIR matched
> ID=0x1.
> + check the pkt3-pkt6 are distributed by RSS with FDIR matched ID=0x3.
> + send mismatched packets::
>
> - check the existing rule.
> - destroy the rule::
> + pkt7 =
> Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.22",
> proto=1) / Raw('x' * 80)
> + pkt8 =
> Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21",
> proto=6) / Raw('x' * 80)
> + pkt9 =
> Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/T
> CP(sport=22,dport=23)/ Raw('x' * 80)
> + pkt10 =
> Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21",
> frag=1)/TCP(sport=22,dport=23)/ Raw('x' * 80)
>
> - testpmd> flow destroy 0 rule 0
> + check the packets received have not FDIR matched ID.
>
> - verify the packets hit rule are not distributed to queue 1.
> +3. repeat step 3 of subcase 1.
> +
> +4. verify matched packets have not FDIR matched ID.
> check there is no rule listed.
>
> -Test case: MAC_IPV4_TUN_IPV4_TCP queue index
> -============================================
> +
> +Test case: MAC_IPV4_UDP pattern
> +===============================
> +
> +Subcase 1: MAC_IPV4_UDP queue index
> +-----------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions queue
> index 1 / end
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end
> actions queue index 63 / mark id 0 / end
>
> -2. send matched packets, check the packets are distributed to queue 1.
> - send mismatched packets, check the packets are not distributed to queue
> 1.
> +2. send matched packets, check the packets is distributed to queue 63 with
> FDIR matched ID=0x0.
> + send mismatched packets, check the packets are received without FDIR
> matched ID.
>
> 3. verify rules can be listed and destroyed::
>
> testpmd> flow list 0
>
> - check the existing rule.
> + check the rule listed.
> destroy the rule::
>
> testpmd> flow destroy 0 rule 0
>
> - verify the packets hit rule are not distributed to queue 1.
> +4. verify matched packet is received without FDIR matched ID.
> check there is no rule listed.
>
> -Test case: MAC_IPV4_TUN_IPV4_SCTP queue index
> -=============================================
> +Subcase 2: MAC_IPV4_UDP rss queues
> +----------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions queue
> index 1 / end
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end
> actions rss queues 0 1 2 3 end / mark id 4294967294 / end
>
> -2. send matched packets, check the packets are distributed to queue 1.
> - send mismatched packets, check the packets are not distributed to queue
> 1.
> +2. send matched packets, check the packets is distributed to queue 0-3 with
> FDIR matched ID=0xfffffffe.
> + send mismatched packets, check the packets are received without FDIR
> matched ID.
>
> -3. verify rules can be listed and destroyed::
> +3. repeat step 3 of subcase 1.
>
> - testpmd> flow list 0
> +4. verify matched packet is not received without FDIR matched ID.
> + check there is no rule listed.
>
> - check the existing rule.
> - destroy the rule::
> +Subcase 3: MAC_IPV4_UDP passthru
> +--------------------------------
>
> - testpmd> flow destroy 0 rule 0
> +1. create filter rule with mark::
>
> - verify the packets hit rule are not distributed to queue 1.
> - check there is no rule listed.
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end
> actions passthru / mark id 1 / end
>
> -Test case: MAC_IPV4_TUN_MAC_IPV4_PAY queue index
> -================================================
> +2. send matched packets, check the packets are distributed by RSS with FDIR
> matched ID=0x1.
> + send mismatched packets, check the packets are distributed by RSS
> without FDIR matched ID.
>
> -1. create filter rules::
> +3. repeat step 3 of subcase 1.
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / end actions queue index 1 / end
> +4. verify matched packets are distributed to the same queue without FDIR
> matched ID.
> + check there is no rule listed.
>
> -2. send matched packets, check the packets are distributed to queue 1.
> - send mismatched packets, check the packets are not distributed to queue
> 1.
> +Subcase 4: MAC_IPV4_UDP drop
> +----------------------------
>
> -3. verify rules can be listed and destroyed::
> +1. create filter rules::
>
> - testpmd> flow list 0
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end
> actions drop / end
>
> - check the existing rule.
> - destroy the rule::
> +2. send matched packet, check the packet is dropped.
> + send mismatched packets, check the packets are not dropped.
>
> - testpmd> flow destroy 0 rule 0
> +3. repeat step 3 of subcase 1.
>
> - verify the packets hit rule are not distributed to queue 1.
> +4. verify matched packet is dropped.
> check there is no rule listed.
>
> -Test case: MAC_IPV4_TUN_MAC_IPV4_UDP queue index
> -================================================
> +Subcase 5: MAC_IPV4_UDP mark+rss
> +--------------------------------
> +Note: This combined action is mark with RSS which is without queues
> specified.
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue
> index 1 / end
> -
> -2. send matched packets, check the packets are distributed to queue 1.
> - send mismatched packets, check the packets are not distributed to queue
> 1.
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end
> actions mark id 2 / rss / end
>
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> +2. send matched packets, check the packets are distributed by RSS with FDIR
> matched ID=0x2
> + send mismatched packets, check the packets are distributed by RSS
> without FDIR matched ID.
>
> - testpmd> flow destroy 0 rule 0
> +3. repeat step 3 of subcase 1.
>
> - verify the packets hit rule are not distributed to queue 1.
> +4. verify matched packets are distributed to the same queue without FDIR
> matched ID.
> check there is no rule listed.
>
> -Test case: MAC_IPV4_TUN_MAC_IPV4_TCP queue index
> -================================================
> +Subcase 6: MAC_IPV4_UDP mark
> +----------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions queue
> index 1 / end
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end
> actions mark id 1 / end
>
> -2. send matched packets, check the packets are distributed to queue 1.
> - send mismatched packets, check the packets are not distributed to queue
> 1.
> +2. repeat the step 2-3 of in subcase 3,
> + get the same result.
>
> -3. verify rules can be listed and destroyed::
> +Test case: MAC_IPV4_TCP pattern
> +===============================
>
> - testpmd> flow list 0
> +1. replace "udp" with "tcp" in all the subcases of MAC_IPV4_UDP pattern.
> +2. Then repeat all the steps in all the subcases of MAC_IPV4_UDP pattern.
> +3. get the same result.
>
> - check the existing rule.
> - destroy the rule::
> +Test case: MAC_IPV4_SCTP pattern
> +================================
>
> - testpmd> flow destroy 0 rule 0
> +1. replace "udp" with "sctp" in all the subcases of MAC_IPV4_UDP pattern.
> +2. Then repeat all the steps in all the subcases of MAC_IPV4_UDP pattern.
> +3. get the same result.
>
> - verify the packets hit rule are not distributed to queue 1.
> - check there is no rule listed.
>
> -Test case: MAC_IPV4_TUN_MAC_IPV4_SCTP queue index
> -=================================================
> +Test case: MAC_IPV6_PAY pattern
> +===============================
> +
> +Subcase 1: MAC_IPV6_PAY queue index
> +-----------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions queue
> index 1 / end
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 0 hop is 2
> tc is 1 / end actions queue index 1 / mark / end
>
> -2. send matched packets, check the packets are distributed to queue 1.
> - send mismatched packets, check the packets are not distributed to queue
> 1.
> +2. send matched packets, check the packets is distributed to queue 1 with
> FDIR matched ID=0x0.
> + send mismatched packets, check the packets are received without FDIR
> matched ID.
>
> 3. verify rules can be listed and destroyed::
>
> testpmd> flow list 0
>
> - check the existing rule.
> + check the rule listed.
> destroy the rule::
>
> testpmd> flow destroy 0 rule 0
>
> - verify the packets hit rule are not distributed to queue 1.
> +4. verify matched packet is received without FDIR matched ID.
> check there is no rule listed.
>
> -Test case: queue index wrong parameters
> -=======================================
> +Subcase 2: MAC_IPV6_PAY rss queues
> +----------------------------------
>
> -1. invalid parameters::
> -
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions
> queue index 64 / end
> +1. create filter rules::
>
> - failed to be created.
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 0 hop is 2
> tc is 1 / end \
> + actions rss queues 56 57 58 59 60 61 62 63 end / mark / end
>
> -2. same pattern items, different action::
> +2. send matched packets, check the packets is distributed to queue 56-63
> with FDIR matched ID=0x0.
> + send mismatched packets, check the packets are not distributed to queue
> 56-63 with FDIR matched ID=0x0.
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions
> queue index 1 / end
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions
> queue index 2 / end
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions drop
> / end
> +3. repeat step 3 of subcase 1.
>
> - flow 1 can be created successfully,
> - flow 2 and flow 3 failed to be created cause of confliction.
> +4. verify matched packet is received without FDIR matched ID=0x0.
> + check there is no rule listed.
>
> -Test case: MAC_IPV4_PAY passthru/count
> -======================================
> +Subcase 3: MAC_IPV6_PAY passthru
> +--------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions
> passthru / count / end
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 0 hop is 2
> tc is 1 / end actions passthru / mark / end
>
> -2. send matched packets, check the packets are redirected by RSS
> - send mismatched packets, check the packets are redirected by RSS
> - check the count number::
> +2. send matched packets, check the packets are distributed by RSS with FDIR
> matched ID=0x0.
> + send mismatched packets, check the packets are distributed by RSS
> without FDIR matched ID.
>
> - flow query 0 0 count
> - count:
> - hits_set: 1
> - bytes_set: 0
> - hits: 2
> - bytes: 0
> +3. repeat step 3 of subcase 1.
>
> -3. verify rules can be listed and destroyed::
> +4. verify matched packets are destributed to the same queue without FDIR
> matched ID .
> + check there is no rule listed.
>
> - testpmd> flow list 0
> +Subcase 4: MAC_IPV6_PAY drop
> +----------------------------
>
> - check the existing rule.
> - destroy the rule::
> +1. create filter rules::
>
> - testpmd> flow destroy 0 rule 0
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 0 hop is 2
> tc is 1 / end actions drop / end
> +
> +2. send matched packets, check the packets are dropped.
> + send mismatched packets, check the packets are not dropped.
> +
> +3. repeat step 3 of subcase 1.
>
> - verify matched packets are redirected to the same queue.
> +4. verify matched packet is dropped.
> check there is no rule listed.
>
> -Test case: MAC_IPV4_PAY passthru/mark
> -=====================================
> +Subcase 5: MAC_IPV6_PAY mark+rss
> +--------------------------------
> +Note: This combined action is mark with RSS which is without queues
> specified.
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions
> passthru / mark / end
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 0 hop is 2
> tc is 1 / end actions mark / rss / end
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID.
> +2. send matched packets, check the packets are distributed by RSS with FDIR
> matched ID=0x0
> + send mismatched packets, check the packets are distributed by RSS
> without FDIR matched ID.
>
> -3. verify rules can be listed and destroyed::
> +3. repeat step 3 of subcase 1.
>
> - testpmd> flow list 0
> +4. verify matched packets are distributed to the same queue without FDIR
> matched ID.
> + check there is no rule listed.
>
> - check the existing rule.
> - destroy the rule::
> +Subcase 6: MAC_IPV6_PAY mark
> +----------------------------
>
> - testpmd> flow destroy 0 rule 0
> +1. create filter rules::
>
> - verify matched packets are redirected to the same queue without FDIR ID.
> - check there is no rule listed.
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 0 hop is 2
> tc is 1 / end actions mark / end
>
> -Test case: MAC_IPV4_UDP passthru/mark
> -=====================================
> +2. repeat the steps of passthru in subcase 3,
> + get the same result.
> +
> +Subcase 7: MAC_IPV6_PAY protocal
> +--------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end
> actions passthru / end
> + flow create 0 ingress pattern eth / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is
> ABAB:910A:2222:5498:8475:1111:3900:1010 proto is 44 / end actions rss
> queues 5 6 end / mark id 1 / end
> + flow create 0 ingress pattern eth / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 6 / end actions mark id
> 2 / rss / end
>
> -2. send matched packets, check the packets are redirected by RSS.
> - send mismatched packets, check the packets are redirected by RSS.
> +2. send matched packets::
>
> -3. verify rules can be listed and destroyed::
> + pkt1 =
> Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3
> 900:2020", src="ABAB:910A:2222:5498:8475:1111:3900:1010", nh=44, tc=1,
> hlim=2)/("X"*480)
> + pkt2 =
> Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3
> 900:2020",
> src="ABAB:910A:2222:5498:8475:1111:3900:1010")/IPv6ExtHdrFragment(100
> 0)/("X"*480)
> + pkt3 =
> Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3
> 900:2020", src="ABAB:910A:2222:5498:8475:1111:3900:1010",
> nh=44)/TCP(sport=22,dport=23)/("X"*480)
> + pkt4 =
> Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3
> 900:2020",
> src="ABAB:910A:2222:5498:8475:1111:3900:1010")/IPv6ExtHdrFragment(100
> 0)/TCP(sport=22,dport=23)/("X"*480)
> + pkt5 =
> Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3
> 900:2020", nh=6)/("X"*480)
> + pkt6 =
> Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3
> 900:2020")/TCP(sport=22,dport=23)/("X"*480)
>
> - testpmd> flow list 0
> + check pkt1-pkt4 are redirected to queue 5 or queue 6 with FDIR matched
> ID=0x1.
> + check pkt5 and pkt6 are distributed by RSS with FDIR matched ID=0x2.
> + send mismatched packets::
>
> - check the existing rule.
> - destroy the rule::
> + pkt7 =
> Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3
> 900:2020", src="ABAB:910A:2222:5498:8475:1111:3900:1011",
> nh=44)/("X"*480)
> + pkt8 =
> Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3
> 900:2020")/UDP(sport=22,dport=23)/("X"*480)
> + pkt9 =
> Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3
> 900:2020", nh=17)/("X"*480)
>
> - testpmd> flow destroy 0 rule 0
> + check the packets received have not FDIR matched ID.
> +
> +3. repeat step 3 of subcase 1.
>
> - verify matched packet is redirected to the same queue.
> +4. verify matched packets have not FDIR matched.
> check there is no rule listed.
>
> -Test case: MAC_IPV4_TCP passthru/mark
> -=====================================
> +
> +Test case: MAC_IPV6_UDP pattern
> +===============================
> +
> +Subcase 1: MAC_IPV6_UDP queue index
> +-----------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / tcp src is 22 dst is 23 / end
> actions passthru / mark / end
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 /
> udp src is 22 dst is 23 / end actions queue index 1 / mark / end
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID.
> +2. send matched packets, check the packets is distributed to queue 1 with
> FDIR matched ID=0x0.
> + send mismatched packets, check the packets are received without FDIR
> matched ID=0x0.
>
> 3. verify rules can be listed and destroyed::
>
> testpmd> flow list 0
>
> - check the existing rule.
> + check the rule listed.
> destroy the rule::
>
> testpmd> flow destroy 0 rule 0
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> +4. verify matched packet is received without FDIR matched ID=0x0.
> check there is no rule listed.
>
> -Test case: MAC_IPV4_SCTP passthru/mark
> -======================================
> +Subcase 2: MAC_IPV6_UDP rss queues
> +----------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / sctp src is 22 dst is 23 tag is 1
> / end actions passthru / mark / end
> + flow create 0 ingress pattern eth / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 /
> udp src is 22 dst is 23 / end actions rss / end
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID.
> +2. send matched packets, check the packets is distributed by RSS.
> + send mismatched packets, check the packets are distributed by RSS too.
>
> -3. verify rules can be listed and destroyed::
> +3. repeat step 3 of subcase 1.
>
> - testpmd> flow list 0
> +4. verify matched packet is destributed to the same queue.
> + check there is no rule listed.
>
> - check the existing rule.
> - destroy the rule::
> +Subcase 3: MAC_IPV6_UDP passthru
> +--------------------------------
>
> - testpmd> flow destroy 0 rule 0
> +1. create filter rules::
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> - check there is no rule listed.
> + flow create 0 ingress pattern eth / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 /
> udp src is 22 dst is 23 / end actions passthru / mark / end
>
> -Test case: MAC_IPV6_PAY passthru/mark
> -=====================================
> +2. send matched packets, check the packets are distributed by RSS with FDIR
> matched ID=0x0.
> + send mismatched packets, check the packets are distributed by RSS
> without FDIR matched ID.
>
> -1. create filter rules::
> +3. repeat step 3 of subcase 1.
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 1 hop is 2
> tc is 1 / end actions passthru / mark / end
> +4. verify matched packets are destributed to the same queue without FDIR
> matched ID .
> + check there is no rule listed.
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID.
> +Subcase 4: MAC_IPV6_UDP drop
> +----------------------------
>
> -3. verify rules can be listed and destroyed::
> +1. create filter rules::
>
> - testpmd> flow list 0
> + flow create 0 ingress pattern eth / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 /
> udp src is 22 dst is 23 / end actions drop / end
>
> - check the existing rule.
> - destroy the rule::
> +2. send matched packets, check the packets are dropped.
> + send mismatched packets, check the packets are not dropped.
>
> - testpmd> flow destroy 0 rule 0
> +3. repeat step 3 of subcase 1.
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> +4. verify matched packet is dropped.
> check there is no rule listed.
>
> -Test case: MAC_IPV6_UDP passthru/mark
> -=====================================
> +Subcase 5: MAC_IPV6_UDP mark+rss
> +--------------------------------
> +Note: This combined action is mark with RSS which is without queues
> specified.
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 /
> udp src is 22 dst is 23 / end actions passthru / mark / end
> + flow create 0 ingress pattern eth / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 /
> udp src is 22 dst is 23 / end actions mark / rss / end
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID.
> +2. send matched packets, check the packets are distributed by RSS with FDIR
> matched ID=0x0
> + send mismatched packets, check the packets are distributed by RSS
> without FDIR matched ID.
>
> -3. verify rules can be listed and destroyed::
> +3. repeat step 3 of subcase 1.
>
> - testpmd> flow list 0
> +4. verify matched packets are distributed to the same queue without FDIR
> matched ID.
> + check there is no rule listed.
>
> - check the existing rule.
> - destroy the rule::
> +Subcase 6: MAC_IPV6_UDP mark
> +----------------------------
>
> - testpmd> flow destroy 0 rule 0
> +1. create filter rules::
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> - check there is no rule listed.
> + flow create 0 ingress pattern eth / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 /
> udp src is 22 dst is 23 / end actions mark / end
>
> -Test case: MAC_IPV6_TCP passthru/mark
> -=====================================
> +2. repeat the steps of passthru in subcase 3,
> + get the same result.
>
> -1. create filter rules::
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / tcp
> src is 22 dst is 23 / end actions passthru / mark / end
> +Test case: MAC_IPV6_TCP pattern
> +===============================
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID.
> +1. replace "udp" with "tcp" in all the subcases of MAC_IPV6_UDP pattern.
> +2. Then repeat all the steps in all the subcases of MAC_IPV6_UDP pattern.
> +3. get the same result.
>
> -3. verify rules can be listed and destroyed::
> +Test case: MAC_IPV6_SCTP pattern
> +================================
>
> - testpmd> flow list 0
> +1. replace "udp" with "sctp" in all the subcases of MAC_IPV6_UDP pattern.
> +2. Then repeat all the steps in all the subcases of MAC_IPV6_UDP pattern.
> +3. get the same result.
>
> - check the existing rule.
> - destroy the rule::
>
> - testpmd> flow destroy 0 rule 0
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> - check there is no rule listed.
>
> -Test case: MAC_IPV6_SCTP passthru/mark
> -======================================
> +Test case: MAC_IPV4_TUN_IPV4_PAY pattern
> +========================================
> +
> +Subcase 1: MAC_IPV4_TUN_IPV4_PAY queue index
> +--------------------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 /
> sctp src is 22 dst is 23 / end actions passthru / mark / end
> + flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / end actions queue index 1 / end
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID.
> +2. send matched packets, check the packets are distributed to queue 1
> without FDIR matched ID.
> + send mismatched packets, check the packets are not distributed to queue
> 1 without FDIR matched ID.
>
> 3. verify rules can be listed and destroyed::
>
> @@ -1092,84 +1085,92 @@ Test case: MAC_IPV6_SCTP passthru/mark
>
> testpmd> flow destroy 0 rule 0
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> + verify the packets hit rule are not distributed to queue 1 without FDIR
> matched ID.
> check there is no rule listed.
>
> -Test case: MAC_IPV4_TUN_IPV4_PAY passthru/mark
> -==============================================
> +Subcase 2: MAC_IPV4_TUN_IPV4_PAY rss queues
> +-------------------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / end actions passthru / mark / end
> + flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / end actions rss queues 9 10 11 12 13 14 15
> 16 17 18 19 20 21 22 23 24 end / mark / end
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID.
> +2. send matched packets, check the packets are distributed to queue group
> with FDIR matched ID=0x0.
> + send mismatched packets, check the packets are received without FDIR
> matched ID.
>
> -3. verify rules can be listed and destroyed::
> +3. repeat step 3 of subcase 1.
>
> - testpmd> flow list 0
> +4. verify the packets hit rule are received without FDIR matched ID.
> + check there is no rule listed.
>
> - check the existing rule.
> - destroy the rule::
> +Subcase 3: MAC_IPV4_TUN_IPV4_PAY passthru
> +-----------------------------------------
>
> - testpmd> flow destroy 0 rule 0
> +1. create filter rules::
> +
> + flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / end actions passthru / mark / end
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> +2. send matched packets, check the packets are redirected by RSS with FDIR
> matched ID=0x0.
> + send mismatched packets, check the packets are redirected by RSS
> without FDIR matched ID.
> +
> +3. repeat step 3 of subcase 1.
> +
> +4. verify the packets hit rule are received without FDIR matched ID.
> check there is no rule listed.
>
> -Test case: MAC_IPV4_TUN_IPV4_UDP passthru/mark
> -==============================================
> +Subcase 4: MAC_IPV4_TUN_IPV4_PAY drop
> +-------------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions
> passthru / mark / end
> + flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / end actions drop / end
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID.
> +2. send matched packets, check the packets dropped.
> + send mismatched packets, check the packets are not dropped.
>
> -3. verify rules can be listed and destroyed::
> +3. repeat step 3 of subcase 1.
>
> - testpmd> flow list 0
> +4. check there is no rule listed.
> + verify the packets hit the rule are not dropped.
>
> - check the existing rule.
> - destroy the rule::
> +Subcase 5: MAC_IPV4_TUN_IPV4_PAY mark/rss
> +-----------------------------------------
>
> - testpmd> flow destroy 0 rule 0
> +1. create filter rules::
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> - check there is no rule listed.
> + flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / end actions mark / rss / end
>
> -Test case: MAC_IPV4_TUN_IPV4_TCP passthru/mark
> -==============================================
> +2. send matched packets, check the packets are redirected by RSS with FDIR
> matched ID=0x0.
> + send mismatched packets, check the packets are redirected by RSS
> without FDIR matched ID.
>
> -1. create filter rules::
> +3. repeat step 3 of subcase 1.
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions passthru
> / mark / end
> +4. verify matched packet is redirected to the same queue without FDIR
> matched ID.
> + check there is no rule listed.
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID.
> +Subcase 6: MAC_IPV4_TUN_IPV4_PAY mark
> +-------------------------------------
>
> -3. verify rules can be listed and destroyed::
> +1. create filter rules::
>
> - testpmd> flow list 0
> + flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / end actions mark / end
>
> - check the existing rule.
> - destroy the rule::
> +2. repeat the steps of passthru in subcase 3,
> + get the same result.
>
> - testpmd> flow destroy 0 rule 0
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> - check there is no rule listed.
> +Test case: MAC_IPV4_TUN_IPV4_UDP pattern
> +========================================
>
> -Test case: MAC_IPV4_TUN_IPV4_SCTP passthru/mark
> -===============================================
> +Subcase 1: MAC_IPV4_TUN_IPV4_UDP queue index
> +--------------------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions
> passthru / mark / end
> + flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue
> index 1 / mark id 1 / end
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID.
> +2. send matched packets, check the packets are distributed to queue 1 with
> FDIR matched ID=0x1.
> + send mismatched packets, check the packets are received without FDIR
> matched ID.
>
> 3. verify rules can be listed and destroyed::
>
> @@ -1180,106 +1181,106 @@ Test case: MAC_IPV4_TUN_IPV4_SCTP
> passthru/mark
>
> testpmd> flow destroy 0 rule 0
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> +4. verify the packets hit rule are received without FDIR matched ID.
> check there is no rule listed.
>
> -Test case: MAC_IPV4_TUN_MAC_IPV4_PAY passthru/mark
> -==================================================
> +Subcase 2: MAC_IPV4_TUN_IPV4_UDP rss queues
> +-------------------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / end actions passthru / mark / end
> + flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions rss
> queues 38 39 40 41 end / mark id 1 / end
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID.
> +2. send matched packets, check the packets are distributed to queue group
> with FDIR matched ID=0x1.
> + send mismatched packets, check the packets are received without FDIR
> matched ID.
>
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> +3. repeat step 3 of subcase 1.
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> +4. verify the packets hit rule are received without FDIR matched ID.
> check there is no rule listed.
>
> -Test case: MAC_IPV4_TUN_MAC_IPV4_UDP passthru/mark
> -==================================================
> +Subcase 3: MAC_IPV4_TUN_IPV4_UDP passthru
> +-----------------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions
> passthru / mark / end
> + flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions
> passthru / mark id 1 / end
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID.
> +2. send matched packets, check the packets are distributed by RSS with FDIR
> matched ID=0x1.
> + send mismatched packets, check the packets are distributed by RSS
> without FDIR matched ID.
>
> -3. verify rules can be listed and destroyed::
> +3. repeat step 3 of subcase 1.
>
> - testpmd> flow list 0
> +4. verify the packets hit rule are distributed to the same queue without FDIR
> matched ID.
> + check there is no rule listed.
>
> - check the existing rule.
> - destroy the rule::
> +Subcase 4: MAC_IPV4_TUN_IPV4_UDP drop
> +-------------------------------------
>
> - testpmd> flow destroy 0 rule 0
> +1. create filter rules::
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> - check there is no rule listed.
> + flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions drop /
> end
>
> -Test case: MAC_IPV4_TUN_MAC_IPV4_TCP passthru/mark
> -==================================================
> +2. send matched packets, check the packets are dropped.
> + send mismatched packets, check the packets are received without FDIR
> matched ID.
>
> -1. create filter rules::
> +3. repeat step 3 of subcase 1.
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions passthru
> / mark / end
> +4. verify the packets hit rule are received without FDIR matched ID.
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID.
> +Subcase 5: MAC_IPV4_TUN_IPV4_UDP mark/rss
> +-----------------------------------------
>
> -3. verify rules can be listed and destroyed::
> +1. create filter rules::
>
> - testpmd> flow list 0
> + flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions mark id
> 1 / rss / end
>
> - check the existing rule.
> - destroy the rule::
> +2. send matched packets, check the packets are distributed by RSS with FDIR
> matched ID=0x1.
> + send mismatched packets, check the packets are distributed by RSS
> without FDIR matched ID.
>
> - testpmd> flow destroy 0 rule 0
> +3. repeat step 3 of subcase 1.
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> +4. verify the packets hit rule are distributed to the same queue without FDIR
> matched ID.
> check there is no rule listed.
>
> -Test case: MAC_IPV4_TUN_MAC_IPV4_SCTP passthru/mark
> -===================================================
> +Subcase 6: MAC_IPV4_TUN_IPV4_UDP mark
> +-------------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions
> passthru / mark / end
> + flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions mark id
> 1 / end
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID.
> +2. repeat the steps of passthru in subcase 3,
> + get the same result.
>
> -3. verify rules can be listed and destroyed::
>
> - testpmd> flow list 0
> +Test case: MAC_IPV4_TUN_IPV4_TCP pattern
> +========================================
>
> - check the existing rule.
> - destroy the rule::
> +1. replace "udp" with "tcp" in all the subcases of MAC_IPV4_TUN_IPV4_UDP
> pattern.
> +2. Then repeat all the steps in all the subcases of MAC_IPV4_TUN_IPV4_UDP
> pattern.
> +3. get the same result.
>
> - testpmd> flow destroy 0 rule 0
> +Test case: MAC_IPV4_TUN_IPV4_SCTP pattern
> +=========================================
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> - check there is no rule listed.
> +1. replace "udp" with "sctp" in all the subcases of
> MAC_IPV4_TUN_IPV4_UDP pattern.
> +2. Then repeat all the steps in all the subcases of MAC_IPV4_TUN_IPV4_UDP
> pattern.
> +3. get the same result.
>
> -Test case: MAC_IPV4_PAY mark/rss
> -================================
> +
> +Test case: MAC_IPV4_TUN_MAC_IPV4_PAY pattern
> +============================================
> +
> +Subcase 1: MAC_IPV4_TUN_MAC_IPV4_PAY queue index
> +------------------------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions
> mark id 1 / rss / end
> + flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / end actions queue index 0 / end
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID 1.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID 1.
> +2. send matched packets, check the packets are distributed to queue 0
> without FDIR matched ID.
> + send mismatched packets, check the packets are not distributed to queue
> 0 without FDIR matched ID.
>
> 3. verify rules can be listed and destroyed::
>
> @@ -1290,84 +1291,91 @@ Test case: MAC_IPV4_PAY mark/rss
>
> testpmd> flow destroy 0 rule 0
>
> - verify matched packets are redirected to the same queue without FDIR ID.
> +4. verify the packets hit rule are not distributed to queue 0 without FDIR
> matched ID.
> check there is no rule listed.
>
> -Test case: MAC_IPV4_UDP mark/rss
> -================================
> +Subcase 2: MAC_IPV4_TUN_MAC_IPV4_PAY rss queues
> +-----------------------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end
> actions mark / rss / end
> + flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / end actions rss queues 0 1 end / end
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID 0.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID 0.
> +2. send matched packets, check the packets are distributed to queue group
> without FDIR matched ID.
> + send mismatched packets, check the packets are not distributed to queue
> group without FDIR matched ID.
>
> -3. verify rules can be listed and destroyed::
> +3. repeat step 3 of subcase 1.
>
> - testpmd> flow list 0
> +4. verify the packets hit rule are not distributed to queue group without
> FDIR matched ID.
> + check there is no rule listed.
>
> - check the existing rule.
> - destroy the rule::
> +Subcase 3: MAC_IPV4_TUN_MAC_IPV4_PAY passthru
> +---------------------------------------------
>
> - testpmd> flow destroy 0 rule 0
> +1. create filter rules::
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> - check there is no rule listed.
> + flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / end actions passthru / end
>
> -Test case: MAC_IPV4_TCP mark/rss
> -================================
> +2. send matched packets, check the packets are distributed by RSS without
> FDIR matched ID.
> + send mismatched packets, check the packets are distributed by RSS
> without FDIR matched ID.
>
> -1. create filter rules::
> +3. repeat step 3 of subcase 1.
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / tcp src is 22 dst is 23 / end
> actions mark id 1 / rss / end
> +4. verify the packets hit rule are distributed to same queue without FDIR
> matched ID.
> + check there is no rule listed.
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID 1.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID 1.
> +Subcase 4: MAC_IPV4_TUN_MAC_IPV4_PAY drop
> +-----------------------------------------
>
> -3. verify rules can be listed and destroyed::
> +1. create filter rules::
>
> - testpmd> flow list 0
> + flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / end actions drop / end
>
> - check the existing rule.
> - destroy the rule::
> +2. send matched packets, check the packets are dropped.
> + send mismatched packets, check the packets are not dropped.
>
> - testpmd> flow destroy 0 rule 0
> +3. repeat step 3 of subcase 1.
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> +4. verify the packets hit rule are not dropped.
> check there is no rule listed.
>
> -Test case: MAC_IPV4_SCTP mark/rss
> -=================================
> +Subcase 5: MAC_IPV4_TUN_MAC_IPV4_PAY mark/rss
> +---------------------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / sctp src is 22 dst is 23 tag is 1
> / end actions mark id 1 / rss / end
> + flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / end actions mark / rss / end
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID 1.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID 1.
> +2. send matched packets, check the packets are distributed by RSS with FDIR
> matched ID=0x0.
> + send mismatched packets, check the packets are distributed by RSS
> without FDIR matched ID.
>
> -3. verify rules can be listed and destroyed::
> +3. repeat step 3 of subcase 1.
>
> - testpmd> flow list 0
> +4. verify the packets hit rule are distributed to same queue without FDIR
> matched ID.
> + check there is no rule listed.
>
> - check the existing rule.
> - destroy the rule::
> +Subcase 6: MAC_IPV4_TUN_MAC_IPV4_PAY mark
> +-----------------------------------------
>
> - testpmd> flow destroy 0 rule 0
> +1. create filter rules::
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> - check there is no rule listed.
> + flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / end actions mark / end
>
> -Test case: MAC_IPV6_PAY mark/rss
> -================================
> +2. repeat the steps of passthru in subcase 3,
> + get the same result.
> +
> +Test case: MAC_IPV4_TUN_MAC_IPV4_UDP pattern
> +============================================
> +
> +Subcase 1: MAC_IPV4_TUN_MAC_IPV4_UDP queue index
> +------------------------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 1 hop is 2
> tc is 1 / end actions mark id 1 / rss / end
> + flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue
> index 15 / mark id 1 / end
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID 1.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID 1.
> +2. send matched packets, check the packets are distributed to queue 15
> with FDIR matched ID=0x1.
> + send mismatched packets, check the packets are received without FDIR
> matched ID.
>
> 3. verify rules can be listed and destroyed::
>
> @@ -1378,106 +1386,106 @@ Test case: MAC_IPV6_PAY mark/rss
>
> testpmd> flow destroy 0 rule 0
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> +4. verify the packets hit rule are distributed by RSS without FDIR matched ID.
> check there is no rule listed.
>
> -Test case: MAC_IPV6_UDP mark/rss
> -================================
> +Subcase 2: MAC_IPV4_TUN_MAC_IPV4_UDP rss queues
> +-----------------------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 /
> udp src is 22 dst is 23 / end actions mark id 1 / rss / end
> + flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions rss
> queues 0 1 2 3 end / mark id 1 / end
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID 1.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID 1.
> +2. send matched packets, check the packets are distributed to queue group
> with FDIR matched ID=0x1.
> + send mismatched packets, check the packets are distributed by RSS
> without FDIR matched ID.
>
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> +3. repeat step 3 of subcase 1.
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> +4. verify the packets hit rule are distributed by RSS without FDIR matched ID.
> check there is no rule listed.
>
> -Test case: MAC_IPV6_TCP mark/rss
> -================================
> +Subcase 3: MAC_IPV4_TUN_MAC_IPV4_UDP passthru
> +---------------------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / tcp
> src is 22 dst is 23 / end actions mark id 1 / rss / end
> + flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions
> passthru / mark id 1 / end
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID 1.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID 1.
> +2. send matched packets, check the packets are distributed by RSS with FDIR
> matched ID=0x1.
> + send mismatched packets, check the packets are distributed by RSS
> without FDIR matched ID.
>
> -3. verify rules can be listed and destroyed::
> +3. repeat step 3 of subcase 1.
>
> - testpmd> flow list 0
> +4. verify the packets hit rule are distributed by RSS without FDIR matched ID.
> + check there is no rule listed.
>
> - check the existing rule.
> - destroy the rule::
> +Subcase 4: MAC_IPV4_TUN_MAC_IPV4_UDP drop
> +-----------------------------------------
>
> - testpmd> flow destroy 0 rule 0
> +1. create filter rules::
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> - check there is no rule listed.
> + flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions drop /
> mark id 1 / end
>
> -Test case: MAC_IPV6_SCTP mark/rss
> -=================================
> +2. send matched packets, check the packets are dropped.
> + send mismatched packets, check the packets are distributed by RSS
> without FDIR matched ID.
>
> -1. create filter rules::
> +3. repeat step 3 of subcase 1.
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 /
> sctp src is 22 dst is 23 / end actions mark id 1 / rss / end
> +4. verify the packets hit rule are distributed by RSS without FDIR matched ID.
> + check there is no rule listed.
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID 1.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID 1.
> +Subcase 5: MAC_IPV4_TUN_MAC_IPV4_UDP mark/rss
> +---------------------------------------------
>
> -3. verify rules can be listed and destroyed::
> +1. create filter rules::
>
> - testpmd> flow list 0
> + flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions rss /
> mark id 1 / end
>
> - check the existing rule.
> - destroy the rule::
> +2. send matched packets, check the packets are distributed by RSS with FDIR
> matched ID=0x1.
> + send mismatched packets, check the packets are distributed by RSS
> without FDIR matched ID.
>
> - testpmd> flow destroy 0 rule 0
> +3. repeat step 3 of subcase 1.
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> +4. verify the packets hit rule are distributed to same queue without FDIR
> matched ID.
> check there is no rule listed.
>
> -Test case: MAC_IPV4_TUN_IPV4_PAY mark/rss
> -=========================================
> +Subcase 6: MAC_IPV4_TUN_MAC_IPV4_UDP mark
> +-----------------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / end actions mark / rss / end
> + flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions mark id
> 1 / end
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID 0.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID 0.
> +2. repeat the steps of passthru in subcase 3,
> + get the same result.
>
> -3. verify rules can be listed and destroyed::
>
> - testpmd> flow list 0
> +Test case: MAC_IPV4_TUN_MAC_IPV4_TCP pattern
> +============================================
>
> - check the existing rule.
> - destroy the rule::
> +1. replace "udp" with "tcp" in all the subcases of
> MAC_IPV4_TUN_MAC_IPV4_UDP pattern.
> +2. Then repeat all the steps in all the subcases of
> MAC_IPV4_TUN_MAC_IPV4_UDP pattern.
> +3. get the same result.
>
> - testpmd> flow destroy 0 rule 0
> +Test case: MAC_IPV4_TUN_MAC_IPV4_SCTP pattern
> +=============================================
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> - check there is no rule listed.
> +1. replace "udp" with "sctp" in all the subcases of
> MAC_IPV4_TUN_MAC_IPV4_UDP pattern.
> +2. Then repeat all the steps in all the subcases of
> MAC_IPV4_TUN_MAC_IPV4_UDP pattern.
> +3. get the same result.
>
> -Test case: MAC_IPV4_TUN_IPV4_UDP mark/rss
> -=========================================
> +Test case: MAC_IPV4_GTPU_EH pattern
> +===================================
> +
> +Subcase 1: MAC_IPV4_GTPU_EH queue index
> +---------------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions mark id
> 1 / rss / end
> + flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc qfi is 0x34 / end actions queue index 1 / mark id 1 / end
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID 1.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID 1.
> +2. send matched packets, check the packets are distributed to queue 1 with
> FDIR matched ID=0x1.
> + send mismatched packets, check the packets are not distributed to queue
> 1 without FDIR matched ID.
>
> 3. verify rules can be listed and destroyed::
>
> @@ -1488,128 +1496,131 @@ Test case: MAC_IPV4_TUN_IPV4_UDP
> mark/rss
>
> testpmd> flow destroy 0 rule 0
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> - check there is no rule listed.
> +4. verify matched packets are not distributed to queue 1 without FDIR
> matched ID.
> + Then check there is no rule listed.
>
> -Test case: MAC_IPV4_TUN_IPV4_TCP mark/rss
> -=========================================
> +Subcase 2: MAC_IPV4_GTPU_EH queue group
> +---------------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions mark id
> 1 / rss / end
> + flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc qfi is 0x34 / end actions rss queues 0 1 2 3 end / mark id 1 / end
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID 1.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID 1.
> +2. send matched packets, check the packets are distributed to queue group
> with FDIR matched ID=0x1.
> + send mismatched packets, check the packets are not distributed to queue
> group without FDIR matched ID.
>
> -3. verify rules can be listed and destroyed::
> +3. repeat step 3 of subcase 1.
>
> - testpmd> flow list 0
> +4. verify matched packets are not distributed to queue group without FDIR
> matched ID.
> + Then check there is no rule listed.
>
> - check the existing rule.
> - destroy the rule::
> +Subcase 3: MAC_IPV4_GTPU_EH passthru
> +------------------------------------
>
> - testpmd> flow destroy 0 rule 0
> +1. create filter rules::
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> - check there is no rule listed.
> + flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc qfi is 0x34 / end actions passthru / mark id 1 / end
>
> -Test case: MAC_IPV4_TUN_IPV4_SCTP mark/rss
> -==========================================
> +2. send matched packets, check the packets are redirected by RSS with FDIR
> matched ID=0x1.
> + send mismatched packets, check the packets are redirected by RSS
> without FDIR matched ID.
>
> -1. create filter rules::
> +3. repeat step 3 of subcase 1.
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions mark id
> 1 / rss / end
> +4. verify matched packets are redirected to the same queue without FDIR ID.
> + check there is no rule listed.
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID 1.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID 1.
> +Subcase 4: MAC_IPV4_GTPU_EH drop
> +--------------------------------
>
> -3. verify rules can be listed and destroyed::
> +1. create filter rules::
>
> - testpmd> flow list 0
> + flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc qfi is 0x34 / end actions drop / end
>
> - check the existing rule.
> - destroy the rule::
> +2. send matched packets, check the packets are dropped.
> + send mismatched packets, check the packets are not dropped without
> FDIR matched ID.
>
> - testpmd> flow destroy 0 rule 0
> +3. repeat step 3 of subcase 1.
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> - check there is no rule listed.
> +4. verify matched packets are not dropped without FDIR matched ID.
> + Then check there is no rule listed.
>
> -Test case: MAC_IPV4_TUN_MAC_IPV4_PAY mark/rss
> -=============================================
> +Subcase 5: MAC_IPV4_GTPU_EH mark/rss
> +------------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / end actions mark id 1 / rss / end
> + flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc qfi is 0x34 / end actions mark id 1 / rss / end
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID 1.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID 1.
> +2. send matched packets, check the packets are redirected by RSS with FDIR
> matched ID=0x1.
> + send mismatched packets, check the packets are redirected by RSS
> without FDIR matched ID.
>
> -3. verify rules can be listed and destroyed::
> +3. repeat step 3 of subcase 1.
>
> - testpmd> flow list 0
> +4. verify matched packets are redirected to the same queue without FDIR
> matched ID.
> + check there is no rule listed.
>
> - check the existing rule.
> - destroy the rule::
> +Subcase 6: MAC_IPV4_GTPU_EH mark
> +--------------------------------
>
> - testpmd> flow destroy 0 rule 0
> +1. create filter rules::
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> - check there is no rule listed.
> + flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc qfi is 0x34 / end actions mark id 1 / end
>
> -Test case: MAC_IPV4_TUN_MAC_IPV4_UDP mark/rss
> -=============================================
> +2. repeat the steps of passthru in subcase 3,
> + get the same result.
>
> -1. create filter rules::
> +Subcase 7: MAC_IPV4_GTPU_EH QFI queue index / mark
> +--------------------------------------------------
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions mark id
> 1 / rss / end
> +1. create filter rules on port 0::
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID 1.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID 1.
> + flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc qfi is 0x34 /
> end actions queue index 1 / mark id 3 / end
>
> -3. verify rules can be listed and destroyed::
> +2. send matched packets, check the packet is redirected to queue 1 with
> FDIR matched ID=0x3::
>
> - testpmd> flow list 0
> + p_gtpu1 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255)/GTP_P
> DUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP()/TCP()/Raw('x'*20)
>
> - check the existing rule.
> - destroy the rule::
> + send mismatched packets, check the packet received has not FDIR::
>
> - testpmd> flow destroy 0 rule 0
> + p_gtpu2 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255)/GTP_P
> DUSession_ExtensionHeader(pdu_type=0, qos_flow=0x35)/IP()/Raw('x'*20)
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> - check there is no rule listed.
> +3. repeat step 3 of subcase 1.
>
> -Test case: MAC_IPV4_TUN_MAC_IPV4_TCP mark/rss
> -=============================================
> +4. verify matched packet received has not FDIR.
> + Then check there is no rule listed.
>
> -1. create filter rules::
> +Subcase 8: MAC_IPV4_GTPU_EH without QFI rss queues / mark
> +---------------------------------------------------------
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions mark id
> 1 / rss / end
> +1. create filter rules on port 0::
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID 1.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID 1.
> + flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc / end actions rss queues 2 3 end / mark id 1 / end
>
> -3. verify rules can be listed and destroyed::
> +2. send matched packets, check the packet is distributed to queue 2 or
> queue 3 with FDIR matched ID=0x3::
>
> - testpmd> flow list 0
> + p_gtpu1 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0)/IP()/TCP(
> )/Raw('x'*20)
>
> - check the existing rule.
> - destroy the rule::
> + send mismatched packets, check the packet received has no FDIR::
>
> - testpmd> flow destroy 0 rule 0
> + p_gtpu2 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x1234567)/GTP_PDUSession_ExtensionHeader(pdu_type=0)/IP()/TCP()
> /Raw('x'*20)
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> - check there is no rule listed.
> +3. repeat step 3 of subcase 1.
> +
> +4. verify matched packet received has not FDIR.
> + Then check there is no rule listed.
> +
> +Test case: MAC_IPV4_GTPU pattern
> +================================
>
> -Test case: MAC_IPV4_TUN_MAC_IPV4_SCTP mark/rss
> -==============================================
> +Subcase 1: MAC_IPV4_GTPU queue index
> +------------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions mark id
> 1 / rss / end
> + flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> end actions queue index 1 / mark / end
>
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID 1.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID 1.
> +2. send matched packets, check the packets are distributed to queue 1 with
> FDIR matched ID=0x0.
> + send mismatched packets, check the packets are not distributed to queue
> 1 without FDIR matched ID.
>
> 3. verify rules can be listed and destroyed::
>
> @@ -1620,1263 +1631,383 @@ Test case: MAC_IPV4_TUN_MAC_IPV4_SCTP
> mark/rss
>
> testpmd> flow destroy 0 rule 0
>
> - verify matched packet is redirected to the same queue without FDIR ID.
> - check there is no rule listed.
> +4. verify matched packets are not distributed to queue 1 without FDIR
> matched ID.
> + Then check there is no rule listed.
>
> -Test case: mark/rss wrong parameters
> -====================================
> +Subcase 2: MAC_IPV4_GTPU queue group
> +------------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end
> actions rss / end
> + flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> end actions rss queues 0 1 end / mark / end
>
> -2. The rule failed to be created, report proper error message.
> +2. send matched packets, check the packets are distributed to queue group
> with FDIR matched ID=0x0.
> + send mismatched packets, check the packets are not distributed to queue
> group without FDIR matched ID.
>
> -3. list the flow::
> -
> - testpmd> flow list 0
> +3. repeat step 3 of subcase 1.
>
> - there is no flow listed.
> +4. verify matched packets are not distributed to queue group without FDIR
> matched ID.
> + Then check there is no rule listed.
>
> -Test case: MAC_IPV4_PAY drop
> -============================
> +Subcase 3: MAC_IPV4_GTPU passthru
> +---------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions drop
> / end
> + flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> end actions passthru / mark / end
>
> -2. send matched packets, check the packets dropped.
> - send mismatched packets, check the packets are not dropped.
> +2. send matched packets, check the packets are redirected by RSS with FDIR
> matched ID=0x0.
> + send mismatched packets, check the packets are redirected by RSS
> without FDIR matched ID.
>
> -3. verify rules can be listed and destroyed::
> +3. repeat step 3 of subcase 1.
>
> - testpmd> flow list 0
> +4. verify matched packets are distributed to same queue without FDIR
> matched ID.
> + Then check there is no rule listed.
>
> - check the existing rule.
> - destroy the rule::
> +Subcase 4: MAC_IPV4_GTPU drop
> +-----------------------------
>
> - testpmd> flow destroy 0 rule 0
> +1. create filter rules::
>
> - check there is no rule listed.
> - verify matched packets are not dropped.
> + flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> end actions drop / end
>
> -Test case: MAC_IPV4_UDP drop
> -============================
> +2. send matched packets, check the packets are dropped.
> + send mismatched packets, check the packets are not dropped.
>
> -1. create filter rules::
> +3. repeat step 3 of subcase 1.
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end
> actions drop / end
> +4. verify matched packets are not dropped without FDIR matched ID.
> + Then check there is no rule listed.
>
> -2. send matched packets, check the packet dropped.
> - send mismatched packets, check the packets are not dropped.
> +Subcase 5: MAC_IPV4_GTPU mark/rss
> +---------------------------------
>
> -3. verify rules can be listed and destroyed::
> +1. create filter rules::
>
> - testpmd> flow list 0
> + flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> end actions mark / rss / end
>
> - check the existing rule.
> - destroy the rule::
> +2. send matched packets, check the packets are redirected by RSS with FDIR
> matched ID=0x0.
> + send mismatched packets, check the packets are redirected by RSS
> without FDIR matched ID.
>
> - testpmd> flow destroy 0 rule 0
> +3. repeat step 3 of subcase 1.
>
> - check there is no rule listed.
> - verify the packet hit the rule is not dropped.
> +4. verify matched packets are distributed to same queue without FDIR
> matched ID.
> + Then check there is no rule listed.
>
> -Test case: MAC_IPV4_TCP drop
> -============================
> +Subcase 6: MAC_IPV4_GTPU mark
> +-----------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / tcp src is 22 dst is 23 / end
> actions drop / end
> + flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> end actions mark / end
>
> -2. send matched packets, check the packet dropped.
> - send mismatched packets, check the packets are not dropped.
> +2. repeat the steps of passthru in subcase 3,
> + get the same result.
>
> -3. verify rules can be listed and destroyed::
>
> - testpmd> flow list 0
> +Test case: negative cases
> +=========================
>
> - check the existing rule.
> - destroy the rule::
> +Subcase 1: invalid parameters of queue index
> +--------------------------------------------
>
> - testpmd> flow destroy 0 rule 0
> +1. Invalid parameters::
>
> - check there is no rule listed.
> - verify the packet hit the rule is not dropped.
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions
> queue index 64 / end
>
> -Test case: MAC_IPV4_SCTP drop
> -=============================
> + Failed to create flow, report message::
>
> -1. create filter rules::
> + Invalid queue for FDIR.: Invalid argument
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / sctp src is 22 dst is 23 / end
> actions drop / end
> +2. check there is no rule listed.
>
> -2. send matched packets, check the packet dropped.
> - send mismatched packets, check the packets are not dropped.
> +Subcase 2: invalid parameters of rss queues
> +-------------------------------------------
>
> -3. verify rules can be listed and destroyed::
> +1. Invalid number of queues::
>
> - testpmd> flow list 0
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss
> queues 1 2 3 end / end
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss
> queues 0 end / end
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss
> queues end / end
>
> - check the existing rule.
> - destroy the rule::
> + Failed to create flow, report message::
>
> - testpmd> flow destroy 0 rule 0
> + Invalid input action: Invalid argument
>
> - check there is no rule listed.
> - verify the packet hit the rule is not dropped.
> +2. Discontinuous queues::
>
> -Test case: MAC_IPV6_PAY drop
> -============================
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss
> queues 1 2 3 5 end / end
>
> -1. create filter rules::
> + Failed to create flow, report message::
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 1 hop is 2
> tc is 1 \
> - / end actions drop / end
> + Discontinuous queue region: Invalid argument
>
> -2. send matched packets, check the packets dropped.
> - send mismatched packets, check the packets are not dropped.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - check there is no rule listed.
> - verify the packet hit the rule is not dropped.
> -
> -Test case: MAC_IPV6_UDP drop
> -============================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 /
> udp src is 22 dst is 23 / end actions drop / end
> -
> -2. send matched packets, check the packet dropped.
> - send mismatched packets, check the packets are not dropped.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - check there is no rule listed.
> - verify the packet hit the rule is not dropped.
> -
> -Test case: MAC_IPV6_TCP drop
> -============================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / tcp
> src is 22 dst is 23 / end actions drop / end
> -
> -2. send matched packets, check the packet dropped.
> - send mismatched packets, check the packets are not dropped.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - check there is no rule listed.
> - verify the packet hit the rule is not dropped.
> -
> -Test case: MAC_IPV6_SCTP drop
> -=============================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 /
> sctp src is 22 dst is 23 / end actions drop / end
> -
> -2. send matched packets, check the packet dropped.
> - send mismatched packets, check the packets are not dropped.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - check there is no rule listed.
> - verify the packet hit the rule is not dropped.
> -
> -Test case: MAC_IPV4_TUN_IPV4_PAY drop
> -=====================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / end actions drop / end
> -
> -2. send matched packets, check the packets dropped.
> - send mismatched packets, check the packets are not dropped.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - check there is no rule listed.
> - verify the packets hit the rule are not dropped.
> -
> -Test case: MAC_IPV4_TUN_IPV4_UDP drop
> -=====================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions drop /
> end
> -
> -2. send matched packets, check the packets dropped.
> - send mismatched packets, check the packets are not dropped.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - check there is no rule listed.
> - verify the packets hit the rule are not dropped.
> -
> -Test case: MAC_IPV4_TUN_IPV4_TCP drop
> -=====================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions drop /
> end
> -
> -2. send matched packets, check the packets dropped.
> - send mismatched packets, check the packets are not dropped.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - check there is no rule listed.
> - verify the packets hit the rule are not dropped.
> -
> -Test case: MAC_IPV4_TUN_IPV4_SCTP drop
> -======================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions drop /
> end
> -
> -2. send matched packets, check the packets dropped.
> - send mismatched packets, check the packets are not dropped.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - check there is no rule listed.
> - verify the packets hit the rule are not dropped.
> -
> -Test case: MAC_IPV4_TUN_MAC_IPV4_PAY drop
> -=========================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / end actions drop / end
> -
> -2. send matched packets, check the packets dropped.
> - send mismatched packets, check the packets are not dropped.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - check there is no rule listed.
> - verify the packets hit the rule are not dropped.
> -
> -Test case: MAC_IPV4_TUN_MAC_IPV4_UDP drop
> -=========================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions drop /
> end
> -
> -2. send matched packets, check the packets dropped.
> - send mismatched packets, check the packets are not dropped.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - check there is no rule listed.
> - verify the packets hit the rule are not dropped.
> -
> -Test case: MAC_IPV4_TUN_MAC_IPV4_TCP drop
> -=========================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions drop /
> end
> -
> -2. send matched packets, check the packets dropped.
> - send mismatched packets, check the packets are not dropped.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - check there is no rule listed.
> - verify the packets hit the rule are not dropped.
> -
> -Test case: MAC_IPV4_TUN_MAC_IPV4_SCTP drop
> -==========================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions drop /
> end
> -
> -2. send matched packets, check the packets dropped.
> - send mismatched packets, check the packets are not dropped.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - check there is no rule listed.
> - verify the packets hit the rule are not dropped.
> -
> -Test case: MAC_IPV4_PAY queue group
> -===================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss
> queues 0 1 end / end
> -
> -2. send matched packets, check the packets are distributed to queue 0 or 1.
> - send mismatched packets, check the packets are not distributed to queue
> 0 or 1.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify pkt1 and pkt2 are not distributed to queue 0 or 1.
> - check there is no rule listed.
> -
> -Test case: MAC_IPV4_UDP queue group
> -===================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end
> actions rss queues 1 2 3 4 end / end
> -
> -2. send matched packets, check the packets are distributed to queue group.
> - send mismatched packets, check the packets are not distributed to queue
> group.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify the packets hit rule are not distributed to queue group.
> - check there is no rule listed.
> -
> -Test case: MAC_IPV4_TCP queue group
> -===================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / tcp src is 22 dst is 23 / end
> actions rss queues 56 57 58 59 60 61 62 63 end / end
> -
> -2. send matched packets, check the packets are distributed to queue group.
> - send mismatched packets, check the packets are not distributed to queue
> group.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify the packets hit rule are not distributed to queue group.
> - check there is no rule listed.
> -
> -Test case: MAC_IPV4_SCTP queue group
> -====================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / sctp src is 22 dst is 23 tag is 1
> / end actions rss queues 0 1 2 3 end / end
> -
> -2. send matched packets, check the packets are distributed to queue group.
> - send mismatched packets, check the packets are not distributed to queue
> group.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify the packets hit rule are not distributed to queue group.
> - check there is no rule listed.
> -
> -Test case: MAC_IPV6_PAY queue group
> -===================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 1 hop is 2
> tc is 1 / end actions rss queues 1 2 end / end
> -
> -2. send matched packets, check the packets are distributed to queue group.
> - send mismatched packets, check the packets are not distributed to queue
> group.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify the packets hit rule are not distributed to queue group.
> - check there is no rule listed.
> -
> -Test case: MAC_IPV6_UDP queue group
> -===================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 /
> udp src is 22 dst is 23 / end actions rss queues 1 2 end / end
> -
> -2. send matched packets, check the packets are distributed to queue group.
> - send mismatched packets, check the packets are not distributed to queue
> group.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify the packets hit rule are not distributed to queue group.
> - check there is no rule listed.
> -
> -Test case: MAC_IPV6_TCP queue group
> -===================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / tcp
> src is 22 dst is 23 / end actions rss queues 1 2 end / end
> -
> -2. send matched packets, check the packets are distributed to queue group.
> - send mismatched packets, check the packets are not distributed to queue
> group.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify the packets hit rule are not distributed to queue group.
> - check there is no rule listed.
> -
> -Test case: MAC_IPV6_SCTP queue group
> -====================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 /
> sctp src is 22 dst is 23 / end actions rss queues 1 2 end / end
> -
> -2. send matched packets, check the packets are distributed to queue group.
> - send mismatched packets, check the packets are not distributed to queue
> group.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify the packets hit rule are not distributed to queue group.
> - check there is no rule listed.
> -
> -Test case: MAC_IPV4_TUN_IPV4_PAY queue group
> -============================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / end actions rss queues 9 10 11 12 13 14 15
> 16 17 18 19 20 21 22 23 24 end / end
> -
> -2. send matched packets, check the packets are distributed to queue group.
> - send mismatched packets, check the packets are not distributed to queue
> group.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify the packets hit rule are not distributed to queue group.
> - check there is no rule listed.
> -
> -Test case: MAC_IPV4_TUN_IPV4_UDP queue group
> -============================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions rss
> queues 38 39 40 41 end / end
> -
> -2. send matched packets, check the packets are distributed to queue group.
> - send mismatched packets, check the packets are not distributed to queue
> group.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify the packets hit rule are not distributed to queue group.
> - check there is no rule listed.
> -
> -Test case: MAC_IPV4_TUN_IPV4_TCP queue group
> -============================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions rss
> queues 1 2 end / end
> -
> -2. send matched packets, check the packets are distributed to queue group.
> - send mismatched packets, check the packets are not distributed to queue
> group.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify the packets hit rule are not distributed to queue group.
> - check there is no rule listed.
> -
> -Test case: MAC_IPV4_TUN_IPV4_SCTP queue group
> -=============================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions rss
> queues 1 2 end / end
> -
> -2. send matched packets, check the packets are distributed to queue group.
> - send mismatched packets, check the packets are not distributed to queue
> group.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify the packets hit rule are not distributed to queue group.
> - check there is no rule listed.
> -
> -Test case: MAC_IPV4_TUN_MAC_IPV4_PAY queue group
> -================================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / end actions rss queues 1 2 end / end
> -
> -2. send matched packets, check the packets are distributed to queue group.
> - send mismatched packets, check the packets are not distributed to queue
> group.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify the packets hit rule are not distributed to queue group.
> - check there is no rule listed.
> -
> -Test case: MAC_IPV4_TUN_MAC_IPV4_UDP queue group
> -================================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions rss
> queues 1 2 end / end
> -
> -2. send matched packets, check the packets are distributed to queue group.
> - send mismatched packets, check the packets are not distributed to queue
> group.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify the packets hit rule are not distributed to queue group.
> - check there is no rule listed.
> -
> -Test case: MAC_IPV4_TUN_MAC_IPV4_TCP queue group
> -================================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions rss
> queues 1 2 end / end
> -
> -2. send matched packets, check the packets are distributed to queue group.
> - send mismatched packets, check the packets are not distributed to queue
> group.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify the packets hit rule are not distributed to queue group.
> - check there is no rule listed.
> -
> -Test case: MAC_IPV4_TUN_MAC_IPV4_SCTP queue group
> -=================================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions rss
> queues 1 2 end / end
> -
> -2. send matched packets, check the packets are distributed to queue group.
> - send mismatched packets, check the packets are not distributed to queue
> group.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify the packets hit rule are not distributed to queue group.
> - check there is no rule listed.
> -
> -Test case: queue group wrong parameters
> -=======================================
> -
> -1. invalid number of queues::
> -
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss
> queues 0 1 2 end / end
> -
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss
> queues 0 end / end
> -
> -2. Discontinuous queues::
> -
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss
> queues 1 2 3 5 end / end
> -
> -3. invalid queue index::
> +3. invalid queue index::
>
> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss
> queues 63 64 end / end
>
> -4. "--rxq=32 --txq=32", set queue group 64 queues::
> -
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions rss queues 0 1 2
> 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
> 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
> 58 59 60 61 62 63 end / end
> -
> -all the above five rules are failed to created.
> -
> -5. "--rxq=64 --txq=64", set queue group 64 queues,
> - create the 64 queues flow successfully.
> - send matched packets, check the packets are distributed to queue 0-63.
> - send mismatched packets, check the packets are distributed to queue 0-63
> too.
> -
> -Test case: MAC_IPV4_GTPU_EH queue index
> -=======================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc qfi is 0x34 / end actions queue index 1 / end
> -
> -2. send matched packets, check the packets are distributed to queue 1.
> - send mismatched packets, check the packets are not distributed to queue
> 1.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify matched packets are not distributed to queue 1.
> - Then check there is no rule listed.
> -
> -Test case: MAC_IPV4_GTPU_EH passthru/mark
> -=========================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc qfi is 0x34 / end actions passthru / mark / end
> -
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify matched packets are redirected to the same queue without FDIR ID.
> - check there is no rule listed.
> -
> -Test case: MAC_IPV4_GTPU_EH mark/rss
> -====================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc qfi is 0x34 / end actions mark id 1 / rss / end
> -
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID 1.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID 1.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify matched packets are redirected to the same queue without FDIR ID.
> - check there is no rule listed.
> -
> -Test case: MAC_IPV4_GTPU_EH drop
> -================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc qfi is 0x34 / end actions drop / end
> -
> -2. send matched packets, check the packets are dropped.
> - send mismatched packets, check the packets are not dropped.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify matched packets are not dropped.
> - Then check there is no rule listed.
> -
> -Test case: MAC_IPV4_GTPU_EH queue group
> -=======================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc qfi is 0x34 / end actions rss queues 0 1 end / end
> -
> -2. send matched packets, check the packets are distributed to queue group.
> - send mismatched packets, check the packets are not distributed to queue
> group.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify matched packets are not distributed to queue group.
> - Then check there is no rule listed.
> -
> -Test case: MAC_IPV4_GTPU queue index
> -====================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> end actions queue index 1 / end
> -
> -2. send matched packets, check the packets are distributed to queue 1.
> - send mismatched packets, check the packets are not distributed to queue
> 1.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify matched packets are not distributed to queue 1.
> - Then check there is no rule listed.
> -
> -Test case: MAC_IPV4_GTPU passthru/mark
> -======================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> end actions passthru / mark / end
> -
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify matched packets are redirected to the same queue without FDIR ID.
> - check there is no rule listed.
> -
> -Test case: MAC_IPV4_GTPU mark/rss
> -=================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> end actions mark id 1 / rss / end
> -
> -2. send matched packets, check the packets are redirected by RSS with FDIR
> ID 1.
> - send mismatched packets, check the packets are redirected by RSS without
> FDIR ID 1.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify matched packets are redirected to the same queue without FDIR ID.
> - check there is no rule listed.
> -
> -Test case: MAC_IPV4_GTPU drop
> -=============================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> end actions drop / end
> + Failed to create flow, report message::
>
> -2. send matched packets, check the packets are dropped.
> - send mismatched packets, check the packets are not dropped.
> -
> -3. verify rules can be listed and destroyed::
> + Invalid queue region indexes.: Invalid argument
>
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> +4. "--rxq=7 --txq=7", set queue group 8 queues::
>
> - testpmd> flow destroy 0 rule 0
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions rss queues 0 1 2
> 3 4 5 6 7 end / end
>
> - verify matched packets are not dropped.
> - Then check there is no rule listed.
> + Failed to create flow, report message::
>
> -Test case: MAC_IPV4_GTPU queue group
> -====================================
> + Invalid queue region indexes.: Invalid argument
>
> -1. create filter rules::
> +5. check there is no rule listed.
>
> - flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> end actions rss queues 0 1 end / end
> +6. "--rxq=8 --txq=8", set queue group 8 queues,
> + create the 8 queues flow successfully.
> + send matched packets, check the packets are distributed to queue 0-7.
> + send mismatched packets, check the packets are distributed to queue 0-7
> too.
>
> -2. send matched packets, check the packets are distributed to queue group.
> - send mismatched packets, check the packets are not distributed to queue
> group.
> +Subcase 3: Invalid parameters of input set
> +------------------------------------------
>
> -3. verify rules can be listed and destroyed::
> +1. Invalid value of teid and qfi::
>
> - testpmd> flow list 0
> + flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc qfi is 0x100 / end actions queue index 1 / end
> + flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x100000000 /
> gtp_psc qfi is 0x5 / end actions queue index 2 / end
> + flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x100000000 /
> end actions queue index 1 / end
>
> - check the existing rule.
> - destroy the rule::
> + Failed to create flow, report message "Bad arguments"
>
> - testpmd> flow destroy 0 rule 0
> +2. check there is no rule listed.
>
> - verify matched packets are not distributed to queue group.
> - Then check there is no rule listed.
> +Subcase 4: Invalid parameters of mark ID
> +----------------------------------------
>
> -Test case: MAC_IPV4_GTPU_EH mark/count/query
> -============================================
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc qfi is 0x34 / end actions queue index 2 / mark id 2 / count / end
> -
> -2. send matched packets, check the packets are distributed to queue 2, the
> FDIR=0x2.
> - send mismatched packets, check the packets are not distributed to queue
> 2, no FDIR.
> - check the count number::
> -
> - flow query 0 0 count
> - count:
> - hits_set: 1
> - bytes_set: 0
> - hits: 10
> - bytes: 0
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify matched packets are not distributed to queue 2, and no FDIR.
> - Then check there is no rule listed.
> -
> -Test case: MAC_IPV4_GTPU mark/count/query
> -=========================================
> -
> -1. create filter rules on port 1::
> -
> - flow create 1 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> end actions rss queues 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
> 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
> 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 end / mark id 100 / count /
> end
> -
> -2. send matched packets, check the packets are distributed to queue in 0-63,
> the FDIR=0x64::
> -
> - p_gtpu1 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x35)/IP()/Raw('x'*20)
> - p_gtpu2 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IP()/Raw('x'*20)
> -
> - send mismatched packets, check the packets have not FDIR::
> -
> - p_gtpu2 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x1234567)/IP()/Raw('x'*20)
> -
> - check the count number::
> -
> - flow query 1 0 count
> - count:
> - hits_set: 1
> - bytes_set: 0
> - hits: 2
> - bytes: 0
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 / end actions queue index 1 / mark id 4294967296 / end
>
> -3. verify rules can be listed and destroyed::
> + Failed to create flow, report message "Bad arguments"
>
> - testpmd> flow list 1
> +2. check there is no rule listed.
>
> - check the existing rule.
> - destroy the rule::
> +Subcase 5: Duplicated rules
> +---------------------------
>
> - testpmd> flow destroy 1 rule 0
> +1. Create a FDIR rule::
>
> - verify matched packets are distributed to queue in 0-63, and no FDIR.
> - Then check there is no rule listed.
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 1 /
> end
>
> -Test case: MAC_IPV4_GTPU_EH QFI mark/count/query
> -================================================
> + the rule is created successfully.
>
> -1. create filter rules on port 1::
> +2. Create the same rule again, Failed to create flow, report message::
>
> - flow create 1 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc qfi is 0x34 /
> end actions drop / mark id 3 / count / end
> + Rule already exists!: File exists
>
> -2. send matched packets, check the packets are dropped::
> +3. check there is only one rule listed.
>
> - p_gtpu1 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255)/GTP_P
> DUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP()/TCP()/Raw('x'*20)
> +Subcase 6: conflicted rules
> +---------------------------
>
> - send mismatched packets, check the packets are not dropped, no FDIR::
> +1. Create a FDIR rule::
>
> - p_gtpu2 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255)/GTP_P
> DUSession_ExtensionHeader(pdu_type=0, qos_flow=0x35)/IP()/Raw('x'*20)
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 1 /
> end
>
> - check the count number::
> + the rule is created successfully.
>
> - flow query 1 0 count
> - count:
> - hits_set: 1
> - bytes_set: 0
> - hits: 1
> - bytes: 0
> +2. Create a rule with same input set but different action::
>
> -3. verify rules can be listed and destroyed::
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 2 /
> end
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions drop / end
>
> - testpmd> flow list 1
> + Failed to create the two flows, report message::
>
> - check the existing rule.
> - destroy the rule::
> + Rule already exists!: File exists
>
> - testpmd> flow destroy 1 rule 0
> +3. check there is only one rule listed.
>
> - verify matched packets are not dropped, and no FDIR.
> - Then check there is no rule listed.
> +Subcase 7: conflicted actions
> +-----------------------------
>
> -Test case: MAC_IPV4_GTPU_EH without QFI mark/count/query
> -========================================================
> +1. Create a rule with two conflicted actions::
>
> -1. create filter rules on port 0::
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 1 /
> rss queues 2 3 end / end
>
> - flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc / end actions queue index 15 / mark id 3 / count / end
> + Failed to create flow, report message::
>
> -2. send matched packets, check the packets are distributed to queue 15, the
> FDIR=0x3::
> + Invalid input action: Invalid argument
>
> - p_gtpu1 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0)/IP()/TCP(
> )/Raw('x'*20)
> +2. check there is no rule listed.
>
> - send mismatched packets, check the packets are not distributed to queue
> 15, no FDIR::
> +Subcase 8: void action
> +----------------------
>
> - p_gtpu2 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x1234567)/GTP_PDUSession_ExtensionHeader(pdu_type=0)/IP()/TCP()
> /Raw('x'*20)
> +1. Create a rule with void action::
>
> - check the count number::
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions end
>
> - flow query 0 0 count
> - count:
> - hits_set: 1
> - bytes_set: 0
> - hits: 1
> - bytes: 0
> + Failed to create flow, report message::
>
> -3. verify rules can be listed and destroyed::
> + Invalid input action: Invalid argument
>
> - testpmd> flow list 0
> +2. check there is no rule listed.
>
> - check the existing rule.
> - destroy the rule::
> +Subcase 9: unsupported action
> +-----------------------------
>
> - testpmd> flow destroy 0 rule 0
> +1. Create a rule with count action only::
>
> - verify matched packets are not distributed to queue 15, and no FDIR.
> - Then check there is no rule listed.
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions count / end
>
> -Test case: MAC_IPV4_GTPU_EH multirules
> -======================================
> + Failed to create flow, report message::
>
> -1. create filter rules on port 0::
> + Invalid input action: Invalid argument
>
> - flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc qfi is 0x34 / end actions queue index 1 / end
> - flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc qfi is 0x35 / end actions queue index 2 / end
> - flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x1234567 /
> gtp_psc qfi is 0x35 / end actions queue index 3 / end
> +2. check there is no rule listed.
>
> - the three rules are created successfully.
> - then create the following rules::
> +Subcase 10: delete a non-existent rule
> +--------------------------------------
>
> - flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x1234567 /
> gtp_psc qfi is 0x35 / end actions queue index 3 / end
> - flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x1234567 /
> gtp_psc qfi is 0x35 / end actions queue index 4 / end
> - flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x1234567 /
> gtp_psc qfi is 0x75 / end actions queue index 4 / end
> +1. show the rule list of port 0::
>
> - the three rules are failed to created.
> - then create the following rule::
> + flow list 0
>
> - flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x1234567 /
> gtp_psc qfi is 0x34 / end actions queue index 3 / end
> + There is no rule listed.
>
> - the rule is created successfully.
> +2. destroy rule 0 of port 0::
>
> -2. send matched packets::
> + flow destroy 0 rule 0
>
> - p_gtpu1 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP()/Raw('x'*20)
> - p_gtpu2 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x1234567)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP()/Raw('x'*20)
> - p_gtpu3 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x35)/IP()/Raw('x'*20)
> - p_gtpu4 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x1234567)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x35)/IP()/Raw('x'*20)
> + There is no error message reported.
>
> - check the packets, p_gtpu1 to queue 1, p_gtpu2 to queue 3, p_gtpu3 to
> queue 2, p_gtpu4 to queue 3.
> - send mismatched packets, check the packets are not distributed to queue
> 1-3::
> +3. check there is no rule listed.
>
> - p_gtpu5 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x1234567)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x36)/IP()/Raw('x'*20)
> +4. flush rules of port 0::
>
> -3. verify rules can be listed and destroyed::
> + flow flush 0
>
> - testpmd> flow list 0
> + There is no error message reported.
>
> - check the existing rule.
> - destroy the rule::
> +5. check there is no rule listed.
>
> - testpmd> flow flush 0
> +Subcase 11: unsupported input set field
> +---------------------------------------
>
> - verify matched packets are not distributed to same queue.
> - Then check there is no rule listed.
> +1. Create a IPV4_PAY rule with TC input set::
>
> -Test case: MAC_IPV4_GTPU_EH two ports
> -=====================================
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 tc is 2 / end actions queue index 1 / end
>
> -1. create filter rules on two ports::
> + Failed to create flow, report message::
>
> - flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc qfi is 0x34 / end actions queue index 1 / end
> - flow create 1 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc qfi is 0x34 / end actions queue index 1 / end
> + Bad arguments
>
> - send matched packets::
> +2. check there is no rule listed.
>
> - p_gtpu1 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP()/Raw('x'*20)
> +Subcase 12: unsupported pattern
> +-------------------------------
>
> - send the packet to two ports, both are distributed to queue 1.
> +1. Create a GTPU rule with OS default package::
>
> -2. create filter rules on two ports::
> + flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc qfi is 0x34 / end actions drop / end
>
> - flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc qfi is 0x35 / end actions queue index 2 / end
> - flow create 1 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc qfi is 0x35 / end actions queue index 3 / end
> + Failed to create flow, report error message.
>
> - send matched packets::
> +2. check there is no rule listed.
>
> - p_gtpu2 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x35)/IP()/Raw('x'*20)
> +Subcase 13: conflict patterns
> +-----------------------------
>
> - send the packet to two ports, both are distributed to expected queue.
> +Note: MAC_IPV4_UDP packet can match MAC_IPV4_PAY rule if ip address
> can match.
> +so if there is a MAC_IPV4_PAY rule existing,
> +MAC_IPV4_UDP rule will be set to switch rule.
> +set "--log-level=ice,7", then check::
>
> -3. flush the rules::
> + ice_flow_create(): Succeeded to create (1) flow -> FDIR
> + ice_flow_create(): Succeeded to create (2) flow -> switch
>
> - flow flush 0
> - flow flush 1
> +1. set MAC_IPV4_PAY rule firstly::
>
> -4. create filter rules on two ports::
> + flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / end actions
> queue index 1 / end
>
> - flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc qfi is 0x34 / end actions queue index 1 / end
> - flow create 1 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> end actions queue index 2 / end
> + the first flow rule is set to fdir filter, send matched packet::
>
> - send matched packets::
> +
> sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0
> .21")/Raw('x' * 80)],iface="enp175s0f0", count=10)
> +
> sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0
> .21") /UDP(sport=22, dport=23)/ Raw('x' * 80)],iface="enp175s0f0", count=10)
>
> - p_gtpu2 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x35)/IP()/Raw('x'*20)
> - p_gtpu3 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:00:00:00:01:03")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP()/Raw('x'*20)
> + the two packets are both redirected to queue 1.
> + then create MAC_IPV4_UDP flow, it is set to switch filter::
>
> - send the packets to two ports,
> - p_gtpu2 is not distributed to queue 1 of port 0, it is distributed to queue 2
> of port 1.
> - p_gtpu3 is distributed to queue 2 of port 1, it is distributed to queue 1 of
> port 0.
> + flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / udp src is 22
> dst is 23 / end actions queue index 2 / end
>
> -5. verify rules can be listed and destroyed::
> + send same packets, MAC_IPV4_PAY packet to queue 1, MAC_IPV4_UDP
> packet to queue 2.
>
> - testpmd> flow list 0
> - testpmd> flow list 1
> +2. flush the rules.
>
> - check the existing rules.
> - destroy the rule::
> +3. set MAC_IPV4_UDP rule firstly::
>
> - testpmd> flow destroy 0 rule 0
> - testpmd> flow destroy 1 rule 0
> + flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / udp src is 22
> dst is 23 / end actions queue index 2 / end
>
> - verify matched packets are not distributed to expected queue.
> - Then check there is no rule listed.
> + the first rule is set to fdir filter, send matched packet::
>
> -Test case: MAC_IPV4_GTPU_EH wrong parameters
> -============================================
> +
> sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0
> .21") /UDP(sport=22, dport=23)/ Raw('x' * 80)],iface="enp175s0f0", count=10)
>
> -1. create filter rules on port 0::
> + the packet is redirected to queue 2.
> + then create MAC_IPV4_PAY rule, it is set to switch filter::
>
> - flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc qfi is 0x100 / end actions queue index 1 / end
> - flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x100000000 /
> gtp_psc qfi is 0x5 / end actions queue index 2 / end
> + flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / end actions
> queue index 1 / end
>
> - the two flows can not be created successfully, report proper error
> message.
> + send same packet, it is redirected to queue 1, because the packet match
> switch filter first.
>
> -2. list the flow::
>
> - testpmd> flow list 0
> +Test case: count/query
> +======================
>
> - there is no flow listed.
> +Subcase 1: count for 1 rule of 1 port
> +-------------------------------------
>
> -Test case: MAC_IPV4_GTPU wrong parameters
> -=========================================
> +1. create filter rules::
>
> -1. create filter rules on port 0::
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions
> queue index 1 / count / end
>
> - flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x100000000 /
> end actions queue index 1 / end
> +2. send matched packets, check the packets are redirected to queue 1.
> + send mismatched packets, check the packets are redirected by RSS.
> + check the count number::
>
> - the flow can not be created successfully.
> + flow query 0 0 count
> + count:
> + hits_set: 1
> + bytes_set: 0
> + hits: 2
> + bytes: 0
>
> -2. list the flow::
> +3. verify rules can be listed and destroyed::
>
> testpmd> flow list 0
>
> - there is no flow listed.
> + check the existing rule.
> + destroy the rule::
> +
> + testpmd> flow destroy 0 rule 0
> +
> + verify matched packets are redirected by RSS.
> + check there is no rule listed.
> +
> +4. check the count number::
>
> -Test case: count query identifier share
> -=======================================
> + testpmd> flow query 0 0 count
> + Flow rule #0 not found
> +
> +Subcase 2: count query identifier share
> +---------------------------------------
>
> 1. create filter rules::
>
> flow create 0 ingress pattern eth / ipv4 src is 192.168.0.1 / end actions
> queue index 1 / count identifier 0x1234 shared on / end
> - flow create 0 ingress pattern eth / ipv4 src is 192.168.0.2 / end actions
> queue index 2 / count identifier 0x1234 shared on / end
> - flow create 0 ingress pattern eth / ipv4 src is 192.168.0.3 / end actions
> queue index 3 / count identifier 0x1234 shared off / end
> - flow create 0 ingress pattern eth / ipv4 src is 192.168.0.4 / end actions
> queue index 4 / count identifier 0x1234 / end
> + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.2 / end actions rss
> queues 2 3 end / count identifier 0x1234 shared on / end
> + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.3 / end actions
> passthru / mark / count identifier 0x1234 shared off / end
> + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.4 / end actions
> mark id 1 / rss / count identifier 0x1234 / end
> flow create 0 ingress pattern eth / ipv4 src is 192.168.0.5 / end actions
> queue index 5 / count shared on / end
> flow create 0 ingress pattern eth / ipv4 src is 192.168.0.6 / end actions
> drop / count shared on / end
> flow create 0 ingress pattern eth / ipv4 src is 192.168.0.7 / end actions
> drop / count identifier 0x1235 shared on / end
> + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.8 / end actions rss
> / count / end
>
> 2. send matched packets::
>
> @@ -2887,10 +2018,15 @@ Test case: count query identifier share
>
> sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.5",dst="192.168.0.
> 21") / Raw('x' * 80)],iface="enp175s0f0", count=10)
>
> sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.6",dst="192.168.0.
> 21") / Raw('x' * 80)],iface="enp175s0f0", count=10)
>
> sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.7",dst="192.168.0.
> 21") / Raw('x' * 80)],iface="enp175s0f0", count=10)
> +
> sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.8",dst="192.168.0.
> 21") / Raw('x' * 80)],iface="enp175s0f0", count=10)
>
> check the packets,
> - packet 1 to queue 1, packet 2 to queue 2, packet 3 to queue 3, packet 4 to
> queue 4, packet 5 to queue 5,
> + packet 1 to queue 1, packet 2 to queue 2 or queue 3,
> + packet 3 is distributed by RSS with FDIR matched ID=0x0,
> + packet 4 is distributed by RSS with FDIR matched ID=0x1,
> + packet 5 to queue 5,
> packet 6 dropped, packet 7 dropped.
> + packet 8 is distributed by RSS.
>
> 3. query count::
>
> @@ -2936,6 +2072,12 @@ Test case: count query identifier share
> bytes_set: 0
> hits: 10
> bytes: 0
> + testpmd> flow query 0 7 count
> + COUNT:
> + hits_set: 1
> + bytes_set: 0
> + hits: 10
> + bytes: 0
>
> 4. verify rules can be listed and destroyed::
>
> @@ -2946,21 +2088,23 @@ Test case: count query identifier share
>
> testpmd> flow flush 0
>
> - verify matched packet are not distributed to same queue.
> - check there is no rule listed.
> +5. check there is no rule listed,
> + send matched packets, query count, flow rule not found.
>
> -Test case: multi patterns count query
> -=====================================
> +Subcase 3: multi patterns mark count query
> +------------------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / tcp src is 22
> dst is 23 / end actions queue index 1 / count / end
> - flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / udp src is 22
> dst is 23 / end actions drop / count / end
> - flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / sctp src is 22
> dst is 23 / end actions rss queues 62 63 end / count / end
> - flow create 0 ingress pattern eth / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 / end actions
> queue index 1 / count / end
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue
> index 3 / count / end
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 / tcp dst is 23 / end actions queue index 4 / count / end
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions queue
> index 5 / count / end
> + flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / tcp src is 22
> dst is 23 / end actions queue index 1 / mark id 0 / count / end
> + flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / udp src is 22
> dst is 23 / end actions drop / mark id 1 / count / end
> + flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / sctp src is 22
> dst is 23 / end actions rss queues 62 63 end / mark id 2 / count / end
> + flow create 0 ingress pattern eth / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 / end actions
> queue index 1 / mark id 3 / count / end
> + flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue
> index 3 / mark id 4 / count / end
> + flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 / tcp dst is 23 / end actions queue index 4 / count / mark id 5 /
> end
> + flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions queue
> index 5 / mark id 6 / count / end
> + flow create 1 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> end actions rss queues 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
> 22 23 24 25 26 27 28 29 30 31 \
> + 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
> 57 58 59 60 61 62 63 end / mark id 100 / count / end
>
> 2. send matched packets::
>
> @@ -2971,10 +2115,12 @@ Test case: multi patterns count query
>
> sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=4790)/VXLAN(flags=0
> xc)/IP(dst="192.168.0.21",
> src="192.168.0.20")/UDP(sport=22,dport=23)/("X"*480)], iface="enp175s0f0",
> count=10)
>
> sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP()/VXLAN(vni=2)/Ether(dst="
> 00:11:22:33:44:55")/IP(src="192.168.0.20")/TCP(dport=23)/("X"*480)],
> iface="enp175s0f0", count=10)
>
> sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP()/VXLAN(vni=2)/Ether()/IP(s
> rc='192.168.0.20', dst='192.168.0.21')/SCTP(sport=22,dport=23)/("X"*480)],
> iface="enp175s0f0", count=10)
> + sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255,
> teid=0x12345678)/IP()/Raw('x'*20)], iface="enp175s0f0", count=10)
>
> check the packets,
> packet 1 to queue 1, packet 2 dropped, packet 3 to queue 62-63, packet 4
> to queue 1, packet 5 to queue 3,
> - packet 6 to queue 4, packet 7 to queue 5.
> + packet 6 to queue 4, packet 7 to queue 5, packet 8 is distributed by RSS.
> + all the packets are received with FDIR matched ID.
>
> 3. query count::
>
> @@ -3020,630 +2166,423 @@ Test case: multi patterns count query
> bytes_set: 0
> hits: 10
> bytes: 0
> + testpmd> flow query 0 7 count
> + COUNT:
> + hits_set: 1
> + bytes_set: 0
> + hits: 10
> + bytes: 0
>
> -4. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - There are 7 rules listed.
> - destroy the rule 0::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify the packet matching rule 0 is not distributed to queue 1.
> - check rule 1-6 listed.
> -
> -5. destroy the rule 6::
> -
> - testpmd> flow destroy 0 rule 6
> -
> - verify the packet matching rule 6 is not distributed to queue 5.
> - check rule 1-5 listed.
> -
> -6. destroy the rule 3::
> -
> - testpmd> flow destroy 0 rule 3
> -
> - verify the packet matching rule 3 is not distributed to queue 1.
> - check rule 1/2/4/5 listed.
> -
> -7. flush the all the rules::
> -
> - testpmd> flow flush 0
> -
> - verify the matched packets are not distributed to the same queue.
> - check no rule listed.
> -
> -Test case: two ports multi patterns count query
> -===============================================
> -
> -1. create filter rules::
> -
> - flow create 1 ingress pattern eth / ipv4 dst is 192.168.0.21 proto is 255 tos
> is 4 / end actions queue index 1 / count / end
> - flow create 1 ingress pattern eth / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 /
> sctp src is 22 dst is 23 / end actions rss queues 6 7 end / count / end
> - flow create 1 ingress pattern eth / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 /
> udp src is 22 dst is 23 / end actions rss queues 6 7 end / count / end
> - flow create 1 ingress pattern eth / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / tcp
> src is 22 dst is 23 / end actions queue index 2 / count / end
> - flow create 1 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / end actions drop / count / end
> - flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 tos is 4 / tcp src
> is 22 dst is 23 / end actions drop / count / end
> - flow create 0 ingress pattern eth / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 / end actions
> queue index 1 / count / end
> -
> -2. send matched packets::
> -
> -
> sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0
> .21", proto=255, ttl=2, tos=4) / Raw('x' * 80)],iface="enp175s0f1", count=10)
> -
> sendp([Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:847
> 5:1111:3900:2020", src="2001::2", tc=1,
> hlim=2)/SCTP(sport=22,dport=23)/("X"*480)], iface="enp175s0f1", count=10)
> -
> sendp([Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:847
> 5:1111:3900:2020", src="2001::2", tc=1,
> hlim=2)/UDP(sport=22,dport=23)/("X"*480)], iface="enp175s0f1", count=10)
> -
> sendp([Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:847
> 5:1111:3900:2020", src="2001::2", tc=1,
> hlim=2)/TCP(sport=22,dport=23)/("X"*480)], iface="enp175s0f1", count=10)
> -
> sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP()/VXLAN()/Ether()/IP(src='1
> 92.168.0.20', dst='192.168.0.21')/("X"*480)], iface="enp175s0f1", count=10)
> - sendp([Ether(dst="00:11:22:33:44:55")/IP(dst="192.168.0.21", ttl=2,
> tos=4)/TCP(sport=22,dport=23)/Raw(load="X"*480)], iface="enp175s0f0",
> count=10)
> -
> sendp([Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:847
> 5:1111:3900:2020", src="2001::2", nh=0, tc=1, hlim=2)/("X"*480)],
> iface="enp175s0f0", count=10)
> - sendp([Ether(dst="00:11:22:33:44:55")/IP(dst="192.168.0.21", ttl=2,
> tos=4)/TCP(sport=22,dport=23)/Raw(load="X"*480)], iface="enp175s0f1",
> count=10)
> -
> - check the packets,
> - packet 1 to queue 1 of port 1, packet 2 to queue 6-7 of port 1, packet 3 to
> queue 6-7 of port 1,
> - packet 4 to queue 2 of port 1, packet 5 dropped of port 1,
> - packet 6 to dropped of port 0, packet 7 to queue 1 of port 0.
> - packet 8 received by port 1.
> -
> -3. query count::
> -
> - testpmd> flow query 1 0 count
> - COUNT:
> - hits_set: 1
> - bytes_set: 0
> - hits: 10
> - bytes: 0
> - testpmd> flow query 1 1 count
> - COUNT:
> - hits_set: 1
> - bytes_set: 0
> - hits: 10
> - bytes: 0
> - testpmd> flow query 1 2 count
> - COUNT:
> - hits_set: 1
> - bytes_set: 0
> - hits: 10
> - testpmd> flow query 1 3 count
> - COUNT:
> - hits_set: 1
> - bytes_set: 0
> - hits: 10
> - bytes: 0
> - testpmd> flow query 1 4 count
> - COUNT:
> - hits_set: 1
> - bytes_set: 0
> - hits: 10
> - bytes: 0
> - testpmd> flow query 0 0 count
> - COUNT:
> - hits_set: 1
> - bytes_set: 0
> - hits: 10
> - testpmd> flow query 0 1 count
> - COUNT:
> - hits_set: 1
> - bytes_set: 0
> - hits: 10
> -
> -4. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> - testpmd> flow list 1
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow flush 0
> - testpmd> flow flush 1
> -
> - verify matched packet are not distributed to same queue.
> - check there is no rule listed::
> -
> - testpmd> flow list 0
> - testpmd> flow list 1
> -
> -Test case: max count
> -====================
> -
> -1. create 257 flows with count::
> -
> - flow create 0 ingress pattern eth / ipv4 src is 192.168.0.1 / end actions
> drop / count / end
> - flow create 0 ingress pattern eth / ipv4 src is 192.168.0.2 / end actions
> drop / count / end
> - ……
> - flow create 0 ingress pattern eth / ipv4 src is 192.168.1.1 / end actions
> drop / count / end
> - flow create 0 ingress pattern eth / ipv4 src is 192.168.1.2 / end actions
> drop / count / end
> -
> - the last one failed to create.
> -
> -2. send matched packets::
> -
> -
> sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.1.1",dst="192.168.0.
> 21") / Raw('x' * 80)],iface="enp175s0f0", count=10)
> -
> - check the packet dropped.
> -
> -3. query count::
> -
> - testpmd> flow query 0 255 count
> - COUNT:
> - hits_set: 1
> - bytes_set: 0
> - hits: 10
> - bytes: 0
> -
> -4. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow flush 0
> -
> - verify matched packet are not dropped.
> - check there is no rule listed.
> -
> -Test case: MAC_IPV4_PAY queue index mark
> -========================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions
> queue index 1 / mark id 0 / end
> -
> -2. send 1 matched packet, check the packets are distributed to queue 1 with
> "FDIR matched ID=0x0" printed.
> - send 1 mismatched packet, check the packets are not distributed to queue
> 1 without "FDIR matched" printed.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify matched packets are distributed to different queue without "FDIR
> matched" printed.
> - Then check there is no rule listed.
> -
> -Test case: MAC_IPV4_UDP queue index mark
> -========================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end
> actions queue index 0 / mark id 1 / end
> -
> -2. send 1 matched packet, check the packets are distributed to queue 0 with
> "FDIR matched ID=0x1" printed.
> - send 1 mismatched packet, check the packets are not distributed to queue
> 0 without "FDIR matched" printed.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify matched packets are distributed to different queue without "FDIR
> matched" printed.
> - Then check there is no rule listed.
> -
> -Test case: MAC_IPV4_TCP queue index mark
> -========================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / tcp src is 22 dst is 23 / end
> actions queue index 1 / mark id 4294967294 / end
> -
> -2. send 1 matched packet, check the packets are distributed to queue 1 with
> "FDIR matched ID=0xfffffffe" printed.
> - send 1 mismatched packet, check the packets are not distributed to queue
> 1 without "FDIR matched" printed.
> -
> -3. verify rules can be listed and destroyed::
> +4. verify rules can be listed and destroyed::
>
> testpmd> flow list 0
>
> check the existing rule.
> destroy the rule::
>
> - testpmd> flow destroy 0 rule 0
> -
> - verify matched packets are distributed to different queue without "FDIR
> matched" printed.
> - Then check there is no rule listed.
> -
> -Test case: MAC_IPV4_SCTP drop mark
> -==================================
> -
> -1. create filter rules::
> + testpmd> flow flush 0
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / sctp src is 22 dst is 23 tag is 1
> / end actions drop / mark id 1 / end
> +5. check there is no rule listed,
> + send matched packets, query count, flow rule not found.
>
> -2. send 1 matched packet, check the packets are dropped.
> - send 1 mismatched packet, check the packets are not dropped without
> "FDIR matched" printed.
> +Subcase 4: max count number
> +---------------------------
>
> -3. verify rules can be listed and destroyed::
> +1. create 257 flows with count::
>
> - testpmd> flow list 0
> + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.1 / end actions
> drop / count / end
> + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.2 / end actions
> drop / count / end
> + ……
> + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.255 / end actions
> drop / count / end
> + flow create 0 ingress pattern eth / ipv4 src is 192.168.1.1 / end actions
> drop / count / end
> + flow create 0 ingress pattern eth / ipv4 src is 192.168.1.2 / end actions
> drop / count / end
>
> - check the existing rule.
> - destroy the rule::
> + the last one failed to create, report the error message::
>
> - testpmd> flow destroy 0 rule 0
> + No free counter found
>
> - verify matched packets are distributed to different queue without "FDIR
> matched" printed.
> - Then check there is no rule listed.
> +2. send matched packets::
>
> -Test case: MAC_IPV6_PAY queue index mark
> -========================================
> +
> sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.1.1",dst="192.168.0.
> 21") / Raw('x' * 80)],iface="enp175s0f0", count=10)
>
> -1. create filter rules::
> + check the packet dropped.
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 1 hop is 2
> tc is 1 / end actions queue index 1 / mark id 1 / end
> +3. query count::
>
> -2. send 1 matched packet, check the packets are distributed to queue 1 with
> "FDIR matched ID=0x1" printed.
> - send 1 mismatched packet, check the packets are not distributed to queue
> 1 without "FDIR matched" printed.
> + testpmd> flow query 0 255 count
> + COUNT:
> + hits_set: 1
> + bytes_set: 0
> + hits: 10
> + bytes: 0
>
> -3. verify rules can be listed and destroyed::
> +4. verify rules can be listed and destroyed::
>
> testpmd> flow list 0
>
> - check the existing rule.
> + check that 256 rules listed.
> destroy the rule::
>
> - testpmd> flow destroy 0 rule 0
> -
> - verify matched packets are distributed to different queue without "FDIR
> matched" printed.
> - Then check there is no rule listed.
> -
> -Test case: MAC_IPV6_UDP queue index mark
> -========================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 /
> udp src is 22 dst is 23 / end actions queue index 1 / mark id 1 / end
> -
> -2. send 1 matched packet, check the packets are distributed to queue 1 with
> "FDIR matched ID=0x1" printed.
> - send 1 mismatched packet, check the packets are not distributed to queue
> 1 without "FDIR matched" printed.
> -
> -3. verify rules can be listed and destroyed::
> + testpmd> flow flush 0
>
> - testpmd> flow list 0
> + verify matched packet are not dropped.
> + check there is no rule listed.
>
> - check the existing rule.
> - destroy the rule::
> +Test case: two ports
> +====================
>
> - testpmd> flow destroy 0 rule 0
> +Subcase 1: same rule on two ports
> +---------------------------------
>
> - verify matched packets are distributed to different queue without "FDIR
> matched" printed.
> - Then check there is no rule listed.
> +1. create filter rules on two ports::
>
> -Test case: MAC_IPV6_TCP queue index mark
> -========================================
> + flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc qfi is 0x34 / end actions queue index 1 / mark / end
> + flow create 1 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 /
> gtp_psc qfi is 0x34 / end actions queue index 1 / mark / end
>
> -1. create filter rules::
> + send matched packets::
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / tcp
> src is 22 dst is 23 / end actions queue index 1 / mark id 1 / end
> + p_gtpu1 = Ether(src="a4:bf:01:51:27:ca",
> dst="00:11:22:33:44:55")/IP(src="192.168.0.20",
> dst="192.168.0.21")/UDP(dport=2152) \
> + /GTP_U_Header(gtp_type=255,
> teid=0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP()/Raw('x'*20)
>
> -2. send 1 matched packet, check the packets are distributed to queue 1 with
> "FDIR matched ID=0x1" printed.
> - send 1 mismatched packet, check the packets are not distributed to queue
> 1 without "FDIR matched" printed.
> + send the packet to two ports, both are distributed to queue 1 with FDIR
> matched ID=0x0.
>
> -3. verify rules can be listed and destroyed::
> +2. list the rules on two ports::
>
> testpmd> flow list 0
> + ID Group Prio Attr Rule
> + 0 0 0 i-- ETH IPV4 UDP GTPU GTP_PSC => QUEUE MARK
> + testpmd> flow list 1
> + ID Group Prio Attr Rule
> + 0 0 0 i-- ETH IPV4 UDP GTPU GTP_PSC => QUEUE MARK
>
> - check the existing rule.
> - destroy the rule::
> +3. destroy rule 0 on port 0::
>
> testpmd> flow destroy 0 rule 0
> + Flow rule #0 destroyed
>
> - verify matched packets are distributed to different queue without "FDIR
> matched" printed.
> - Then check there is no rule listed.
> -
> -Test case: MAC_IPV6_SCTP queue index mark
> -=========================================
> -
> -1. create filter rules::
> -
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 /
> sctp src is 22 dst is 23 / end actions queue index 1 / mark id 1 / end
> -
> -2. send 1 matched packet, check the packets are distributed to queue 1 with
> "FDIR matched ID=0x1" printed.
> - send 1 mismatched packet, check the packets are not distributed to queue
> 1 without "FDIR matched" printed.
> -
> -3. verify rules can be listed and destroyed::
> + list the rules on two ports::
>
> testpmd> flow list 0
> + testpmd> flow list 1
> + ID Group Prio Attr Rule
> + 0 0 0 i-- ETH IPV4 UDP GTPU GTP_PSC => QUEUE MARK
>
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify matched packets are distributed to different queue without "FDIR
> matched" printed.
> - Then check there is no rule listed.
> -
> -Test case: MAC_IPV4_TUN_IPV4_PAY queue index mark
> -=================================================
> -
> -1. create filter rules::
> +4. send the matched packet to port 0, it is redirected by RSS without FDIR
> matched ID.
> + send the matched packet to port 1, it is still redirected to queue 1 with
> FDIR matched ID=0x0.
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / end actions queue index 1 / mark id 1 /
> end
> +5. destroy rule 0 on port 1::
>
> -2. send 1 matched packet, check the packets are distributed to queue 1 with
> "FDIR matched ID=0x1" printed.
> - send 1 mismatched packet, check the packets are not distributed to queue
> 1 without "FDIR matched" printed.
> + testpmd> flow destroy 1 rule 0
> + Flow rule #0 destroyed
>
> -3. verify rules can be listed and destroyed::
> + list the rules on two ports::
>
> testpmd> flow list 0
> + testpmd> flow list 1
>
> - check the existing rule.
> - destroy the rule::
> + there is no rule listed on both ports.
> + send the matched packet to port 0/1, it is redirected by RSS without FDIR
> matched ID.
>
> - testpmd> flow destroy 0 rule 0
> +Subcase 2: same input set, different actions on two ports
> +---------------------------------------------------------
>
> - verify matched packets are distributed to different queue without "FDIR
> matched" printed.
> - Then check there is no rule listed.
> +1. create filter rules on two ports::
>
> -Test case: MAC_IPV4_TUN_IPV4_UDP queue group mark
> -=================================================
> + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is
> 192.168.0.21 / tcp src is 22 dst is 23 / end actions queue index 1 / mark id 1 /
> end
> + flow create 1 ingress pattern eth / ipv4 src is 192.168.0.20 dst is
> 192.168.0.21 / tcp src is 22 dst is 23 / end actions rss queues 2 3 end / mark
> id 1 / end
>
> -1. create filter rules::
> + send matched packets to two ports::
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions rss
> queues 1 2 end / mark id 1 / end
> + pkt =
> Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/T
> CP(sport=22,dport=23)/Raw('x' * 80)
>
> -2. send 1 matched packet, check the packets are distributed to queue 1-2
> with "FDIR matched ID=0x1" printed.
> - send 1 mismatched packet, check the packets are not distributed to queue
> 1-2 without "FDIR matched" printed.
> + the packet sent to port 0 is redirected to queue 1 with FDIR matched
> ID=0x1,
> + the packet sent to port 1 is redirected to queue 2 or queue 3 with FDIR
> matched ID=0x1.
>
> -3. verify rules can be listed and destroyed::
> +2. destroy rule 0 on both ports::
>
> - testpmd> flow list 0
> + testpmd> flow flush 0
> + testpmd> flow flush 1
>
> - check the existing rule.
> - destroy the rule::
> + list the rules on two ports::
>
> - testpmd> flow destroy 0 rule 0
> + testpmd> flow list 0
> + testpmd> flow list 1
>
> - verify matched packets are distributed to different queue without "FDIR
> matched" printed.
> - Then check there is no rule listed.
> + there is no rule listed on both ports.
> + send the matched packet to port 0/1, it is redirected by RSS without FDIR
> matched ID.
>
> -Test case: MAC_IPV4_TUN_IPV4_TCP drop mark
> -==========================================
> +Subcase 3: two ports multi patterns count query
> +-----------------------------------------------
>
> 1. create filter rules::
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions drop /
> mark id 1 / end
> -
> -2. send 1 matched packet, check the packets are dropped.
> - send 1 mismatched packet, check the packets are not dropped without
> "FDIR matched" printed.
> -
> -3. verify rules can be listed and destroyed::
> -
> - testpmd> flow list 0
> -
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> + flow create 1 ingress pattern eth / ipv4 dst is 192.168.0.21 proto is 255
> tos is 4 / end actions queue index 1 / mark id 1 / count identifier 0x1234
> shared on / end
> + flow create 1 ingress pattern eth / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 /
> sctp src is 22 dst is 23 / end actions rss queues 6 7 end / mark id 2 / count
> identifier 0x1234 shared on / end
> + flow create 1 ingress pattern eth / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 /
> udp src is 22 dst is 23 / end actions rss queues 6 7 end / mark id 1 / count /
> end
> + flow create 1 ingress pattern eth / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1 / tcp
> src is 22 dst is 23 / end actions queue index 2 / mark / count / end
> + flow create 1 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / end actions drop / count / end
> + flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 tos is 4 / tcp src
> is 22 dst is 23 / end actions drop / count / end
> + flow create 0 ingress pattern eth / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 / end actions
> queue index 1 / mark id 1 / count identifier 0x1234 shared on / end
>
> - verify matched packets are dropped without "FDIR matched" printed.
> - Then check there is no rule listed.
> +2. send matched packets::
>
> -Test case: MAC_IPV4_TUN_IPV4_SCTP queue index mark
> -==================================================
> +
> sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0
> .21", proto=255, ttl=2, tos=4) / Raw('x' * 80)],iface="enp175s0f1", count=10)
> +
> sendp([Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:847
> 5:1111:3900:2020", src="2001::2", tc=1,
> hlim=2)/SCTP(sport=22,dport=23)/("X"*480)], iface="enp175s0f1", count=10)
> +
> sendp([Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:847
> 5:1111:3900:2020", src="2001::2", tc=1,
> hlim=2)/UDP(sport=22,dport=23)/("X"*480)], iface="enp175s0f1", count=10)
> +
> sendp([Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:847
> 5:1111:3900:2020", src="2001::2", tc=1,
> hlim=2)/TCP(sport=22,dport=23)/("X"*480)], iface="enp175s0f1", count=10)
> +
> sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP()/VXLAN()/Ether()/IP(src='1
> 92.168.0.20', dst='192.168.0.21')/("X"*480)], iface="enp175s0f1", count=10)
> + sendp([Ether(dst="00:11:22:33:44:55")/IP(dst="192.168.0.21", ttl=2,
> tos=4)/TCP(sport=22,dport=23)/Raw(load="X"*480)], iface="enp175s0f0",
> count=10)
> +
> sendp([Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:847
> 5:1111:3900:2020", src="2001::2", nh=0, tc=1, hlim=2)/("X"*480)],
> iface="enp175s0f0", count=10)
> + sendp([Ether(dst="00:11:22:33:44:55")/IP(dst="192.168.0.21", ttl=2,
> tos=4)/TCP(sport=22,dport=23)/Raw(load="X"*480)], iface="enp175s0f1",
> count=10)
>
> -1. create filter rules::
> + check the packets,
> + packet 1 to queue 1 of port 1, packet 2 to queue 6-7 of port 1, packet 3 to
> queue 6-7 of port 1,
> + packet 4 to queue 2 of port 1, packet 5 dropped of port 1,
> + packet 6 to dropped of port 0, packet 7 to queue 1 of port 0.
> + packet 8 received by port 1.
> + all the received packets have specified FDIR matched ID.
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions queue
> index 1 / mark id 1 / end
> +3. query count::
>
> -2. send 1 matched packet, check the packets are distributed to queue 1 with
> "FDIR matched ID=0x1" printed.
> - send 1 mismatched packet, check the packets are not distributed to queue
> 1 without "FDIR matched" printed.
> + testpmd> flow query 1 0 count
> + COUNT:
> + hits_set: 1
> + bytes_set: 0
> + hits: 20
> + bytes: 0
> + testpmd> flow query 1 1 count
> + COUNT:
> + hits_set: 1
> + bytes_set: 0
> + hits: 20
> + bytes: 0
> + testpmd> flow query 1 2 count
> + COUNT:
> + hits_set: 1
> + bytes_set: 0
> + hits: 10
> + testpmd> flow query 1 3 count
> + COUNT:
> + hits_set: 1
> + bytes_set: 0
> + hits: 10
> + bytes: 0
> + testpmd> flow query 1 4 count
> + COUNT:
> + hits_set: 1
> + bytes_set: 0
> + hits: 10
> + bytes: 0
> + testpmd> flow query 0 0 count
> + COUNT:
> + hits_set: 1
> + bytes_set: 0
> + hits: 10
> + testpmd> flow query 0 1 count
> + COUNT:
> + hits_set: 1
> + bytes_set: 0
> + hits: 10
>
> -3. verify rules can be listed and destroyed::
> +4. verify rules can be listed correctly::
>
> testpmd> flow list 0
> + testpmd> flow list 1
>
> - check the existing rule.
> - destroy the rule::
> +5. destroy the rule::
>
> - testpmd> flow destroy 0 rule 0
> + testpmd> flow flush 0
> + testpmd> flow flush 1
>
> - verify matched packets are distributed to different queue without "FDIR
> matched" printed.
> - Then check there is no rule listed.
> + verify matched packet are received without FDIR matched ID.
> + check there is no rule listed::
>
> -Test case: MAC_IPV4_TUN_MAC_IPV4_PAY queue index mark
> -=====================================================
> + testpmd> flow list 0
> + testpmd> flow list 1
>
> -1. create filter rules::
> + query the count number, all reported::
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / end actions queue index 1 / mark id 1 /
> end
> + Flow rule #[ID] not found
>
> -2. send 1 matched packet, check the packets are distributed to queue 1 with
> "FDIR matched ID=0x1" printed.
> - send 1 mismatched packet, check the packets are not distributed to queue
> 1 without "FDIR matched" printed.
> +Test case: Stress test
> +======================
>
> -3. verify rules can be listed and destroyed::
> +Subcase 1: port stop/port start/port reset
> +------------------------------------------
>
> - testpmd> flow list 0
> +1. create a rule::
>
> - check the existing rule.
> - destroy the rule::
> + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / end actions queue index 1 / mark / end
>
> - testpmd> flow destroy 0 rule 0
> +2. list the rule and send matched packet::
>
> - verify matched packets are distributed to different queue without "FDIR
> matched" printed.
> - Then check there is no rule listed.
> +
> sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0
> .21") / Raw('x' * 80)],iface="enp175s0f0")
>
> -Test case: MAC_IPV4_TUN_MAC_IPV4_UDP queue index mark
> -=====================================================
> + check the packet are redirected to queue 1 with FDIR matched ID=0x0
>
> -1. create filter rules::
> +3. stop the port, then start the port::
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue
> index 1 / mark id 1 / end
> + testpmd> port stop 0
> + testpmd> port start 0
>
> -2. send 1 matched packet, check the packets are distributed to queue 1 with
> "FDIR matched ID=0x1" printed.
> - send 1 mismatched packet, check the packets are not distributed to queue
> 1 without "FDIR matched" printed.
> +4. show the rule list, the rule is still there.
>
> -3. verify rules can be listed and destroyed::
> +5. verify matched packet can be still redirected to queue 1 with FDIR
> matched ID=0x0.
>
> - testpmd> flow list 0
> +6. reset pf::
>
> - check the existing rule.
> - destroy the rule::
> + testpmd> port stop 0
> + testpmd> port reset 0
> + testpmd> port start 0
>
> - testpmd> flow destroy 0 rule 0
> +7. show the rule list, the rule is still there.
>
> - verify matched packets are distributed to different queue without "FDIR
> matched" printed.
> - Then check there is no rule listed.
> +8. verify matched packet can be still redirected to queue 1 with FDIR
> matched ID=0x0.
>
> +Subcase 2: add/delete rules
> +---------------------------
>
> -Test case: MAC_IPV4_TUN_MAC_IPV4_TCP queue index mark
> -=====================================================
> +1. create two rules::
>
> -1. create filter rules::
> + flow create 0 ingress pattern eth / ipv4 proto is 255 / end actions queue
> index 1 / mark / end
> + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is
> 192.168.0.21 / tcp src is 22 dst is 23 / end actions rss queues 2 3 end / mark
> id 1 / end
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions queue
> index 1 / mark id 1 / end
> + return the message::
>
> -2. send 1 matched packet, check the packets are distributed to queue 1 with
> "FDIR matched ID=0x1" printed.
> - send 1 mismatched packet, check the packets are not distributed to queue
> 1 without "FDIR matched" printed.
> + Flow rule #0 created
> + Flow rule #1 created
>
> -3. verify rules can be listed and destroyed::
> + list the rules::
>
> testpmd> flow list 0
> + ID Group Prio Attr Rule
> + 0 0 0 i-- ETH IPV4 => QUEUE MARK
> + 1 0 0 i-- ETH IPV4 TCP => RSS MARK
>
> - check the existing rule.
> - destroy the rule::
> -
> - testpmd> flow destroy 0 rule 0
> -
> - verify matched packets are distributed to different queue without "FDIR
> matched" printed.
> - Then check there is no rule listed.
> -
> -Test case: MAC_IPV4_TUN_MAC_IPV4_SCTP queue index mark
> -======================================================
> +2. delete the rules::
>
> -1. create filter rules::
> + testpmd> flow flush 0
>
> - flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actions queue
> index 1 / mark id 1 / end
> +3. repeate the create and delete operations in step1-2 15360 times.
>
> -2. send 1 matched packet, check the packets are distributed to queue 1 with
> "FDIR matched ID=0x1" printed.
> - send 1 mismatched packet, check the packets are not distributed to queue
> 1 without "FDIR matched" printed.
> +4. create the two rules one more time, check the rules listed.
>
> -3. verify rules can be listed and destroyed::
> +5. send matched packet::
>
> - testpmd> flow list 0
> +
> sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0
> .21", proto=255)/Raw('x' * 80)],iface="enp175s0f0")
> +
> sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0
> .21")/TCP(sport=22,dport=23)/Raw('x' * 80)],iface="enp175s0f0")
>
> - check the existing rule.
> - destroy the rule::
> + check packet 1 is redirected to queue 1 with FDIR matched ID=0x0
> + check packet 2 is redirected to queue 2 or queue 3 with FDIR matched
> ID=0x1
>
> - testpmd> flow destroy 0 rule 0
> +Subcase 3: delete rules
> +-----------------------
>
> - verify matched packets are distributed to different queue without "FDIR
> matched" printed.
> - Then check there is no rule listed.
> +1. create 3 rules and destory the first rule::
>
> -Test case: multirules mark
> -==========================
> + flow create 0 ingress pattern eth / ipv4 src is 192.168.56.0 dst is 192.1.0.0
> tos is 4 / tcp src is 22 dst is 23 / end actions queue index 1 / mark / end
> + flow create 0 ingress pattern eth / ipv4 src is 192.168.56.0 dst is 192.1.0.0
> tos is 4 / tcp src is 22 dst is 24 / end actions queue index 2 / mark / end
> + flow create 0 ingress pattern eth / ipv4 src is 192.168.56.0 dst is 192.1.0.0
> tos is 4 / tcp src is 22 dst is 25 / end actions queue index 3 / mark / end
>
> -1. create filter rules::
> + there are rule 0/1/2 listed::
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end
> actions queue index 1 / mark id 1 / end
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / tcp src is 22 dst is 23 / end
> actions queue index 2 / mark id 1 / end
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / sctp src is 22 dst is 23 / end
> actions queue index 1 / mark id 2 / count / end
> + flow list 0
>
> -2. send matched packet::
> + send packets match rule 0, rule 1 and rule 2,
> + Verify all packets can be redirected to expected queue and mark.
> + destory the first rule::
>
> -
> sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0
> .21", ttl=2, tos=4) /UDP(sport=22,dport=23)/Raw('x' *
> 80)],iface="enp175s0f0")
> -
> sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0
> .21", ttl=2, tos=4) /TCP(sport=22,dport=23)/Raw('x' *
> 80)],iface="enp175s0f0")
> -
> sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0
> .21", ttl=2, tos=4) /SCTP(sport=22,dport=23)/Raw('x' *
> 80)],iface="enp175s0f0")
> + flow destroy 0 rule 0
>
> - check packet 1 to queue 1 with "FDIR matched ID=0x1" printed.
> - packet 2 to queue 2 with "FDIR matched ID=0x1" printed.
> - packet 3 to queue 1 with "FDIR matched ID=0x2" printed.
> + list the rules, verify there are only rule 1 and rule 2 listed.
> + send packet matched rule 0, verify it is received without FDIR matched ID.
> + send packets matched rule 1 and rule 2, Verify all packets be redirected
> and mark.
> + flush rules::
>
> -3. query count::
> + flow flush 0
>
> - testpmd> flow query 0 2 count
> - COUNT:
> - hits_set: 1
> - bytes_set: 0
> - hits: 1
> - bytes: 0
> + send packets match rule 0, rule 1 and rule 2, verify all packets can not
> mark.
>
> -4. verify rules can be listed and destroyed::
> +2. create 3 rules and destory the second rule::
>
> - testpmd> flow list 0
> + flow create 0 ingress pattern eth / ipv4 src is 192.168.56.0 dst is 192.1.0.0
> tos is 4 / tcp src is 22 dst is 23 / end actions queue index 1 / mark / end
> + flow create 0 ingress pattern eth / ipv4 src is 192.168.56.0 dst is 192.1.0.0
> tos is 4 / tcp src is 22 dst is 24 / end actions queue index 2 / mark / end
> + flow create 0 ingress pattern eth / ipv4 src is 192.168.56.0 dst is 192.1.0.0
> tos is 4 / tcp src is 22 dst is 25 / end actions queue index 3 / mark / end
>
> - check 3 rules listed.
> - destroy the rule 0::
> + there are rule 0/1/2 listed::
>
> - testpmd> flow destroy 0 rule 0
> + flow list 0
>
> - verify packet 1 is distributed to different queue without "FDIR matched"
> printed.
> - Then check there is 2 rules listed.
> - packet 2 to queue 2 with "FDIR matched ID=0x1" printed.
> - packet 3 to queue 1 with "FDIR matched ID=0x2" printed.
> - query count::
> + send packets match rule 0, rule 1 and rule 2,
> + Verify all packets can be redirected to expected queue and mark.
> + destory the second rule::
>
> - testpmd> flow query 0 2 count
> - COUNT:
> - hits_set: 1
> - bytes_set: 0
> - hits: 2
> - bytes: 0
> + flow destroy 0 rule 1
>
> + list the rules, verify there are only rule 0 and rule 2 listed.
> + send packet matched rule 1, verify it is received without FDIR matched ID.
> + send packets matched rule 0 and rule 2, Verify all packets be redirected
> and mark.
> flush rules::
>
> - testpmd> flow flush 0
> + flow flush 0
>
> - verify matched packets are distributed to different queue without "FDIR
> matched" printed.
> - Then check there is no rule listed, and no count exist.
> + send packets match rule 0, rule 1 and rule 2, verify all packets can not
> mark.
>
> -Test case: mark wrong parameters
> -================================
> +3. create 3 rules and destory the third rule::
>
> -1. create filter rules::
> + flow create 0 ingress pattern eth / ipv4 src is 192.168.56.0 dst is 192.1.0.0
> tos is 4 / tcp src is 22 dst is 23 / end actions queue index 1 / mark / end
> + flow create 0 ingress pattern eth / ipv4 src is 192.168.56.0 dst is 192.1.0.0
> tos is 4 / tcp src is 22 dst is 24 / end actions queue index 2 / mark / end
> + flow create 0 ingress pattern eth / ipv4 src is 192.168.56.0 dst is 192.1.0.0
> tos is 4 / tcp src is 22 dst is 25 / end actions queue index 3 / mark / end
>
> - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is
> 192.168.0.20 / end actions queue index 1 / mark id 4294967296 / end
> + there are rule 0/1/2 listed::
>
> - the flow failed to be created.
> + flow list 0
>
> -2. list the flow::
> + send packets match rule 0, rule 1 and rule 2,
> + Verify all packets can be redirected to expected queue and mark.
> + destory the last rule::
>
> - testpmd> flow list 0
> + flow destroy 0 rule 2
>
> - Then check there is no rule listed.
> + list the rules, verify there are only rule 0 and rule 1 listed.
> + send packet matched rule 2, verify it is received without FDIR matched ID.
> + send packets matched rule 0 and rule 1, Verify all packets be redirected
> and mark.
> + flush rules::
>
> -Test case: pattern conflict flow
> -================================
> + flow flush 0
>
> -MAC_IPV4_PAY and MAC_IPV4_UDP are conflict patterns.
> -so if create one, then create the other one, the second flow will be
> -set to switch filer.
> -IPV4_UDP packet can match MAC_IPV4_PAY rule.
> -but IPV4_PAY packet cannot match MAC_IPV4_UDP rule.
> + send packets match rule 0, rule 1 and rule 2, verify all packets can not
> mark.
>
> -1. set MAC_IPV4_PAY firstly::
> +Subcase 4: max rules
> +--------------------
>
> - flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / end actions
> queue index 1 / end
> +1. create 15360 rules on port 0::
>
> - the first flow is set to fdir filter, send matched packet::
> + flow create 0 ingress pattern eth / ipv4 src is 192.168.100.20 dst is
> 192.168.0.0 / end actions queue index 1 / mark / end
> + flow create 0 ingress pattern eth / ipv4 src is 192.168.100.20 dst is
> 192.168.0.1 / end actions queue index 1 / mark / end
> + ......
> + flow create 0 ingress pattern eth / ipv4 src is 192.168.100.20 dst is
> 192.168.59.255 / end actions queue index 1 / mark / end
>
> -
> sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0
> .21")/Raw('x' * 80)],iface="enp175s0f0", count=10)
> -
> sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0
> .21") /UDP(sport=22, dport=23)/ Raw('x' * 80)],iface="enp175s0f0", count=10)
> + all the rules are created successfully.
>
> - the two type packets both to queue 1.
> - then create MAC_IPV4_UDP flow, it is set to switch filer::
> +2. create one more rule::
>
> - flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / udp src is 22
> dst is 23 / end actions queue index 2 / end
> + flow create 0 ingress pattern eth / ipv4 src is 192.168.100.20 dst is
> 192.168.60.0 / end actions queue index 1 / mark / end
>
> - send same packets, IPV4_PAY packet to queue 1, IPV4_UDP packet to
> queue 2.
> + the rule failed to create. return the error message::
>
> -2. set MAC_IPV4_UDP firstly::
> + Failed to create flow
>
> - flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / udp src is 22
> dst is 23 / end actions queue index 2 / end
> +3. check the rule list, there are 15360 rules listed.
>
> - send matched packet::
> +4. send matched packets for rule 0 and rule 15359::
>
> -
> sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0
> .21") /UDP(sport=22, dport=23)/ Raw('x' * 80)],iface="enp175s0f0", count=10)
> +
> sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.100.20",dst="192.168
> .0.0")/Raw('x' * 80)],iface="enp175s0f0")
> +
> sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.100.20",dst="192.168
> .59.255")/Raw('x' * 80)],iface="enp175s0f0")
>
> - packet to queue 2.
> - then create MAC_IPV4_PAY flow::
> + check all packets are redirected to expected queue with FDIR matched
> ID=0x0
>
> - flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / end actions
> queue index 1 / end
> +5. flush all the rules, check the rule list,
> + there is no rule listed.
>
> - send same packet, packet to queue 1, because the packet match switch
> filter first.
> +6. verify matched packets for rule 0 and rule 15359 received without FDIR
> matched ID.
> --
> 2.7.4
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-31 3:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26 10:23 [dts] [PATCH v1]test_plans: rework case structure Yuan Peng
2020-03-31 3:04 ` Tu, Lijuan
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).