[V2,3/5] test_plans/ice_dcf_dual_vlan: split ice_qinq suite

Message ID 20230111103858.970228-4-songx.jiale@intel.com (mailing list archive)
State Accepted
Headers
Series split the ice_qinq suite |

Commit Message

Jiale, SongX Jan. 11, 2023, 10:38 a.m. UTC
  split dcf cases in ice_qinq to ice_dcf_dual_vlan and delete ice_qinq suite.

Signed-off-by: Song Jiale <songx.jiale@intel.com>
---
 ...an.rst => ice_dcf_dual_vlan_test_plan.rst} | 1695 +++++------------
 1 file changed, 501 insertions(+), 1194 deletions(-)
 rename test_plans/{ice_qinq_test_plan.rst => ice_dcf_dual_vlan_test_plan.rst} (64%)
  

Patch

diff --git a/test_plans/ice_qinq_test_plan.rst b/test_plans/ice_dcf_dual_vlan_test_plan.rst
similarity index 64%
rename from test_plans/ice_qinq_test_plan.rst
rename to test_plans/ice_dcf_dual_vlan_test_plan.rst
index b3981829..4d2645a9 100644
--- a/test_plans/ice_qinq_test_plan.rst
+++ b/test_plans/ice_dcf_dual_vlan_test_plan.rst
@@ -7,13 +7,16 @@  ICE support QinQ protocol
 DPDK support QinQ protocol in Intel® Ethernet 800 Series as below requirements:
 * DCF support QinQ by add steering rule and vlan strip disable.
 * DCF is able to set port vlan by port representor.
-* AVF is able to configure inner VLAN filter when port vlan is enabled base on negotiation.
-* AVF is able to configure outer VLAN (8100) if no port VLANis enabled to compatible with legacy mode.
-this test plan contain 3 parts to cover above requirements:
+
+this test plan contain 2 parts to cover above requirements:
 * DCF switch filter for QinQ.
 * DCF pvid support for QinQ.
-* AVF VLAN offload for QinQ.
 
+Intel® Ethernet 800 Series support l4 for QinQ switch filter in DCF driver is by
+dst MAC + outer VLAN id + inner VLAN id + dst IP + dst port, and port can support
+as eth / vlan / vlan / IP / tcp|udp.
+* Enable QINQ switch filter for IPv4/IPv6, IPv4 + TCP/UDP in non-pipeline mode.
+* Enable QINQ switch filter for IPv6 + TCP/UDP in pipeline mode.
 
 Prerequisites
 =============
@@ -78,39 +81,24 @@  Prerequisites
      ip link set dev ens785f0 vf 2 spoofchk off
      ip link set dev ens785f0 vf 3 spoofchk off
 
-12. For test cases for DCF switch filter(01-06), use below cmd to launch testpmd::
+12. For test cases for Non-pipeline mode(case 01-07,09-11), use below cmd to launch testpmd::
 
      ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:18:01.0,cap=dcf,representor=[1] -a 0000:18:01.1 -a 0000:18:01.2 -a 0000:18:01.3 -- -i
-     testpmd> set fwd rxonly
-     testpmd> set verbose 1
-     testpmd> start
-     testpmd> show port info all
 
-   check the VF0 driver is net_ice_dcf.
+   check the port 0 and port 1 driver is net_ice_dcf.
 
-   For test cases for DCF pvid(07-09), use below cmd to launch testpmd::
+   For test cases for Pipeline mode(case 08), use below cmd to launch testpmd::
 
-    ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:18:01.0,cap=dcf,representor=[1] -a 0000:18:01.1 -a 0000:18:01.2 -a 0000:18:01.3 -- -i
-    testpmd> set fwd mac
-    testpmd> set verbose 1
-    testpmd> start
-    testpmd> show port info all
+    ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:18:01.0,cap=dcf,representor=[1],pipeline-mode-support=1 -a 0000:18:01.1 -a 0000:18:01.2 -a 0000:18:01.3 -- -i
 
    check the VF0 driver is net_ice_dcf.
 
-13. For AVF QinQ test cases(10-14), recreate Generate 1 VFs on PF0, reconfig the VF then launch testpmd::
-
-     echo 0 > /sys/bus/pci/devices/0000:18:00.0/sriov_numvfs
-     ethtool --set-priv-flags ens785f0 vf-vlan-pruning on
-     echo 1 > /sys/bus/pci/devices/0000:18:00.0/sriov_numvfs
-     ip link set ens785f0 vf 0 mac 00:11:22:33:44:11
-     ip link set dev ens785f0 vf 0 spoofchk off
+13. config testpmd::
 
-     ./usertools/dpdk-devbind.py -b vfio-pci 0000:18:01.0
-     ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:18:01.0 -- -i --rxq=16 --txq=16
      testpmd> set fwd mac
      testpmd> set verbose 1
      testpmd> start
+     testpmd> show port info all
 
 DCF switch filter support pattern and input set
 -----------------------------------------------
@@ -156,7 +144,7 @@  subcase: dest mac
     sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x2,type=0x0800)/IP()/("X"*480)], iface="ens786f0")
     sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6()/("X"*480)], iface="ens786f0")
 
-   check the packets are not to port 1.
+   check the packets are not to VF1.
 
 3. verify rules can be destroyed::
 
@@ -164,7 +152,7 @@  subcase: dest mac
     testpmd> flow list 0
 
    check the rule not exists in the list.
-   send matched packets in step 2, check the packets are not to port 1.
+   send matched packets in step 2, check the packets are not to VF1.
 
 subcase: src ip
 ---------------
@@ -187,7 +175,7 @@  subcase: src ip
     sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
     sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x2,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
 
-   check the packets are not to port 1.
+   check the packets are not to VF1.
 
 3. verify rules can be destroyed::
 
@@ -195,7 +183,7 @@  subcase: src ip
     testpmd> flow list 0
 
    check the rule not exists in the list.
-   send matched packets in step 2, check the packets are not to port 1.
+   send matched packets in step 2, check the packets are not to VF1.
 
 subcase: dst ip
 ---------------
@@ -218,7 +206,7 @@  subcase: dst ip
     sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP(dst="196.222.232.221")/("X"*480)], iface="ens786f0")
     sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x2,type=0x0800)/IP(dst="196.222.232.221")/("X"*480)], iface="ens786f0")
 
-   check the packets are not to port 1.
+   check the packets are not to VF1.
 
 3. verify rules can be destroyed::
 
@@ -226,7 +214,7 @@  subcase: dst ip
     testpmd> flow list 0
 
    check the rule not exists in the list.
-   send matched packets in step 2, check the packets are not to port 1.
+   send matched packets in step 2, check the packets are not to VF1.
 
 
 Test case 02: DCF switch for MAC_QINQ_IPV6_PAY
@@ -252,7 +240,7 @@  subcase: dest mac
     sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x2,type=0x86DD)/IPv6()/("X"*480)], iface="ens786f0")
     sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP()/("X"*480)], iface="ens786f0")
 
-   check the packets are not to port 1.
+   check the packets are not to VF1.
 
 3. verify rules can be destroyed::
 
@@ -260,7 +248,7 @@  subcase: dest mac
     testpmd> flow list 0
 
    check the rule not exists in the list.
-   send matched packets in step 2, check the packets are not to port 1.
+   send matched packets in step 2, check the packets are not to VF1.
 
 subcase: src ip
 ---------------
@@ -283,7 +271,7 @@  subcase: src ip
     sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(src="1111:2222:3333:4444:5555:6666:7777:8888")/("X"*480)], iface="ens786f0")
     sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x2,type=0x86DD)/IPv6(src="1111:2222:3333:4444:5555:6666:7777:8888")/("X"*480)], iface="ens786f0")
 
-   check the packets are not to port 1.
+   check the packets are not to VF1.
 
 3. verify rules can be destroyed::
 
@@ -291,7 +279,7 @@  subcase: src ip
     testpmd> flow list 0
 
    check the rule not exists in the list.
-   send matched packets in step 2, check the packets are not to port 1.
+   send matched packets in step 2, check the packets are not to VF1.
 
 subcase: dst ip
 ---------------
@@ -314,7 +302,7 @@  subcase: dst ip
     sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888")/("X"*480)], iface="ens786f0")
     sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x2,type=0x86DD)/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888")/("X"*480)], iface="ens786f0")
 
-   check the packets are not to port 1.
+   check the packets are not to VF1.
 
 3. verify rules can be destroyed::
 
@@ -322,7 +310,7 @@  subcase: dst ip
     testpmd> flow list 0
 
    check the rule not exists in the list.
-   send matched packets in step 2, check the packets are not to port 1.
+   send matched packets in step 2, check the packets are not to VF1.
 
 
 Test case 03: DCF switch for MAC_QINQ_PPPOE_PAY
@@ -352,7 +340,7 @@  Test case 03: DCF switch for MAC_QINQ_PPPOE_PAY
     sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=0x1)/PPP(proto=0x21)/IP()/("X"*480)], iface="ens786f0")
     sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=0x1)/PPP(proto=0x21)/IP()/("X"*480)], iface="ens786f0")
 
-   check the packets are not to port 1.
+   check the packets are not to VF1.
 
 3. verify rules can be destroyed::
 
@@ -360,7 +348,7 @@  Test case 03: DCF switch for MAC_QINQ_PPPOE_PAY
     testpmd> flow list 0
 
    check the rule not exists in the list.
-   send matched packets in step 2, check the packets are not to port 1.
+   send matched packets in step 2, check the packets are not to VF1.
 
 
 Test case 04: DCF switch for MAC_QINQ_PPPOE_PAY_Proto
@@ -386,7 +374,7 @@  Test case 04: DCF switch for MAC_QINQ_PPPOE_PAY_Proto
     sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=0x1)/PPP(proto=0x57)/IPv6()/("X"*480)], iface="ens786f0")
     sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=0x1)/PPP(proto=0x57)/IPv6()/("X"*480)], iface="ens786f0")
 
-   check the packets are not to port 1.
+   check the packets are not to VF1.
 
 3. verify rules can be destroyed::
 
@@ -394,7 +382,7 @@  Test case 04: DCF switch for MAC_QINQ_PPPOE_PAY_Proto
     testpmd> flow list 0
 
    check the rule not exists in the list.
-   send matched packets in step 2, check the packets are not to port 1.
+   send matched packets in step 2, check the packets are not to VF1.
 
 
 Test case 05: DCF switch for MAC_QINQ_PPPOE_IPV4
@@ -421,7 +409,7 @@  subcase: dest mac
     sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x8864)/PPPoE(sessionid=0x1)/PPP(proto=0x57)/IPv6()/UDP(dport=23)/("X"*480)], iface="ens786f0")
     sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x8864)/PPPoE(sessionid=0x1)/PPP(proto=0x21)/IP()/UDP(dport=23)/("X"*480)], iface="ens786f0")
 
-   check the packets are not to port 1.
+   check the packets are not to VF1.
 
 3. verify rules can be destroyed::
 
@@ -429,7 +417,7 @@  subcase: dest mac
     testpmd> flow list 0
 
    check the rule not exists in the list.
-   send matched packets in step 2, check the packets are not to port 1.
+   send matched packets in step 2, check the packets are not to VF1.
 
 subcase: src ip
 ---------------
@@ -453,7 +441,7 @@  subcase: src ip
     sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=0x1,type=0x8864)/PPPoE(sessionid=0x1)/PPP(proto=0x21)/IP(src="196.222.232.221")/UDP(dport=23)/("X"*480)], iface="ens786f0")
     sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x2,type=0x8864)/PPPoE(sessionid=0x1)/PPP(proto=0x21)/IP(src="196.222.232.221")/UDP(dport=23)/("X"*480)], iface="ens786f0")
 
-   check the packets are not to port 1.
+   check the packets are not to VF1.
 
 3. verify rules can be destroyed::
 
@@ -461,7 +449,7 @@  subcase: src ip
     testpmd> flow list 0
 
    check the rule not exists in the list.
-   send matched packets in step 2, check the packets are not to port 1.
+   send matched packets in step 2, check the packets are not to VF1.
 
 subcase: dst ip
 ---------------
