From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A6F95A054F; Tue, 2 Mar 2021 02:28:52 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9B14C4014E; Tue, 2 Mar 2021 02:28:52 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 5A6F740142 for ; Tue, 2 Mar 2021 02:28:50 +0100 (CET) IronPort-SDR: nV2MERUaw+1RxPwl2ogCQ/QMga1AFTmJgz+utR02jTJQfhsN4mOuyR8ug1l1zb/t2OcQnnSqde 0xxLQnvqiq8A== X-IronPort-AV: E=McAfee;i="6000,8403,9910"; a="271653048" X-IronPort-AV: E=Sophos;i="5.81,216,1610438400"; d="scan'208";a="271653048" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2021 17:28:49 -0800 IronPort-SDR: 5UKXTSot64lyGj+2at9aL0i5LcoXbSj3FAUwz5X48rz3Isq8MfS30AkhTXJjq5Q5ZDG+/Ql8hG U3HM5DVGxR2w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,216,1610438400"; d="scan'208";a="406484581" Received: from dpdk-qifu-cxl.sh.intel.com ([10.67.119.24]) by orsmga008.jf.intel.com with ESMTP; 01 Mar 2021 17:28:46 -0800 From: qifu To: dts@dpdk.org Cc: qifu Date: Tue, 2 Mar 2021 05:12:35 -0500 Message-Id: <20210302101235.222554-1-qi.fu@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: [dts] [PATCH V2]test_plans: add test plan for cvl qinq X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" 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 --- 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_p= lan.rst new file mode 100644 index 00000000..a11aa344 --- /dev/null +++ b/test_plans/cvl_qinq_test_plan.rst @@ -0,0 +1,1407 @@ +.. Copyright (c) <2021>, Intel Corporation=0D + All rights reserved.=0D +=0D + Redistribution and use in source and binary forms, with or without=0D + modification, are permitted provided that the following conditions=0D + are met:=0D +=0D + - Redistributions of source code must retain the above copyright=0D + notice, this list of conditions and the following disclaimer.=0D +=0D + - Redistributions in binary form must reproduce the above copyright=0D + notice, this list of conditions and the following disclaimer in=0D + the documentation and/or other materials provided with the=0D + distribution.=0D +=0D + - Neither the name of Intel Corporation nor the names of its=0D + contributors may be used to endorse or promote products derived=0D + from this software without specific prior written permission.=0D +=0D + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS=0D + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT=0D + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS=0D + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE=0D + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,=0D + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES=0D + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR=0D + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)=0D + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,=0D + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)=0D + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED=0D + OF THE POSSIBILITY OF SUCH DAMAGE.=0D +=0D +=3D=3D=3D=3D=3D=3D=3D=3D=0D +CVL QinQ=0D +=3D=3D=3D=3D=3D=3D=3D=3D=0D +DPDK support QinQ protocol in CVL as below requirements:=0D +1. DCF support QinQ by add steering rule and vlan strip disable.=0D +2. DCF is able to set port vlan by port representor.=0D +3. AVF is able to configure inner VLAN filter when port vlan is enabled ba= se on negotiation.=0D +4. AVF is able to configure outer VLAN (8100) if no port VLANis enabled to= compatible with legacy mode.=0D +this test plan contain 3 parts to cover above requirements:=0D +1. DCF switch filter for QinQ.=0D +2. DCF pvid support for QinQ.=0D +3. AVF VLAN offload for QinQ.=0D +=0D +=0D +Prerequisites=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +1. Hardware:=0D + columbiaville_25g/columbiaville_100g=0D +=0D +2. Software:=0D + dpdk: http://dpdk.org/git/dpdk=0D + scapy: http://www.secdev.org/projects/scapy/=0D +=0D +3. Copy specific ice package to /lib/firmware/updates/intel/ice/ddp/ice.pk= g,=0D + then load driver::=0D +=0D + rmmod ice=0D + insmod ice.ko=0D +=0D +4. Compile DPDK::=0D +=0D + CC=3Dgcc meson --werror -Denable_kmods=3DTrue -Dlibdir=3Dlib --default= -library=3Dstatic x86_64-native-linuxapp-gcc=0D + ninja -C x86_64-native-linuxapp-gcc -j 110=0D +=0D +5. Get the pci device id of DUT, for example::=0D +=0D + ./usertools/dpdk-devbind.py -s=0D +=0D + 0000:18:00.0 'Device 159b' if=3Dens785f0 drv=3Dice unused=3Dvfio-pci=0D + 0000:18:00.1 'Device 159b' if=3Dens785f1 drv=3Dice unused=3Dvfio-pci=0D +=0D +6. Enable vlan prune flag::=0D +=0D + ethtool --set-priv-flags ens785f0 vf-vlan-prune-disable on=0D +=0D +7. Generate 4 VFs on PF0::=0D +=0D + echo 4 > /sys/bus/pci/devices/0000:18:00.0/sriov_numvfs=0D +=0D + ./usertools/dpdk-devbind.py -s=0D + 0000:18:01.0 'Ethernet Adaptive Virtual Function 1889' if=3Dens785f0v0= drv=3Diavf unused=3Dvfio-pci=0D + 0000:18:01.1 'Ethernet Adaptive Virtual Function 1889' if=3Dens785f0v1= drv=3Diavf unused=3Dvfio-pci=0D + 0000:18:01.2 'Ethernet Adaptive Virtual Function 1889' if=3Dens785f0v2= drv=3Diavf unused=3Dvfio-pci=0D + 0000:18:01.3 'Ethernet Adaptive Virtual Function 1889' if=3Dens785f0v3= drv=3Diavf unused=3Dvfio-pci=0D +=0D +8. Set VF0 as trust::=0D +=0D + ip link set ens785f0 vf 0 trust on=0D +=0D +9. Set mac addr for VF1, VF2 and VF3::=0D +=0D + ip link set ens785f0 vf 1 mac 00:11:22:33:44:11=0D + ip link set ens785f0 vf 2 mac 00:11:22:33:44:22=0D + ip link set ens785f0 vf 3 mac 00:11:22:33:44:33 =0D +=0D +10. Bind VFs to dpdk driver::=0D +=0D + modprobe vfio-pci=0D + ./usertools/dpdk-devbind.py -b vfio-pci 0000:18:01.0 0000:18:01.1 0000= :18:01.2 0000:18:01.3=0D +=0D +11. Disabel spoofchk for VF::=0D +=0D + ip link set dev ens785f0 vf 0 spoofchk off=0D + ip link set dev ens785f0 vf 1 spoofchk off=0D + ip link set dev ens785f0 vf 2 spoofchk off=0D + ip link set dev ens785f0 vf 3 spoofchk off=0D +=0D +12. For test cases for DCF switch filter(01-06), use below cmd to launch t= estpmd::=0D +=0D + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:18:0= 1.0,cap=3Ddcf -a 0000:18:01.1 -a 0000:18:01.2 -a 0000:18:01.3 -- -i=0D + testpmd> set fwd rxonly=0D + testpmd> set verbose 1=0D + testpmd> start=0D + testpmd> show port info all=0D +=0D + check the VF0 driver is net_ice_dcf.=0D +=0D + For test cases for DCF pvid(07-09), use below cmd to launch testpmd::=0D +=0D + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:18:01= .0,cap=3Ddcf,representor=3D[1] -a 0000:18:01.1 -a 0000:18:01.2 -a 0000:18:0= 1.3 -- -i=0D + testpmd> set fwd mac=0D + testpmd> set verbose 1=0D + testpmd> start=0D + testpmd> show port info all=0D +=0D + check the VF0 driver is net_ice_dcf.=0D +=0D +13. For AVF QinQ test cases(10-14), recreate Generate 1 VFs on PF0, reconf= ig the VF then launch testpmd::=0D +=0D + echo 0 > /sys/bus/pci/devices/0000:18:00.0/sriov_numvfs=0D + ethtool --set-priv-flags ens785f0 vf-vlan-prune-disable off=0D + echo 1 > /sys/bus/pci/devices/0000:18:00.0/sriov_numvfs=0D + ip link set ens785f0 vf 0 mac 00:11:22:33:44:11=0D + ip link set dev ens785f0 vf 0 spoofchk off=0D +=0D + ./usertools/dpdk-devbind.py -b vfio-pci 0000:18:01.0=0D + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:18:0= 1.0 -- -i --rxq=3D16 --txq=3D16=0D + testpmd> set fwd mac=0D + testpmd> set verbose 1=0D + testpmd> start=0D +=0D +DCF switch filter support pattern and input set=0D +-----------------------------------------------=0D +.. table::=0D +=0D + +------------------------+--------------------------+-----------------= ----------------------------------------+=0D + | Packet type | Pattern | All the Input Se= t options in combination |=0D + +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+=0D + | eth_qinq_ipv4 | MAC_QINQ_IPV4_PAY | dest mac, outer = vlan, inner vlan, src ip, dst ip |=0D + +------------------------+--------------------------+-----------------= ----------------------------------------+=0D + | eth_qinq_ipv6 | MAC_QINQ_IPV6_PAY | dest mac, outer = vlan, inner vlan, src ip, dst ip |=0D + +------------------------+--------------------------+-----------------= ----------------------------------------+=0D + | eth_qinq_pppoes | MAC_QINQ_PPPOE_PAY | dest mac, outer = vlan, inner vlan, seid |=0D + +------------------------+--------------------------+-----------------= ----------------------------------------+=0D + | eth_qinq_pppoes_proto | MAC_QINQ_PPPOE_PAY | dest mac, outer = vlan, inner vlan, seid, pppoe_proto_id |=0D + +------------------------+--------------------------+-----------------= ----------------------------------------+=0D + | eth_qinq_pppoes_ipv4 | MAC_QINQ_PPPOE_IPV4_PAY | dest mac, outer = vlan, inner vlan, seid, src ip, dst ip |=0D + +------------------------+--------------------------+-----------------= ----------------------------------------+=0D + | eth_qinq_pppoes_ipv6 | MAC_QINQ_PPPOE_IPV6_PAY | dest mac, outer = vlan, inner vlan, seid, src ip, dst ip |=0D + +------------------------+--------------------------+-----------------= ----------------------------------------+=0D +=0D +=0D +Test case 01: DCF switch for MAC_QINQ_IPV4_PAY=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +subcase: src ip=0D +---------------=0D +1. create a rule::=0D +=0D + 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=0D + testpmd> flow list 0=0D +=0D + check the rule exists in the list.=0D +=0D +2. send matched packets::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x0800)/IP(src=3D"196.222.232.221")/(= "X"*480)], iface=3D"ens786f0")=0D +=0D + check port 1 receive the packet.=0D + send mismatched packets::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x0800)/IP(src=3D"196.222.232.222")/(= "X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x0800)/IP(dst=3D"196.222.232.221")/(= "X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D1,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x0800)/IP(src=3D"196.222.232.221")/(= "X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x2,type=3D0x0800)/IP(src=3D"196.222.232.221")/(= "X"*480)], iface=3D"ens786f0")=0D +=0D + check the packets are not to port 1.=0D +=0D +3. verify rules can be destroyed::=0D +=0D + testpmd> flow destroy 0 rule 0=0D + testpmd> flow list 0=0D +=0D + check the rule not exists in the list.=0D + send matched packets in step 2, check the packets are not to port 1.=0D +=0D +subcase: dst ip=0D +---------------=0D +1. create a rule::=0D +=0D + 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=0D + testpmd> flow list 0=0D +=0D + check the rule exists in the list.=0D +=0D +2. send matched packets::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x0800)/IP(dst=3D"196.222.232.221")/(= "X"*480)], iface=3D"ens786f0")=0D +=0D + check port 1 receive the packet.=0D + send mismatched packets::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x0800)/IP(dst=3D"196.222.232.222")/(= "X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x0800)/IP(src=3D"196.222.232.221")/(= "X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D1,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x0800)/IP(dst=3D"196.222.232.221")/(= "X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x2,type=3D0x0800)/IP(dst=3D"196.222.232.221")/(= "X"*480)], iface=3D"ens786f0")=0D +=0D + check the packets are not to port 1.=0D +=0D +3. verify rules can be destroyed::=0D +=0D + testpmd> flow destroy 0 rule 0=0D + testpmd> flow list 0=0D +=0D + check the rule not exists in the list.=0D + send matched packets in step 2, check the packets are not to port 1.=0D +=0D +=0D +Test case 02: DCF switch for MAC_QINQ_IPV6_PAY=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +subcase: src ip=0D +---------------=0D +1. create a rule::=0D +=0D + 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=0D + testpmd> flow list 0=0D +=0D + check the rule exists in the list.=0D +=0D +2. send matched packets::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x86DD)/IPv6(src=3D"1111:2222:3333:44= 44:5555:6666:7777:8888")/("X"*480)], iface=3D"ens786f0")=0D +=0D + check port 1 receive the packet.=0D + send mismatched packets::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x86DD)/IPv6(src=3D"1111:2222:3333:44= 44:5555:6666:7777:9999")/("X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x86DD)/IPv6(dst=3D"1111:2222:3333:44= 44:5555:6666:7777:8888")/("X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D1,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x86DD)/IPv6(src=3D"1111:2222:3333:44= 44:5555:6666:7777:8888")/("X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x2,type=3D0x86DD)/IPv6(src=3D"1111:2222:3333:44= 44:5555:6666:7777:8888")/("X"*480)], iface=3D"ens786f0")=0D +=0D + check the packets are not to port 1.=0D +=0D +3. verify rules can be destroyed::=0D +=0D + testpmd> flow destroy 0 rule 0=0D + testpmd> flow list 0=0D +=0D + check the rule not exists in the list.=0D + send matched packets in step 2, check the packets are not to port 1.=0D +=0D +subcase: dst ip=0D +---------------=0D +1. create a rule::=0D +=0D + 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=0D + testpmd> flow list 0=0D +=0D + check the rule exists in the list.=0D +=0D +2. send matched packets::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x86DD)/IPv6(dst=3D"1111:2222:3333:44= 44:5555:6666:7777:8888")/("X"*480)], iface=3D"ens786f0")=0D +=0D + check port 1 receive the packet.=0D + send mismatched packets::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x86DD)/IPv6(dst=3D"1111:2222:3333:44= 44:5555:6666:7777:9999")/("X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x86DD)/IPv6(src=3D"1111:2222:3333:44= 44:5555:6666:7777:8888")/("X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D1,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x86DD)/IPv6(dst=3D"1111:2222:3333:44= 44:5555:6666:7777:8888")/("X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x2,type=3D0x86DD)/IPv6(dst=3D"1111:2222:3333:44= 44:5555:6666:7777:8888")/("X"*480)], iface=3D"ens786f0")=0D +=0D + check the packets are not to port 1.=0D +=0D +3. verify rules can be destroyed::=0D +=0D + testpmd> flow destroy 0 rule 0=0D + testpmd> flow list 0=0D +=0D + check the rule not exists in the list.=0D + send matched packets in step 2, check the packets are not to port 1.=0D +=0D +=0D +Test case 03: DCF switch for MAC_QINQ_PPPOE_PAY=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +=0D +1. create a rule::=0D +=0D + 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=0D + testpmd> flow list 0=0D +=0D + check the rule exists in the list.=0D +=0D +2. send matched packets::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D1,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(prot= o=3D0x57)/IPv6()/("X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D1,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(prot= o=3D0x21)/IP()/("X"*480)], iface=3D"ens786f0")=0D +=0D + check port 1 receive the packet.=0D + send mismatched packets::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D1,type=3D0x8864)/PPPoE(sessionid=3D0x2)/PPP(prot= o=3D0x57)/IPv6()/("X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D1,t= ype=3D0x8100)/Dot1Q(vlan=3D1,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(prot= o=3D0x57)/IPv6()/("X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D2,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(prot= o=3D0x57)/IPv6()/("X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D1,type=3D0x8864)/PPPoE(sessionid=3D0x2)/PPP(prot= o=3D0x21)/IP()/("X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D1,t= ype=3D0x8100)/Dot1Q(vlan=3D1,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(prot= o=3D0x21)/IP()/("X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D2,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(prot= o=3D0x21)/IP()/("X"*480)], iface=3D"ens786f0")=0D +=0D + check the packets are not to port 1.=0D +=0D +3. verify rules can be destroyed::=0D +=0D + testpmd> flow destroy 0 rule 0=0D + testpmd> flow list 0=0D +=0D + check the rule not exists in the list.=0D + send matched packets in step 2, check the packets are not to port 1.=0D +=0D +=0D +Test case 04: DCF switch for MAC_QINQ_PPPOE_PAY_Proto=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=0D +=0D +1. create a rule::=0D +=0D + 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=0D + testpmd> flow list 0=0D +=0D + check the rule exists in the list.=0D +=0D +2. send matched packets::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D1,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(prot= o=3D0x57)/IPv6()/("X"*480)], iface=3D"ens786f0")=0D +=0D + check port 1 receive the packet.=0D + send mismatched packets::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D1,type=3D0x8864)/PPPoE(sessionid=3D0x2)/PPP(prot= o=3D0x57)/IPv6()/("X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D1,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(prot= o=3D0x21)/IP()/("X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D1,t= ype=3D0x8100)/Dot1Q(vlan=3D1,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(prot= o=3D0x57)/IPv6()/("X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D2,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(prot= o=3D0x57)/IPv6()/("X"*480)], iface=3D"ens786f0")=0D +=0D + check the packets are not to port 1.=0D +=0D +3. verify rules can be destroyed::=0D +=0D + testpmd> flow destroy 0 rule 0=0D + testpmd> flow list 0=0D +=0D + check the rule not exists in the list.=0D + send matched packets in step 2, check the packets are not to port 1.=0D +=0D +=0D +Test case 05: DCF switch for MAC_QINQ_PPPOE_IPV4=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +subcase: src ip=0D +---------------=0D +1. create a rule::=0D +=0D + 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=0D + testpmd> flow list 0=0D +=0D + check the rule exists in the list.=0D +=0D +2. send matched packets::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(pr= oto=3D0x21)/IP(src=3D"196.222.232.221")/UDP(dport=3D23)/("X"*480)], iface= =3D"ens786f0")=0D +=0D + check port 1 receive the packet.=0D + send mismatched packets::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(pr= oto=3D0x21)/IP(src=3D"196.222.232.222")/UDP(dport=3D23)/("X"*480)], iface= =3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(pr= oto=3D0x21)/IP(dst=3D"196.222.232.221")/UDP(dport=3D23)/("X"*480)], iface= =3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x8864)/PPPoE(sessionid=3D0x2)/PPP(pr= oto=3D0x21)/IP(src=3D"196.222.232.221")/UDP(dport=3D23)/("X"*480)], iface= =3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D1,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(pr= oto=3D0x21)/IP(src=3D"196.222.232.221")/UDP(dport=3D23)/("X"*480)], iface= =3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x2,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(pr= oto=3D0x21)/IP(src=3D"196.222.232.221")/UDP(dport=3D23)/("X"*480)], iface= =3D"ens786f0")=0D +=0D + check the packets are not to port 1.=0D +=0D +3. verify rules can be destroyed::=0D +=0D + testpmd> flow destroy 0 rule 0=0D + testpmd> flow list 0=0D +=0D + check the rule not exists in the list.=0D + send matched packets in step 2, check the packets are not to port 1.=0D +=0D +subcase: dst ip=0D +---------------=0D +1. create a rule::=0D +=0D + 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=0D + testpmd> flow list 0=0D +=0D + check the rule exists in the list.=0D +=0D +2. send matched packets::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(pr= oto=3D0x21)/IP(dst=3D"196.222.232.221")/UDP(dport=3D23)/("X"*480)], iface= =3D"ens786f0")=0D +=0D + check port 1 receive the packet.=0D + send mismatched packets::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(pr= oto=3D0x21)/IP(dst=3D"196.222.232.222")/UDP(dport=3D23)/("X"*480)], iface= =3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(pr= oto=3D0x21)/IP(src=3D"196.222.232.221")/UDP(dport=3D23)/("X"*480)], iface= =3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x8864)/PPPoE(sessionid=3D0x2)/PPP(pr= oto=3D0x21)/IP(dst=3D"196.222.232.221")/UDP(dport=3D23)/("X"*480)], iface= =3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D1,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(pr= oto=3D0x21)/IP(dst=3D"196.222.232.221")/UDP(dport=3D23)/("X"*480)], iface= =3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x2,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(pr= oto=3D0x21)/IP(dst=3D"196.222.232.221")/UDP(dport=3D23)/("X"*480)], iface= =3D"ens786f0")=0D +=0D + check the packets are not to port 1.=0D +=0D +3. verify rules can be destroyed::=0D +=0D + testpmd> flow destroy 0 rule 0=0D + testpmd> flow list 0=0D +=0D + check the rule not exists in the list.=0D + send matched packets in step 2, check the packets are not to port 1.=0D +=0D +=0D +Test case 06: DCF switch for MAC_QINQ_PPPOE_IPV6=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +subcase: src ip=0D +---------------=0D +1. create a rule::=0D +=0D + 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:88= 88 / end actions vf id 1 / end=0D + testpmd> flow list 0=0D +=0D + check the rule exists in the list.=0D +=0D +2. send matched packets::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(pr= oto=3D0x57)/IPv6(src=3D"1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport= =3D23)/("X"*480)], iface=3D"ens786f0")=0D +=0D + check port 1 receive the packet.=0D + send mismatched packets::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(pr= oto=3D0x57)/IPv6(src=3D"1111:2222:3333:4444:5555:6666:7777:9999")/UDP(dport= =3D23)/("X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(pr= oto=3D0x57)/IPv6(dst=3D"1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport= =3D23)/("X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x8864)/PPPoE(sessionid=3D0x2)/PPP(pr= oto=3D0x57)/IPv6(src=3D"1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport= =3D23)/("X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D1,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(pr= oto=3D0x57)/IPv6(src=3D"1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport= =3D23)/("X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x2,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(pr= oto=3D0x57)/IPv6(src=3D"1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport= =3D23)/("X"*480)], iface=3D"ens786f0")=0D +=0D + check the packets are not to port 1.=0D +=0D +3. verify rules can be destroyed::=0D +=0D + testpmd> flow destroy 0 rule 0=0D + testpmd> flow list 0=0D +=0D + check the rule not exists in the list.=0D + send matched packets in step 2, check the packets are not to port 1.=0D +=0D +subcase: dst ip=0D +---------------=0D +1. create a rule::=0D +=0D + 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:88= 88 / end actions vf id 1 / end=0D + testpmd> flow list 0=0D +=0D + check the rule exists in the list.=0D +=0D +2. send matched packets::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(pr= oto=3D0x57)/IPv6(dst=3D"1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport= =3D23)/("X"*480)], iface=3D"ens786f0")=0D +=0D + check port 1 receive the packet.=0D + send mismatched packets::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(pr= oto=3D0x57)/IPv6(dst=3D"1111:2222:3333:4444:5555:6666:7777:9999")/UDP(dport= =3D23)/("X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(pr= oto=3D0x57)/IPv6(src=3D"1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport= =3D23)/("X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x8864)/PPPoE(sessionid=3D0x2)/PPP(pr= oto=3D0x57)/IPv6(dst=3D"1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport= =3D23)/("X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D1,t= ype=3D0x8100)/Dot1Q(vlan=3D0x1,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(pr= oto=3D0x57)/IPv6(dst=3D"1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport= =3D23)/("X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:33",type=3D0x8100)/Dot1Q(vlan=3D2,t= ype=3D0x8100)/Dot1Q(vlan=3D0x2,type=3D0x8864)/PPPoE(sessionid=3D0x1)/PPP(pr= oto=3D0x57)/IPv6(dst=3D"1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport= =3D23)/("X"*480)], iface=3D"ens786f0")=0D +=0D + check the packets are not to port 1.=0D +=0D +3. verify rules can be destroyed::=0D +=0D + testpmd> flow destroy 0 rule 0=0D + testpmd> flow list 0=0D +=0D + check the rule not exists in the list.=0D + send matched packets in step 2, check the packets are not to port 1.=0D +=0D +=0D +Test case 07: vlan strip when pvid enable=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +=0D +1. enable vlan header stripping for VF1 by representor::=0D +=0D + testpmd> vlan set strip on 1=0D +=0D + Port 2: reset event=0D +=0D +2. reset VF1(port 2)::=0D +=0D + testpmd> port stop 2=0D + testpmd> port reset 2=0D + testpmd> port start 2=0D + testpmd> start=0D +=0D +3. tester send qinq pkt and single vlan pkt to VF1::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11",type=3D0x8100)/Dot1Q(vlan=3D1,t= ype=3D0x8100)/Dot1Q(vlan=3D2,type=3D0x0800)/IP(src=3D"196.222.232.221")/("X= "*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:11",type=3D0x8100)/Dot1Q(vlan=3D21,= type=3D0x0800)/IP(src=3D"196.222.232.221")/("X"*480)], iface=3D"ens786f0")= =0D +=0D +4. check the pkts can be received in VF1 and fwd to tester without outer v= lan header::=0D +=0D + testpmd> port 2/queue 0: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x8100 - le= ngth=3D518 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRA= G - sw ptype: L2_ETHER_VLAN L3_IPV4 - l2_len=3D18 - l3_len=3D20 - Receive= queue=3D0x0=0D + ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CK= SUM_UNKNOWN=0D +=0D + port 2/queue 0: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x0800 - le= ngth=3D514 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRA= G - sw ptype: L2_ETHER L3_IPV4 - l2_len=3D14 - l3_len=3D20 - Receive queu= e=3D0x0=0D + ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CK= SUM_UNKNOWN=0D +=0D + 10:15:10.958039 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1= Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, etherty= pe IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0),= length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 10:15:10.958121 00:11:22:33:44:22 > 02:00:00:00:00:03, ethertype 802.1= Q (0x8100), length 518: vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1= , offset 0, flags [none], proto Options (0), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D + 10:15:15.693894 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1= Q (0x8100), length 518: vlan 21, p 0, ethertype IPv4, (tos 0x0, ttl 64, id = 1, offset 0, flags [none], proto Options (0), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 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)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D +5. disable vlan header stripping for VF1::=0D +=0D + testpmd> vlan set strip off 1=0D +=0D + Port 2: reset event=0D +=0D +6. reset VF1::=0D +=0D + testpmd> port stop 2=0D + testpmd> port reset 2=0D + testpmd> port start 2=0D + testpmd> start=0D +=0D +7. repeat step 3, check the pkts can be received in VF1 and fwd to tester = with outer vlan header::=0D +=0D + testpmd> port 2/queue 0: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x8100 - le= ngth=3D518 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRA= G - sw ptype: L2_ETHER_VLAN L3_IPV4 - l2_len=3D18 - l3_len=3D20 - Receive= queue=3D0x0=0D + ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CK= SUM_UNKNOWN=0D +=0D + port 2/queue 0: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x0800 - le= ngth=3D514 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRA= G - sw ptype: L2_ETHER L3_IPV4 - l2_len=3D14 - l3_len=3D20 - Receive queu= e=3D0x0=0D + ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CK= SUM_UNKNOWN=0D +=0D + 10:17:55.321952 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1= Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, etherty= pe IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0),= length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 10:17:55.322008 00:11:22:33:44:22 > 02:00:00:00:00:03, ethertype 802.1= Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, etherty= pe IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0),= length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D + 10:17:58.009862 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1= Q (0x8100), length 518: vlan 21, p 0, ethertype IPv4, (tos 0x0, ttl 64, id = 1, offset 0, flags [none], proto Options (0), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 10:17:58.009908 00:11:22:33:44:22 > 02:00:00:00:00:03, ethertype 802.1= Q (0x8100), length 518: vlan 21, p 0, ethertype IPv4, (tos 0x0, ttl 64, id = 1, offset 0, flags [none], proto Options (0), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D +8. repeat step 1,2, then enable vlan strip by AVF::=0D +=0D + testpmd> vlan set strip on 2=0D +=0D +9. repeat step 3, check the pkts can be received in VF1 and fwd to tester = without both outer and inner vlan header::=0D +=0D + testpmd> port 2/queue 0: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x8100 - le= ngth=3D518 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRA= G - sw ptype: L2_ETHER_VLAN L3_IPV4 - l2_len=3D18 - l3_len=3D20 - Receive= queue=3D0x0=0D + ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CK= SUM_UNKNOWN=0D +=0D + port 2/queue 0: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x0800 - le= ngth=3D514 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRA= G - sw ptype: L2_ETHER L3_IPV4 - l2_len=3D14 - l3_len=3D20 - Receive queu= e=3D0x0=0D + ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CK= SUM_UNKNOWN=0D +=0D + 10:28:01.642361 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1= Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, etherty= pe IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0),= length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 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)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D + 10:28:10.185876 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1= Q (0x8100), length 518: vlan 21, p 0, ethertype IPv4, (tos 0x0, ttl 64, id = 1, offset 0, flags [none], proto Options (0), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 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)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D +10. relaunch testpmd and enable vlan strip by AVF::=0D +=0D + testpmd> vlan set strip on 2=0D +=0D +11. repeat step 1,2 and 3, check the pkts can be received in VF1 and fwd t= o tester without both outer and inner vlan header::=0D +=0D + testpmd> port 2/queue 0: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x8100 - le= ngth=3D518 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRA= G - sw ptype: L2_ETHER_VLAN L3_IPV4 - l2_len=3D18 - l3_len=3D20 - Receive= queue=3D0x0=0D + ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CK= SUM_UNKNOWN=0D +=0D + port 2/queue 0: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x0800 - le= ngth=3D514 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRA= G - sw ptype: L2_ETHER L3_IPV4 - l2_len=3D14 - l3_len=3D20 - Receive queu= e=3D0x0=0D + ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CK= SUM_UNKNOWN=0D +=0D + 10:28:01.642361 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1= Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, etherty= pe IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0),= length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 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)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D + 10:28:10.185876 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1= Q (0x8100), length 518: vlan 21, p 0, ethertype IPv4, (tos 0x0, ttl 64, id = 1, offset 0, flags [none], proto Options (0), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 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)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D +=0D +Test case 08: vlan insertion when pvid enable=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +=0D +1. add tx port vlan for VF1 by representor 1::=0D +=0D + testpmd> tx_vlan set pvid 1 24 on=0D +=0D + Port 2: reset event=0D +=0D +2. reset VF1::=0D +=0D + testpmd> port stop 2=0D + testpmd> port reset 2=0D + testpmd> port start 2=0D + testpmd> start=0D +=0D +3. send a pkt without vlan header to VF2(VF2 rx, VF1 tx)::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:22",type=3D0x0800)/IP(src=3D"196.22= 2.232.221")/("X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:22",type=3D0x8100)/Dot1Q(vlan=3D1,t= ype=3D0x0800)/IP(src=3D"196.222.232.221")/("X"*480)], iface=3D"ens786f0")=0D +=0D +4. check the dpdk can receive this pkt with VF2 and fwd this pkt with oute= r vlan header id 24 by VF1, and the vlan header ptype is 8100::=0D +=0D + testpmd> port 4/queue 0: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:22 - type=3D0x0800 - le= ngth=3D514 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRA= G - sw ptype: L2_ETHER L3_IPV4 - l2_len=3D14 - l3_len=3D20 - Receive queu= e=3D0x0=0D + ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CK= SUM_UNKNOWN=0D +=0D + port 4/queue 0: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:22 - type=3D0x8100 - le= ngth=3D518 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRA= G - sw ptype: L2_ETHER_VLAN L3_IPV4 - l2_len=3D18 - l3_len=3D20 - Receive= queue=3D0x0=0D + ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CK= SUM_UNKNOWN=0D +=0D + tcpdump -i ens786f0 -nn -e -v=0D + 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)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 11:08:01.061987 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1= Q (0x8100), length 518: vlan 24, p 0, ethertype IPv4, (tos 0x0, ttl 64, id = 1, offset 0, flags [none], proto Options (0), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + =0D + 11:08:06.773884 00:00:00:00:00:00 > 00:11:22:33:44:22, ethertype 802.1= Q (0x8100), length 518: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1= , offset 0, flags [none], proto Options (0), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 11:08:06.773928 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1= Q (0x8100), length 522: vlan 24, p 0, ethertype 802.1Q, vlan 1, p 0, ethert= ype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0)= , length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D +5. change the tpid of vlan header to 88A8 for VF1::=0D +=0D + testpmd> vlan set outer tpid 0x88a8 1=0D +=0D +6. reset VF1::=0D +=0D + testpmd> port stop 2=0D + testpmd> port reset 2=0D + testpmd> port start 2=0D + testpmd> start=0D +=0D +7. repeat step 3, check the dpdk can receive this pkt with VF2 and fwd thi= s pkt with outer vlan header id 24 by VF1, and the vlan header ptype is 88a= 8::=0D +=0D + testpmd> port 4/queue 0: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:22 - type=3D0x0800 - le= ngth=3D514 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRA= G - sw ptype: L2_ETHER L3_IPV4 - l2_len=3D14 - l3_len=3D20 - Receive queu= e=3D0x0=0D + ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CK= SUM_UNKNOWN=0D +=0D + port 4/queue 0: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:22 - type=3D0x8100 - le= ngth=3D518 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRA= G - sw ptype: L2_ETHER_VLAN L3_IPV4 - l2_len=3D18 - l3_len=3D20 - Receive= queue=3D0x0=0D + ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CK= SUM_UNKNOWN=0D +=0D + tcpdump -i ens786f0 -nn -e -v=0D + 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)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 11:10:32.441883 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1= Q-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)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D + 11:10:34.081863 00:00:00:00:00:00 > 00:11:22:33:44:22, ethertype 802.1= Q (0x8100), length 518: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1= , offset 0, flags [none], proto Options (0), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 11:10:34.081913 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1= Q-QinQ (0x88a8), length 522: vlan 24, p 0, ethertype 802.1Q, vlan 1, p 0, e= thertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Option= s (0), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D +8. change the tpid of vlan header to 9100 for VF1::=0D +=0D + testpmd> vlan set outer tpid 0x9100 1=0D +=0D +9. reset VF1::=0D +=0D + testpmd> port stop 2=0D + testpmd> port reset 2=0D + testpmd> port start 2=0D + testpmd> start=0D +=0D +10. repeat step 3, check the dpdk can receive this pkt with VF2 and fwd th= is pkt with outer vlan header id 24 by VF1, and the vlan header ptype is 91= 00::=0D +=0D + testpmd> port 4/queue 0: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:22 - type=3D0x0800 - le= ngth=3D514 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRA= G - sw ptype: L2_ETHER L3_IPV4 - l2_len=3D14 - l3_len=3D20 - Receive queu= e=3D0x0=0D + ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CK= SUM_UNKNOWN=0D +=0D + port 4/queue 0: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:22 - type=3D0x8100 - le= ngth=3D518 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRA= G - sw ptype: L2_ETHER_VLAN L3_IPV4 - l2_len=3D18 - l3_len=3D20 - Receive= queue=3D0x0=0D + ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CK= SUM_UNKNOWN=0D +=0D + tcpdump -i ens786f0 -nn -e -v=0D + 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)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 11:12:13.237890 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1= Q-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)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D + 11:12:26.049869 00:00:00:00:00:00 > 00:11:22:33:44:22, ethertype 802.1= Q (0x8100), length 518: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1= , offset 0, flags [none], proto Options (0), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 11:12:26.049920 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1= Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q-9100, vlan 24, p 0, e= thertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Option= s (0), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D +11. enable tx_vlan for VF1 by AVF::=0D +=0D + testpmd> port stop 2=0D + Stopping ports...=0D + Checking link statuses...=0D + Done=0D + testpmd> tx_vlan set 2 11=0D + testpmd> port start 2=0D +=0D +12. repeat step 3, check the dpdk can receive this pkt with VF2 and fwd th= is pkt with outer vlan header id 24, inner vlan id 11 by VF1::=0D +=0D + testpmd> port 3/queue 0: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:22 - type=3D0x0800 - le= ngth=3D514 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRA= G - sw ptype: L2_ETHER L3_IPV4 - l2_len=3D14 - l3_len=3D20 - Receive queu= e=3D0x0=0D + ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CK= SUM_UNKNOWN=0D +=0D + port 3/queue 0: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:22 - type=3D0x8100 - le= ngth=3D518 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRA= G - sw ptype: L2_ETHER_VLAN L3_IPV4 - l2_len=3D18 - l3_len=3D20 - Receive= queue=3D0x0=0D + ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CK= SUM_UNKNOWN=0D +=0D + 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)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 11:22:29.561992 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1= Q (0x8100), length 522: vlan 24, p 0, ethertype 802.1Q, vlan 11, p 0, ether= type IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0= ), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D + 11:22:44.481889 00:00:00:00:00:00 > 00:11:22:33:44:22, ethertype 802.1= Q (0x8100), length 518: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1= , offset 0, flags [none], proto Options (0), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 11:22:44.481922 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1= Q (0x8100), length 526: vlan 24, p 0, ethertype 802.1Q, vlan 11, p 0, ether= type 802.1Q, vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0,= flags [none], proto Options (0), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D +13. relaunch testpmd and execute step 11 then step 1, 2 and 3, check the d= pdk can receive this pkt with VF2 and fwd this pkt with outer vlan header i= d 24, inner vlan id 11 by VF1::=0D +=0D + testpmd> port 3/queue 0: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:22 - type=3D0x0800 - le= ngth=3D514 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRA= G - sw ptype: L2_ETHER L3_IPV4 - l2_len=3D14 - l3_len=3D20 - Receive queu= e=3D0x0=0D + ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CK= SUM_UNKNOWN=0D +=0D + port 3/queue 0: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:22 - type=3D0x8100 - le= ngth=3D518 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRA= G - sw ptype: L2_ETHER_VLAN L3_IPV4 - l2_len=3D18 - l3_len=3D20 - Receive= queue=3D0x0=0D + ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CK= SUM_UNKNOWN=0D +=0D + 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)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 11:22:29.561992 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1= Q (0x8100), length 522: vlan 24, p 0, ethertype 802.1Q, vlan 11, p 0, ether= type IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0= ), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D + 11:22:44.481889 00:00:00:00:00:00 > 00:11:22:33:44:22, ethertype 802.1= Q (0x8100), length 518: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1= , offset 0, flags [none], proto Options (0), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 11:22:44.481922 00:11:22:33:44:11 > 02:00:00:00:00:02, ethertype 802.1= Q (0x8100), length 526: vlan 24, p 0, ethertype 802.1Q, vlan 11, p 0, ether= type 802.1Q, vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0,= flags [none], proto Options (0), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D +=0D +Test case 09: vlan filter when pvid enable=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +=0D +1. reset test environment, create vfs and disable vlan prune flag::=0D +=0D + ethtool --set-priv-flags ens785f0 vf-vlan-prune-disable off=0D +=0D +2. repeat Prerequisites steps from 7 to 12=0D +=0D +3. enable vlan filter and add rx_vlan for VF1 by representor::=0D +=0D + testpmd> vlan set filter on 1=0D + testpmd> rx_vlan add 11 1=0D + rte_eth_dev_vlan_filter(port_pi=3D1, vlan_id=3D11, on=3D1) failed diag= =3D-95=0D +=0D +4. enable vlan filter and add rx_vlan for VF1 by AVF::=0D +=0D + testpmd> vlan set filter on 2=0D + testpmd> rx_vlan add 11 2=0D +=0D +5. tester send qinq pkt and single vlan pkt which outer vlan id is 11 to V= F1::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11",type=3D0x8100)/Dot1Q(vlan=3D11,= type=3D0x8100)/Dot1Q(vlan=3D2,type=3D0x0800)/IP(src=3D"196.222.232.221")/("= X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:11",type=3D0x8100)/Dot1Q(vlan=3D11,= type=3D0x0800)/IP(src=3D"196.222.232.221")/("X"*480)], iface=3D"ens786f0")= =0D +=0D +6. check the pkts can be received by VF1 and fwd to tester::=0D +=0D + testpmd> port 2/queue 0: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x8100 - le= ngth=3D522 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRA= G - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4 - l2_len=3D= 18 - inner_l2_len=3D4 - inner_l3_len=3D20 - Receive queue=3D0x0=0D + ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CK= SUM_UNKNOWN=0D + port 2/queue 0: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x8100 - le= ngth=3D518 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRA= G - sw ptype: L2_ETHER_VLAN L3_IPV4 - l2_len=3D18 - l3_len=3D20 - Receive= queue=3D0x0=0D + ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CK= SUM_UNKNOWN=0D +=0D + 10:21:53.418039 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1= Q (0x8100), length 522: vlan 11, p 0, ethertype 802.1Q, vlan 2, p 0, ethert= ype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0)= , length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 10:21:53.418114 00:11:22:33:44:22 > 02:00:00:00:00:03, ethertype 802.1= Q (0x8100), length 522: vlan 11, p 0, ethertype 802.1Q, vlan 2, p 0, ethert= ype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0)= , length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D + 10:22:00.005885 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1= Q (0x8100), length 518: vlan 11, p 0, ethertype IPv4, (tos 0x0, ttl 64, id = 1, offset 0, flags [none], proto Options (0), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 10:22:00.005919 00:11:22:33:44:22 > 02:00:00:00:00:03, ethertype 802.1= Q (0x8100), length 518: vlan 11, p 0, ethertype IPv4, (tos 0x0, ttl 64, id = 1, offset 0, flags [none], proto Options (0), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D +7. tester send qinq pkt and single vlan pkt which outer vlan id is 21 to V= F1::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11",type=3D0x8100)/Dot1Q(vlan=3D21,= type=3D0x8100)/Dot1Q(vlan=3D2,type=3D0x0800)/IP(src=3D"196.222.232.221")/("= X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:11",type=3D0x8100)/Dot1Q(vlan=3D21,= type=3D0x0800)/IP(src=3D"196.222.232.221")/("X"*480)], iface=3D"ens786f0")= =0D +=0D +8. check the pkts can not be received by VF1.=0D +=0D +9. remove rx_vlan::=0D +=0D + testpmd> rx_vlan rm 11 2=0D +=0D +10. repeat step 5, check the pkts can not be received by VF1.=0D +=0D +=0D +Test case 10: Enable/Disable IAVF VLAN filtering=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +=0D +1. enable vlan filtering on port VF::=0D +=0D + testpmd> set fwd mac=0D + Set mac packet forwarding mode=0D + testpmd> vlan set filter on 0=0D +=0D +2. check the vlan mode is set successfully::=0D +=0D + testpmd> show port info 0=0D +=0D + ********************* Infos for port 0 *********************=0D + ......=0D + VLAN offload:=0D + strip off, filter on, extend off, qinq strip off=0D +=0D +3. tester send qinq pkt and single vlan pkt which outer vlan id is 1 to VF= ::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11",type=3D0x8100)/Dot1Q(vlan=3D1,t= ype=3D0x8100)/Dot1Q(vlan=3D2,type=3D0x0800)/IP(src=3D"196.222.232.221")/("X= "*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:11",type=3D0x8100)/Dot1Q(vlan=3D1,t= ype=3D0x0800)/IP(src=3D"196.222.232.221")/("X"*480)], iface=3D"ens786f0")=0D +=0D +4. check the pkts can't be received in VF::=0D +=0D +5. add rx_vlan in VF::=0D +=0D + testpmd> rx_vlan add 1 0=0D +=0D +6. repeat step 3, check the pkts can be received by VF and fwd to tester::= =0D +=0D + testpmd> port 0/queue 0: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x8100 - le= ngth=3D522 - nb_segs=3D1 - hw ptype: L2_ETHER - sw ptype: L2_ETHER_VLAN IN= NER_L2_ETHER_VLAN - l2_len=3D18 - inner_l2_len=3D4 - Receive queue=3D0x0=0D + ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CK= SUM_UNKNOWN=0D + port 0/queue 0: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x8100 - le= ngth=3D518 - nb_segs=3D1 - hw ptype: L2_ETHER - sw ptype: L2_ETHER_VLAN -= l2_len=3D18 - Receive queue=3D0x0=0D + ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CK= SUM_UNKNOWN=0D +=0D + tcpdump -i ens786f0 -nn -e -v=0D +=0D + 16:50:38.807158 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1= Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, etherty= pe 0x0800,=0D + 16:50:38.807217 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1= Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, etherty= pe 0x0800,=0D +=0D + 16:51:06.083084 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1= Q (0x8100), length 518: vlan 1, p 0, ethertype 0x0800,=0D + 16:51:06.083127 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1= Q (0x8100), length 518: vlan 1, p 0, ethertype 0x0800,=0D +=0D +7. tester send qinq pkt and single vlan pkt which outer vlan id is 11 to V= F::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11",type=3D0x8100)/Dot1Q(vlan=3D11,= type=3D0x8100)/Dot1Q(vlan=3D2,type=3D0x0800)/IP(src=3D"196.222.232.221")/("= X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:11",type=3D0x8100)/Dot1Q(vlan=3D11,= type=3D0x0800)/IP(src=3D"196.222.232.221")/("X"*480)], iface=3D"ens786f0")= =0D +=0D +8. check the pkts can not be received by VF.=0D +=0D +9. remove rx_vlan in VF1::=0D +=0D + testpmd> rx_vlan rm 1 0=0D +=0D +10. repeat step 3, check the pkts can not be received by VF.=0D +=0D +=0D +Test case 11: Enable/Disable IAVF VLAN header stripping=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=0D +=0D +1. enable vlan filtering on port VF::=0D +=0D + testpmd> vlan set filter on 0=0D + testpmd> rx_vlan add 1 0=0D +=0D +2. check the vlan mode is set successfully::=0D +=0D + testpmd> show port info 0=0D +=0D + ********************* Infos for port 0 *********************=0D + ......=0D + VLAN offload:=0D + strip off, filter on, extend off, qinq strip off=0D +=0D +3. enable vlan header stripping on VF::=0D +=0D + testpmd> vlan set strip on 0=0D +=0D +4. check the vlan mode is set successfully::=0D +=0D + testpmd> show port info 0=0D +=0D + ********************* Infos for port 0 *********************=0D + ......=0D + VLAN offload:=0D + strip on, filter on, extend off, qinq strip off=0D +=0D +5. tester send qinq pkt and single vlan pkt which outer vlan id is 1 to VF= ::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11",type=3D0x8100)/Dot1Q(vlan=3D1,t= ype=3D0x8100)/Dot1Q(vlan=3D2,type=3D0x0800)/IP(src=3D"196.222.232.221")/("X= "*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:11",type=3D0x8100)/Dot1Q(vlan=3D1,t= ype=3D0x0800)/IP(src=3D"196.222.232.221")/("X"*480)], iface=3D"ens786f0")=0D +=0D +6. check the pkts can be received in VF and fwd to tester without outer vl= an header::=0D +=0D + testpmd> port 0/queue 10: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x8100 - le= ngth=3D518 - nb_segs=3D1 - RSS hash=3D0xc7b627aa - RSS queue=3D0xa - hw pty= pe: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - sw ptype: L2_ETHER_VLAN L3_I= PV4 - l2_len=3D18 - l3_len=3D20 - Tail/CRC: 0x58585858/0x00000000 - Receiv= e queue=3D0xa=0D + ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PK= T_RX_OUTER_L4_CKSUM_UNKNOWN=0D +=0D + port 0/queue 10: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x0800 - le= ngth=3D514 - nb_segs=3D1 - RSS hash=3D0xc7b627aa - RSS queue=3D0xa - hw pty= pe: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 = - l2_len=3D14 - l3_len=3D20 - Tail/CRC: 0x58585858/0x00000000 - Receive que= ue=3D0xa=0D + ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PK= T_RX_OUTER_L4_CKSUM_UNKNOWN=0D +=0D + 10:12:38.034948 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1= Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, etherty= pe IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0),= length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 10:12:38.035025 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1= Q (0x8100), length 518: vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1= , offset 0, flags [none], proto Options (0), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D + 10:12:44.806825 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1= Q (0x8100), length 518: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1= , offset 0, flags [none], proto Options (0), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 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)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D +7. disable vlan header stripping on VF1::=0D +=0D + testpmd> vlan set strip off 0=0D +=0D +8. check the vlan mode is set successfully::=0D +=0D + testpmd> show port info 0=0D +=0D + ********************* Infos for port 0 *********************=0D + ......=0D + VLAN offload:=0D + strip off, filter on, extend off, qinq strip off=0D +=0D +9. repeat step 5, check the pkts can be received in VF and fwd to tester w= ith outer vlan header::=0D +=0D + testpmd> port 0/queue 10: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x8100 - le= ngth=3D522 - nb_segs=3D1 - RSS hash=3D0xc7b627aa - RSS queue=3D0xa - hw pty= pe: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - sw ptype: L2_ETHER_VLAN INNE= R_L2_ETHER_VLAN INNER_L3_IPV4 - l2_len=3D18 - inner_l2_len=3D4 - inner_l3_= len=3D20 - Tail/CRC: 0x58585858/0x00000000 - Receive queue=3D0xa=0D + ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PK= T_RX_OUTER_L4_CKSUM_UNKNOWN=0D +=0D + port 0/queue 10: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x8100 - le= ngth=3D518 - nb_segs=3D1 - RSS hash=3D0xc7b627aa - RSS queue=3D0xa - hw pty= pe: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - sw ptype: L2_ETHER_VLAN L3_I= PV4 - l2_len=3D18 - l3_len=3D20 - Tail/CRC: 0x58585858/0x00000000 - Receiv= e queue=3D0xa=0D + ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PK= T_RX_OUTER_L4_CKSUM_UNKNOWN=0D +=0D + 09:49:08.295172 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1= Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, etherty= pe IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0),= length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 09:49:08.295239 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1= Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, etherty= pe IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0),= length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D + 09:49:41.043101 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1= Q (0x8100), length 518: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1= , offset 0, flags [none], proto Options (0), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 09:49:41.043166 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1= Q (0x8100), length 518: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1= , offset 0, flags [none], proto Options (0), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D +=0D +Test case 12: Enable/Disable IAVF VLAN header insertion=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=0D +=0D +1. enable vf-vlan-prune-disable flag::=0D +=0D + echo 0 > /sys/bus/pci/devices/0000:18:00.0/sriov_numvfs=0D + ethtool --set-priv-flags ens785f0 vf-vlan-prune-disable on=0D +=0D +2. set up test environment again::=0D +=0D + echo 1 > /sys/bus/pci/devices/0000:18:00.0/sriov_numvfs=0D + ip link set ens785f0 vf 0 mac 00:11:22:33:44:11=0D + ip link set dev ens785f0 vf 0 spoofchk off=0D + ./usertools/dpdk-devbind.py -b vfio-pci 0000:18:01.0=0D + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:18:0= 1.0 -- -i --rxq=3D16 --txq=3D16=0D + testpmd> set fwd mac=0D + testpmd> set verbose 1=0D +=0D +3. enable vlan header insertion on VF::=0D +=0D + testpmd> port stop 0=0D + Stopping ports...=0D + Checking link statuses...=0D + Done=0D + testpmd> tx_vlan set 0 1=0D + testpmd> port start 0=0D +=0D +4. tester send pkt to VF::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11",type=3D0x0800)/IP(src=3D"196.22= 2.232.221")/("X"*480)], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:11",type=3D0x8100)/Dot1Q(vlan=3D11,= type=3D0x0800)/IP(src=3D"196.222.232.221")/("X"*480)], iface=3D"ens786f0")= =0D +=0D +5. check the pkts with vlan header can be received in tester::=0D +=0D + testpmd> port 0/queue 13: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x0800 - le= ngth=3D514 - nb_segs=3D1 - RSS hash=3D0xcaf4abfd - RSS queue=3D0xd - hw pty= pe: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 = - l2_len=3D14 - l3_len=3D20 - Receive queue=3D0xd=0D + ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PK= T_RX_OUTER_L4_CKSUM_UNKNOWN=0D +=0D + port 0/queue 8: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x8100 - le= ngth=3D518 - nb_segs=3D1 - RSS hash=3D0x28099b78 - RSS queue=3D0x8 - hw pty= pe: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - sw ptype: L2_ETHER_VLAN L3_I= PV4 - l2_len=3D18 - l3_len=3D20 - Receive queue=3D0x8=0D + ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PK= T_RX_OUTER_L4_CKSUM_UNKNOWN=0D +=0D + 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)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 10:32:55.566856 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1= Q (0x8100), length 518: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1= , offset 0, flags [none], proto Options (0), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D + 06:29:32.281896 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1= Q (0x8100), length 518: vlan 11, p 0, ethertype IPv4, (tos 0x0, ttl 64, id = 1, offset 0, flags [none], proto Options (0), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 06:29:32.281940 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1= Q (0x8100), length 522: vlan 11, p 0, ethertype 802.1Q, vlan 1, p 0, ethert= ype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0)= , length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D +6. disable vlan header insertion on VF1::=0D +=0D + testpmd> port stop 0=0D + Stopping ports...=0D + Checking link statuses...=0D + Done=0D + testpmd> tx_vlan reset 0=0D + testpmd> port start 0=0D +=0D +7. repeat step 4, check the pkts without vlan tag can be received in teste= r::=0D +=0D + testpmd> port 0/queue 9: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x0800 - le= ngth=3D514 - nb_segs=3D1 - RSS hash=3D0xa63e8869 - RSS queue=3D0x9 - hw pty= pe: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 = - l2_len=3D14 - l3_len=3D20 - Receive queue=3D0x9=0D + ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PK= T_RX_OUTER_L4_CKSUM_UNKNOWN=0D +=0D + port 0/queue 12: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x8100 - le= ngth=3D518 - nb_segs=3D1 - RSS hash=3D0x6f5533bc - RSS queue=3D0xc - hw pty= pe: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - sw ptype: L2_ETHER_VLAN L3_I= PV4 - l2_len=3D18 - l3_len=3D20 - Receive queue=3D0xc=0D + ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PK= T_RX_OUTER_L4_CKSUM_UNKNOWN=0D +=0D + 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)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 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)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D + 06:36:57.641871 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1= Q (0x8100), length 518: vlan 11, p 0, ethertype IPv4, (tos 0x0, ttl 64, id = 1, offset 0, flags [none], proto Options (0), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 06:36:57.641909 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1= Q (0x8100), length 518: vlan 11, p 0, ethertype IPv4, (tos 0x0, ttl 64, id = 1, offset 0, flags [none], proto Options (0), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D +=0D +Test case 13: Enable/disable AVF CRC stripping=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +=0D +1. start testpmd with "--disable-crc-strip"::=0D +=0D + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 20-23 -n 4 -a 0000:18= :01.0 -- -i --rxq=3D16 --txq=3D16 --disable-crc-strip=0D + testpmd> set fwd mac=0D + testpmd> set verbose 1=0D +=0D +2. send pkts to VF::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11",type=3D0x0800)/IP(src=3D"196.22= 2.232.221")/("X"*480)], iface=3D"ens786f0")=0D +=0D +3. check VF1 receive this pkts with CRC::=0D +=0D + testpmd> port 0/queue 0: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x0800 - le= ngth=3D514 - nb_segs=3D1 - RSS hash=3D0x890d9a70 - RSS queue=3D0x0 - hw pty= pe: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 = - l2_len=3D14 - l3_len=3D20 - Receive queue=3D0x0=0D + ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PK= T_RX_OUTER_L4_CKSUM_UNKNOWN=0D +=0D + show port stats all=0D +=0D + ######################## NIC statistics for port 0 ##################= ######=0D + RX-packets: 1 RX-missed: 0 RX-bytes: 518=0D + RX-errors: 0=0D + RX-nombuf: 0=0D + TX-packets: 1 TX-errors: 0 TX-bytes: 514=0D +=0D + Throughput (since last show)=0D + Rx-pps: 0 Rx-bps: 0=0D + Tx-pps: 0 Tx-bps: 0=0D + ######################################################################= ######=0D + clear port stats all=0D +=0D +4. enable crc strip in testpmd::=0D +=0D + testpmd> stop=0D + testpmd> port stop 0=0D + testpmd> port config 0 rx_offload keep_crc off=0D + testpmd> port start 0=0D + testpmd> start=0D +=0D +5. repeat step 2, check VF receive this pkts without CRC::=0D +=0D + testpmd> port 0/queue 2: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x0800 - le= ngth=3D514 - nb_segs=3D1 - RSS hash=3D0xa94c21d2 - RSS queue=3D0x2 - hw pty= pe: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 = - l2_len=3D14 - l3_len=3D20 - Receive queue=3D0x2=0D + ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PK= T_RX_OUTER_L4_CKSUM_UNKNOWN=0D +=0D + show port stats all=0D +=0D + ######################## NIC statistics for port 0 ##################= ######=0D + RX-packets: 1 RX-missed: 0 RX-bytes: 514=0D + RX-errors: 0=0D + RX-nombuf: 0=0D + TX-packets: 1 TX-errors: 0 TX-bytes: 514=0D +=0D + Throughput (since last show)=0D + Rx-pps: 0 Rx-bps: 0=0D + Tx-pps: 0 Tx-bps: 0=0D + ######################################################################= ######=0D + clear port stats all=0D +=0D +6. disable crc strip in testpmd::=0D +=0D + testpmd> stop=0D + testpmd> port stop 0=0D + testpmd> port config 0 rx_offload keep_crc on=0D + testpmd> port start 0=0D + testpmd> start=0D +=0D +7. repeat step 2, check VF1 receive this pkts with CRC::=0D +=0D + testpmd> port 0/queue 0: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x0800 - le= ngth=3D514 - nb_segs=3D1 - RSS hash=3D0x79c10190 - RSS queue=3D0x0 - hw pty= pe: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 = - l2_len=3D14 - l3_len=3D20 - Receive queue=3D0x0=0D + ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PK= T_RX_OUTER_L4_CKSUM_UNKNOWN=0D +=0D + show port stats all=0D +=0D + ######################## NIC statistics for port 0 ##################= ######=0D + RX-packets: 1 RX-missed: 0 RX-bytes: 518=0D + RX-errors: 0=0D + RX-nombuf: 0=0D + TX-packets: 1 TX-errors: 0 TX-bytes: 514=0D +=0D + Throughput (since last show)=0D + Rx-pps: 0 Rx-bps: 0=0D + Tx-pps: 0 Tx-bps: 0=0D + ######################################################################= ######=0D + clear port stats all=0D +=0D +8. re-launch testpmd without "--disable-crc-strip"::=0D +=0D + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 20-23 -n 4 -a 0000:18= :01.0 -- -i --rxq=3D16 --txq=3D16=0D + testpmd> set fwd mac=0D + testpmd> set verbose 1=0D +=0D +9. repeat step 2, check VF receive this pkts without CRC::=0D +=0D + testpmd> port 0/queue 2: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x0800 - le= ngth=3D514 - nb_segs=3D1 - RSS hash=3D0x898ada82 - RSS queue=3D0x2 - hw pty= pe: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 = - l2_len=3D14 - l3_len=3D20 - Receive queue=3D0x2=0D + ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PK= T_RX_OUTER_L4_CKSUM_UNKNOWN=0D +=0D + show port stats all=0D +=0D + ######################## NIC statistics for port 0 ##################= ######=0D + RX-packets: 1 RX-missed: 0 RX-bytes: 514=0D + RX-errors: 0=0D + RX-nombuf: 0=0D + TX-packets: 1 TX-errors: 0 TX-bytes: 514=0D +=0D + Throughput (since last show)=0D + Rx-pps: 0 Rx-bps: 0=0D + Tx-pps: 0 Tx-bps: 0=0D + ######################################################################= ######=0D +=0D +=0D +Test case 14: AVF CRC strip and Vlan strip co-exists=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=0D +=0D +1. start testpmd with crc strip enable, vlan strip disable::=0D +=0D + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 20-23 -n 4 -a 0000:18= :01.0 -- -i --rxq=3D16 --txq=3D16=0D + testpmd> set fwd mac=0D + testpmd> set verbose 1=0D + testpmd> show port info 0=0D + ********************* Infos for port 0 *********************=0D + MAC address: 00:11:22:33:44:11=0D + Device name: 0000:18:01.1=0D + Driver name: net_iavf=0D + ......=0D + VLAN offload:=0D + strip off, filter off, extend off, qinq strip off=0D +=0D +2. request disable vlan strip::=0D +=0D + testpmd> vlan set strip off 0=0D +=0D +3. check the vlan strip still disable::=0D +=0D + testpmd> show port info 0=0D + ********************* Infos for port 0 *********************=0D + MAC address: 00:11:22:33:44:11=0D + Device name: 0000:18:01.1=0D + Driver name: net_iavf=0D + ......=0D + VLAN offload:=0D + strip off, filter off, extend off, qinq strip off=0D +=0D +4. set vlan filter on and add rx_vlan 1::=0D +=0D + testpmd> vlan set filter on 0=0D + testpmd> rx_vlan add 1 0=0D + testpmd> start=0D +=0D +5. send qinq pkts to check vlan strip is off, crc strip is on::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11",type=3D0x8100)/Dot1Q(vlan=3D1,t= ype=3D0x8100)/Dot1Q(vlan=3D2,type=3D0x0800)/IP(src=3D"196.222.232.221")/("X= "*480)], iface=3D"ens786f0")=0D +=0D + testpmd> port 0/queue 6: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x8100 - le= ngth=3D522 - nb_segs=3D1 - RSS hash=3D0xf6521426 - RSS queue=3D0x6 - hw pty= pe: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - sw ptype: L2_ETHER_VLAN INNE= R_L2_ETHER_VLAN INNER_L3_IPV4 - l2_len=3D18 - inner_l2_len=3D4 - inner_l3_= len=3D20 - Tail/CRC: 0x58585858/0x00000000 - Receive queue=3D0x6=0D + ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PK= T_RX_OUTER_L4_CKSUM_UNKNOWN=0D +=0D + show port stats all=0D +=0D + ######################## NIC statistics for port 0 ##################= ######=0D + RX-packets: 1 RX-missed: 0 RX-bytes: 522=0D + RX-errors: 0=0D + RX-nombuf: 0=0D + TX-packets: 1 TX-errors: 0 TX-bytes: 522=0D +=0D + Throughput (since last show)=0D + Rx-pps: 0 Rx-bps: 0=0D + Tx-pps: 0 Tx-bps: 0=0D + ######################################################################= ######=0D +=0D + 09:07:45.863251 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1= Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, etherty= pe IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0),= length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 09:07:45.863340 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1= Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, etherty= pe IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0),= length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D +6. request enable vlan strip::=0D +=0D + testpmd> vlan set strip on 0=0D +=0D +7. check the vlan strip enable successfully::=0D +=0D + testpmd> show port info 0=0D + ********************* Infos for port 0 *********************=0D + MAC address: 00:11:22:33:44:11=0D + Device name: 0000:18:01.1=0D + Driver name: net_iavf=0D + ......=0D + VLAN offload:=0D + strip on, filter off, extend off, qinq strip off=0D +=0D +8. repeat step 5, send qinq pkts to check vlan strip is on(tx-4), crc stri= p is on::=0D +=0D + testpmd> port 0/queue 6: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x8100 - le= ngth=3D518 - nb_segs=3D1 - RSS hash=3D0xf6521426 - RSS queue=3D0x6 - hw pty= pe: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - sw ptype: L2_ETHER_VLAN L3_I= PV4 - l2_len=3D18 - l3_len=3D20 - Tail/CRC: 0x58585858/0x00000000 - Receiv= e queue=3D0x6=0D + ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PK= T_RX_OUTER_L4_CKSUM_UNKNOWN=0D +=0D + show port stats all=0D +=0D + ######################## NIC statistics for port 0 ##################= ######=0D + RX-packets: 1 RX-missed: 0 RX-bytes: 522=0D + RX-errors: 0=0D + RX-nombuf: 0=0D + TX-packets: 1 TX-errors: 0 TX-bytes: 518=0D +=0D + Throughput (since last show)=0D + Rx-pps: 0 Rx-bps: 0=0D + Tx-pps: 0 Tx-bps: 0=0D + ######################################################################= ######=0D +=0D + 11:09:03.918907 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1= Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, etherty= pe IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0),= length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 11:09:03.918952 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1= Q (0x8100), length 518: vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1= , offset 0, flags [none], proto Options (0), length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D +9. request disable vlan strip::=0D +=0D + testpmd> vlan set strip off 0=0D +=0D +10. check the vlan strip disable successfully::=0D +=0D + testpmd> show port info 0=0D + ********************* Infos for port 0 *********************=0D + MAC address: 00:11:22:33:44:11=0D + Device name: 0000:18:01.1=0D + Driver name: net_iavf=0D + ......=0D + VLAN offload:=0D + strip off, filter on, extend off, qinq strip off=0D +=0D +11. request disable crc strip::=0D +=0D + testpmd> stop=0D + testpmd> port stop 0=0D + testpmd> port config 0 rx_offload keep_crc on=0D + testpmd> port start 0=0D + testpmd> start=0D +=0D +12. repeat step 5, send qinq pkts to check vlan strip is off, crc strip is= off(rx+4)::=0D +=0D + testpmd> port 0/queue 7: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x8100 - le= ngth=3D522 - nb_segs=3D1 - RSS hash=3D0xbc8b1857 - RSS queue=3D0x7 - hw pty= pe: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - sw ptype: L2_ETHER_VLAN INNE= R_L2_ETHER_VLAN INNER_L3_IPV4 - l2_len=3D18 - inner_l2_len=3D4 - inner_l3_= len=3D20 - Tail/CRC: 0x58585858/0x6d870bf6 - Receive queue=3D0x7=0D + ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PK= T_RX_OUTER_L4_CKSUM_UNKNOWN=0D +=0D + show port stats all=0D + ######################## NIC statistics for port 0 ##################= ######=0D + RX-packets: 1 RX-missed: 0 RX-bytes: 526=0D + RX-errors: 0=0D + RX-nombuf: 0=0D + TX-packets: 1 TX-errors: 0 TX-bytes: 522=0D +=0D + Throughput (since last show)=0D + Rx-pps: 0 Rx-bps: 0=0D + Tx-pps: 0 Tx-bps: 0=0D + ######################################################################= ######=0D +=0D + 10:23:57.350934 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1= Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, etherty= pe IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0),= length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 10:23:57.351008 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1= Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, etherty= pe IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0),= length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D +13. request enable vlan strip::=0D +=0D + testpmd> vlan set strip on 0=0D + iavf_execute_vf_cmd(): No response or return failure (-64) for cmd 54= =0D + iavf_config_vlan_strip_v2(): fail to execute command VIRTCHNL_OP_ENABL= E_VLAN_STRIPPING_V2=0D + rx_vlan_strip_set(port_pi=3D0, on=3D1) failed diag=3D-5=0D +=0D +14. repeat step 5, send qinq pkts to check the vlan strip can not enable::= =0D +=0D + testpmd> port 0/queue 7: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x8100 - le= ngth=3D518 - nb_segs=3D1 - RSS hash=3D0xbc8b1857 - RSS queue=3D0x7 - hw pty= pe: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - sw ptype: L2_ETHER_VLAN L3_I= PV4 - l2_len=3D18 - l3_len=3D20 - Tail/CRC: 0x58585858/0x6d870bf6 - Receiv= e queue=3D0x7=0D + ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PK= T_RX_OUTER_L4_CKSUM_UNKNOWN=0D +=0D + show port stats all=0D + ######################## NIC statistics for port 0 ##################= ######=0D + RX-packets: 1 RX-missed: 0 RX-bytes: 526=0D + RX-errors: 0=0D + RX-nombuf: 0=0D + TX-packets: 1 TX-errors: 0 TX-bytes: 522=0D +=0D + Throughput (since last show)=0D + Rx-pps: 0 Rx-bps: 0=0D + Tx-pps: 0 Tx-bps: 0=0D + ######################################################################= ######=0D +=0D + 10:26:08.346936 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1= Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, etherty= pe IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0),= length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 10:26:08.347006 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1= Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, etherty= pe IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0),= length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D +=0D +15. request disable vlan strip::=0D +=0D + vlan set strip off 0=0D +=0D +16. check the vlan strip still disable::=0D +=0D + testpmd> show port info 0=0D + ********************* Infos for port 0 *********************=0D + MAC address: 00:11:22:33:44:11=0D + Device name: 0000:18:01.1=0D + Driver name: net_iavf=0D + ......=0D + VLAN offload:=0D + strip off, filter on, extend off, qinq strip off=0D +=0D +17. request enable crc strip::=0D +=0D + testpmd> stop=0D + testpmd> port stop 0=0D + testpmd> port config 0 rx_offload keep_crc off=0D + testpmd> port start 0=0D + testpmd> start=0D +=0D +18. repeat step 5, send qinq pkts to check the crc strip enable successful= ly::=0D +=0D + testpmd> port 0/queue 3: received 1 packets=0D + src=3D00:00:00:00:00:00 - dst=3D00:11:22:33:44:11 - type=3D0x8100 - le= ngth=3D522 - nb_segs=3D1 - RSS hash=3D0x2b4ad203 - RSS queue=3D0x3 - hw pty= pe: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - sw ptype: L2_ETHER_VLAN INNE= R_L2_ETHER_VLAN INNER_L3_IPV4 - l2_len=3D18 - inner_l2_len=3D4 - inner_l3_= len=3D20 - Receive queue=3D0x3=0D + ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PK= T_RX_OUTER_L4_CKSUM_UNKNOWN=0D + port 0/queue 3: sent 1 packets=0D + src=3D00:11:22:33:44:11 - dst=3D02:00:00:00:00:00 - type=3D0x8100 - le= ngth=3D522 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRA= G - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4 - l2_len=3D= 18 - inner_l2_len=3D4 - inner_l3_len=3D20 - Send queue=3D0x3=0D + ol_flags: PKT_RX_L4_CKSUM_UNKNOWN PKT_RX_IP_CKSUM_UNKNOWN PKT_RX_OUTER= _L4_CKSUM_UNKNOWN=0D +=0D + show port stats all=0D + ######################## NIC statistics for port 0 ##################= ######=0D + RX-packets: 1 RX-missed: 0 RX-bytes: 522=0D + RX-errors: 0=0D + RX-nombuf: 0=0D + TX-packets: 1 TX-errors: 0 TX-bytes: 522=0D +=0D + Throughput (since last show)=0D + Rx-pps: 0 Rx-bps: 0=0D + Tx-pps: 0 Tx-bps: 0=0D + ######################################################################= ######=0D +=0D + 10:29:19.995352 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1= Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, etherty= pe IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0),= length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480=0D + 10:29:19.995424 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1= Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, etherty= pe IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto Options (0),= length 500)=0D + 196.222.232.221 > 127.0.0.1: ip-proto-0 480 \ No newline at end of file --=20 2.25.1