test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V3]test_plans: add test plan for cvl supporting qinq protocol
@ 2021-03-02 16:35 qifu
  2021-03-03  5:11 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: qifu @ 2021-03-02 16:35 UTC (permalink / raw)
  To: dts; +Cc: qifu

dpdk can support qinq in CVL from dpdk-21.02,
add test plan to cover 3 parts:
1. DCF switch filter for QinQ.
2. DCF pvid support for QinQ.
3. AVF VLAN offload for QinQ.

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

diff --git a/test_plans/cvl_qinq_test_plan.rst b/test_plans/cvl_qinq_test_plan.rst
new file mode 100644
index 00000000..6e0beb61
--- /dev/null
+++ b/test_plans/cvl_qinq_test_plan.rst
@@ -0,0 +1,1407 @@
+.. Copyright (c) <2021>, Intel Corporation\r
+   All rights reserved.\r
+\r
+   Redistribution and use in source and binary forms, with or without\r
+   modification, are permitted provided that the following conditions\r
+   are met:\r
+\r
+   - Redistributions of source code must retain the above copyright\r
+     notice, this list of conditions and the following disclaimer.\r
+\r
+   - Redistributions in binary form must reproduce the above copyright\r
+     notice, this list of conditions and the following disclaimer in\r
+     the documentation and/or other materials provided with the\r
+     distribution.\r
+\r
+   - Neither the name of Intel Corporation nor the names of its\r
+     contributors may be used to endorse or promote products derived\r
+     from this software without specific prior written permission.\r
+\r
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\r
+   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\r
+   COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\r
+   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
+   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\r
+   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\r
+   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\r
+   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\r
+   OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+=========================\r
+CVL support QinQ protocol\r
+=========================\r
+DPDK support QinQ protocol in CVL as below requirements:\r
+* DCF support QinQ by add steering rule and vlan strip disable.\r
+* DCF is able to set port vlan by port representor.\r
+* AVF is able to configure inner VLAN filter when port vlan is enabled base on negotiation.\r
+* AVF is able to configure outer VLAN (8100) if no port VLANis enabled to compatible with legacy mode.\r
+this test plan contain 3 parts to cover above requirements:\r
+* DCF switch filter for QinQ.\r
+* DCF pvid support for QinQ.\r
+* AVF VLAN offload for QinQ.\r
+\r
+\r
+Prerequisites\r
+=============\r
+1. Hardware:\r
+   columbiaville_25g/columbiaville_100g\r
+\r
+2. Software:\r
+   dpdk: http://dpdk.org/git/dpdk\r
+   scapy: http://www.secdev.org/projects/scapy/\r
+\r
+3. Copy specific ice package to /lib/firmware/updates/intel/ice/ddp/ice.pkg,\r
+   then load driver::\r
+\r
+    rmmod ice\r
+    insmod ice.ko\r
+\r
+4. Compile DPDK::\r
+\r
+    CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib --default-library=static x86_64-native-linuxapp-gcc\r
+    ninja -C x86_64-native-linuxapp-gcc -j 110\r
+\r
+5. Get the pci device id of DUT, for example::\r
+\r
+    ./usertools/dpdk-devbind.py -s\r
+\r
+    0000:18:00.0 'Device 159b' if=ens785f0 drv=ice unused=vfio-pci\r
+    0000:18:00.1 'Device 159b' if=ens785f1 drv=ice unused=vfio-pci\r
+\r
+6. Enable vlan prune flag::\r
+\r
+    ethtool --set-priv-flags ens785f0 vf-vlan-prune-disable on\r
+\r
+7. Generate 4 VFs on PF0(not all the VFs are used)::\r
+\r
+    echo 4 > /sys/bus/pci/devices/0000:18:00.0/sriov_numvfs\r
+\r
+    ./usertools/dpdk-devbind.py -s\r
+    0000:18:01.0 'Ethernet Adaptive Virtual Function 1889' if=ens785f0v0 drv=iavf unused=vfio-pci\r
+    0000:18:01.1 'Ethernet Adaptive Virtual Function 1889' if=ens785f0v1 drv=iavf unused=vfio-pci\r
+    0000:18:01.2 'Ethernet Adaptive Virtual Function 1889' if=ens785f0v2 drv=iavf unused=vfio-pci\r
+    0000:18:01.3 'Ethernet Adaptive Virtual Function 1889' if=ens785f0v3 drv=iavf unused=vfio-pci\r
+\r
+8. Set VF0 as trust::\r
+\r
+    ip link set ens785f0 vf 0 trust on\r
+\r
+9. Set mac addr for VF1, VF2 and VF3::\r
+\r
+    ip link set ens785f0 vf 1 mac 00:11:22:33:44:11\r
+    ip link set ens785f0 vf 2 mac 00:11:22:33:44:22\r
+    ip link set ens785f0 vf 3 mac 00:11:22:33:44:33\r
+\r
+10. Bind VFs to dpdk driver::\r
+\r
+    modprobe vfio-pci\r
+    ./usertools/dpdk-devbind.py -b vfio-pci 0000:18:01.0 0000:18:01.1 0000:18:01.2 0000:18:01.3\r
+\r
+11. Disabel spoofchk for VF::\r
+\r
+    ip link set dev ens785f0 vf 0 spoofchk off\r
+    ip link set dev ens785f0 vf 1 spoofchk off\r
+    ip link set dev ens785f0 vf 2 spoofchk off\r
+    ip link set dev ens785f0 vf 3 spoofchk off\r
+\r
+12. For test cases for DCF switch filter(01-06), use below cmd to launch testpmd::\r
+\r
+    ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:18:01.0,cap=dcf -a 0000:18:01.1 -a 0000:18:01.2 -a 0000:18:01.3 -- -i\r
+    testpmd> set fwd rxonly\r
+    testpmd> set verbose 1\r
+    testpmd> start\r
+    testpmd> show port info all\r
+\r
+   check the VF0 driver is net_ice_dcf.\r
+\r
+   For test cases for DCF pvid(07-09), use below cmd to launch testpmd::\r
+\r
+   ./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\r
+    testpmd> set fwd mac\r
+    testpmd> set verbose 1\r
+    testpmd> start\r
+    testpmd> show port info all\r
+\r
+   check the VF0 driver is net_ice_dcf.\r
+\r
+13. For AVF QinQ test cases(10-14), recreate Generate 1 VFs on PF0, reconfig the VF then launch testpmd::\r
+\r
+    echo 0 > /sys/bus/pci/devices/0000:18:00.0/sriov_numvfs\r
+    ethtool --set-priv-flags ens785f0 vf-vlan-prune-disable off\r
+    echo 1 > /sys/bus/pci/devices/0000:18:00.0/sriov_numvfs\r
+    ip link set ens785f0 vf 0 mac 00:11:22:33:44:11\r
+    ip link set dev ens785f0 vf 0 spoofchk off\r
+\r
+    ./usertools/dpdk-devbind.py -b vfio-pci 0000:18:01.0\r
+    ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:18:01.0 -- -i --rxq=16 --txq=16\r
+    testpmd> set fwd mac\r
+    testpmd> set verbose 1\r
+    testpmd> start\r
+\r
+DCF switch filter support pattern and input set\r
+-----------------------------------------------\r
+.. table::\r
+\r
+    +------------------------+--------------------------+---------------------------------------------------------+\r
+    | Packet type            | Pattern                  | All the Input Set options in combination                |\r
+    +========================+==========================+=========================================================+\r
+    | eth_qinq_ipv4          | MAC_QINQ_IPV4_PAY        | dest mac, outer vlan, inner vlan, src ip, dst ip        |\r
+    +------------------------+--------------------------+---------------------------------------------------------+\r
+    | eth_qinq_ipv6          | MAC_QINQ_IPV6_PAY        | dest mac, outer vlan, inner vlan, src ip, dst ip        |\r
+    +------------------------+--------------------------+---------------------------------------------------------+\r
+    | eth_qinq_pppoes        | MAC_QINQ_PPPOE_PAY       | dest mac, outer vlan, inner vlan, seid                  |\r
+    +------------------------+--------------------------+---------------------------------------------------------+\r
+    | eth_qinq_pppoes_proto  | MAC_QINQ_PPPOE_PAY       | dest mac, outer vlan, inner vlan, seid, pppoe_proto_id  |\r
+    +------------------------+--------------------------+---------------------------------------------------------+\r
+    | eth_qinq_pppoes_ipv4   | MAC_QINQ_PPPOE_IPV4_PAY  | dest mac, outer vlan, inner vlan, seid, src ip, dst ip  |\r
+    +------------------------+--------------------------+---------------------------------------------------------+\r
+    | eth_qinq_pppoes_ipv6   | MAC_QINQ_PPPOE_IPV6_PAY  | dest mac, outer vlan, inner vlan, seid, src ip, dst ip  |\r
+    +------------------------+--------------------------+---------------------------------------------------------+\r
+\r
+\r
+Test case 01: DCF switch for MAC_QINQ_IPV4_PAY\r
+==============================================\r
+subcase: src ip\r
+---------------\r
+1. create a rule::\r
+\r
+    testpmd> flow create 0 ingress pattern eth / vlan tci is 2 / vlan tci is 1 / ipv4 src is 196.222.232.221 / end actions vf id 1 / end\r
+    testpmd> flow list 0\r
+\r
+   check the rule exists in the list.\r
+\r
+2. send matched packets::\r
+\r
+    sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")\r
+\r
+   check port 1 receive the packet.\r
+   send mismatched packets::\r
+\r
+    sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP(src="196.222.232.222")/("X"*480)], iface="ens786f0")\r
+    sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP(dst="196.222.232.221")/("X"*480)], iface="ens786f0")\r
+    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")\r
+    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")\r
+\r
+   check the packets are not to port 1.\r
+\r
+3. verify rules can be destroyed::\r
+\r
+    testpmd> flow destroy 0 rule 0\r
+    testpmd> flow list 0\r
+\r
+   check the rule not exists in the list.\r
+   send matched packets in step 2, check the packets are not to port 1.\r
+\r
+subcase: dst ip\r
+---------------\r
+1. create a rule::\r
+\r
+    testpmd> flow create 0 ingress pattern eth / vlan tci is 2 / vlan tci is 1 / ipv4 dst is 196.222.232.221 / end actions vf id 1 / end\r
+    testpmd> flow list 0\r
+\r
+   check the rule exists in the list.\r
+\r
+2. send matched packets::\r
+\r
+    sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP(dst="196.222.232.221")/("X"*480)], iface="ens786f0")\r
+\r
+   check port 1 receive the packet.\r
+   send mismatched packets::\r
+\r
+    sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP(dst="196.222.232.222")/("X"*480)], iface="ens786f0")\r
+    sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")\r
+    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")\r
+    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")\r
+\r
+   check the packets are not to port 1.\r
+\r
+3. verify rules can be destroyed::\r
+\r
+    testpmd> flow destroy 0 rule 0\r
+    testpmd> flow list 0\r
+\r
+   check the rule not exists in the list.\r
+   send matched packets in step 2, check the packets are not to port 1.\r
+\r
+\r
+Test case 02: DCF switch for MAC_QINQ_IPV6_PAY\r
+==============================================\r
+subcase: src ip\r
+---------------\r
+1. create a rule::\r
+\r
+    testpmd> flow create 0 ingress pattern eth / vlan tci is 2 / vlan tci is 1 / ipv6 src is 1111:2222:3333:4444:5555:6666:7777:8888 / end actions vf id 1 / end\r
+    testpmd> flow list 0\r
+\r
+   check the rule exists in the list.\r
+\r
+2. send matched packets::\r
+\r
+    sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(src="1111:2222:3333:4444:5555:6666:7777:8888")/("X"*480)], iface="ens786f0")\r
+\r
+   check port 1 receive the packet.\r
+   send mismatched packets::\r
+\r
+    sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(src="1111:2222:3333:4444:5555:6666:7777:9999")/("X"*480)], iface="ens786f0")\r
+    sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888")/("X"*480)], iface="ens786f0")\r
+    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")\r
+    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")\r
+\r
+   check the packets are not to port 1.\r
+\r
+3. verify rules can be destroyed::\r
+\r
+    testpmd> flow destroy 0 rule 0\r
+    testpmd> flow list 0\r
+\r
+   check the rule not exists in the list.\r
+   send matched packets in step 2, check the packets are not to port 1.\r
+\r
+subcase: dst ip\r
+---------------\r
+1. create a rule::\r
+\r
+    testpmd> flow create 0 ingress pattern eth / vlan tci is 2 / vlan tci is 1 / ipv6 dst is 1111:2222:3333:4444:5555:6666:7777:8888 / end actions vf id 1 / end\r
+    testpmd> flow list 0\r
+\r
+   check the rule exists in the list.\r
+\r
+2. send matched packets::\r
+\r
+    sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888")/("X"*480)], iface="ens786f0")\r
+\r
+   check port 1 receive the packet.\r
+   send mismatched packets::\r
+\r
+    sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:9999")/("X"*480)], iface="ens786f0")\r
+    sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(src="1111:2222:3333:4444:5555:6666:7777:8888")/("X"*480)], iface="ens786f0")\r
+    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")\r
+    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")\r
+\r
+   check the packets are not to port 1.\r
+\r
+3. verify rules can be destroyed::\r
+\r
+    testpmd> flow destroy 0 rule 0\r
+    testpmd> flow list 0\r
+\r
+   check the rule not exists in the list.\r
+   send matched packets in step 2, check the packets are not to port 1.\r
+\r
+\r
+Test case 03: DCF switch for MAC_QINQ_PPPOE_PAY\r
+===============================================\r
+\r
+1. create a rule::\r
+\r
+    testpmd> flow create 0 ingress pattern eth / vlan tci is 2 / vlan tci is 1 / pppoes seid is 1 / end actions vf id 1 / end\r
+    testpmd> flow list 0\r
+\r
+   check the rule exists in the list.\r
+\r
+2. send matched packets::\r
+\r
+    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")\r
+    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")\r
+\r
+   check port 1 receive the packet.\r
+   send mismatched packets::\r
+\r
+    sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=0x2)/PPP(proto=0x57)/IPv6()/("X"*480)], iface="ens786f0")\r
+    sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=0x1)/PPP(proto=0x57)/IPv6()/("X"*480)], iface="ens786f0")\r
+    sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=0x1)/PPP(proto=0x57)/IPv6()/("X"*480)], iface="ens786f0")\r
+    sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=0x2)/PPP(proto=0x21)/IP()/("X"*480)], iface="ens786f0")\r
+    sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=0x1)/PPP(proto=0x21)/IP()/("X"*480)], iface="ens786f0")\r
+    sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=0x1)/PPP(proto=0x21)/IP()/("X"*480)], iface="ens786f0")\r
+\r
+   check the packets are not to port 1.\r
+\r
+3. verify rules can be destroyed::\r
+\r
+    testpmd> flow destroy 0 rule 0\r
+    testpmd> flow list 0\r
+\r
+   check the rule not exists in the list.\r
+   send matched packets in step 2, check the packets are not to port 1.\r
+\r
+\r
+Test case 04: DCF switch for MAC_QINQ_PPPOE_PAY_Proto\r
+=====================================================\r
+\r
+1. create a rule::\r
+\r
+    testpmd> flow create 0 ingress pattern eth / vlan tci is 2 / vlan tci is 1 / pppoes seid is 1 / pppoe_proto_id is 0x0057 / end actions vf id 1 / end\r
+    testpmd> flow list 0\r
+\r
+   check the rule exists in the list.\r
+\r
+2. send matched packets::\r
+\r
+    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")\r
+\r
+   check port 1 receive the packet.\r
+   send mismatched packets::\r
+\r
+    sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=0x2)/PPP(proto=0x57)/IPv6()/("X"*480)], iface="ens786f0")\r
+    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")\r
+    sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=0x1)/PPP(proto=0x57)/IPv6()/("X"*480)], iface="ens786f0")\r
+    sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=0x1)/PPP(proto=0x57)/IPv6()/("X"*480)], iface="ens786f0")\r
+\r
+   check the packets are not to port 1.\r
+\r
+3. verify rules can be destroyed::\r
+\r
+    testpmd> flow destroy 0 rule 0\r
+    testpmd> flow list 0\r
+\r
+   check the rule not exists in the list.\r
+   send matched packets in step 2, check the packets are not to port 1.\r
+\r
+\r
+Test case 05: DCF switch for MAC_QINQ_PPPOE_IPV4\r
+================================================\r
+subcase: src ip\r
+---------------\r
+1. create a rule::\r
+\r
+    testpmd> flow create 0 ingress pattern eth / vlan tci is 2 / vlan tci is 1 / pppoes seid is 1 / ipv4 src is 196.222.232.221 / end actions vf id 1 / end\r
+    testpmd> flow list 0\r
+\r
+   check the rule exists in the list.\r
+\r
+2. send matched packets::\r
+\r
+    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(src="196.222.232.221")/UDP(dport=23)/("X"*480)], iface="ens786f0")\r
+\r
+   check port 1 receive the packet.\r
+   send mismatched packets::\r
+\r
+    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(src="196.222.232.222")/UDP(dport=23)/("X"*480)], iface="ens786f0")\r
+    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(dst="196.222.232.221")/UDP(dport=23)/("X"*480)], iface="ens786f0")\r
+    sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x8864)/PPPoE(sessionid=0x2)/PPP(proto=0x21)/IP(src="196.222.232.221")/UDP(dport=23)/("X"*480)], iface="ens786f0")\r
+    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")\r
+    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")\r
+\r
+   check the packets are not to port 1.\r
+\r
+3. verify rules can be destroyed::\r
+\r
+    testpmd> flow destroy 0 rule 0\r
+    testpmd> flow list 0\r
+\r
+   check the rule not exists in the list.\r
+   send matched packets in step 2, check the packets are not to port 1.\r
+\r
+subcase: dst ip\r
+---------------\r
+1. create a rule::\r
+\r
+    testpmd> flow create 0 ingress pattern eth / vlan tci is 2 / vlan tci is 1 / pppoes seid is 1 / ipv4 dst is 196.222.232.221 / end actions vf id 1 / end\r
+    testpmd> flow list 0\r
+\r
+   check the rule exists in the list.\r
+\r
+2. send matched packets::\r
+\r
+    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(dst="196.222.232.221")/UDP(dport=23)/("X"*480)], iface="ens786f0")\r
+\r
+   check port 1 receive the packet.\r
+   send mismatched packets::\r
+\r
+    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(dst="196.222.232.222")/UDP(dport=23)/("X"*480)], iface="ens786f0")\r
+    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(src="196.222.232.221")/UDP(dport=23)/("X"*480)], iface="ens786f0")\r
+    sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x8864)/PPPoE(sessionid=0x2)/PPP(proto=0x21)/IP(dst="196.222.232.221")/UDP(dport=23)/("X"*480)], iface="ens786f0")\r
+    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")\r
+    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")\r
+\r
+   check the packets are not to port 1.\r
+\r
+3. verify rules can be destroyed::\r
+\r
+    testpmd> flow destroy 0 rule 0\r
+    testpmd> flow list 0\r
+\r
+   check the rule not exists in the list.\r
+   send matched packets in step 2, check the packets are not to port 1.\r
+\r
+\r
+Test case 06: DCF switch for MAC_QINQ_PPPOE_IPV6\r
+================================================\r
+subcase: src ip\r
+---------------\r
+1. create a rule::\r
+\r
+    testpmd> flow create 0 ingress pattern eth / vlan tci is 2 / vlan tci is 1 / pppoes seid is 1 / ipv6 src is 1111:2222:3333:4444:5555:6666:7777:8888 / end actions vf id 1 / end\r
+    testpmd> flow list 0\r
+\r
+   check the rule exists in the list.\r
+\r
+2. send matched packets::\r
+\r
+    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(src="1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport=23)/("X"*480)], iface="ens786f0")\r
+\r
+   check port 1 receive the packet.\r
+   send mismatched packets::\r
+\r
+    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(src="1111:2222:3333:4444:5555:6666:7777:9999")/UDP(dport=23)/("X"*480)], iface="ens786f0")\r
+    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(dst="1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport=23)/("X"*480)], iface="ens786f0")\r
+    sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x8864)/PPPoE(sessionid=0x2)/PPP(proto=0x57)/IPv6(src="1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport=23)/("X"*480)], iface="ens786f0")\r
+    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")\r
+    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")\r
+\r
+   check the packets are not to port 1.\r
+\r
+3. verify rules can be destroyed::\r
+\r
+    testpmd> flow destroy 0 rule 0\r
+    testpmd> flow list 0\r
+\r
+   check the rule not exists in the list.\r
+   send matched packets in step 2, check the packets are not to port 1.\r
+\r
+subcase: dst ip\r
+---------------\r
+1. create a rule::\r
+\r
+    testpmd> flow create 0 ingress pattern eth / vlan tci is 2 / vlan tci is 1 / pppoes seid is 1 / ipv6 dst is 1111:2222:3333:4444:5555:6666:7777:8888 / end actions vf id 1 / end\r
+    testpmd> flow list 0\r
+\r
+   check the rule exists in the list.\r
+\r
+2. send matched packets::\r
+\r
+    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(dst="1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport=23)/("X"*480)], iface="ens786f0")\r
+\r
+   check port 1 receive the packet.\r
+   send mismatched packets::\r
+\r
+    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(dst="1111:2222:3333:4444:5555:6666:7777:9999")/UDP(dport=23)/("X"*480)], iface="ens786f0")\r
+    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(src="1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport=23)/("X"*480)], iface="ens786f0")\r
+    sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x8864)/PPPoE(sessionid=0x2)/PPP(proto=0x57)/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport=23)/("X"*480)], iface="ens786f0")\r
+    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")\r
+    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")\r
+\r
+   check the packets are not to port 1.\r
+\r
+3. verify rules can be destroyed::\r
+\r
+    testpmd> flow destroy 0 rule 0\r
+    testpmd> flow list 0\r
+\r
+   check the rule not exists in the list.\r
+   send matched packets in step 2, check the packets are not to port 1.\r
+\r
+\r
+Test case 07: vlan strip when pvid enable\r
+=========================================\r
+\r
+1. enable vlan header stripping for VF1 by representor::\r
+\r
+    testpmd> vlan set strip on 1\r
+\r
+    Port 2: reset event\r
+\r
+2. reset VF1(port 2)::\r
+\r
+    testpmd> port stop 2\r
+    testpmd> port reset 2\r
+    testpmd> port start 2\r
+    testpmd> start\r
+\r
+3. tester send qinq pkt and single vlan pkt to VF1::\r
+\r
+    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")\r
+    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")\r
+\r
+4. check the pkts can be received in VF1 and fwd to tester without outer vlan header::\r
+\r
+    testpmd> port 2/queue 0: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    port 2/queue 0: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+5. disable vlan header stripping for VF1::\r
+\r
+    testpmd> vlan set strip off 1\r
+\r
+    Port 2: reset event\r
+\r
+6. reset VF1::\r
+\r
+    testpmd> port stop 2\r
+    testpmd> port reset 2\r
+    testpmd> port start 2\r
+    testpmd> start\r
+\r
+7. repeat step 3, check the pkts can be received in VF1 and fwd to tester with outer vlan header::\r
+\r
+    testpmd> port 2/queue 0: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    port 2/queue 0: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+8. repeat step 1,2, then enable vlan strip by AVF::\r
+\r
+    testpmd> vlan set strip on 2\r
+\r
+9. repeat step 3, check the pkts can be received in VF1 and fwd to tester without both outer and inner vlan header::\r
+\r
+    testpmd> port 2/queue 0: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    port 2/queue 0: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+10. relaunch testpmd and enable vlan strip by AVF::\r
+\r
+    testpmd> vlan set strip on 2\r
+\r
+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::\r
+\r
+    testpmd> port 2/queue 0: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    port 2/queue 0: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+\r
+Test case 08: vlan insertion when pvid enable\r
+=============================================\r
+\r
+1. add tx port vlan for VF1 by representor 1::\r
+\r
+    testpmd> tx_vlan set pvid 1 24 on\r
+\r
+    Port 2: reset event\r
+\r
+2. reset VF1::\r
+\r
+    testpmd> port stop 2\r
+    testpmd> port reset 2\r
+    testpmd> port start 2\r
+    testpmd> start\r
+\r
+3. send a pkt without vlan header to VF2(VF2 rx, VF1 tx)::\r
+\r
+    sendp([Ether(dst="00:11:22:33:44:22",type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")\r
+    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")\r
+\r
+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::\r
+\r
+    testpmd> port 4/queue 0: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    port 4/queue 0: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    tcpdump -i ens786f0 -nn -e -v\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+5. change the tpid of vlan header to 88A8 for VF1::\r
+\r
+    testpmd> vlan set outer tpid 0x88a8 1\r
+\r
+6. reset VF1::\r
+\r
+    testpmd> port stop 2\r
+    testpmd> port reset 2\r
+    testpmd> port start 2\r
+    testpmd> start\r
+\r
+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::\r
+\r
+    testpmd> port 4/queue 0: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    port 4/queue 0: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    tcpdump -i ens786f0 -nn -e -v\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+8. change the tpid of vlan header to 9100 for VF1::\r
+\r
+    testpmd> vlan set outer tpid 0x9100 1\r
+\r
+9. reset VF1::\r
+\r
+    testpmd> port stop 2\r
+    testpmd> port reset 2\r
+    testpmd> port start 2\r
+    testpmd> start\r
+\r
+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::\r
+\r
+    testpmd> port 4/queue 0: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    port 4/queue 0: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    tcpdump -i ens786f0 -nn -e -v\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+11. enable tx_vlan for VF1 by AVF::\r
+\r
+    testpmd> port stop 2\r
+    Stopping ports...\r
+    Checking link statuses...\r
+    Done\r
+    testpmd> tx_vlan set 2 11\r
+    testpmd> port start 2\r
+\r
+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::\r
+\r
+    testpmd> port 3/queue 0: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    port 3/queue 0: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+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::\r
+\r
+    testpmd> port 3/queue 0: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    port 3/queue 0: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+\r
+Test case 09: vlan filter when pvid enable\r
+==========================================\r
+\r
+1. reset test environment, create vfs and disable vlan prune flag::\r
+\r
+    ethtool --set-priv-flags ens785f0 vf-vlan-prune-disable off\r
+\r
+2. repeat Prerequisites steps from 7 to 12\r
+\r
+3. enable vlan filter and add rx_vlan for VF1 by representor::\r
+\r
+    testpmd> vlan set filter on 1\r
+    testpmd> rx_vlan add 11 1\r
+    rte_eth_dev_vlan_filter(port_pi=1, vlan_id=11, on=1) failed diag=-95\r
+\r
+4. enable vlan filter and add rx_vlan for VF1 by AVF::\r
+\r
+    testpmd> vlan set filter on 2\r
+    testpmd> rx_vlan add 11 2\r
+\r
+5. tester send qinq pkt and single vlan pkt which outer vlan id is 11 to VF1::\r
+\r
+    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")\r
+    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")\r
+\r
+6. check the pkts can be received by VF1 and fwd to tester::\r
+\r
+    testpmd> port 2/queue 0: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+    port 2/queue 0: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+7. tester send qinq pkt and single vlan pkt which outer vlan id is 21 to VF1::\r
+\r
+    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")\r
+    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")\r
+\r
+8. check the pkts can not be received by VF1.\r
+\r
+9. remove rx_vlan::\r
+\r
+    testpmd> rx_vlan rm 11 2\r
+\r
+10. repeat step 5, check the pkts can not be received by VF1.\r
+\r
+\r
+Test case 10: Enable/Disable IAVF VLAN filtering\r
+================================================\r
+\r
+1. enable vlan filtering on port VF::\r
+\r
+    testpmd> set fwd mac\r
+    Set mac packet forwarding mode\r
+    testpmd> vlan set filter on 0\r
+\r
+2. check the vlan mode is set successfully::\r
+\r
+    testpmd> show port info 0\r
+\r
+    ********************* Infos for port 0  *********************\r
+    ......\r
+    VLAN offload:\r
+    strip off, filter on, extend off, qinq strip off\r
+\r
+3. tester send qinq pkt and single vlan pkt which outer vlan id is 1 to VF::\r
+\r
+    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")\r
+    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")\r
+\r
+4. check the pkts can't be received in VF::\r
+\r
+5. add rx_vlan in VF::\r
+\r
+    testpmd> rx_vlan add 1 0\r
+\r
+6. repeat step 3, check the pkts can be received by VF and fwd to tester::\r
+\r
+    testpmd> port 0/queue 0: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+    port 0/queue 0: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    tcpdump -i ens786f0 -nn -e -v\r
+\r
+    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,\r
+    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,\r
+\r
+    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,\r
+    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,\r
+\r
+7. tester send qinq pkt and single vlan pkt which outer vlan id is 11 to VF::\r
+\r
+    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")\r
+    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")\r
+\r
+8. check the pkts can not be received by VF.\r
+\r
+9. remove rx_vlan in VF1::\r
+\r
+    testpmd> rx_vlan rm 1 0\r
+\r
+10. repeat step 3, check the pkts can not be received by VF.\r
+\r
+\r
+Test case 11: Enable/Disable IAVF VLAN header stripping\r
+=======================================================\r
+\r
+1. enable vlan filtering on port VF::\r
+\r
+    testpmd> vlan set filter on 0\r
+    testpmd> rx_vlan add 1 0\r
+\r
+2. check the vlan mode is set successfully::\r
+\r
+    testpmd> show port info 0\r
+\r
+    ********************* Infos for port 0  *********************\r
+    ......\r
+    VLAN offload:\r
+    strip off, filter on, extend off, qinq strip off\r
+\r
+3. enable vlan header stripping on VF::\r
+\r
+    testpmd> vlan set strip on 0\r
+\r
+4. check the vlan mode is set successfully::\r
+\r
+    testpmd> show port info 0\r
+\r
+    ********************* Infos for port 0  *********************\r
+    ......\r
+    VLAN offload:\r
+    strip on, filter on, extend off, qinq strip off\r
+\r
+5. tester send qinq pkt and single vlan pkt which outer vlan id is 1 to VF::\r
+\r
+    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")\r
+    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")\r
+\r
+6. check the pkts can be received in VF and fwd to tester without outer vlan header::\r
+\r
+    testpmd> port 0/queue 10: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    port 0/queue 10: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+7. disable vlan header stripping on VF1::\r
+\r
+    testpmd> vlan set strip off 0\r
+\r
+8. check the vlan mode is set successfully::\r
+\r
+    testpmd> show port info 0\r
+\r
+    ********************* Infos for port 0  *********************\r
+    ......\r
+    VLAN offload:\r
+    strip off, filter on, extend off, qinq strip off\r
+\r
+9. repeat step 5, check the pkts can be received in VF and fwd to tester with outer vlan header::\r
+\r
+    testpmd> port 0/queue 10: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    port 0/queue 10: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+\r
+Test case 12: Enable/Disable IAVF VLAN header insertion\r
+=======================================================\r
+\r
+1. enable vf-vlan-prune-disable flag::\r
+\r
+    echo 0 > /sys/bus/pci/devices/0000:18:00.0/sriov_numvfs\r
+    ethtool --set-priv-flags ens785f0 vf-vlan-prune-disable on\r
+\r
+2. set up test environment again::\r
+\r
+    echo 1 > /sys/bus/pci/devices/0000:18:00.0/sriov_numvfs\r
+    ip link set ens785f0 vf 0 mac 00:11:22:33:44:11\r
+    ip link set dev ens785f0 vf 0 spoofchk off\r
+    ./usertools/dpdk-devbind.py -b vfio-pci 0000:18:01.0\r
+    ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:18:01.0 -- -i --rxq=16 --txq=16\r
+    testpmd> set fwd mac\r
+    testpmd> set verbose 1\r
+\r
+3. enable vlan header insertion on VF::\r
+\r
+    testpmd> port stop 0\r
+    Stopping ports...\r
+    Checking link statuses...\r
+    Done\r
+    testpmd> tx_vlan set 0 1\r
+    testpmd> port start 0\r
+\r
+4. tester send pkt to VF::\r
+\r
+    sendp([Ether(dst="00:11:22:33:44:11",type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")\r
+    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")\r
+\r
+5. check the pkts with vlan header can be received in tester::\r
+\r
+    testpmd> port 0/queue 13: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    port 0/queue 8: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+6. disable vlan header insertion on VF1::\r
+\r
+    testpmd> port stop 0\r
+    Stopping ports...\r
+    Checking link statuses...\r
+    Done\r
+    testpmd> tx_vlan reset 0\r
+    testpmd> port start 0\r
+\r
+7. repeat step 4, check the pkts without vlan tag can be received in tester::\r
+\r
+    testpmd> port 0/queue 9: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    port 0/queue 12: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+\r
+Test case 13: Enable/disable AVF CRC stripping\r
+==============================================\r
+\r
+1. start testpmd with "--disable-crc-strip"::\r
+\r
+    ./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\r
+    testpmd> set fwd mac\r
+    testpmd> set verbose 1\r
+\r
+2. send pkts to VF::\r
+\r
+    sendp([Ether(dst="00:11:22:33:44:11",type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")\r
+\r
+3. check VF1 receive this pkts with CRC::\r
+\r
+    testpmd> port 0/queue 0: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    show port stats all\r
+\r
+    ######################## NIC statistics for port 0  ########################\r
+    RX-packets: 1          RX-missed: 0          RX-bytes:  518\r
+    RX-errors: 0\r
+    RX-nombuf:  0\r
+    TX-packets: 1          TX-errors: 0          TX-bytes:  514\r
+\r
+    Throughput (since last show)\r
+    Rx-pps:            0          Rx-bps:            0\r
+    Tx-pps:            0          Tx-bps:            0\r
+    ############################################################################\r
+    clear port stats all\r
+\r
+4. enable crc strip in testpmd::\r
+\r
+    testpmd> stop\r
+    testpmd> port stop 0\r
+    testpmd> port config 0 rx_offload keep_crc off\r
+    testpmd> port start 0\r
+    testpmd> start\r
+\r
+5. repeat step 2, check VF receive this pkts without CRC::\r
+\r
+    testpmd> port 0/queue 2: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    show port stats all\r
+\r
+    ######################## NIC statistics for port 0  ########################\r
+    RX-packets: 1          RX-missed: 0          RX-bytes:  514\r
+    RX-errors: 0\r
+    RX-nombuf:  0\r
+    TX-packets: 1          TX-errors: 0          TX-bytes:  514\r
+\r
+    Throughput (since last show)\r
+    Rx-pps:            0          Rx-bps:            0\r
+    Tx-pps:            0          Tx-bps:            0\r
+    ############################################################################\r
+    clear port stats all\r
+\r
+6. disable crc strip in testpmd::\r
+\r
+    testpmd> stop\r
+    testpmd> port stop 0\r
+    testpmd> port config 0 rx_offload keep_crc on\r
+    testpmd> port start 0\r
+    testpmd> start\r
+\r
+7. repeat step 2, check VF1 receive this pkts with CRC::\r
+\r
+    testpmd> port 0/queue 0: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    show port stats all\r
+\r
+    ######################## NIC statistics for port 0  ########################\r
+    RX-packets: 1          RX-missed: 0          RX-bytes:  518\r
+    RX-errors: 0\r
+    RX-nombuf:  0\r
+    TX-packets: 1          TX-errors: 0          TX-bytes:  514\r
+\r
+    Throughput (since last show)\r
+    Rx-pps:            0          Rx-bps:            0\r
+    Tx-pps:            0          Tx-bps:            0\r
+    ############################################################################\r
+    clear port stats all\r
+\r
+8. re-launch testpmd without "--disable-crc-strip"::\r
+\r
+    ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 20-23 -n 4 -a 0000:18:01.0 -- -i --rxq=16 --txq=16\r
+    testpmd> set fwd mac\r
+    testpmd> set verbose 1\r
+\r
+9. repeat step 2, check VF receive this pkts without CRC::\r
+\r
+    testpmd> port 0/queue 2: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    show port stats all\r
+\r
+    ######################## NIC statistics for port 0  ########################\r
+    RX-packets: 1          RX-missed: 0          RX-bytes:  514\r
+    RX-errors: 0\r
+    RX-nombuf:  0\r
+    TX-packets: 1          TX-errors: 0          TX-bytes:  514\r
+\r
+    Throughput (since last show)\r
+    Rx-pps:            0          Rx-bps:            0\r
+    Tx-pps:            0          Tx-bps:            0\r
+    ############################################################################\r
+\r
+\r
+Test case 14: AVF CRC strip and Vlan strip co-exists\r
+====================================================\r
+\r
+1. start testpmd with crc strip enable, vlan strip disable::\r
+\r
+    ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 20-23 -n 4 -a 0000:18:01.0 -- -i --rxq=16 --txq=16\r
+    testpmd> set fwd mac\r
+    testpmd> set verbose 1\r
+    testpmd> show port info 0\r
+    ********************* Infos for port 0  *********************\r
+    MAC address: 00:11:22:33:44:11\r
+    Device name: 0000:18:01.1\r
+    Driver name: net_iavf\r
+    ......\r
+    VLAN offload:\r
+      strip off, filter off, extend off, qinq strip off\r
+\r
+2. request disable vlan strip::\r
+\r
+    testpmd> vlan set strip off 0\r
+\r
+3. check the vlan strip still disable::\r
+\r
+    testpmd> show port info 0\r
+    ********************* Infos for port 0  *********************\r
+    MAC address: 00:11:22:33:44:11\r
+    Device name: 0000:18:01.1\r
+    Driver name: net_iavf\r
+    ......\r
+    VLAN offload:\r
+      strip off, filter off, extend off, qinq strip off\r
+\r
+4. set vlan filter on and add rx_vlan 1::\r
+\r
+    testpmd> vlan set filter on 0\r
+    testpmd> rx_vlan add 1 0\r
+    testpmd> start\r
+\r
+5. send qinq pkts to check vlan strip is off, crc strip is on::\r
+\r
+    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")\r
+\r
+    testpmd> port 0/queue 6: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    show port stats all\r
+\r
+    ######################## NIC statistics for port 0  ########################\r
+    RX-packets: 1          RX-missed: 0          RX-bytes:  522\r
+    RX-errors: 0\r
+    RX-nombuf:  0\r
+    TX-packets: 1          TX-errors: 0          TX-bytes:  522\r
+\r
+    Throughput (since last show)\r
+    Rx-pps:            0          Rx-bps:            0\r
+    Tx-pps:            0          Tx-bps:            0\r
+    ############################################################################\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+6. request enable vlan strip::\r
+\r
+    testpmd> vlan set strip on 0\r
+\r
+7. check the vlan strip enable successfully::\r
+\r
+    testpmd> show port info 0\r
+    ********************* Infos for port 0  *********************\r
+    MAC address: 00:11:22:33:44:11\r
+    Device name: 0000:18:01.1\r
+    Driver name: net_iavf\r
+    ......\r
+    VLAN offload:\r
+      strip on, filter off, extend off, qinq strip off\r
+\r
+8. repeat step 5, send qinq pkts to check vlan strip is on(tx-4), crc strip is on::\r
+\r
+    testpmd> port 0/queue 6: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    show port stats all\r
+\r
+    ######################## NIC statistics for port 0  ########################\r
+    RX-packets: 1          RX-missed: 0          RX-bytes:  522\r
+    RX-errors: 0\r
+    RX-nombuf:  0\r
+    TX-packets: 1          TX-errors: 0          TX-bytes:  518\r
+\r
+    Throughput (since last show)\r
+    Rx-pps:            0          Rx-bps:            0\r
+    Tx-pps:            0          Tx-bps:            0\r
+    ############################################################################\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+9. request disable vlan strip::\r
+\r
+    testpmd> vlan set strip off 0\r
+\r
+10. check the vlan strip disable successfully::\r
+\r
+    testpmd> show port info 0\r
+    ********************* Infos for port 0  *********************\r
+    MAC address: 00:11:22:33:44:11\r
+    Device name: 0000:18:01.1\r
+    Driver name: net_iavf\r
+    ......\r
+    VLAN offload:\r
+      strip off, filter on, extend off, qinq strip off\r
+\r
+11. request disable crc strip::\r
+\r
+    testpmd> stop\r
+    testpmd> port stop 0\r
+    testpmd> port config 0 rx_offload keep_crc on\r
+    testpmd> port start 0\r
+    testpmd> start\r
+\r
+12. repeat step 5, send qinq pkts to check vlan strip is off, crc strip is off(rx+4)::\r
+\r
+    testpmd> port 0/queue 7: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    show port stats all\r
+    ######################## NIC statistics for port 0  ########################\r
+    RX-packets: 1          RX-missed: 0          RX-bytes:  526\r
+    RX-errors: 0\r
+    RX-nombuf:  0\r
+    TX-packets: 1          TX-errors: 0          TX-bytes:  522\r
+\r
+    Throughput (since last show)\r
+    Rx-pps:            0          Rx-bps:            0\r
+    Tx-pps:            0          Tx-bps:            0\r
+    ############################################################################\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+13. request enable vlan strip::\r
+\r
+    testpmd> vlan set strip on 0\r
+    iavf_execute_vf_cmd(): No response or return failure (-64) for cmd 54\r
+    iavf_config_vlan_strip_v2(): fail to execute command VIRTCHNL_OP_ENABLE_VLAN_STRIPPING_V2\r
+    rx_vlan_strip_set(port_pi=0, on=1) failed diag=-5\r
+\r
+14. repeat step 5, send qinq pkts to check the vlan strip can not enable::\r
+\r
+    testpmd> port 0/queue 7: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    show port stats all\r
+    ######################## NIC statistics for port 0  ########################\r
+    RX-packets: 1          RX-missed: 0          RX-bytes:  526\r
+    RX-errors: 0\r
+    RX-nombuf:  0\r
+    TX-packets: 1          TX-errors: 0          TX-bytes:  522\r
+\r
+    Throughput (since last show)\r
+    Rx-pps:            0          Rx-bps:            0\r
+    Tx-pps:            0          Tx-bps:            0\r
+    ############################################################################\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+\r
+15. request disable vlan strip::\r
+\r
+    vlan set strip off 0\r
+\r
+16. check the vlan strip still disable::\r
+\r
+    testpmd> show port info 0\r
+    ********************* Infos for port 0  *********************\r
+    MAC address: 00:11:22:33:44:11\r
+    Device name: 0000:18:01.1\r
+    Driver name: net_iavf\r
+    ......\r
+    VLAN offload:\r
+      strip off, filter on, extend off, qinq strip off\r
+\r
+17. request enable crc strip::\r
+\r
+    testpmd> stop\r
+    testpmd> port stop 0\r
+    testpmd> port config 0 rx_offload keep_crc off\r
+    testpmd> port start 0\r
+    testpmd> start\r
+\r
+18. repeat step 5, send qinq pkts to check the crc strip enable successfully::\r
+\r
+    testpmd> port 0/queue 3: received 1 packets\r
+    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\r
+    ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+    port 0/queue 3: sent 1 packets\r
+    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\r
+    ol_flags: PKT_RX_L4_CKSUM_UNKNOWN PKT_RX_IP_CKSUM_UNKNOWN PKT_RX_OUTER_L4_CKSUM_UNKNOWN\r
+\r
+    show port stats all\r
+    ######################## NIC statistics for port 0  ########################\r
+    RX-packets: 1          RX-missed: 0          RX-bytes:  522\r
+    RX-errors: 0\r
+    RX-nombuf:  0\r
+    TX-packets: 1          TX-errors: 0          TX-bytes:  522\r
+\r
+    Throughput (since last show)\r
+    Rx-pps:            0          Rx-bps:            0\r
+    Tx-pps:            0          Tx-bps:            0\r
+    ############################################################################\r
+\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480\r
+    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)\r
+    196.222.232.221 > 127.0.0.1:  ip-proto-0 480
\ No newline at end of file
-- 
2.25.1


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

* Re: [dts] [PATCH V3]test_plans: add test plan for cvl supporting qinq protocol
  2021-03-02 16:35 [dts] [PATCH V3]test_plans: add test plan for cvl supporting qinq protocol qifu
@ 2021-03-03  5:11 ` Tu, Lijuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2021-03-03  5:11 UTC (permalink / raw)
  To: Fu, Qi, dts; +Cc: Fu, Qi

> dpdk can support qinq in CVL from dpdk-21.02,
> add test plan to cover 3 parts:
> 1. DCF switch filter for QinQ.
> 2. DCF pvid support for QinQ.
> 3. AVF VLAN offload for QinQ.
> 
> Signed-off-by: qifu <qi.fu@intel.com>

Applied, thanks

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

end of thread, other threads:[~2021-03-03  5:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-02 16:35 [dts] [PATCH V3]test_plans: add test plan for cvl supporting qinq protocol qifu
2021-03-03  5:11 ` Tu, Lijuan

test suite reviews and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dts/0 dts/git/0.git

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

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


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