@@ -485,7 +473,7 @@  subcase: dst ip
     sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=0x1,type=0x8864)/PPPoE(sessionid=0x1)/PPP(proto=0x21)/IP(dst="196.222.232.221")/UDP(dport=23)/("X"*480)], iface="ens786f0")
     sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x2,type=0x8864)/PPPoE(sessionid=0x1)/PPP(proto=0x21)/IP(dst="196.222.232.221")/UDP(dport=23)/("X"*480)], iface="ens786f0")
 
-   check the packets are not to port 1.
+   check the packets are not to VF1.
 
 3. verify rules can be destroyed::
 
@@ -493,7 +481,7 @@  subcase: dst ip
     testpmd> flow list 0
 
    check the rule not exists in the list.
-   send matched packets in step 2, check the packets are not to port 1.
+   send matched packets in step 2, check the packets are not to VF1.
 
 
 Test case 06: DCF switch for MAC_QINQ_PPPOE_IPV6
@@ -520,7 +508,7 @@  subcase: dest mac
     sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x8864)/PPPoE(sessionid=0x1)/PPP(proto=0x21)/IP()/UDP(dport=23)/("X"*480)], iface="ens786f0")
     sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x8864)/PPPoE(sessionid=0x1)/PPP(proto=0x57)/IPv6()/UDP(dport=23)/("X"*480)], iface="ens786f0")
 
-   check the packets are not to port 1.
+   check the packets are not to VF1.
 
 3. verify rules can be destroyed::
 
@@ -528,7 +516,7 @@  subcase: dest mac
     testpmd> flow list 0
 
    check the rule not exists in the list.
-   send matched packets in step 2, check the packets are not to port 1.
+   send matched packets in step 2, check the packets are not to VF1.
 
 subcase: src ip
 ---------------
@@ -552,7 +540,7 @@  subcase: src ip
     sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=0x1,type=0x8864)/PPPoE(sessionid=0x1)/PPP(proto=0x57)/IPv6(src="1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport=23)/("X"*480)], iface="ens786f0")
     sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x2,type=0x8864)/PPPoE(sessionid=0x1)/PPP(proto=0x57)/IPv6(src="1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport=23)/("X"*480)], iface="ens786f0")
 
-   check the packets are not to port 1.
+   check the packets are not to VF1.
 
 3. verify rules can be destroyed::
 
@@ -560,7 +548,7 @@  subcase: src ip
     testpmd> flow list 0
 
    check the rule not exists in the list.
-   send matched packets in step 2, check the packets are not to port 1.
+   send matched packets in step 2, check the packets are not to VF1.
 
 subcase: dst ip
 ---------------
@@ -584,7 +572,7 @@  subcase: dst ip
     sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=0x1,type=0x8864)/PPPoE(sessionid=0x1)/PPP(proto=0x57)/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport=23)/("X"*480)], iface="ens786f0")
     sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x2,type=0x8864)/PPPoE(sessionid=0x1)/PPP(proto=0x57)/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport=23)/("X"*480)], iface="ens786f0")
 
-   check the packets are not to port 1.
+   check the packets are not to VF1.
 
 3. verify rules can be destroyed::
 
@@ -592,1436 +580,755 @@  subcase: dst ip
     testpmd> flow list 0
 
    check the rule not exists in the list.
-   send matched packets in step 2, check the packets are not to port 1.
+   send matched packets in step 2, check the packets are not to VF1.
 
 
-Test case 07: vlan strip when pvid enable
-=========================================
+#Non-pipeline mode
+Test case 07: DCF switch for MAC_L4_QINQ
+========================================
+subcase: MAC_QINQ_IPV4
+----------------------
+The test case enable QINQ switch filter for IPv4 in non-pipeline mode, and port can support as dst MAC + outer VLAN id + inner VLAN id + IPv4.
 
-1. enable vlan header stripping for VF1 by representor::
+Test Steps
+~~~~~~~~~~
+1. Validate a rule::
 
-    testpmd> vlan set strip on 1
+     testpmd> flow validate 0 ingress pattern eth dst is <dst mac> / vlan tci is <outer vlan tci> / vlan tci is <inner vlan tci> / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions represented_port ethdev_port_id1 / end
 
-    Port 2: reset event
+   Get the message::
 
-2. reset VF1(port 2)::
+     Flow rule validated
 
-    testpmd> port stop 2
-    testpmd> port reset 2
-    testpmd> port start 2
-    testpmd> start
+2. Create a rule and list rules::
 
-3. tester send qinq pkt and single vlan pkt to VF1::
+     testpmd> flow create 0 ingress pattern eth dst is <dst mac> / vlan tci is <outer vlan tci> / vlan tci is <inner vlan tci> / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions represented_port ethdev_port_id1 / end
 
-    sendp([Ether(dst="00:11:22:33:44:11",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
-    sendp([Ether(dst="00:11:22:33:44:11",type=0x8100)/Dot1Q(vlan=21,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
+   Get the message::
 
-4. check the pkts can be received in VF1 and fwd to tester without outer vlan header::
+     Flow rule #0 created
 
-    testpmd> port 2/queue 0: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x8100 - length=518 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN L3_IPV4  - l2_len=18 - l3_len=20 - Receive queue=0x0
-    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+   Check the flow list::
 
-    port 2/queue 0: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x0800 - length=514 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0
-    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+     testpmd> flow list 0
 
-    10:15:10.958039 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-    10:15:10.958121 00:11:22:33:44:22 > 02:00:00:00:00:03, ethertype 802.1Q (0x8100), length 518: vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+   ID      Group   Prio    Attr    Rule
+   0       0       0       i--     ETH VLAN VLAN IPV4 => VF
 
-    10:15:15.693894 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 518: vlan 21, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-    10:15:15.693942 00:11:22:33:44:22 > 02:00:00:00:00:03, ethertype IPv4 (0x0800), length 514: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+3. Send matched packet in scapy on tester, check the port 2 of DUT received this packet.
 
-5. disable vlan header stripping for VF1::
+Tester::
 
-    testpmd> vlan set strip off 1
+    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IP(src="<ipv4 src>",dst="<ipv4 dst>")/("X"*80)],iface="<tester interface>")
 
-    Port 2: reset event
+DUT::
 
-6. reset VF1::
+   testpmd> port 2/queue 0: received 1 packets
+   src=A4:BF:01:4D:6F:32 - dst=00:11:22:33:44:55 - type=0x8100 - length=122 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - Receive queue=0x0
+   ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN
 
-    testpmd> port stop 2
-    testpmd> port reset 2
-    testpmd> port start 2
-    testpmd> start
+4. Send mismatched packet in scapy on tester, check the port 2 of DUT could not receive this packet.
 
-7. repeat step 3, check the pkts can be received in VF1 and fwd to tester with outer vlan header::
+Tester::
 
-    testpmd> port 2/queue 0: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x8100 - length=518 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN L3_IPV4  - l2_len=18 - l3_len=20 - Receive queue=0x0
-    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+    >>> sendp([Ether(dst="<dst mac change inputset>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IP(src="<ipv4 src>",dst="<ipv4 dst>")/("X"*80)],iface="<tester interface>")
 
-    port 2/queue 0: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x0800 - length=514 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0
-    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci change inputset>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IP(src="<ipv4 src>",dst="<ipv4 dst>")/("X"*80)],iface="<tester interface>")
 
-    10:17:55.321952 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-    10:17:55.322008 00:11:22:33:44:22 > 02:00:00:00:00:03, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci change inputset>,type=0x0800)/IP(src="<ipv4 src>",dst="<ipv4 dst>")/("X"*80)],iface="<tester interface>")
 
-    10:17:58.009862 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 518: vlan 21, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-    10:17:58.009908 00:11:22:33:44:22 > 02:00:00:00:00:03, ethertype 802.1Q (0x8100), length 518: vlan 21, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IP(src="<ipv4 src change inputset>",dst="<ipv4 dst>")/("X"*80)],iface="<tester interface>")
 
-8. repeat step 1,2, then enable vlan strip by AVF::
+5. Destroy a rule and list rules::
 
-    testpmd> vlan set strip on 2
+     testpmd> flow destroy 0 rule 0
 
-9. repeat step 3, check the pkts can be received in VF1 and fwd to tester without both outer and inner vlan header::
+   Get the message::
 
-    testpmd> port 2/queue 0: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x8100 - length=518 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN L3_IPV4  - l2_len=18 - l3_len=20 - Receive queue=0x0
-    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+     Flow rule #0 destroyed
 
-    port 2/queue 0: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x0800 - length=514 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0
-    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+   Check the flow list::
 
-    10:28:01.642361 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-    10:28:01.642438 00:11:22:33:44:22 > 02:00:00:00:00:03, ethertype IPv4 (0x0800), length 514: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+     testpmd> flow list 0
 
-    10:28:10.185876 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 518: vlan 21, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-    10:28:10.185916 00:11:22:33:44:22 > 02:00:00:00:00:03, ethertype IPv4 (0x0800), length 514: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+   Check the rule not exists in the list.
+   Send matched packets in step 3, check the packets are not to VF1.
 
-10. relaunch testpmd and enable vlan strip by AVF::
+subcase: MAC_QINQ_IPV6
+----------------------
+The test case enable QINQ switch filter for IPv6 in non-pipeline mode, and port can support as dst MAC + outer VLAN id + inner VLAN id + IPv6.
 
-     testpmd> vlan set strip on 2
+Test Steps
+~~~~~~~~~~
+1. Validate a rule::
 
-11. repeat step 1,2 and 3, check the pkts can be received in VF1 and fwd to tester without both outer and inner vlan header::
+     testpmd> flow validate 0 ingress pattern eth dst is <dst mac> / vlan tci is <outer vlan tci> / vlan tci is <inner vlan tci> / ipv6 dst is <ipv6 dst> / end actions represented_port ethdev_port_id1 / end
 
-     testpmd> port 2/queue 0: received 1 packets
-     src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x8100 - length=518 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN L3_IPV4  - l2_len=18 - l3_len=20 - Receive queue=0x0
-     ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+   Get the message::
 
-     port 2/queue 0: received 1 packets
-     src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x0800 - length=514 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0
-     ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+     Flow rule validated
 
-     10:28:01.642361 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-     10:28:01.642438 00:11:22:33:44:22 > 02:00:00:00:00:03, ethertype IPv4 (0x0800), length 514: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+2. Create a rule and list rules::
 
-     10:28:10.185876 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 518: vlan 21, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-     10:28:10.185916 00:11:22:33:44:22 > 02:00:00:00:00:03, ethertype IPv4 (0x0800), length 514: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+     testpmd> flow create 0 ingress pattern eth dst is <dst mac> / vlan tci is <outer vlan tci> / vlan tci is <inner vlan tci> / ipv6 dst is <ipv6 dst> / end actions represented_port ethdev_port_id1 / end
 
+   Get the message::
 
-Test case 08: vlan insertion when pvid enable
-=============================================
+     Flow rule #0 created
 
-1. add tx port vlan for VF1 by representor 1::
+   Check the flow list::
 
-    testpmd> tx_vlan set pvid 1 24 on
+     testpmd> flow list 0
 
-    Port 2: reset event
+   ID      Group   Prio    Attr    Rule
+   0       0       0       i--     ETH VLAN VLAN IPV6 => VF
 
-2. reset VF1::
+3. Send matched packet in scapy on tester, check the port 2 of DUT received this packet.
 
-    testpmd> port stop 2
-    testpmd> port reset 2
-    testpmd> port start 2
-    testpmd> start
+Tester::
 
-3. send a pkt without vlan header to VF2(VF2 rx, VF1 tx)::
+    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IPv6(dst="<ipv6 dst>")/("X"*80)],iface="<tester interface>")
 
-    sendp([Ether(dst="00:11:22:33:44:22",type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
-    sendp([Ether(dst="00:11:22:33:44:22",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
+DUT::
 
-4. check the dpdk can receive this pkt with VF2 and fwd this pkt with outer vlan header id 24 by VF1, and the vlan header ptype is 8100::
+   testpmd> port 2/queue 0: received 1 packets
+   src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=142 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV6_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV6  - l2_len=18 - inner_l2_len=4 - inner_l3_len=40 - Receive queue=0x0
+   ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN
 
-    testpmd> port 4/queue 0: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:22 - type=0x0800 - length=514 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0
-    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+4. Send mismatched packet in scapy on tester, check the port 2 of DUT could not receive this packet.
 
-    port 4/queue 0: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:22 - type=0x8100 - length=518 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN L3_IPV4  - l2_len=18 - l3_len=20 - Receive queue=0x0
-    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+Tester::
 
-    tcpdump -i ens786f0 -nn -e -v
-    11:08:01.061908 00:00:00:00:00:00 > 00:11:22:33:44:22, ethertype IPv4 (0x0800), length 514: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-    11:08:01.061987 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1Q (0x8100), length 518: vlan 24, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+    >>> sendp([Ether(dst="<dst mac change inputset>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IPv6(dst="<ipv6 dst>")/("X"*80)],iface="<tester interface>")
 
-    11:08:06.773884 00:00:00:00:00:00 > 00:11:22:33:44:22, ethertype 802.1Q (0x8100), length 518: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-    11:08:06.773928 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1Q (0x8100), length 522: vlan 24, p 0, ethertype 802.1Q, vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci change inputset>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IPv6(dst="<ipv6 dst>")/("X"*80)],iface="<tester interface>")
 
-5. change the tpid of vlan header to 88A8 for VF1::
+    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci change inputset>,type=0x0800)/IPv6(dst="<ipv6 dst>")/("X"*80)],iface="<tester interface>")
 
-    testpmd> vlan set outer tpid 0x88a8 1
+    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IPv6(dst="<ipv6 dst change inputset>")/("X"*80)],iface="<tester interface>")
 
-6. reset VF1::
+5. Destroy a rule and list rules::
 
-    testpmd> port stop 2
-    testpmd> port reset 2
-    testpmd> port start 2
-    testpmd> start
+     testpmd> flow destroy 0 rule 0
 
-7. repeat step 3, check the dpdk can receive this pkt with VF2 and fwd this pkt with outer vlan header id 24 by VF1, and the vlan header ptype is 88a8::
+   Get the message::
 
-    testpmd> port 4/queue 0: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:22 - type=0x0800 - length=514 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0
-    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+     Flow rule #0 destroyed
 
-    port 4/queue 0: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:22 - type=0x8100 - length=518 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN L3_IPV4  - l2_len=18 - l3_len=20 - Receive queue=0x0
-    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+   Check the flow list::
 
-    tcpdump -i ens786f0 -nn -e -v
-    11:10:32.441834 00:00:00:00:00:00 > 00:11:22:33:44:22, ethertype IPv4 (0x0800), length 514: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-    11:10:32.441883 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1Q-QinQ (0x88a8), length 518: vlan 24, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+     testpmd> flow list 0
 
-    11:10:34.081863 00:00:00:00:00:00 > 00:11:22:33:44:22, ethertype 802.1Q (0x8100), length 518: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-    11:10:34.081913 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1Q-QinQ (0x88a8), length 522: vlan 24, p 0, ethertype 802.1Q, vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+   Check the rule not exists in the list.
+   Send matched packets in step 3, check the packets are not to VF1.
 
-8. change the tpid of vlan header to 9100 for VF1::
+subcase: MAC_QINQ_IPV4_UDP
+--------------------------
+The test case enable QINQ switch filter for IPv4 + UDP in non-pipeline mode, and port can support as dst MAC + outer VLAN id + inner VLAN id + IPv4 + UDP.
 
-    testpmd> vlan set outer tpid 0x9100 1
+Test steps
+~~~~~~~~~~
+1. Validate a rule::
 
-9. reset VF1::
+     testpmd> flow validate 0 ingress pattern eth dst is <dst mac> / vlan tci is <outer vlan tci> / vlan tci is <inner vlan tci> / ipv4 / udp src is <sport> dst is <dport> / end actions represented_port ethdev_port_id1 / end
 
-    testpmd> port stop 2
-    testpmd> port reset 2
-    testpmd> port start 2
-    testpmd> start
+   Get the message::
 
-10. repeat step 3, check the dpdk can receive this pkt with VF2 and fwd this pkt with outer vlan header id 24 by VF1, and the vlan header ptype is 9100::
+     Flow rule validated
 
-     testpmd> port 4/queue 0: received 1 packets
-     src=00:00:00:00:00:00 - dst=00:11:22:33:44:22 - type=0x0800 - length=514 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0
-     ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+2. Create a rule and list rules::
 
-     port 4/queue 0: received 1 packets
-     src=00:00:00:00:00:00 - dst=00:11:22:33:44:22 - type=0x8100 - length=518 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN L3_IPV4  - l2_len=18 - l3_len=20 - Receive queue=0x0
-     ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+     testpmd> flow create 0 ingress pattern eth dst is <dst mac> / vlan tci is <outer vlan tci> / vlan tci is <inner vlan tci> / ipv4 / udp src is <sport> dst is <dport> / end actions represented_port ethdev_port_id1 / end
 
-     tcpdump -i ens786f0 -nn -e -v
-     11:12:13.237834 00:00:00:00:00:00 > 00:11:22:33:44:22, ethertype IPv4 (0x0800), length 514: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-     11:12:13.237890 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1Q-9100 (0x9100), length 518: vlan 24, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+   Get the message::
 
-     11:12:26.049869 00:00:00:00:00:00 > 00:11:22:33:44:22, ethertype 802.1Q (0x8100), length 518: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-     11:12:26.049920 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q-9100, vlan 24, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+     Flow rule #0 created
 
-11. enable tx_vlan for VF1 by AVF::
+   Check the flow list::
 
-     testpmd> port stop 2
-     Stopping ports...
-     Checking link statuses...
-     Done
-     testpmd> tx_vlan set 2 11
-     testpmd> port start 2
+     testpmd> flow list 0
 
-12. repeat step 3, check the dpdk can receive this pkt with VF2 and fwd this pkt with outer vlan header id 24, inner vlan id 11 by VF1::
-
-     testpmd> port 3/queue 0: received 1 packets
-     src=00:00:00:00:00:00 - dst=00:11:22:33:44:22 - type=0x0800 - length=514 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0
-     ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
-
-     port 3/queue 0: received 1 packets
-     src=00:00:00:00:00:00 - dst=00:11:22:33:44:22 - type=0x8100 - length=518 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN L3_IPV4  - l2_len=18 - l3_len=20 - Receive queue=0x0
-     ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
-
-     11:22:29.561918 00:00:00:00:00:00 > 00:11:22:33:44:22, ethertype IPv4 (0x0800), length 514: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-     11:22:29.561992 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1Q (0x8100), length 522: vlan 24, p 0, ethertype 802.1Q, vlan 11, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+   ID      Group   Prio    Attr    Rule
+   0       0       0       i--     ETH VLAN VLAN IPV4 UDP => VF
 
-     11:22:44.481889 00:00:00:00:00:00 > 00:11:22:33:44:22, ethertype 802.1Q (0x8100), length 518: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-     11:22:44.481922 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1Q (0x8100), length 526: vlan 24, p 0, ethertype 802.1Q, vlan 11, p 0, ethertype 802.1Q, vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+3. Send matched packet in scapy on tester, check the port 2 of DUT received this packet.
 
-13. relaunch testpmd and execute step 11 then step 1, 2 and 3, check the dpdk can receive this pkt with VF2 and fwd this pkt with outer vlan header id 24, inner vlan id 11 by VF1::
+Tester::
 
-     testpmd> port 3/queue 0: received 1 packets
-     src=00:00:00:00:00:00 - dst=00:11:22:33:44:22 - type=0x0800 - length=514 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0
-     ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IP()/UDP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
 
-     port 3/queue 0: received 1 packets
-     src=00:00:00:00:00:00 - dst=00:11:22:33:44:22 - type=0x8100 - length=518 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN L3_IPV4  - l2_len=18 - l3_len=20 - Receive queue=0x0
-     ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+DUT::
 
-     11:22:29.561918 00:00:00:00:00:00 > 00:11:22:33:44:22, ethertype IPv4 (0x0800), length 514: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-     11:22:29.561992 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1Q (0x8100), length 522: vlan 24, p 0, ethertype 802.1Q, vlan 11, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+   testpmd> port 2/queue 0: received 1 packets
+   src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=130 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_UDP  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=8 - Receive queue=0x0
+   ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN
 
-     11:22:44.481889 00:00:00:00:00:00 > 00:11:22:33:44:22, ethertype 802.1Q (0x8100), length 518: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-     11:22:44.481922 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1Q (0x8100), length 526: vlan 24, p 0, ethertype 802.1Q, vlan 11, p 0, ethertype 802.1Q, vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+4. Send mismatched packet in scapy on tester, check the port 2 of DUT could not receive this packet.
 
+Tester::
 
-Test case 09: vlan filter when pvid enable
-==========================================
+    >>> sendp([Ether(dst="<dst mac change inputset>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IP()/UDP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
 
-1. reset test environment, create vfs and enable vlan prune flag::
+    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci change inputset>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IP()/UDP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
 
-    ethtool --set-priv-flags ens785f0 vf-vlan-pruning on
+    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci change inputset>,type=0x0800)/IP()/UDP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
 
-2. repeat Prerequisites steps from 7 to 12
+    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IP()/UDP(sport=<sport>,dport=<dport change inputset>)/("X"*80)],iface="<tester interface>")
 
-3. enable vlan filter and add rx_vlan for VF1 by representor::
+5. Destroy a rule and list rules::
 
-    testpmd> vlan set filter on 1
-    testpmd> rx_vlan add 11 1
-    rte_eth_dev_vlan_filter(port_pi=1, vlan_id=11, on=1) failed diag=-95
+     testpmd> flow destroy 0 rule 0
 
-4. enable vlan filter and add rx_vlan for VF1 by AVF::
+   Get the message::
 
-    testpmd> vlan set filter on 2
-    testpmd> rx_vlan add 11 2
+     Flow rule #0 destroyed
 
-5. tester send qinq pkt and single vlan pkt which outer vlan id is 11 to VF1::
+   Check the flow list::
 
-    sendp([Ether(dst="00:11:22:33:44:11",type=0x8100)/Dot1Q(vlan=11,type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
-    sendp([Ether(dst="00:11:22:33:44:11",type=0x8100)/Dot1Q(vlan=11,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
+     testpmd> flow list 0
 
-6. check the pkts can be received by VF1 and fwd to tester::
+   Check the rule not exists in the list.
+   Send matched packets in step 3, check the packets are not to VF1.
 
-    testpmd> port 2/queue 0: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x8100 - length=522 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - Receive queue=0x0
-    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
-    port 2/queue 0: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x8100 - length=518 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN L3_IPV4  - l2_len=18 - l3_len=20 - Receive queue=0x0
-    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+subcase: MAC_QINQ_IPV4_TCP
+--------------------------
+The test case enable QINQ switch filter for IPv4 + TCP in non-pipeline mode, and port can support as dst MAC + outer VLAN id + inner VLAN id + IPv4 + TCP.
 
-    10:21:53.418039 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 522: vlan 11, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-    10:21:53.418114 00:11:22:33:44:22 > 02:00:00:00:00:03, ethertype 802.1Q (0x8100), length 522: vlan 11, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+Test Steps
+~~~~~~~~~~
+1. Validate a rule::
 
-    10:22:00.005885 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 518: vlan 11, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-    10:22:00.005919 00:11:22:33:44:22 > 02:00:00:00:00:03, ethertype 802.1Q (0x8100), length 518: vlan 11, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+     testpmd> flow validate 0 ingress pattern eth dst is <dst mac> / vlan tci is <outer vlan tci> / vlan tci is <inner vlan tci> / ipv4 / tcp src is <sport> dst is <dport> / end actions represented_port ethdev_port_id1 / end
 
-7. tester send qinq pkt and single vlan pkt which outer vlan id is 21 to VF1::
+   Get the message::
 
-    sendp([Ether(dst="00:11:22:33:44:11",type=0x8100)/Dot1Q(vlan=21,type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
-    sendp([Ether(dst="00:11:22:33:44:11",type=0x8100)/Dot1Q(vlan=21,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
+     Flow rule validated
 
-8. check the pkts can not be received by VF1.
+2. Create a rule and list rules::
 
-9. remove rx_vlan::
+     testpmd> flow create 0 ingress pattern eth dst is <dst mac> / vlan tci is <outer vlan tci> / vlan tci is <inner vlan tci> / ipv4 / tcp src is <sport> dst is <dport> / end actions represented_port ethdev_port_id1 / end
 
-    testpmd> rx_vlan rm 11 2
+   Get the message::
 
-10. repeat step 5, check the pkts can not be received by VF1.
+     Flow rule #0 created
 
+   Check the flow list::
 
-Test case 10: Enable/Disable IAVF VLAN filtering
-================================================
+     testpmd> flow list 0
 
-1. enable vlan filtering on port VF::
+   ID      Group   Prio    Attr    Rule
+   0       0       0       i--     ETH VLAN VLAN IPV4 TCP => VF
 
-    testpmd> set fwd mac
-    Set mac packet forwarding mode
-    testpmd> vlan set filter on 0
+3. Send matched packet in scapy on tester, check the port 2 of DUT received this packet.
 
-2. check the vlan mode is set successfully::
+Tester::
 
-    testpmd> show port info 0
+    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IP()/TCP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
 
-    ********************* Infos for port 0  *********************
-    ......
-    VLAN offload:
-    strip off, filter on, extend off, qinq strip off
+DUT::
 
-3. tester send qinq pkt and single vlan pkt which outer vlan id is 1 to VF::
+   testpmd> port 2/queue 0: received 1 packets
+   src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=142 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_TCP  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=20 - Receive queue=0x0
+   ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN
 
-    sendp([Ether(dst="00:11:22:33:44:11",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
-    sendp([Ether(dst="00:11:22:33:44:11",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
+4. Send mismatched packet in scapy on tester, check the port 2 of DUT could not receive this packet.
 
-4. check the pkts can't be received in VF.
+Tester::
 
-5. add rx_vlan in VF::
+    >>> sendp([Ether(dst="<dst mac change inputset>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IP()/TCP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
 
-    testpmd> rx_vlan add 1 0
+    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci change inputset>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IP()/TCP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
 
-6. repeat step 3, check the pkts can be received by VF and fwd to tester::
+    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci change inputset>,type=0x0800)/IP()/TCP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
 
-    testpmd> port 0/queue 0: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x8100 - length=522 - nb_segs=1 - hw ptype: L2_ETHER  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN  - l2_len=18 - inner_l2_len=4 - Receive queue=0x0
-    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
-    port 0/queue 0: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x8100 - length=518 - nb_segs=1 - hw ptype: L2_ETHER  - sw ptype: L2_ETHER_VLAN  - l2_len=18 - Receive queue=0x0
-    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IP()/TCP(sport=<sport>,dport=<dport change inputset>)/("X"*80)],iface="<tester interface>")
 
-    tcpdump -i ens786f0 -nn -e -v
+5. Destroy a rule and list rules::
 
-    16:50:38.807158 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype 0x0800,
-    16:50:38.807217 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype 0x0800,
+     testpmd> flow destroy 0 rule 0
 
-    16:51:06.083084 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 518: vlan 1, p 0, ethertype 0x0800,
-    16:51:06.083127 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1Q (0x8100), length 518: vlan 1, p 0, ethertype 0x0800,
+   Get the message::
 
-7. tester send qinq pkt and single vlan pkt which outer vlan id is 11 to VF::
+     Flow rule #0 destroyed
 
-    sendp([Ether(dst="00:11:22:33:44:11",type=0x8100)/Dot1Q(vlan=11,type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
-    sendp([Ether(dst="00:11:22:33:44:11",type=0x8100)/Dot1Q(vlan=11,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
+   Check the flow list::
 
-8. check the pkts can not be received by VF.
+     testpmd> flow list 0
 
-9. remove rx_vlan in VF1::
+   Check the rule not exists in the list.
+   Send matched packets in step 3, check the packets are not to VF1.
 
-    testpmd> rx_vlan rm 1 0
+#Pipeline mode
+Test case 08: DCF switch for MAC_L4_QINQ_IPV6
+=============================================
+subcase: MAC_QINQ_IPV6_UDP
+--------------------------
+The test case enable QINQ switch filter for IPv6 + UDP in pipeline mode, and port can support as dst MAC + outer VLAN id + inner VLAN id + IPv6 + UDP.
 
-10. repeat step 3, check the pkts can not be received by VF.
+Test Steps
+~~~~~~~~~~
+1. Validate a rule::
 
+     testpmd> flow validate 0 priority 0 ingress pattern eth dst is <dst mac> / vlan tci is <outer vlan tci> / vlan tci is <inner vlan tci> / ipv6 dst is <ipv6 dst> / udp src is <sport> dst is <dport> / end actions represented_port ethdev_port_id1 / end
 
-Test case 11: Enable/Disable IAVF VLAN header stripping
-=======================================================
+   Get the message::
 
-1. enable vlan filtering on port VF::
+     Flow rule validated
 
-    testpmd> vlan set filter on 0
-    testpmd> rx_vlan add 1 0
+2. Create a rule and list rules::
 
-2. check the vlan mode is set successfully::
+     testpmd> flow create 0 priority 0 ingress pattern eth dst is <dst mac> / vlan tci is <outer vlan tci> / vlan tci is <inner vlan tci> / ipv6 dst is <ipv6 dst> / udp src is <sport> dst is <dport> / end actions represented_port ethdev_port_id1 / end
 
-    testpmd> show port info 0
+   Get the message::
 
-    ********************* Infos for port 0  *********************
-    ......
-    VLAN offload:
-    strip off, filter on, extend off, qinq strip off
+     Flow rule #0 created
 
-3. enable vlan header stripping on VF::
+   Check the flow list::
 
-    testpmd> vlan set strip on 0
+     testpmd> flow list 0
 
-4. check the vlan mode is set successfully::
+   ID      Group   Prio    Attr    Rule
+   0       0       0       i--     ETH VLAN VLAN IPV6 UDP => VF
 
-    testpmd> show port info 0
+3. Send matched packet in scapy on tester, check the port 2 of DUT received this packet.
 
-    ********************* Infos for port 0  *********************
-    ......
-    VLAN offload:
-    strip on, filter on, extend off, qinq strip off
+Tester::
 
-5. tester send qinq pkt and single vlan pkt which outer vlan id is 1 to VF::
+    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x86DD)/IPv6(dst="<ipv6 dst>")/UDP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
 
-    sendp([Ether(dst="00:11:22:33:44:11",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
-    sendp([Ether(dst="00:11:22:33:44:11",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
+DUT::
 
-6. check the pkts can be received in VF and fwd to tester without outer vlan header::
+   testpmd> port 2/queue 0: received 1 packets
+   src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=150 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV6_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_UDP  - l2_len=18 - inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=8 - Receive queue=0x0
+   ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN
 
-    testpmd> port 0/queue 10: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x8100 - length=518 - nb_segs=1 - RSS hash=0xc7b627aa - RSS queue=0xa - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN L3_IPV4  - l2_len=18 - l3_len=20 - Tail/CRC: 0x58585858/0x00000000 - Receive queue=0xa
-    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+4. Send mismatched packet in scapy on tester, check the port 2 of DUT could not receive this packet.
 
-    port 0/queue 10: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x0800 - length=514 - nb_segs=1 - RSS hash=0xc7b627aa - RSS queue=0xa - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Tail/CRC: 0x58585858/0x00000000 - Receive queue=0xa
-    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+Tester::
 
-    10:12:38.034948 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-    10:12:38.035025 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1Q (0x8100), length 518: vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+    >>> sendp([Ether(dst="<dst mac change inputset>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x86DD)/IPv6(dst="<ipv6 dst>")/UDP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
 
-    10:12:44.806825 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 518: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-    10:12:44.806865 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype IPv4 (0x0800), length 514: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci change inputset>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x86DD)/IPv6(dst="<ipv6 dst>")/UDP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
 
-7. disable vlan header stripping on VF1::
+    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci change inputset>,type=0x86DD)/IPv6(dst="<ipv6 dst>")/UDP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
 
-    testpmd> vlan set strip off 0
+    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x86DD)/IPv6(dst="<ipv6 dst change inputset>")/UDP(sport=<sport>,dport=<dport change inputset>)/("X"*80)],iface="<tester interface>")
 
-8. check the vlan mode is set successfully::
+5. Destroy a rule and list rules::
 
-    testpmd> show port info 0
+     testpmd> flow destroy 0 rule 0
 
-    ********************* Infos for port 0  *********************
-    ......
-    VLAN offload:
-    strip off, filter on, extend off, qinq strip off
+   Get the message::
 
-9. repeat step 5, check the pkts can be received in VF and fwd to tester with outer vlan header::
+     Flow rule #0 destroyed
 
-    testpmd> port 0/queue 10: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x8100 - length=522 - nb_segs=1 - RSS hash=0xc7b627aa - RSS queue=0xa - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - Tail/CRC: 0x58585858/0x00000000 - Receive queue=0xa
-    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+   Check the flow list::
 
-    port 0/queue 10: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x8100 - length=518 - nb_segs=1 - RSS hash=0xc7b627aa - RSS queue=0xa - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN L3_IPV4  - l2_len=18 - l3_len=20 - Tail/CRC: 0x58585858/0x00000000 - Receive queue=0xa
-    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+     testpmd> flow list 0
 
-    09:49:08.295172 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-    09:49:08.295239 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+   Check the rule not exists in the list.
+   Send matched packets in step 3, check the packets are not to VF1.
 
-    09:49:41.043101 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 518: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-    09:49:41.043166 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1Q (0x8100), length 518: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+subcase: MAC_QINQ_IPV6_TCP
+--------------------------
+The test case enable QINQ switch filter for IPv6 + TCP in pipeline mode, and port can support as dst MAC + outer VLAN id + inner VLAN id + IPv6 + TCP.
 
+Test steps
+~~~~~~~~~~
+1. Validate a rule::
 
-Test case 12: Enable/Disable IAVF VLAN header insertion
-=======================================================
+     testpmd> flow validate 0 priority 0 ingress pattern eth dst is <dst mac> / vlan tci is <outer vlan tci> / vlan tci is <inner vlan tci> / ipv6 dst is <ipv6 dst> / tcp src is <sport> dst is <dport> / end actions represented_port ethdev_port_id1 / end
 
-1. disable vf-vlan-pruning flag::
+   Get the message::
 
-    echo 0 > /sys/bus/pci/devices/0000:18:00.0/sriov_numvfs
-    ethtool --set-priv-flags ens785f0 vf-vlan-pruning off
+     Flow rule validated
 
-2. set up test environment again::
+2. Create a rule and list rules::
 
-    echo 1 > /sys/bus/pci/devices/0000:18:00.0/sriov_numvfs
-    ip link set ens785f0 vf 0 mac 00:11:22:33:44:11
-    ip link set dev ens785f0 vf 0 spoofchk off
-    ./usertools/dpdk-devbind.py -b vfio-pci 0000:18:01.0
-    ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:18:01.0 -- -i --rxq=16 --txq=16
-    testpmd> set fwd mac
-    testpmd> set verbose 1
+     testpmd> flow create 0 priority 0 ingress pattern eth dst is <dst mac> / vlan tci is <outer vlan tci> / vlan tci is <inner vlan tci> / ipv6 dst is <ipv6 dst> / tcp src is <sport> dst is <dport> / end actions represented_port ethdev_port_id1 / end
 
-3. enable vlan header insertion on VF::
+   Get the message::
 
-    testpmd> port stop 0
-    Stopping ports...
-    Checking link statuses...
-    Done
-    testpmd> tx_vlan set 0 1
-    testpmd> port start 0
+     Flow rule #0 created
 
-4. tester send pkt to VF::
+   Check the flow list::
 
-    sendp([Ether(dst="00:11:22:33:44:11",type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
-    sendp([Ether(dst="00:11:22:33:44:11",type=0x8100)/Dot1Q(vlan=11,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
+     testpmd> flow list 0
 
-5. check the pkts with vlan header can be received in tester::
+   ID      Group   Prio    Attr    Rule
+   0       0       0       i--     ETH VLAN VLAN IPV6 TCP => VF
 
-    testpmd> port 0/queue 13: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x0800 - length=514 - nb_segs=1 - RSS hash=0xcaf4abfd - RSS queue=0xd - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0xd
-    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+3. Send matched packet in scapy on tester, check the port 2 of DUT received this packet.
 
-    port 0/queue 8: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x8100 - length=518 - nb_segs=1 - RSS hash=0x28099b78 - RSS queue=0x8 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN L3_IPV4  - l2_len=18 - l3_len=20 - Receive queue=0x8
-    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+Tester::
 
-    10:32:55.566801 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype IPv4 (0x0800), length 514: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-    10:32:55.566856 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1Q (0x8100), length 518: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x86DD)/IPv6(dst="<ipv6 dst>")/TCP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
 
-    06:29:32.281896 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 518: vlan 11, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-    06:29:32.281940 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1Q (0x8100), length 522: vlan 11, p 0, ethertype 802.1Q, vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+DUT::
 
-6. disable vlan header insertion on VF1::
+   testpmd> port 2/queue 0: received 1 packets
+   src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=162 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV6_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_TCP  - l2_len=18 - inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=20 - Receive queue=0x0
+   ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN
 
-    testpmd> port stop 0
-    Stopping ports...
-    Checking link statuses...
-    Done
-    testpmd> tx_vlan reset 0
-    testpmd> port start 0
+4. Send mismatched packet in scapy on tester, check the port 2 of DUT could not receive this packet.
 
-7. repeat step 4, check the pkts without vlan tag can be received in tester::
+Tester::
 
-    testpmd> port 0/queue 9: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x0800 - length=514 - nb_segs=1 - RSS hash=0xa63e8869 - RSS queue=0x9 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x9
-    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+    >>> sendp([Ether(dst="<dst mac change inputset>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x86DD)/IPv6(dst="<ipv6 dst>")/TCP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
 
-    port 0/queue 12: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x8100 - length=518 - nb_segs=1 - RSS hash=0x6f5533bc - RSS queue=0xc - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN L3_IPV4  - l2_len=18 - l3_len=20 - Receive queue=0xc
-    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci change inputset>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x86DD)/IPv6(dst="<ipv6 dst>")/TCP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
 
-    10:34:40.070754 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype IPv4 (0x0800), length 514: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-    10:34:40.070824 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype IPv4 (0x0800), length 514: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci change inputset>,type=0x86DD)/IPv6(dst="<ipv6 dst>")/TCP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
 
-    06:36:57.641871 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 518: vlan 11, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-    06:36:57.641909 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1Q (0x8100), length 518: vlan 11, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x86DD)/IPv6(dst="<ipv6 dst change inputset>")/TCP(sport=<sport>,dport=<dport change inputset>)/("X"*80)],iface="<tester interface>")
 
+5. Destroy a rule and list rules::
 
-Test case 13: Enable/disable AVF CRC stripping
-==============================================
+     testpmd> flow destroy 0 rule 0
 
-1. start testpmd with "--disable-crc-strip"::
+   Get the message::
 
-    ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 20-23 -n 4 -a 0000:18:01.0 -- -i --rxq=16 --txq=16 --disable-crc-strip
-    testpmd> set fwd mac
-    testpmd> set verbose 1
+     Flow rule #0 destroyed
 
-2. send pkts to VF::
+   Check the flow list::
 
-    sendp([Ether(dst="00:11:22:33:44:11",type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
+     testpmd> flow list 0
 
-3. check VF1 receive this pkts with CRC::
+   Check the rule not exists in the list.
+   Send matched packets in step 3, check the packets are not to VF1.
 
-    testpmd> port 0/queue 0: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x0800 - length=514 - nb_segs=1 - RSS hash=0x890d9a70 - RSS queue=0x0 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0
-    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+Test case 09: DCF vlan strip when pvid enable
+=============================================
 
-    show port stats all
+1. enable vlan header stripping for VF1 by representor::
 
-    ######################## NIC statistics for port 0  ########################
-    RX-packets: 1          RX-missed: 0          RX-bytes:  518
-    RX-errors: 0
-    RX-nombuf:  0
-    TX-packets: 1          TX-errors: 0          TX-bytes:  514
+    testpmd> vlan set strip on 1
 
-    Throughput (since last show)
-    Rx-pps:            0          Rx-bps:            0
-    Tx-pps:            0          Tx-bps:            0
-    ############################################################################
-    clear port stats all
+    Port 2: reset event
 
-4. enable crc strip in testpmd::
+2. reset VF1(port 2)::
 
-    testpmd> stop
-    testpmd> port stop 0
-    testpmd> port config 0 rx_offload keep_crc off
-    testpmd> port start 0
+    testpmd> port stop 2
+    testpmd> port reset 2
+    testpmd> port start 2
     testpmd> start
 
-5. repeat step 2, check VF receive this pkts without CRC::
+3. tester send qinq pkt and single vlan pkt to VF1::
 
-    testpmd> port 0/queue 2: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x0800 - length=514 - nb_segs=1 - RSS hash=0xa94c21d2 - RSS queue=0x2 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x2
-    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+    sendp([Ether(dst="00:11:22:33:44:11",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
+    sendp([Ether(dst="00:11:22:33:44:11",type=0x8100)/Dot1Q(vlan=21,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
 
-    show port stats all
+4. check the pkts can be received in VF1 and fwd to tester without outer vlan header::
 
-    ######################## NIC statistics for port 0  ########################
-    RX-packets: 1          RX-missed: 0          RX-bytes:  514
-    RX-errors: 0
-    RX-nombuf:  0
-    TX-packets: 1          TX-errors: 0          TX-bytes:  514
+    testpmd> port 2/queue 0: received 1 packets
+    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x8100 - length=518 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN L3_IPV4  - l2_len=18 - l3_len=20 - Receive queue=0x0
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
 
-    Throughput (since last show)
-    Rx-pps:            0          Rx-bps:            0
-    Tx-pps:            0          Tx-bps:            0
-    ############################################################################
-    clear port stats all
+    port 2/queue 0: received 1 packets
+    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x0800 - length=514 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
 
-6. disable crc strip in testpmd::
+    10:15:10.958039 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+    10:15:10.958121 00:11:22:33:44:22 > 02:00:00:00:00:03, ethertype 802.1Q (0x8100), length 518: vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
 
-    testpmd> stop
-    testpmd> port stop 0
-    testpmd> port config 0 rx_offload keep_crc on
-    testpmd> port start 0
-    testpmd> start
+    10:15:15.693894 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 518: vlan 21, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+    10:15:15.693942 00:11:22:33:44:22 > 02:00:00:00:00:03, ethertype IPv4 (0x0800), length 514: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
 
-7. repeat step 2, check VF1 receive this pkts with CRC::
+5. disable vlan header stripping for VF1::
 
-    testpmd> port 0/queue 0: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x0800 - length=514 - nb_segs=1 - RSS hash=0x79c10190 - RSS queue=0x0 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0
-    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+    testpmd> vlan set strip off 1
 
-    show port stats all
+    Port 2: reset event
 
-    ######################## NIC statistics for port 0  ########################
-    RX-packets: 1          RX-missed: 0          RX-bytes:  518
-    RX-errors: 0
-    RX-nombuf:  0
-    TX-packets: 1          TX-errors: 0          TX-bytes:  514
+6. reset VF1::
 
-    Throughput (since last show)
-    Rx-pps:            0          Rx-bps:            0
-    Tx-pps:            0          Tx-bps:            0
-    ############################################################################
-    clear port stats all
+    testpmd> port stop 2
+    testpmd> port reset 2
+    testpmd> port start 2
+    testpmd> start
 
-8. re-launch testpmd without "--disable-crc-strip"::
+7. repeat step 3, check the pkts can be received in VF1 and fwd to tester with outer vlan header::
 
-    ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 20-23 -n 4 -a 0000:18:01.0 -- -i --rxq=16 --txq=16
-    testpmd> set fwd mac
-    testpmd> set verbose 1
+    testpmd> port 2/queue 0: received 1 packets
+    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x8100 - length=518 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN L3_IPV4  - l2_len=18 - l3_len=20 - Receive queue=0x0
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
 
-9. repeat step 2, check VF receive this pkts without CRC::
+    port 2/queue 0: received 1 packets
+    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x0800 - length=514 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
 
-    testpmd> port 0/queue 2: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x0800 - length=514 - nb_segs=1 - RSS hash=0x898ada82 - RSS queue=0x2 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x2
-    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
-
-    show port stats all
-
-    ######################## NIC statistics for port 0  ########################
-    RX-packets: 1          RX-missed: 0          RX-bytes:  514
-    RX-errors: 0
-    RX-nombuf:  0
-    TX-packets: 1          TX-errors: 0          TX-bytes:  514
-
-    Throughput (since last show)
-    Rx-pps:            0          Rx-bps:            0
-    Tx-pps:            0          Tx-bps:            0
-    ############################################################################
-
-
-Test case 14: AVF CRC strip and Vlan strip co-exists
-====================================================
-
-1. start testpmd with crc strip enable, vlan strip disable::
-
-    ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 20-23 -n 4 -a 0000:18:01.0 -- -i --rxq=16 --txq=16
-    testpmd> set fwd mac
-    testpmd> set verbose 1
-    testpmd> show port info 0
-    ********************* Infos for port 0  *********************
-    MAC address: 00:11:22:33:44:11
-    Device name: 0000:18:01.1
-    Driver name: net_iavf
-    ......
-    VLAN offload:
-      strip off, filter off, extend off, qinq strip off
-
-2. request disable vlan strip::
-
-    testpmd> vlan set strip off 0
-
-3. check the vlan strip still disable::
-
-    testpmd> show port info 0
-    ********************* Infos for port 0  *********************
-    MAC address: 00:11:22:33:44:11
-    Device name: 0000:18:01.1
-    Driver name: net_iavf
-    ......
-    VLAN offload:
-      strip off, filter off, extend off, qinq strip off
-
-4. set vlan filter on and add rx_vlan 1::
-
-    testpmd> vlan set filter on 0
-    testpmd> rx_vlan add 1 0
-    testpmd> start
-
-5. send qinq pkts to check vlan strip is off, crc strip is on::
-
-    sendp([Ether(dst="00:11:22:33:44:11",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
-
-    testpmd> port 0/queue 6: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x8100 - length=522 - nb_segs=1 - RSS hash=0xf6521426 - RSS queue=0x6 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - Tail/CRC: 0x58585858/0x00000000 - Receive queue=0x6
-    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
-
-    show port stats all
-
-    ######################## NIC statistics for port 0  ########################
-    RX-packets: 1          RX-missed: 0          RX-bytes:  522
-    RX-errors: 0
-    RX-nombuf:  0
-    TX-packets: 1          TX-errors: 0          TX-bytes:  522
-
-    Throughput (since last show)
-    Rx-pps:            0          Rx-bps:            0
-    Tx-pps:            0          Tx-bps:            0
-    ############################################################################
-
-    09:07:45.863251 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+    10:17:55.321952 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-    09:07:45.863340 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+    10:17:55.322008 00:11:22:33:44:22 > 02:00:00:00:00:03, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
 
-6. request enable vlan strip::
-
-    testpmd> vlan set strip on 0
-
-7. check the vlan strip enable successfully::
-
-    testpmd> show port info 0
-    ********************* Infos for port 0  *********************
-    MAC address: 00:11:22:33:44:11
-    Device name: 0000:18:01.1
-    Driver name: net_iavf
-    ......
-    VLAN offload:
-      strip on, filter off, extend off, qinq strip off
+    10:17:58.009862 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 518: vlan 21, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+    10:17:58.009908 00:11:22:33:44:22 > 02:00:00:00:00:03, ethertype 802.1Q (0x8100), length 518: vlan 21, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
 
-8. repeat step 5, send qinq pkts to check vlan strip is on(tx-4), crc strip is on::
+8. repeat step 1,2, then enable vlan strip by AVF::
 
-    testpmd> port 0/queue 6: received 1 packets
-    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x8100 - length=518 - nb_segs=1 - RSS hash=0xf6521426 - RSS queue=0x6 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN L3_IPV4  - l2_len=18 - l3_len=20 - Tail/CRC: 0x58585858/0x00000000 - Receive queue=0x6
-    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+    testpmd> vlan set strip on 2
 
-    show port stats all
+9. repeat step 3, check the pkts can be received in VF1 and fwd to tester without both outer and inner vlan header::
 
-    ######################## NIC statistics for port 0  ########################
-    RX-packets: 1          RX-missed: 0          RX-bytes:  522
-    RX-errors: 0
-    RX-nombuf:  0
-    TX-packets: 1          TX-errors: 0          TX-bytes:  518
+    testpmd> port 2/queue 0: received 1 packets
+    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x8100 - length=518 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN L3_IPV4  - l2_len=18 - l3_len=20 - Receive queue=0x0
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
 
-    Throughput (since last show)
-    Rx-pps:            0          Rx-bps:            0
-    Tx-pps:            0          Tx-bps:            0
-    ############################################################################
+    port 2/queue 0: received 1 packets
+    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x0800 - length=514 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
 
-    11:09:03.918907 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+    10:28:01.642361 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-    11:09:03.918952 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1Q (0x8100), length 518: vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+    10:28:01.642438 00:11:22:33:44:22 > 02:00:00:00:00:03, ethertype IPv4 (0x0800), length 514: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
 
-9. request disable vlan strip::
-
-    testpmd> vlan set strip off 0
-
-10. check the vlan strip disable successfully::
-
-     testpmd> show port info 0
-     ********************* Infos for port 0  *********************
-     MAC address: 00:11:22:33:44:11
-     Device name: 0000:18:01.1
-     Driver name: net_iavf
-     ......
-     VLAN offload:
-       strip off, filter on, extend off, qinq strip off
-
-11. request disable crc strip::
+    10:28:10.185876 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 518: vlan 21, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+    10:28:10.185916 00:11:22:33:44:22 > 02:00:00:00:00:03, ethertype IPv4 (0x0800), length 514: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
 
-     testpmd> stop
-     testpmd> port stop 0
-     testpmd> port config 0 rx_offload keep_crc on
-     testpmd> port start 0
-     testpmd> start
+10. relaunch testpmd and enable vlan strip by AVF::
 
-12. repeat step 5, send qinq pkts to check vlan strip is off, crc strip is off(rx+4)::
+     testpmd> vlan set strip on 2
 
-     testpmd> port 0/queue 7: received 1 packets
-     src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x8100 - length=522 - nb_segs=1 - RSS hash=0xbc8b1857 - RSS queue=0x7 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - Tail/CRC: 0x58585858/0x6d870bf6 - Receive queue=0x7
-     ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+11. repeat step 1,2 and 3, check the pkts can be received in VF1 and fwd to tester without both outer and inner vlan header::
 
-     show port stats all
-     ######################## NIC statistics for port 0  ########################
-     RX-packets: 1          RX-missed: 0          RX-bytes:  526
-     RX-errors: 0
-     RX-nombuf:  0
-     TX-packets: 1          TX-errors: 0          TX-bytes:  522
+     testpmd> port 2/queue 0: received 1 packets
+     src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x8100 - length=518 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN L3_IPV4  - l2_len=18 - l3_len=20 - Receive queue=0x0
+     ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
 
-     Throughput (since last show)
-     Rx-pps:            0          Rx-bps:            0
-     Tx-pps:            0          Tx-bps:            0
-     ############################################################################
+     port 2/queue 0: received 1 packets
+     src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x0800 - length=514 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0
+     ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
 
-     10:23:57.350934 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+     10:28:01.642361 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
      196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-     10:23:57.351008 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+     10:28:01.642438 00:11:22:33:44:22 > 02:00:00:00:00:03, ethertype IPv4 (0x0800), length 514: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
      196.222.232.221 > 127.0.0.1:  ip-proto-0 480
 
-13. request enable vlan strip::
-
-     testpmd> vlan set strip on 0
-     iavf_execute_vf_cmd(): No response or return failure (-64) for cmd 54
-     iavf_config_vlan_strip_v2(): fail to execute command VIRTCHNL_OP_ENABLE_VLAN_STRIPPING_V2
-     rx_vlan_strip_set(port_pi=0, on=1) failed diag=-5
-
-14. repeat step 5, send qinq pkts to check the vlan strip can not enable::
-
-     testpmd> port 0/queue 7: received 1 packets
-     src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x8100 - length=518 - nb_segs=1 - RSS hash=0xbc8b1857 - RSS queue=0x7 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN L3_IPV4  - l2_len=18 - l3_len=20 - Tail/CRC: 0x58585858/0x6d870bf6 - Receive queue=0x7
-     ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+     10:28:10.185876 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 518: vlan 21, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+     10:28:10.185916 00:11:22:33:44:22 > 02:00:00:00:00:03, ethertype IPv4 (0x0800), length 514: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
 
-     show port stats all
-     ######################## NIC statistics for port 0  ########################
-     RX-packets: 1          RX-missed: 0          RX-bytes:  526
-     RX-errors: 0
-     RX-nombuf:  0
-     TX-packets: 1          TX-errors: 0          TX-bytes:  522
 
-     Throughput (since last show)
-     Rx-pps:            0          Rx-bps:            0
-     Tx-pps:            0          Tx-bps:            0
-     ############################################################################
+Test case 10: DCF vlan insertion when pvid enable
+=================================================
 
-     10:26:08.346936 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-     10:26:08.347006 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+1. add tx port vlan for VF1 by representor 1::
 
-15. request disable vlan strip::
+    testpmd> tx_vlan set pvid 1 24 on
 
-     vlan set strip off 0
+    Port 2: reset event
 
-16. check the vlan strip still disable::
+2. reset VF1::
 
-     testpmd> show port info 0
-     ********************* Infos for port 0  *********************
-     MAC address: 00:11:22:33:44:11
-     Device name: 0000:18:01.1
-     Driver name: net_iavf
-     ......
-     VLAN offload:
-       strip off, filter on, extend off, qinq strip off
+    testpmd> port stop 2
+    testpmd> port reset 2
+    testpmd> port start 2
+    testpmd> start
 
-17. request enable crc strip::
+3. send a pkt without vlan header to VF2(VF2 rx, VF1 tx)::
 
-     testpmd> stop
-     testpmd> port stop 0
-     testpmd> port config 0 rx_offload keep_crc off
-     testpmd> port start 0
-     testpmd> start
+    sendp([Ether(dst="00:11:22:33:44:22",type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
+    sendp([Ether(dst="00:11:22:33:44:22",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
 
-18. repeat step 5, send qinq pkts to check the crc strip enable successfully::
+4. check the dpdk can receive this pkt with VF2 and fwd this pkt with outer vlan header id 24 by VF1, and the vlan header ptype is 8100::
 
-     testpmd> port 0/queue 3: received 1 packets
-     src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x8100 - length=522 - nb_segs=1 - RSS hash=0x2b4ad203 - RSS queue=0x3 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - Receive queue=0x3
-     ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
-     port 0/queue 3: sent 1 packets
-     src=00:11:22:33:44:11 - dst=02:00:00:00:00:00 - type=0x8100 - length=522 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - Send queue=0x3
-     ol_flags: PKT_RX_L4_CKSUM_UNKNOWN PKT_RX_IP_CKSUM_UNKNOWN PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+    testpmd> port 4/queue 0: received 1 packets
+    src=00:00:00:00:00:00 - dst=00:11:22:33:44:22 - type=0x0800 - length=514 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
 
-     show port stats all
-     ######################## NIC statistics for port 0  ########################
-     RX-packets: 1          RX-missed: 0          RX-bytes:  522
-     RX-errors: 0
-     RX-nombuf:  0
-     TX-packets: 1          TX-errors: 0          TX-bytes:  522
+    port 4/queue 0: received 1 packets
+    src=00:00:00:00:00:00 - dst=00:11:22:33:44:22 - type=0x8100 - length=518 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN L3_IPV4  - l2_len=18 - l3_len=20 - Receive queue=0x0
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
 
-     Throughput (since last show)
-     Rx-pps:            0          Rx-bps:            0
-     Tx-pps:            0          Tx-bps:            0
-     ############################################################################
+    tcpdump -i ens786f0 -nn -e -v
+    11:08:01.061908 00:00:00:00:00:00 > 00:11:22:33:44:22, ethertype IPv4 (0x0800), length 514: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+    11:08:01.061987 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1Q (0x8100), length 518: vlan 24, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
 
-     10:29:19.995352 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
-     10:29:19.995424 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
-     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+    11:08:06.773884 00:00:00:00:00:00 > 00:11:22:33:44:22, ethertype 802.1Q (0x8100), length 518: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+    11:08:06.773928 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1Q (0x8100), length 522: vlan 24, p 0, ethertype 802.1Q, vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
 
-====================================
-ICE DCF QINQ Switch Filter Test Plan
-====================================
+5. change the tpid of vlan header to 88A8 for VF1::
 
-Description
-===========
-Intel® Ethernet 800 Series support l4 for QinQ switch filter in DCF driver is by
-dst MAC + outer VLAN id + inner VLAN id + dst IP + dst port, and port can support
-as eth / vlan / vlan / IP / tcp|udp.
-* Enable QINQ switch filter for IPv4/IPv6, IPv4 + TCP/UDP in non-pipeline mode. 
-* Enable QINQ switch filter for IPv6 + TCP/UDP in pipeline mode. 
+    testpmd> vlan set outer tpid 0x88a8 1
 
-Prerequisites
-=============
+6. reset VF1::
 
-Hardware
---------
-Supportted NICs: Intel® Ethernet Network Adapter E810-XXVDA4/Intel® Ethernet Network Adapter E810-CQDA2
+    testpmd> port stop 2
+    testpmd> port reset 2
+    testpmd> port start 2
+    testpmd> start
 
-Software
---------
-dpdk: http://dpdk.org/git/dpdk
-scapy: http://www.secdev.org/projects/scapy/
+7. repeat step 3, check the dpdk can receive this pkt with VF2 and fwd this pkt with outer vlan header id 24 by VF1, and the vlan header ptype is 88a8::
 
-General Set Up
---------------
-1. Compile DPDK::
+    testpmd> port 4/queue 0: received 1 packets
+    src=00:00:00:00:00:00 - dst=00:11:22:33:44:22 - type=0x0800 - length=514 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
 
-    # CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib --default-library=static x86_64-native-linuxapp-gcc
-    # ninja -C x86_64-native-linuxapp-gcc -j 110
+    port 4/queue 0: received 1 packets
+    src=00:00:00:00:00:00 - dst=00:11:22:33:44:22 - type=0x8100 - length=518 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN L3_IPV4  - l2_len=18 - l3_len=20 - Receive queue=0x0
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
 
-2. Get the pci device id and interface of DUT and tester. 
-   For example, 0000:3b:00.0 and 0000:af:00.0 is pci device id,
-   ens785f0 and ens260f0 is interface::
+    tcpdump -i ens786f0 -nn -e -v
+    11:10:32.441834 00:00:00:00:00:00 > 00:11:22:33:44:22, ethertype IPv4 (0x0800), length 514: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+    11:10:32.441883 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1Q-QinQ (0x88a8), length 518: vlan 24, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
 
-    <dpdk dir># ./usertools/dpdk-devbind.py -s
+    11:10:34.081863 00:00:00:00:00:00 > 00:11:22:33:44:22, ethertype 802.1Q (0x8100), length 518: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+    11:10:34.081913 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1Q-QinQ (0x88a8), length 522: vlan 24, p 0, ethertype 802.1Q, vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
 
-    0000:3b:00.0 'Ethernet Controller E810-C for SFP 1593' if=ens785f0 drv=ice unused=vfio-pci
-    0000:af:00.0 'Ethernet Controller XXV710 for 25GbE SFP28 158b' if=ens260f0 drv=i40e unused=vfio-pci
+8. change the tpid of vlan header to 9100 for VF1::
 
-4. Generate 2 VFs on PF0::
+    testpmd> vlan set outer tpid 0x9100 1
 
-    # echo 2 > /sys/bus/pci/devices/0000:3b:00.0/sriov_numvfs
+9. reset VF1::
 
-5. Get VF pci device id and interface of DUT.
+    testpmd> port stop 2
+    testpmd> port reset 2
+    testpmd> port start 2
+    testpmd> start
 
-    # ./usertools/dpdk-devbind.py -s
+10. repeat step 3, check the dpdk can receive this pkt with VF2 and fwd this pkt with outer vlan header id 24 by VF1, and the vlan header ptype is 9100::
 
-     0000:3b:01.0 'Ethernet Adaptive Virtual Function 1889' if=ens785f0v0 drv=iavf unused=vfio-pci
-     0000:3b:01.1 'Ethernet Adaptive Virtual Function 1889' if=ens785f0v1 drv=iavf unused=vfio-pci
+     testpmd> port 4/queue 0: received 1 packets
+     src=00:00:00:00:00:00 - dst=00:11:22:33:44:22 - type=0x0800 - length=514 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0
+     ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
 
-6. Set VF0 as trust::
+     port 4/queue 0: received 1 packets
+     src=00:00:00:00:00:00 - dst=00:11:22:33:44:22 - type=0x8100 - length=518 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN L3_IPV4  - l2_len=18 - l3_len=20 - Receive queue=0x0
+     ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
 
-    # ip link set ens785f0 vf 0 trust on
+     tcpdump -i ens786f0 -nn -e -v
+     11:12:13.237834 00:00:00:00:00:00 > 00:11:22:33:44:22, ethertype IPv4 (0x0800), length 514: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+     11:12:13.237890 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1Q-9100 (0x9100), length 518: vlan 24, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
 
-7. Bind the DUT port to dpdk::
+     11:12:26.049869 00:00:00:00:00:00 > 00:11:22:33:44:22, ethertype 802.1Q (0x8100), length 518: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+     11:12:26.049920 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q-9100, vlan 24, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
 
-    <dpdk dir># ./usertools/dpdk-devbind.py -b vfio-pci <DUT port pci device id>
+11. enable tx_vlan for VF1 by AVF::
 
-Test case
-=========
+     testpmd> port stop 2
+     Stopping ports...
+     Checking link statuses...
+     Done
+     testpmd> tx_vlan set 2 11
+     testpmd> port start 2
 
-Common Steps
-------------
-1. Launch the userland ``testpmd`` application on DUT as follows::
+12. repeat step 3, check the dpdk can receive this pkt with VF2 and fwd this pkt with outer vlan header id 24, inner vlan id 11 by VF1::
 
-    <dpdk build dir>/app/dpdk-testpmd <EAL options> -a <DUT port pci device id> -- -i 
+     testpmd> port 3/queue 0: received 1 packets
+     src=00:00:00:00:00:00 - dst=00:11:22:33:44:22 - type=0x0800 - length=514 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0
+     ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
 
-..note:: 
+     port 3/queue 0: received 1 packets
+     src=00:00:00:00:00:00 - dst=00:11:22:33:44:22 - type=0x8100 - length=518 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN L3_IPV4  - l2_len=18 - l3_len=20 - Receive queue=0x0
+     ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
 
-    For <EAL options>, you can use "-c 0x6 -n 4", you can also refer to testpmd doc for other setings.
-    For <DUT port pci device id>, you can use "0000:3b:01.0,cap=dcf,representor=[1] -a 0000:3b:01.1" for this test plan.
+     11:22:29.561918 00:00:00:00:00:00 > 00:11:22:33:44:22, ethertype IPv4 (0x0800), length 514: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+     11:22:29.561992 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1Q (0x8100), length 522: vlan 24, p 0, ethertype 802.1Q, vlan 11, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
 
-2. Set verbose::
-    
-     testpmd> set verbose 1
-    
-3. Set fwd engine and start::
+     11:22:44.481889 00:00:00:00:00:00 > 00:11:22:33:44:22, ethertype 802.1Q (0x8100), length 518: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+     11:22:44.481922 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1Q (0x8100), length 526: vlan 24, p 0, ethertype 802.1Q, vlan 11, p 0, ethertype 802.1Q, vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
 
-     testpmd> set fwd rxonly
-     testpmd> start
+13. relaunch testpmd and execute step 11 then step 1, 2 and 3, check the dpdk can receive this pkt with VF2 and fwd this pkt with outer vlan header id 24, inner vlan id 11 by VF1::
 
-4. Show port info::
+     testpmd> port 3/queue 0: received 1 packets
+     src=00:00:00:00:00:00 - dst=00:11:22:33:44:22 - type=0x0800 - length=514 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0
+     ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
 
-     testpmd> show port info all
+     port 3/queue 0: received 1 packets
+     src=00:00:00:00:00:00 - dst=00:11:22:33:44:22 - type=0x8100 - length=518 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN L3_IPV4  - l2_len=18 - l3_len=20 - Receive queue=0x0
+     ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
 
-   Check the VF0 driver is net_ice_dcf.
-
-All the packets in this test plan use below settings:
-dst mac: 00:11:22:33:44:55
-dst mac change inputset: 00:11:22:33:44:33
-ipv4 src: 192.168.1.1
-ipv4 dst: 192.168.1.2
-ipv4 src change inputset: 192.168.1.3
-ipv4 dst change inputset: 192.168.1.4
-ipv6 dst: CDCD:910A:2222:5498:8475:1111:3900:2020 
-ipv6 dst change inputset: CDCD:910A:2222:5498:8475:1111:3900:2023
-outer vlan tci: 2
-outer vlan tci change inputset: 1
-inner vlan tci: 1
-inner vlan tci change inputset: 2
-sport: 50
-sport change inputset: 52
-dport: 23
-dport change inputset: 22
+     11:22:29.561918 00:00:00:00:00:00 > 00:11:22:33:44:22, ethertype IPv4 (0x0800), length 514: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+     11:22:29.561992 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1Q (0x8100), length 522: vlan 24, p 0, ethertype 802.1Q, vlan 11, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
 
-#Non-pipeline mode
+     11:22:44.481889 00:00:00:00:00:00 > 00:11:22:33:44:22, ethertype 802.1Q (0x8100), length 518: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+     11:22:44.481922 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1Q (0x8100), length 526: vlan 24, p 0, ethertype 802.1Q, vlan 11, p 0, ethertype 802.1Q, vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+     196.222.232.221 > 127.0.0.1:  ip-proto-0 480
 
-Test Case 1: MAC_QINQ_IPV4
---------------------------
-The test case enable QINQ switch filter for IPv4 in non-pipeline mode, and port can support as dst MAC + outer VLAN id + inner VLAN id + IPv4.
 
-Test Steps
-~~~~~~~~~~
-1. Validate a rule::
-   
-     testpmd> flow validate 0 ingress pattern eth dst is <dst mac> / vlan tci is <outer vlan tci> / vlan tci is <inner vlan tci> / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions represented_port ethdev_port_id1 / end
+Test case 11: DCF vlan filter when pvid enable
+==============================================
 
-   Get the message::
+1. reset test environment, create vfs and enable vlan prune flag::
 
-     Flow rule validated
+    ethtool --set-priv-flags ens785f0 vf-vlan-pruning on
 
-2. Create a rule and list rules::
+2. repeat Prerequisites steps from 7 to 12
 
-     testpmd> flow create 0 ingress pattern eth dst is <dst mac> / vlan tci is <outer vlan tci> / vlan tci is <inner vlan tci> / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions represented_port ethdev_port_id1 / end
-     
-   Get the message::
+3. enable vlan filter and add rx_vlan for VF1 by representor::
 
-     Flow rule #0 created
-   
-   Check the flow list::
+    testpmd> vlan set filter on 1
+    testpmd> rx_vlan add 11 1
+    rte_eth_dev_vlan_filter(port_pi=1, vlan_id=11, on=1) failed diag=-95
 
-     testpmd> flow list 0
-   
-   ID      Group   Prio    Attr    Rule
-   0       0       0       i--     ETH VLAN VLAN IPV4 => VF
+4. enable vlan filter and add rx_vlan for VF1 by AVF::
 
-3. Send matched packet in scapy on tester, check the port 2 of DUT received this packet.
+    testpmd> vlan set filter on 2
+    testpmd> rx_vlan add 11 2
 
-Tester::
+5. tester send qinq pkt and single vlan pkt which outer vlan id is 11 to VF1::
 
-    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IP(src="<ipv4 src>",dst="<ipv4 dst>")/("X"*80)],iface="<tester interface>")
+    sendp([Ether(dst="00:11:22:33:44:11",type=0x8100)/Dot1Q(vlan=11,type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
+    sendp([Ether(dst="00:11:22:33:44:11",type=0x8100)/Dot1Q(vlan=11,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
 
-DUT::
+6. check the pkts can be received by VF1 and fwd to tester::
 
     testpmd> port 2/queue 0: received 1 packets
-  src=A4:BF:01:4D:6F:32 - dst=00:11:22:33:44:55 - type=0x8100 - length=122 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - Receive queue=0x0
-  ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN
+    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x8100 - length=522 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - Receive queue=0x0
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+    port 2/queue 0: received 1 packets
+    src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x8100 - length=518 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN L3_IPV4  - l2_len=18 - l3_len=20 - Receive queue=0x0
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
 
-4. Send mismatched packet in scapy on tester, check the port 2 of DUT could not receive this packet.
+    10:21:53.418039 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 522: vlan 11, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+    10:21:53.418114 00:11:22:33:44:22 > 02:00:00:00:00:03, ethertype 802.1Q (0x8100), length 522: vlan 11, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
 
-Tester::
+    10:22:00.005885 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 518: vlan 11, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
+    10:22:00.005919 00:11:22:33:44:22 > 02:00:00:00:00:03, ethertype 802.1Q (0x8100), length 518: vlan 11, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0), length 500)
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
 
-    >>> sendp([Ether(dst="<dst mac change inputset>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IP(src="<ipv4 src>",dst="<ipv4 dst>")/("X"*80)],iface="<tester interface>")
-    
-    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci change inputset>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IP(src="<ipv4 src>",dst="<ipv4 dst>")/("X"*80)],iface="<tester interface>")
+7. tester send qinq pkt and single vlan pkt which outer vlan id is 21 to VF1::
 
-    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci change inputset>,type=0x0800)/IP(src="<ipv4 src>",dst="<ipv4 dst>")/("X"*80)],iface="<tester interface>")
+    sendp([Ether(dst="00:11:22:33:44:11",type=0x8100)/Dot1Q(vlan=21,type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
+    sendp([Ether(dst="00:11:22:33:44:11",type=0x8100)/Dot1Q(vlan=21,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
 
-    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IP(src="<ipv4 src change inputset>",dst="<ipv4 dst>")/("X"*80)],iface="<tester interface>")
+8. check the pkts can not be received by VF1.
 
-5. Destroy a rule and list rules::
-
-     testpmd> flow destroy 0 rule 0
-  
-   Get the message::
-
-     Flow rule #0 destroyed
-
-   Check the flow list::
-
-     testpmd> flow list 0
-
-   Check the rule not exists in the list.
-   Send matched packets in step 3, check the packets are not to port 2.
-
-Test Case 2: MAC_QINQ_IPV6
---------------------------
-The test case enable QINQ switch filter for IPv6 in non-pipeline mode, and port can support as dst MAC + outer VLAN id + inner VLAN id + IPv6.
-
-Test Steps
-~~~~~~~~~~
-1. Validate a rule::
-   
-     testpmd> flow validate 0 ingress pattern eth dst is <dst mac> / vlan tci is <outer vlan tci> / vlan tci is <inner vlan tci> / ipv6 dst is <ipv6 dst> / end actions represented_port ethdev_port_id1 / end
-
-   Get the message::
-
-     Flow rule validated
-
-2. Create a rule and list rules::
-
-     testpmd> flow create 0 ingress pattern eth dst is <dst mac> / vlan tci is <outer vlan tci> / vlan tci is <inner vlan tci> / ipv6 dst is <ipv6 dst> / end actions represented_port ethdev_port_id1 / end
-
-   Get the message::
-
-     Flow rule #0 created
-   
-   Check the flow list::
-
-     testpmd> flow list 0
-
-   ID      Group   Prio    Attr    Rule
-   0       0       0       i--     ETH VLAN VLAN IPV6 => VF
-
-3. Send matched packet in scapy on tester, check the port 2 of DUT received this packet.
-
-Tester::
-
-    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IPv6(dst="<ipv6 dst>")/("X"*80)],iface="<tester interface>")
-
-DUT::
-
-    testpmd> port 2/queue 0: received 1 packets
-  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=142 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV6_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV6  - l2_len=18 - inner_l2_len=4 - inner_l3_len=40 - Receive queue=0x0
-  ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN
-
-4. Send mismatched packet in scapy on tester, check the port 2 of DUT could not receive this packet.
-
-Tester::
-
-    >>> sendp([Ether(dst="<dst mac change inputset>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IPv6(dst="<ipv6 dst>")/("X"*80)],iface="<tester interface>")
-   
-    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci change inputset>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IPv6(dst="<ipv6 dst>")/("X"*80)],iface="<tester interface>")
-
-    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci change inputset>,type=0x0800)/IPv6(dst="<ipv6 dst>")/("X"*80)],iface="<tester interface>")
-
-    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IPv6(dst="<ipv6 dst change inputset>")/("X"*80)],iface="<tester interface>")
-
-5. Destroy a rule and list rules::
-
-     testpmd> flow destroy 0 rule 0
-  
-   Get the message::
-
-     Flow rule #0 destroyed
-
-   Check the flow list::
-
-     testpmd> flow list 0
-
-   Check the rule not exists in the list.
-   Send matched packets in step 3, check the packets are not to port 2.
-
-Test Case 3: MAC_QINQ_IPV4_UDP
-------------------------------
-The test case enable QINQ switch filter for IPv4 + UDP in non-pipeline mode, and port can support as dst MAC + outer VLAN id + inner VLAN id + IPv4 + UDP.
-
-Test steps
-~~~~~~~~~~
-1. Validate a rule::
-   
-     testpmd> flow validate 0 ingress pattern eth dst is <dst mac> / vlan tci is <outer vlan tci> / vlan tci is <inner vlan tci> / ipv4 / udp src is <sport> dst is <dport> / end actions represented_port ethdev_port_id1 / end
-
-   Get the message::
-
-     Flow rule validated
-
-2. Create a rule and list rules::
-
-     testpmd> flow create 0 ingress pattern eth dst is <dst mac> / vlan tci is <outer vlan tci> / vlan tci is <inner vlan tci> / ipv4 / udp src is <sport> dst is <dport> / end actions represented_port ethdev_port_id1 / end
-
-   Get the message::
-
-     Flow rule #0 created
-   
-   Check the flow list::
-
-     testpmd> flow list 0
-
-   ID      Group   Prio    Attr    Rule
-   0       0       0       i--     ETH VLAN VLAN IPV4 UDP => VF
-
-3. Send matched packet in scapy on tester, check the port 2 of DUT received this packet.
-
-Tester::
-
-    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IP()/UDP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
-
-DUT::
-
-    testpmd> port 2/queue 0: received 1 packets
-  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=130 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_UDP  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=8 - Receive queue=0x0
-  ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN
-
-4. Send mismatched packet in scapy on tester, check the port 2 of DUT could not receive this packet.
-
-Tester::
-
-    >>> sendp([Ether(dst="<dst mac change inputset>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IP()/UDP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
-    
-    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci change inputset>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IP()/UDP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
-
-    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci change inputset>,type=0x0800)/IP()/UDP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
-
-    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IP()/UDP(sport=<sport>,dport=<dport change inputset>)/("X"*80)],iface="<tester interface>")
-
-5. Destroy a rule and list rules::
-
-     testpmd> flow destroy 0 rule 0
-  
-   Get the message::
-
-     Flow rule #0 destroyed
-
-   Check the flow list::
-
-     testpmd> flow list 0
-
-   Check the rule not exists in the list.
-   Send matched packets in step 3, check the packets are not to port 2.
-
-Test Case 4: MAC_QINQ_IPV4_TCP
-------------------------------
-The test case enable QINQ switch filter for IPv4 + TCP in non-pipeline mode, and port can support as dst MAC + outer VLAN id + inner VLAN id + IPv4 + TCP.
-
-Test Steps
-~~~~~~~~~~
-1. Validate a rule::
-   
-     testpmd> flow validate 0 ingress pattern eth dst is <dst mac> / vlan tci is <outer vlan tci> / vlan tci is <inner vlan tci> / ipv4 / tcp src is <sport> dst is <dport> / end actions represented_port ethdev_port_id1 / end
-
-   Get the message::
-
-     Flow rule validated
-
-2. Create a rule and list rules::
-
-     testpmd> flow create 0 ingress pattern eth dst is <dst mac> / vlan tci is <outer vlan tci> / vlan tci is <inner vlan tci> / ipv4 / tcp src is <sport> dst is <dport> / end actions represented_port ethdev_port_id1 / end
-
-   Get the message::
-
-     Flow rule #0 created
-   
-   Check the flow list::
-
-     testpmd> flow list 0
-
-   ID      Group   Prio    Attr    Rule
-   0       0       0       i--     ETH VLAN VLAN IPV4 TCP => VF
-
-3. Send matched packet in scapy on tester, check the port 2 of DUT received this packet.
-
-Tester::
-
-    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IP()/TCP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
-
-DUT::
-
-    testpmd> port 2/queue 0: received 1 packets
-  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=142 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_TCP  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=20 - Receive queue=0x0
-  ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN
-
-4. Send mismatched packet in scapy on tester, check the port 2 of DUT could not receive this packet.
-
-Tester::
-
-    >>> sendp([Ether(dst="<dst mac change inputset>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IP()/TCP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
-
-    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci change inputset>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IP()/TCP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
-
-    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci change inputset>,type=0x0800)/IP()/TCP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
-
-    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x0800)/IP()/TCP(sport=<sport>,dport=<dport change inputset>)/("X"*80)],iface="<tester interface>")
-
-5. Destroy a rule and list rules::
-
-     testpmd> flow destroy 0 rule 0
-  
-   Get the message::
-
-     Flow rule #0 destroyed
-
-   Check the flow list::
-
-     testpmd> flow list 0
-
-   Check the rule not exists in the list.
-   Send matched packets in step 3, check the packets are not to port 2.
-
-#Pipeline mode
-
-Test Case 5: MAC_QINQ_IPV6_UDP
-------------------------------
-The test case enable QINQ switch filter for IPv6 + UDP in pipeline mode, and port can support as dst MAC + outer VLAN id + inner VLAN id + IPv6 + UDP.
-
-Test Steps
-~~~~~~~~~~
-1. Validate a rule::
-   
-     testpmd> flow validate 0 priority 0 ingress pattern eth dst is <dst mac> / vlan tci is <outer vlan tci> / vlan tci is <inner vlan tci> / ipv6 dst is <ipv6 dst> / udp src is <sport> dst is <dport> / end actions represented_port ethdev_port_id1 / end
-
-   Get the message::
-
-     Flow rule validated
-
-2. Create a rule and list rules::
-
-     testpmd> flow create 0 priority 0 ingress pattern eth dst is <dst mac> / vlan tci is <outer vlan tci> / vlan tci is <inner vlan tci> / ipv6 dst is <ipv6 dst> / udp src is <sport> dst is <dport> / end actions represented_port ethdev_port_id1 / end
-
-   Get the message::
-
-     Flow rule #0 created
-   
-   Check the flow list::
-
-     testpmd> flow list 0
-
-   ID      Group   Prio    Attr    Rule
-   0       0       0       i--     ETH VLAN VLAN IPV6 UDP => VF
-
-3. Send matched packet in scapy on tester, check the port 2 of DUT received this packet.
-
-Tester::
-
-    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x86DD)/IPv6(dst="<ipv6 dst>")/UDP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
-
-DUT::
-
-    testpmd> port 2/queue 0: received 1 packets
-  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=150 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV6_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_UDP  - l2_len=18 - inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=8 - Receive queue=0x0
-  ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN
-
-4. Send mismatched packet in scapy on tester, check the port 2 of DUT could not receive this packet.
-
-Tester::
-
-    >>> sendp([Ether(dst="<dst mac change inputset>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x86DD)/IPv6(dst="<ipv6 dst>")/UDP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
-    
-    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci change inputset>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x86DD)/IPv6(dst="<ipv6 dst>")/UDP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
-
-    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci change inputset>,type=0x86DD)/IPv6(dst="<ipv6 dst>")/UDP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
-
-    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x86DD)/IPv6(dst="<ipv6 dst change inputset>")/UDP(sport=<sport>,dport=<dport change inputset>)/("X"*80)],iface="<tester interface>")
-
-5. Destroy a rule and list rules::
-
-     testpmd> flow destroy 0 rule 0
-  
-   Get the message::
-
-     Flow rule #0 destroyed
-
-   Check the flow list::
-
-     testpmd> flow list 0
-
-   Check the rule not exists in the list.
-   Send matched packets in step 3, check the packets are not to port 2.
-
-Test case 6: MAC_QINQ_IPV6_TCP
-------------------------------
-The test case enable QINQ switch filter for IPv6 + TCP in pipeline mode, and port can support as dst MAC + outer VLAN id + inner VLAN id + IPv6 + TCP.
-
-Test steps
-~~~~~~~~~~
-1. Validate a rule::
-   
-     testpmd> flow validate 0 priority 0 ingress pattern eth dst is <dst mac> / vlan tci is <outer vlan tci> / vlan tci is <inner vlan tci> / ipv6 dst is <ipv6 dst> / tcp src is <sport> dst is <dport> / end actions represented_port ethdev_port_id1 / end
-
-   Get the message::
-
-     Flow rule validated
-
-2. Create a rule and list rules::
-
-     testpmd> flow create 0 priority 0 ingress pattern eth dst is <dst mac> / vlan tci is <outer vlan tci> / vlan tci is <inner vlan tci> / ipv6 dst is <ipv6 dst> / tcp src is <sport> dst is <dport> / end actions represented_port ethdev_port_id1 / end
-
-   Get the message::
-
-     Flow rule #0 created
-   
-   Check the flow list::
-
-     testpmd> flow list 0
-
-   ID      Group   Prio    Attr    Rule
-   0       0       0       i--     ETH VLAN VLAN IPV6 TCP => VF
-   
-3. Send matched packet in scapy on tester, check the port 2 of DUT received this packet.
-
-Tester::
-
-    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x86DD)/IPv6(dst="<ipv6 dst>")/TCP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
-
-DUT::
-
-    testpmd> port 2/queue 0: received 1 packets
-  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=162 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV6_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_TCP  - l2_len=18 - inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=20 - Receive queue=0x0
-  ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN
-
-4. Send mismatched packet in scapy on tester, check the port 2 of DUT could not receive this packet.
-
-Tester::
-
-    >>> sendp([Ether(dst="<dst mac change inputset>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x86DD)/IPv6(dst="<ipv6 dst>")/TCP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
-    
-    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci change inputset>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x86DD)/IPv6(dst="<ipv6 dst>")/TCP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
-
-    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci change inputset>,type=0x86DD)/IPv6(dst="<ipv6 dst>")/TCP(sport=<sport>,dport=<dport>)/("X"*80)],iface="<tester interface>")
-
-    >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<outer vlan tci>,type=0x8100)/Dot1Q(vlan=<inner vlan tci>,type=0x86DD)/IPv6(dst="<ipv6 dst change inputset>")/TCP(sport=<sport>,dport=<dport change inputset>)/("X"*80)],iface="<tester interface>")
-
-5. Destroy a rule and list rules::
-
-     testpmd> flow destroy 0 rule 0
-  
-   Get the message::
-
-     Flow rule #0 destroyed
-
-   Check the flow list::
-
-     testpmd> flow list 0
-
-   Check the rule not exists in the list.
-   Send matched packets in step 3, check the packets are not to port 2.
+9. remove rx_vlan::
 
+    testpmd> rx_vlan rm 11 2
 
+10. repeat step 5, check the pkts can not be received by VF1.