From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 20318A04EF; Mon, 1 Jun 2020 05:12:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B7B6B1D410; Mon, 1 Jun 2020 05:12:42 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 48FBB1D17F for ; Mon, 1 Jun 2020 05:12:40 +0200 (CEST) IronPort-SDR: aHi8cEsHznDqgoCoTVf7DhhugkY1Fym7E6zk05jChXnq33AzXoi5DdnV49jQQUOrzyAdNAqAJW sDGaWfYoSbow== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2020 20:12:38 -0700 IronPort-SDR: WZny31rIIs5ZftklM1N+U1S56T9qht1YLaErnZSLJF1SyOqnVdSlItDD+h4DMEMm1iBSC8Z5hw jvdpjDGShmAA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,459,1583222400"; d="scan'208";a="268179607" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga003.jf.intel.com with ESMTP; 31 May 2020 20:12:38 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 31 May 2020 20:12:38 -0700 Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 31 May 2020 20:12:37 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.85]) by SHSMSX105.ccr.corp.intel.com ([10.239.4.158]) with mapi id 14.03.0439.000; Mon, 1 Jun 2020 11:12:35 +0800 From: "Tu, Lijuan" To: "Lu, Nannan" , "dts@dpdk.org" CC: "Lu, Nannan" Thread-Topic: [dts] [PATCH V1] test_plans: add cvl_dcf_switch_filter_test_plan.rst Thread-Index: AQHWMBd92mdb23pAlkODeeaQ+Hp/nqjDJMYA Date: Mon, 1 Jun 2020 03:12:35 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BC565D2@SHSMSX101.ccr.corp.intel.com> References: <20200522164351.42706-1-nannan.lu@intel.com> In-Reply-To: <20200522164351.42706-1-nannan.lu@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1] test_plans: add cvl_dcf_switch_filter_test_plan.rst X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 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" Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Nannan Lu > Sent: Saturday, May 23, 2020 12:44 AM > To: dts@dpdk.org > Cc: Lu, Nannan > Subject: [dts] [PATCH V1] test_plans: add cvl_dcf_switch_filter_test_plan= .rst >=20 > Add cvl_dcf_switch_filter_test_plan.rst to test_plans >=20 > Signed-off-by: Nannan Lu > --- > .../cvl_dcf_switch_filter_test_plan.rst | 2495 +++++++++++++++++ > 1 file changed, 2495 insertions(+) > create mode 100644 test_plans/cvl_dcf_switch_filter_test_plan.rst >=20 > diff --git a/test_plans/cvl_dcf_switch_filter_test_plan.rst > b/test_plans/cvl_dcf_switch_filter_test_plan.rst > new file mode 100644 > index 0000000..e22f090 > --- /dev/null > +++ b/test_plans/cvl_dcf_switch_filter_test_plan.rst > @@ -0,0 +1,2495 @@ > +.. Copyright (c) <2020>, Intel Corporation > + All rights reserved. > + > + Redistribution and use in source and binary forms, with or without > + modification, are permitted provided that the following conditions > + are met: > + > + - Redistributions of source code must retain the above copyright > + notice, this list of conditions and the following disclaimer. > + > + - Redistributions in binary form must reproduce the above copyright > + notice, this list of conditions and the following disclaimer in > + the documentation and/or other materials provided with the > + distribution. > + > + - Neither the name of Intel Corporation nor the names of its > + contributors may be used to endorse or promote products derived > + from this software without specific prior written permission. > + > + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND > CONTRIBUTORS > + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT > + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND > FITNESS > + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE > + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, > INDIRECT, > + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES > + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE > GOODS OR > + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN > CONTRACT, > + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) > + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF > ADVISED > + OF THE POSSIBILITY OF SUCH DAMAGE. > + > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > +CVL DCF Switch Filter Tests > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > + > +Description > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +This document provides the plan for testing DCF switch filter of CVL, > including: > + > +* Enable DCF switch filter for IPv4/IPv6 + TCP/UDP/IGMP (comm #1 package= ) > +* Enable DCF switch filter for tunnel: NVGRE (comm #1 package) > +* Enable DCF switch filter for PPPOE (comm #1 package) > +* Enable DCF switch filter for PFCP (comm #1 package) > +* Enable DCF switch filter for IP/L2 multicast (comm #1 package) > +* Enable DCF switch filter for ethertype/UDP port/MAC VLAN/VLAN filter > (comm #1 package) > + > + > +Pattern and input set > +--------------------- > + > + +---------------------+-------------------------------+---------------= -------------------------- > --+ > + | Packet Types | Pattern | = Input Set | > + > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D+=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+ > + | | MAC_PAY | [Source MAC], = [Dest MAC], [Ether > type] | > + | +-------------------------------+---------------= ----------------------------+ > + | | MAC_IPV4_FRAG | [Dest MAC], [S= ource IP], [Dest > IP], | > + | | | [TTL], [DSCP] = | > + | +-------------------------------+---------------= ----------------------------+ > + | | MAC_IPV4_PAY | [Dest MAC], [S= ource IP], [Dest IP], > | > + | | | [IP protocol],= [TTL], [DSCP] | > + | +-------------------------------+---------------= ----------------------------+ > + | | MAC_IPV4_UDP_PAY | [Dest MAC], [S= ource IP], [Dest > IP], | > + | | | [TTL], [DSCP],= [Source Port], [Dest Port] | > + | +-------------------------------+---------------= ----------------------------+ > + | IPv4/IPv6 + | MAC_IPV4_TCP_PAY | [Dest MAC], [Sourc= e > IP], [Dest IP], | > + | TCP/UDP/IGMP | | [TTL], [DSCP],= [Source Port], [Dest > Port] | > + | +-------------------------------+---------------= ----------------------------+ > + | | MAC_IPV4_IGMP | [IP protocol] = | > + | +-------------------------------+---------------= ----------------------------+ > + | | MAC_IPV6_FRAG_srcip_dstip | [Source IP], [= Dest IP] > | > + | +-------------------------------+---------------= ----------------------------+ > + | | MAC_IPV6_FRAG_dstip_tc | [Dest MAC], [D= est IP], [TC] > | > + | +-------------------------------+---------------= ----------------------------+ > + | | MAC_IPV6_PAY_srcip_dstip | [Source IP], [= Dest IP] > | > + | +-------------------------------+---------------= ----------------------------+ > + | | MAC_IPV6_PAY_dstip_tc | [Dest MAC], [D= est IP], [TC] > | > + | +-------------------------------+---------------= ----------------------------+ > + | | MAC_IPV6_UDP_PAY | [Dest MAC], [D= est IP], [TC], > | > + | | | [Source Port],= [Dest Port] | > + | +-------------------------------+---------------= ----------------------------+ > + | | MAC_IPV6_TCP | [Dest MAC], [D= est IP], [TC], > | > + | | | [Source Port],= [Dest Port] | > + +---------------------+-------------------------------+---------------= -------------------------- > --+ > + | | MAC_IPV4_TUN_IPV4_FRAG | [Out Dest IP], > [VNI/GRE_KEY], | > + | | | [Inner Source IP], [I= nner Dest IP] | > + | +-------------------------------+---------------= ----------------------------+ > + | | MAC_IPV4_TUN_IPV4_PAY | [Out Dest IP], > [VNI/GRE_KEY], | > + | | | [Inner Source = IP], [Inner Dest IP] | > + | +-------------------------------+---------------= ----------------------------+ > + | | MAC_IPV4_TUN_IPV4_UDP_PAY | [Out Dest IP], > [VNI/GRE_KEY], | > + | | | [Inner Source = IP], [Inner Dest IP], | > + | | | [Inner Source = Port], [Inner Dest Port] | > + | +-------------------------------+---------------= ----------------------------+ > + | | MAC_IPV4_TUN_IPV4_TCP | [Out Dest IP], > [VNI/GRE_KEY], | > + | | | [Inner Source = IP], [Inner Dest IP], | > + | | | [Inner Source = Port], [Inner Dest Port] | > + | tunnel: +-------------------------------+---------------= --------------------------- > -+ > + | NVGRE | MAC_IPV4_TUN_MAC_IPV4_FRAG | [Out Dest IP], > [VNI/GRE_KEY], | > + | | | [Inner Dest MA= C], | > + | | | [Inner Source = IP], [Inner Dest IP] | > + | +-------------------------------+---------------= ----------------------------+ > + | | MAC_IPV4_TUN_MAC_IPV4_PAY | [Out Dest IP], > [VNI/GRE_KEY], | > + | | | [Inner Dest MA= C], | > + | | | [Inner Source = IP], [Inner Dest IP] | > + | +-------------------------------+---------------= ----------------------------+ > + | | MAC_IPV4_TUN_MAC_IPV4_UDP_PAY | [Out Dest IP], > [VNI/GRE_KEY], | > + | | | [Inner Dest MA= C], | > + | | | [Inner Source = IP],[Inner Dest IP], | > + | | | [Inner Source = Port], [Inner Dest Port] | > + | +-------------------------------+---------------= ----------------------------+ > + | | MAC_IPV4_TUN_MAC_IPV4_TCP | [Out Dest IP], > [VNI/GRE_KEY], | > + | | | [Inner Dest MA= C], | > + | | | [Inner Source = IP], [Inner Dest IP], | > + | | | [Inner Source = Port], [Inner Dest Port] | > + +---------------------+-------------------------------+---------------= -------------------------- > --+ > + | | MAC_VLAN_PPPOE_IPV4_PAY | [Dest MAC], [V= LAN], > [seid], | > + | | | [pppoe_proto_i= d] | > + | +-------------------------------+---------------= ----------------------------+ > + | | MAC_VLAN_PPPOE_IPV6_PAY | [Dest MAC], [V= LAN], > [seid], | > + | PPPOE | | [pppoe_proto_i= d] | > + | +-------------------------------+---------------= ----------------------------+ > + | | MAC_PPPOE_IPV4_PAY | [Dest MAC], [s= eid], > [pppoe_proto_id] | > + | +-------------------------------+---------------= ----------------------------+ > + | | MAC_PPPOE_IPV6_PAY | [Dest MAC], [s= eid], > [pppoe_proto_id] | > + +---------------------+-------------------------------+---------------= -------------------------- > --+ > + | | MAC_IPV4_PFCP_NODE | [Dest Port], [= S-field] > | > + | +-------------------------------+---------------= ----------------------------+ > + | | MAC_IPV4_PFCP_SESSION | [Dest Port], [= S-field] > | > + | PFCP +-------------------------------+---------------= ---------------------------- > + > + | | MAC_IPV6_PFCP_NODE | [Dest Port], [= S-field] > | > + | +-------------------------------+---------------= ----------------------------+ > + | | MAC_IPV6_PFCP_SESSION | [Dest Port], [= S-field] > | > + +---------------------+-------------------------------+---------------= -------------------------- > --+ > + | | IP multicast | [Dest IP] = | > + | multicast +-------------------------------+---------------= -------------------------- > --+ > + | | L2 multicast | [Dest MAC] = | > + +---------------------+-------------------------------+---------------= -------------------------- > --+ > + | | ethertype filter_PPPOD | [Ether type] = | > + | +-------------------------------+---------------= ----------------------------+ > + | ethertype filter | ethertype filter_PPPOE | [Ether type] > | > + | +-------------------------------+---------------= ----------------------------+ > + | | ethertype filter_IPV6 | [Ether type] = | > + +---------------------+-------------------------------+---------------= -------------------------- > --+ > + | | UDP port filter_DHCP discovery| [Source Port],= [Dest Port] > | > + | +-------------------------------+---------------= ----------------------------+ > + | UDP port filter | UDP port filter_DHCP offer | [Source Port],= [Dest > Port] | > + | +-------------------------------+---------------= ----------------------------+ > + | | UDP port filter_VXLAN | [Dest Port] = | > + +---------------------+-------------------------------+---------------= -------------------------- > --+ > + | MAC VLAN filter | MAC_VLAN filter | [Dest MAC], [V= LAN] > | > + +---------------------+-------------------------------+---------------= -------------------------- > --+ > + | VLAN filter | VLAN filter | [VLAN] = | > + +---------------------+-------------------------------+---------------= -------------------------- > --+ > + > + > +Supported function type > +----------------------- > + > +* create > +* validate > +* destroy > +* flush > + > + > +Supported action type > +--------------------- > + > +* To vf/vsi > + > + > +Prerequisites > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. Hardware: > + columbiaville_25g/columbiaville_100g > + > +2. Software: > + dpdk: http://dpdk.org/git/dpdk > + scapy: http://www.secdev.org/projects/scapy/ > + > +3. Copy specific ice package to /lib/firmware/updates/intel/ice/ddp/ice.= pkg, > + then load driver:: > + > + rmmod ice > + insmod ice.ko > + > +4. Compile DPDK:: > + > + make -j install T=3Dx86_64-native-linuxapp-gcc > + > +5. Get the pci device id of DUT, for example:: > + > + ./usertools/dpdk-devbind.py -s > + > + 0000:18:00.0 'Device 1593' if=3Denp24s0f0 drv=3Dice unused=3Dvfio-p= ci > + 0000:18:00.1 'Device 1593' if=3Denp24s0f1 drv=3Dice unused=3Dvfio-p= ci > + > +6. Generate 4 VFs on PF0:: > + > + echo 4 > /sys/bus/pci/devices/0000:18:00.0/sriov_numvfs > + > + ./usertools/dpdk-devbind.py -s > + 0000:18:01.0 'Ethernet Adaptive Virtual Function 1889' if=3Denp24s1 > drv=3Diavf unused=3Dvfio-pci > + 0000:18:01.1 'Ethernet Adaptive Virtual Function 1889' if=3Denp24s1= f1 > drv=3Diavf unused=3Dvfio-pci > + 0000:18:01.2 'Ethernet Adaptive Virtual Function 1889' if=3Denp24s1= f2 > drv=3Diavf unused=3Dvfio-pci > + 0000:18:01.3 'Ethernet Adaptive Virtual Function 1889' if=3Denp24s1= f3 > drv=3Diavf unused=3Dvfio-pci > + > +7. Set VF0 as trust:: > + > + ip link set enp24s0f0 vf 0 trust on > + > +8. Bind VFs to dpdk driver:: > + > + modprobe vfio-pci > + ./usertools/dpdk-devbind.py -b vfio-pci 0000:18:01.0 0000:18:01.1 > 0000:18:01.2 0000:18:01.3 > + > +9. Launch dpdk on VF0 and VF1, and VF0 request DCF mode:: > + > + ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w > 0000:18:01.0,cap=3Ddcf -w 0000:18:01.1 -- -i > + testpmd> set portlist 1 > + testpmd> set fwd rxonly > + testpmd> set verbose 1 > + testpmd> start > + testpmd> show port info all > + > + check the VF0 driver is net_ice_dcf. > + > +10. on tester side, copy the layer python file to /root:: > + > + cp pfcp.py to /root > + > + then import layers when start scapy:: > + > + >>> import sys > + >>> sys.path.append('/root') > + >>> from pfcp import PFCP > + >>> from scapy.contrib.igmp import * > + > + > +Test case: MAC_PAY > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth src is 00:00:00:00:00:01= dst is > 00:11:22:33:44:55 type is 0x0800 / end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether(src=3D"00:00:00:00:00:01",dst=3D"00:11:22:33:44:55")/IP()/Ra= w("x" > *80)],iface=3D"enp27s0f0",count=3D1) > + > + check port 1 receive the packet. > + send mismatched packets:: > + > + > sendp([Ether(src=3D"00:00:00:00:00:02",dst=3D"00:11:22:33:44:55")/IP()/Ra= w("x" > *80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether(src=3D"00:00:00:00:00:01",dst=3D"00:11:22:33:44:54")/IP()/Ra= w("x" > *80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether(src=3D"00:00:00:00:00:01",dst=3D"00:11:22:33:44:55")/IPv6()/= Raw(" > x" *80)],iface=3D"enp27s0f0",count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_IPV4_FRAG > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8= / ipv4 > src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 2 / end actions vf = id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.1",dst=3D"192= .168.0. > 2",tos=3D4,ttl=3D2,frag=3D5)/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > + check port 1 receive the packet. > + send mismatched packets:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a3")/IP(src=3D"192.168.0.1",dst=3D"192= .168.0. > 2",tos=3D4,ttl=3D2,frag=3D5)/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.4",dst=3D"192= .168.0. > 2",tos=3D4,ttl=3D2,frag=3D5)/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.1",dst=3D"192= .168.0. > 5",tos=3D4,ttl=3D2,frag=3D5)/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.1",dst=3D"192= .168.0. > 2",tos=3D5,ttl=3D2,frag=3D5)/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.1",dst=3D"192= .168.0. > 2",tos=3D4,ttl=3D3,frag=3D5)/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_IPV4_PAY > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8= / ipv4 > src is 192.168.0.1 dst is 192.168.0.2 proto is 6 tos is 4 ttl is 2 / end = actions vf id > 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.1",dst=3D"192= .168.0. > 2",tos=3D4,ttl=3D2)/TCP()/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > + check port 1 receive the packet. > + send mismatched packets:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a3")/IP(src=3D"192.168.0.1",dst=3D"192= .168.0. > 2",tos=3D4,ttl=3D2)/TCP()/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.4",dst=3D"192= .168.0. > 2",tos=3D4,ttl=3D2)/TCP()/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.1",dst=3D"192= .168.0. > 5",tos=3D4,ttl=3D2)/TCP()/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.1",dst=3D"192= .168.0. > 2",tos=3D5,ttl=3D2)/TCP()/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.1",dst=3D"192= .168.0. > 2",tos=3D4,ttl=3D3)/TCP()/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.1",dst=3D"192= .168.0. > 2",tos=3D4,ttl=3D2)/UDP()/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_IPV4_UDP_PAY > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8= / ipv4 > src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 d= st is 23 / > end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.1",dst=3D"192= .168.0. > 2",tos=3D4,ttl=3D3)/UDP(sport=3D25,dport=3D23)/("X"*480)], iface=3D"enp27= s0f0", > count=3D1) > + > + check port 1 receive the packet. > + send mismatched packets:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.1",dst=3D"192= .168.0. > 2",tos=3D4,ttl=3D3)/UDP(sport=3D30,dport=3D23)/("X"*480)], iface=3D"enp27= s0f0", > count=3D1) > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.1",dst=3D"192= .168.0. > 2",tos=3D4,ttl=3D3)/UDP(sport=3D25,dport=3D19)/("X"*480)], iface=3D"enp27= s0f0", > count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_IPV4_TCP_PAY > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8= / ipv4 > src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / tcp src is 25 d= st is 23 / end > actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.1",dst=3D"192= .168.0. > 2",tos=3D4,ttl=3D3)/TCP(sport=3D25,dport=3D23)/("X"*480)], iface=3D"enp27= s0f0", > count=3D1) > + > + check port 1 receive the packet. > + send mismatched packets:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.1",dst=3D"192= .168.0. > 2",tos=3D4,ttl=3D3)/TCP(sport=3D30,dport=3D23)/("X"*480)], iface=3D"enp27= s0f0", > count=3D1) > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.1",dst=3D"192= .168.0. > 2",tos=3D4,ttl=3D3)/TCP(sport=3D25,dport=3D19)/("X"*480)], iface=3D"enp27= s0f0", > count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_IPV4_IGMP > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 proto is 0x02 / e= nd > actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + sendp([Ether(dst=3D"00:11:22:33:44:55")/IP()/IGMP()/Raw("X"*480)], > iface=3D"enp27s0f0", count=3D1) > + > + check port 1 receive the packet. > + send mismatched packets:: > + > + sendp([Ether(dst=3D"00:11:22:33:44:55")/IP()/TCP()/Raw("X"*480)], > iface=3D"enp27s0f0", count=3D1) > + sendp([Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP()/Raw("X"*480)], > iface=3D"enp27s0f0", count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_IPV6_FRAG_srcip_dstip > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +Description: The maximum input set length of a switch rule is 32 bytes. > +Therefore, if a rule carries src ipv6, dst ipv6, it can not take any oth= er fields. > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth / ipv6 src is > CDCD:910A:2222:5498:8475:1111:3900:1536 dst is > CDCD:910A:2222:5498:8475:1111:3900:2022 / end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether(dst=3D"00:11:22:33:44:55")/IPv6(src=3D"CDCD:910A:2222:5498:8= 47 > 5:1111:3900:1536", > dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/(" > X"*480)], iface=3D"enp27s0f0", count=3D1) > + > + check port 1 receive the packet. > + send mismatched packets:: > + > + > sendp([Ether(dst=3D"00:11:22:33:44:55")/IPv6(src=3D"CDCD:910A:2222:5498:8= 47 > 5:1111:3900:1537", > dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/(" > X"*480)], iface=3D"enp27s0f0", count=3D1) > + > sendp([Ether(dst=3D"00:11:22:33:44:55")/IPv6(src=3D"CDCD:910A:2222:5498:8= 47 > 5:1111:3900:1536", > dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2023")/IPv6ExtHdrFragment()/(" > X"*480)], iface=3D"enp27s0f0", count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_IPV6_FRAG_dstip_tc > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8= / ipv6 > dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions vf i= d 1 > / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IPv6(src=3D"CDCD:910A:2222:5498:8= 47 > 5:1111:3900:1518", > dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3D3)/IPv6ExtHdrFragmen > t()/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > + check port 1 receive the packet. > + send mismatched packets:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a3")/IPv6(src=3D"CDCD:910A:2222:5498:8= 47 > 5:1111:3900:1518", > dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3D3)/IPv6ExtHdrFragmen > t()/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IPv6(src=3D"CDCD:910A:2222:5498:8= 47 > 5:1111:3900:1518", > dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3D3)/IPv6ExtHdrFragmen > t()/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IPv6(src=3D"CDCD:910A:2222:5498:8= 47 > 5:1111:3900:1518", > dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3D4)/IPv6ExtHdrFragmen > t()/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_IPV6_PAY_srcip_dstip > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth / ipv6 src is > CDCD:910A:2222:5498:8475:1111:3900:1536 dst is > CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether(dst=3D"00:11:22:33:44:55")/IPv6(src=3D"CDCD:910A:2222:5498:8= 47 > 5:1111:3900:1536", > dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)], > iface=3D"enp27s0f0", count=3D1) > + > + check port 1 receive the packet. > + send mismatched packets:: > + > + > sendp([Ether(dst=3D"00:11:22:33:44:55")/IPv6(src=3D"CDCD:910A:2222:5498:8= 47 > 5:1111:3900:1537", > dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)], > iface=3D"enp27s0f0", count=3D1) > + > sendp([Ether(dst=3D"00:11:22:33:44:55")/IPv6(src=3D"CDCD:910A:2222:5498:8= 47 > 5:1111:3900:1536", > dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2023")/("X"*480)], > iface=3D"enp27s0f0", count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_IPV6_PAY_dstip_tc > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8= / ipv6 > dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions vf i= d 1 > / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IPv6(src=3D"CDCD:910A:2222:5498:8= 47 > 5:1111:3900:1518", > dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3D3)/("X"*480)], > iface=3D"enp27s0f0", count=3D1) > + > + check port 1 receive the packet. > + send mismatched packets:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a3")/IPv6(src=3D"CDCD:910A:2222:5498:8= 47 > 5:1111:3900:1518", > dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3D3)/("X"*480)], > iface=3D"enp27s0f0", count=3D1) > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IPv6(src=3D"CDCD:910A:2222:5498:8= 47 > 5:1111:3900:1518", > dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3D3)/("X"*480)], > iface=3D"enp27s0f0", count=3D1) > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IPv6(src=3D"CDCD:910A:2222:5498:8= 47 > 5:1111:3900:1518", > dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3D4)/("X"*480)], > iface=3D"enp27s0f0", count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_IPV6_UDP_PAY > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8= / ipv6 > dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / udp src is 25 ds= t is > 23 / end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IPv6(src=3D"CDCD:910A:2222:5498:8= 47 > 5:1111:3900:1518", > dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3D3)/UDP(sport=3D25,dp= ort > =3D23)/("X"*480)], iface=3D"enp27s0f0",count=3D1) > + > + check port 1 receive the packet. > + send mismatched packets:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IPv6(src=3D"CDCD:910A:2222:5498:8= 47 > 5:1111:3900:1518", > dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3D3)/UDP(sport=3D30,dp= ort > =3D23)/("X"*480)], iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IPv6(src=3D"CDCD:910A:2222:5498:8= 47 > 5:1111:3900:1518", > dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3D3)/UDP(sport=3D25,dp= ort > =3D19)/("X"*480)], iface=3D"enp27s0f0",count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_IPV6_TCP > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8= / ipv6 > dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / tcp src is 25 ds= t is > 23 / end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IPv6(src=3D"CDCD:910A:2222:5498:8= 47 > 5:1111:3900:1518", > dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3D3)/TCP(sport=3D25,dp= ort > =3D23)/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > + check port 1 receive the packet. > + send mismatched packets:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IPv6(src=3D"CDCD:910A:2222:5498:8= 47 > 5:1111:3900:1518", > dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3D3)/TCP(sport=3D30,dp= ort > =3D23)/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IPv6(src=3D"CDCD:910A:2222:5498:8= 47 > 5:1111:3900:1518", > dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3D3)/TCP(sport=3D25,dp= ort > =3D19)/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_IPV4_VXLAN_IPV4_FRAG (not support in 20.05) > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.= 1 / udp > / vxlan vni is 2 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end= actions vf > id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether()/IP(sr= c=3D"19 > 2.168.0.2", > dst=3D"192.168.0.3",frag=3D5)/TCP()/Raw("x"*80)],iface=3D"enp27s0f0",coun= t=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether()/IP(sr= c=3D"19 > 2.168.0.2", > dst=3D"192.168.0.3",frag=3D5)/Raw("x"*80)],iface=3D"enp27s0f0",count=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.2")/UDP()/VXLAN(vni=3D2)/Ether()/IP(sr= c=3D"19 > 2.168.0.2", > dst=3D"192.168.0.3",frag=3D5)/Raw("x"*80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D3)/Ether()/IP(sr= c=3D"19 > 2.168.0.2", > dst=3D"192.168.0.3",frag=3D5)/Raw("x"*80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether()/IP(sr= c=3D"19 > 2.168.0.4", > dst=3D"192.168.0.3",frag=3D5)/Raw("x"*80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether()/IP(sr= c=3D"19 > 2.168.0.2", > dst=3D"192.168.0.5",frag=3D5)/Raw("x"*80)],iface=3D"enp27s0f0",count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_IPV4_VXLAN_IPV4_PAY (not support in 20.05) > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.= 1 / udp > / vxlan vni is 2 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end= actions vf > id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether()/IP(sr= c=3D"19 > 2.168.0.2", > dst=3D"192.168.0.3")/TCP()/Raw("x"*80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether()/IP(sr= c=3D"19 > 2.168.0.2", dst=3D"192.168.0.3")/Raw("x"*80)],iface=3D"enp27s0f0",count= =3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.2")/UDP()/VXLAN(vni=3D2)/Ether()/IP(sr= c=3D"19 > 2.168.0.2", > dst=3D"192.168.0.3")/TCP()/Raw("x"*80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D3)/Ether()/IP(sr= c=3D"19 > 2.168.0.2", > dst=3D"192.168.0.3")/TCP()/Raw("x"*80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether()/IP(sr= c=3D"19 > 2.168.0.4", > dst=3D"192.168.0.3")/TCP()/Raw("x"*80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether()/IP(sr= c=3D"19 > 2.168.0.2", > dst=3D"192.168.0.5")/TCP()/Raw("x"*80)],iface=3D"enp27s0f0",count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_IPV4_VXLAN_IPV4_UDP_PAY (not support in 20.05) > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.= 1 / udp > / vxlan vni is 2 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / udp= src is 50 > dst is 23 / end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether()/IP(sr= c=3D"19 > 2.168.0.2", dst=3D"192.168.0.3")/UDP(sport=3D50,dport=3D23) > /Raw("x"*80)],iface=3D"enp27s0f0",count=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether()/IP(sr= c=3D"19 > 2.168.0.2", dst=3D"192.168.0.3")/UDP(sport=3D20,dport=3D23) > /Raw("x"*80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether()/IP(sr= c=3D"19 > 2.168.0.2", dst=3D"192.168.0.3")/UDP(sport=3D50,dport=3D19) > /Raw("x"*80)],iface=3D"enp27s0f0",count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_IPV4_VXLAN_IPV4_TCP (not support in 20.05) > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.= 1 / udp > / vxlan vni is 2 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / tcp= src is 50 > dst is 23 / end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether()/IP(sr= c=3D"19 > 2.168.0.2", > dst=3D"192.168.0.3")/TCP(sport=3D50,dport=3D23)/Raw("x"*80)],iface=3D"enp= 27s0f0" > ,count=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether()/IP(sr= c=3D"19 > 2.168.0.2", > dst=3D"192.168.0.3")/TCP(sport=3D29,dport=3D23)/Raw("x"*80)],iface=3D"enp= 27s0f0" > ,count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether()/IP(sr= c=3D"19 > 2.168.0.2", > dst=3D"192.168.0.3")/TCP(sport=3D50,dport=3D100)/Raw("x"*80)],iface=3D"en= p27s0f0 > ",count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_IPV4_VXLAN_MAC_IPV4_FRAG (not support in 20.05) > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.= 1 / udp > / vxlan vni is 2 / eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.2= dst is > 192.168.0.3 / end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether(dst=3D"= 68:05: > ca:8d:ed:a8")/IP(src=3D"192.168.0.2", > dst=3D"192.168.0.3" ,frag=3D5)/TCP()/Raw("x"*80)],iface=3D"enp27s0f0",cou= nt=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether(dst=3D"= 68:05: > ca:8d:ed:a8")/IP(src=3D"192.168.0.2", > dst=3D"192.168.0.3" ,frag=3D5)/Raw("x"*80)],iface=3D"enp27s0f0",count=3D1= ) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.2")/UDP()/VXLAN(vni=3D2)/Ether(dst=3D"= 68:05: > ca:8d:ed:a8")/IP(src=3D"192.168.0.2", > dst=3D"192.168.0.3" ,frag=3D5)/TCP()/Raw("x"*80)],iface=3D"enp27s0f0",cou= nt=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D3)/Ether(dst=3D"= 68:05: > ca:8d:ed:a8")/IP(src=3D"192.168.0.2", > dst=3D"192.168.0.3" ,frag=3D5)/TCP()/Raw("x"*80)],iface=3D"enp27s0f0",cou= nt=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether(dst=3D"= 68:05: > ca:8d:ed:a9")/IP(src=3D"192.168.0.2", > dst=3D"192.168.0.3" ,frag=3D5)/TCP()/Raw("x"*80)],iface=3D"enp27s0f0",cou= nt=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether(dst=3D"= 68:05: > ca:8d:ed:a8")/IP(src=3D"192.168.0.4", > dst=3D"192.168.0.3" ,frag=3D5)/TCP()/Raw("x"*80)],iface=3D"enp27s0f0",cou= nt=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether(dst=3D"= 68:05: > ca:8d:ed:a8")/IP(src=3D"192.168.0.2", > dst=3D"192.168.0.5" ,frag=3D5)/TCP()/Raw("x"*80)],iface=3D"enp27s0f0",cou= nt=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_IPV4_VXLAN_MAC_IPV4_PAY (not support in 20.05) > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.= 1 / udp > / vxlan vni is 2 / eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.= 2 dst is > 192.168.0.3 / end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether(dst=3D"= 68:05: > ca:8d:ed:a8")/IP(src=3D"192.168.0.2", dst=3D"192.168.0.3") /TCP()/Raw("x"= * > 80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether(dst=3D"= 68:05: > ca:8d:ed:a8")/IP(src=3D"192.168.0.2", dst=3D"192.168.0.3")/Raw("x" * > 80)],iface=3D"enp27s0f0",count=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.2")/UDP()/VXLAN(vni=3D2)/Ether(dst=3D"= 68:05: > ca:8d:ed:a8")/IP(src=3D"192.168.0.2", dst=3D"192.168.0.3") /TCP()/Raw("x"= * > 80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D3)/Ether(dst=3D"= 68:05: > ca:8d:ed:a8")/IP(src=3D"192.168.0.2", dst=3D"192.168.0.3") /TCP()/Raw("x"= * > 80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether(dst=3D"= 68:05: > ca:8d:ed:a9")/IP(src=3D"192.168.0.2", dst=3D"192.168.0.3") /TCP()/Raw("x"= * > 80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether(dst=3D"= 68:05: > ca:8d:ed:a8")/IP(src=3D"192.168.0.4", dst=3D"192.168.0.3") /TCP()/Raw("x"= * > 80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether(dst=3D"= 68:05: > ca:8d:ed:a8")/IP(src=3D"192.168.0.2", dst=3D"192.168.0.5") /TCP()/Raw("x"= * > 80)],iface=3D"enp27s0f0",count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_IPV4_VXLAN_MAC_IPV4_UDP_PAY (not support in 20.05) > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.= 1 / udp > / vxlan vni is 2 / eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.= 2 dst is > 192.168.0.3 / udp src is 50 dst is 23 / end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether(dst=3D"= 68:05: > ca:8d:ed:a8")/IP(src=3D"192.168.0.2", > dst=3D"192.168.0.3")/UDP(sport=3D50,dport=3D23)/Raw("x" * > 80)],iface=3D"enp27s0f0",count=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether(dst=3D"= 68:05: > ca:8d:ed:a8")/IP(src=3D"192.168.0.2", > dst=3D"192.168.0.3")/UDP(sport=3D20,dport=3D23)/Raw("x" * > 80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether(dst=3D"= 68:05: > ca:8d:ed:a8")/IP(src=3D"192.168.0.2", > dst=3D"192.168.0.3")/UDP(sport=3D50,dport=3D29)/Raw("x" * > 80)],iface=3D"enp27s0f0",count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_IPV4_VXLAN_MAC_IPV4_TCP (not support in 20.05) > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.= 1 / udp > / vxlan vni is 2 / eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.= 2 dst is > 192.168.0.3 / tcp src is 25 dst is 23 / end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether(dst=3D"= 68:05: > ca:8d:ed:a8")/IP(src=3D"192.168.0.2", > dst=3D"192.168.0.3")/TCP(sport=3D25,dport=3D23)/Raw("x" * > 80)],iface=3D"enp27s0f0",count=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether(dst=3D"= 68:05: > ca:8d:ed:a8")/IP(src=3D"192.168.0.2", > dst=3D"192.168.0.3")/TCP(sport=3D20,dport=3D23)/Raw("x" * > 80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether(dst=3D"= 68:05: > ca:8d:ed:a8")/IP(src=3D"192.168.0.2", > dst=3D"192.168.0.3")/TCP(sport=3D25,dport=3D19)/Raw("x" * > 80)],iface=3D"enp27s0f0",count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_IPV4_NVGRE_IPV4_FRAG > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.= 1 / > nvgre tni is 2 / eth / ipv4 src is 192.168.1.2 dst is 192.168.1.3 / end a= ctions vf > id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D2)/Ether()/IP(src=3D"1= 92.168. > 1.2", > dst=3D"192.168.1.3" ,frag=3D5)/TCP()/Raw("x"*80)],iface=3D"enp27s0f0",cou= nt=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D2)/Ether()/IP(src=3D"1= 92.168. > 1.2", dst=3D"192.168.1.3" ,frag=3D5)/Raw("x"*80)],iface=3D"enp27s0f0",cou= nt=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.2")/NVGRE(TNI=3D2)/Ether()/IP(src=3D"1= 92.168. > 1.2", > dst=3D"192.168.1.3" ,frag=3D5)/TCP()/Raw("x"*80)],iface=3D"enp27s0f0",cou= nt=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D3)/Ether()/IP(src=3D"1= 92.168. > 1.2", > dst=3D"192.168.1.3" ,frag=3D5)/TCP()/Raw("x"*80)],iface=3D"enp27s0f0",cou= nt=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D2)/Ether()/IP(src=3D"1= 92.168. > 1.4", > dst=3D"192.168.1.3" ,frag=3D5)/TCP()/Raw("x"*80)],iface=3D"enp27s0f0",cou= nt=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D2)/Ether()/IP(src=3D"1= 92.168. > 1.2", > dst=3D"192.168.1.5" ,frag=3D5)/TCP()/Raw("x"*80)],iface=3D"enp27s0f0",cou= nt=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_IPV4_NVGRE_IPV4_PAY > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.= 1 / > nvgre tni is 2 / eth / ipv4 src is 192.168.1.2 dst is 192.168.1.3 / end a= ctions vf > id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D2)/Ether()/IP(src=3D"1= 92.168. > 1.2", dst=3D"192.168.1.3")/TCP()/Raw("x"*80)],iface=3D"enp27s0f0",count= =3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D2)/Ether()/IP(src=3D"1= 92.168. > 1.2", dst=3D"192.168.1.3")/Raw("x"*80)],iface=3D"enp27s0f0",count=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.2")/NVGRE(TNI=3D2)/Ether()/IP(src=3D"1= 92.168. > 1.2", dst=3D"192.168.1.3")/Raw("x"*80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D3)/Ether()/IP(src=3D"1= 92.168. > 1.2", dst=3D"192.168.1.3")/Raw("x"*80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D2)/Ether()/IP(src=3D"1= 92.168. > 1.4", dst=3D"192.168.1.3")/Raw("x"*80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D2)/Ether()/IP(src=3D"1= 92.168. > 1.2", dst=3D"192.168.1.5")/Raw("x"*80)],iface=3D"enp27s0f0",count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > +Test case: MAC_IPV4_NVGRE_IPV4_UDP_PAY > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.= 1 / > nvgre tni is 0x8 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / udp= src is 50 > dst is 23 / end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D0x8)/Ether()/IP(src=3D= "192.1 > 68.0.2", dst=3D"192.168.0.3")/UDP(sport=3D50,dport=3D23)/Raw("x"*80)], > iface=3D"enp27s0f0", count=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D0x8)/Ether()/IP(src=3D= "192.1 > 68.0.2", dst=3D"192.168.0.3")/UDP(sport=3D20,dport=3D23)/Raw("x"*80)], > iface=3D"enp27s0f0", count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D0x8)/Ether()/IP(src=3D= "192.1 > 68.0.2", dst=3D"192.168.0.3")/UDP(sport=3D50,dport=3D19)/Raw("x"*80)], > iface=3D"enp27s0f0", count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > +Test case: MAC_IPV4_NVGRE_IPV4_TCP > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.= 1 / > nvgre tni is 2 / eth / ipv4 src is 192.168.1.2 dst is 192.168.1.3 / tcp s= rc is 25 dst > is 23 / end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D2)/Ether()/IP(src=3D"1= 92.168. > 1.2", > dst=3D"192.168.1.3")/TCP(sport=3D25,dport=3D23)/Raw("x"*80)],iface=3D"enp= 27s0f0" > ,count=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D2)/Ether()/IP(src=3D"1= 92.168. > 1.2", > dst=3D"192.168.1.3")/TCP(sport=3D20,dport=3D23)/Raw("x"*80)],iface=3D"enp= 27s0f0" > ,count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D2)/Ether()/IP(src=3D"1= 92.168. > 1.2", > dst=3D"192.168.1.3")/TCP(sport=3D25,dport=3D39)/Raw("x"*80)],iface=3D"enp= 27s0f0" > ,count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_IPV4_NVGRE_MAC_IPV4_FRAG > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.= 1 / > nvgre tni is 2 / eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.1.2 d= st is > 192.168.1.3 / end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D2)/Ether(dst=3D"68:05:= ca:8d: > ed:a8")/IP(src=3D"192.168.1.2", > dst=3D"192.168.1.3" ,frag=3D5)/TCP()/Raw("x"*80)],iface=3D"enp27s0f0",cou= nt=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D2)/Ether(dst=3D"68:05:= ca:8d: > ed:a8")/IP(src=3D"192.168.1.2", > dst=3D"192.168.1.3" ,frag=3D5)/Raw("x"*80)],iface=3D"enp27s0f0",count=3D1= ) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.2")/NVGRE(TNI=3D2)/Ether(dst=3D"68:05:= ca:8d: > ed:a8")/IP(src=3D"192.168.1.2", > dst=3D"192.168.1.3" ,frag=3D5)/TCP()/Raw("x"*80)],iface=3D"enp27s0f0",cou= nt=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D3)/Ether(dst=3D"68:05:= ca:8d: > ed:a8")/IP(src=3D"192.168.1.2", > dst=3D"192.168.1.3" ,frag=3D5)/TCP()/Raw("x"*80)],iface=3D"enp27s0f0",cou= nt=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D2)/Ether(dst=3D"68:05:= ca:8d: > ed:a9")/IP(src=3D"192.168.1.2", > dst=3D"192.168.1.3" ,frag=3D5)/TCP()/Raw("x"*80)],iface=3D"enp27s0f0",cou= nt=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D2)/Ether(dst=3D"68:05:= ca:8d: > ed:a8")/IP(src=3D"192.168.1.4", > dst=3D"192.168.1.3" ,frag=3D5)/TCP()/Raw("x"*80)],iface=3D"enp27s0f0",cou= nt=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D2)/Ether(dst=3D"68:05:= ca:8d: > ed:a8")/IP(src=3D"192.168.1.2", > dst=3D"192.168.1.5" ,frag=3D5)/TCP()/Raw("x"*80)],iface=3D"enp27s0f0",cou= nt=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_IPV4_NVGRE_MAC_IPV4_PAY > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.= 1 / > nvgre tni is 2 / eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.1.2 = dst is > 192.168.1.3 / end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D2)/Ether(dst=3D"68:05:= ca:8d: > ed:a8")/IP(src=3D"192.168.1.2", > dst=3D"192.168.1.3")/TCP()/Raw("x"*80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D2)/Ether(dst=3D"68:05:= ca:8d: > ed:a8")/IP(src=3D"192.168.1.2", > dst=3D"192.168.1.3")/Raw("x"*80)],iface=3D"enp27s0f0",count=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.2")/NVGRE(TNI=3D2)/Ether(dst=3D"68:05:= ca:8d: > ed:a8")/IP(src=3D"192.168.1.2", > dst=3D"192.168.1.3")/Raw("x"*80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D3)/Ether(dst=3D"68:05:= ca:8d: > ed:a8")/IP(src=3D"192.168.1.2", > dst=3D"192.168.1.3")/Raw("x"*80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D2)/Ether(dst=3D"68:05:= ca:8d: > ed:a9")/IP(src=3D"192.168.1.2", > dst=3D"192.168.1.3")/Raw("x"*80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D2)/Ether(dst=3D"68:05:= ca:8d: > ed:a8")/IP(src=3D"192.168.1.4", > dst=3D"192.168.1.3")/Raw("x"*80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D2)/Ether(dst=3D"68:05:= ca:8d: > ed:a8")/IP(src=3D"192.168.1.2", > dst=3D"192.168.1.5")/Raw("x"*80)],iface=3D"enp27s0f0",count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_IPV4_NVGRE_MAC_IPV4_UDP_PAY > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.= 1 / > nvgre tni is 0x8 / eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.1= .2 dst is > 192.168.1.3 / udp src is 25 dst is 23 / end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D0x8)/Ether(dst=3D"68:0= 5:ca:8 > d:ed:a8")/IP(src=3D"192.168.1.2", > dst=3D"192.168.1.3")/UDP(sport=3D25,dport=3D23)/Raw("x"*80)], > iface=3D"enp27s0f0", count=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D0x8)/Ether(dst=3D"68:0= 5:ca:8 > d:ed:a8")/IP(src=3D"192.168.1.2", > dst=3D"192.168.1.3")/UDP(sport=3D2,dport=3D23)/Raw("x"*80)], iface=3D"enp= 27s0f0", > count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D0x8)/Ether(dst=3D"68:0= 5:ca:8 > d:ed:a8")/IP(src=3D"192.168.1.2", > dst=3D"192.168.1.3")/UDP(sport=3D25,dport=3D20)/Raw("x"*80)], > iface=3D"enp27s0f0", count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > +Test case: MAC_IPV4_NVGRE_MAC_IPV4_TCP > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.= 1 / > nvgre tni is 2 / eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.1.2 = dst is > 192.168.1.3 / tcp src is 25 dst is 23 / end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D2)/Ether(dst=3D"68:05:= ca:8d: > ed:a8")/IP(src=3D"192.168.1.2", > dst=3D"192.168.1.3")/TCP(sport=3D25,dport=3D23)/Raw("x"*80)],iface=3D"enp= 27s0f0" > ,count=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D2)/Ether(dst=3D"68:05:= ca:8d: > ed:a8")/IP(src=3D"192.168.1.2", > dst=3D"192.168.1.3")/TCP(sport=3D1,dport=3D23)/Raw("x"*80)],iface=3D"enp2= 7s0f0",c > ount=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D2)/Ether(dst=3D"68:05:= ca:8d: > ed:a8")/IP(src=3D"192.168.1.2", > dst=3D"192.168.1.3")/TCP(sport=3D25,dport=3D20)/Raw("x"*80)],iface=3D"enp= 27s0f0" > ,count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_VLAN_PPPOE_IPV4_PAY > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55= / vlan > tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions vf i= d 1 / > end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether(dst=3D"00:11:22:33:44:55",type=3D0x8100)/Dot1Q(vlan=3D1,type= =3D0x8 > 864)/PPPoE(sessionid=3D3)/PPP(proto=3D0x0021)/IP()/Raw("x" * > 80)],iface=3D"enp27s0f0",count=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + > sendp([Ether(dst=3D"00:11:22:33:44:54",type=3D0x8100)/Dot1Q(vlan=3D1,type= =3D0x8 > 864)/PPPoE(sessionid=3D3)/PPP(proto=3D0x0021)/IP()/Raw("x" * > 80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether(dst=3D"00:11:22:33:44:55",type=3D0x8100)/Dot1Q(vlan=3D2,type= =3D0x8 > 864)/PPPoE(sessionid=3D3)/PPP(proto=3D0x0021)/IP()/Raw("x" * > 80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether(dst=3D"00:11:22:33:44:55",type=3D0x8100)/Dot1Q(vlan=3D1,type= =3D0x8 > 864)/PPPoE(sessionid=3D4)/PPP(proto=3D0x0021)/IP()/Raw("x" * > 80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether(dst=3D"00:11:22:33:44:55",type=3D0x8100)/Dot1Q(vlan=3D1,type= =3D0x8 > 864)/PPPoE(sessionid=3D3)/PPP(proto=3D0x0057)/IPv6()/Raw("x" * > 80)],iface=3D"enp27s0f0",count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_VLAN_PPPOE_IPV6_PAY > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55= / vlan > tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions vf i= d 1 / > end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether(dst=3D"00:11:22:33:44:55",type=3D0x8100)/Dot1Q(vlan=3D1,type= =3D0x8 > 864)/PPPoE(sessionid=3D3)/PPP(proto=3D0x0057)/IPv6()/Raw("x" * > 80)],iface=3D"enp27s0f0",count=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + > sendp([Ether(dst=3D"00:11:22:33:44:54",type=3D0x8100)/Dot1Q(vlan=3D1,type= =3D0x8 > 864)/PPPoE(sessionid=3D3)/PPP(proto=3D0x0057)/IPv6()/Raw("x" * > 80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether(dst=3D"00:11:22:33:44:55",type=3D0x8100)/Dot1Q(vlan=3D2,type= =3D0x8 > 864)/PPPoE(sessionid=3D3)/PPP(proto=3D0x0057)/IPv6()/Raw("x" * > 80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether(dst=3D"00:11:22:33:44:55",type=3D0x8100)/Dot1Q(vlan=3D1,type= =3D0x8 > 864)/PPPoE(sessionid=3D4)/PPP(proto=3D0x0057)/IPv6()/Raw("x" * > 80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether(dst=3D"00:11:22:33:44:55",type=3D0x8100)/Dot1Q(vlan=3D1,type= =3D0x8 > 864)/PPPoE(sessionid=3D3)/PPP(proto=3D0x0021)/IP()/Raw("x" * > 80)],iface=3D"enp27s0f0",count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_PPPOE_IPV4_PAY > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55= / > pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether(dst=3D"00:11:22:33:44:55",type=3D0x8864)/PPPoE(sessionid=3D3= )/PPP > (proto=3D0x0021)/IP()/Raw("x" * 80)],iface=3D"enp27s0f0",count=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + > sendp([Ether(dst=3D"00:11:22:33:44:54",type=3D0x8864)/PPPoE(sessionid=3D3= )/PPP > (proto=3D0x0021)/IP()/Raw("x" * 80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether(dst=3D"00:11:22:33:44:55",type=3D0x8864)/PPPoE(sessionid=3D4= )/PPP > (proto=3D0x0021)/IP()/Raw("x" * 80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether(dst=3D"00:11:22:33:44:55",type=3D0x8864)/PPPoE(sessionid=3D3= )/PPP > (proto=3D0x0057)/IPv6()/Raw("x" * 80)],iface=3D"enp27s0f0",count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_PPPOE_IPV6_PAY > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55= / > pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether(dst=3D"00:11:22:33:44:55",type=3D0x8864)/PPPoE(sessionid=3D3= )/PPP > (proto=3D0x0057)/IPv6()/Raw("x" * 80)],iface=3D"enp27s0f0",count=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + > sendp([Ether(dst=3D"00:11:22:33:44:54",type=3D0x8864)/PPPoE(sessionid=3D3= )/PPP > (proto=3D0x0057)/IPv6()/Raw("x" * 80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether(dst=3D"00:11:22:33:44:55",type=3D0x8864)/PPPoE(sessionid=3D4= )/PPP > (proto=3D0x0057)/IPv6()/Raw("x" * 80)],iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether(dst=3D"00:11:22:33:44:55",type=3D0x8864)/PPPoE(sessionid=3D3= )/PPP > (proto=3D0x0021)/IP()/Raw("x" * 80)],iface=3D"enp27s0f0",count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_IPV4_PFCP_NODE > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > + > +1. DUT create switch filter rules for MAC_IPV4_PFCP_NODE to VF1:: > + > + flow create 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 0 /= end > actions vf id 1 / end > + > + check the rule exists in the list. > + > + testpmd> flow list 0 > + ID Group Prio Attr Rule > + 0 0 0 i-- ETH IPV4 UDP PFCP =3D> VF > + > +2. send matched packets:: > + > + > sendp(Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D8805)/PFCP(Sfield= =3D0),i > face=3D"enp134s0f1") > + > + check port 1 receive the packet. > + send mismatched packets:: > + > + > sendp(Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D8805)/PFCP(Sfield= =3D1),i > face=3D"enp134s0f1") > + > sendp(Ether(dst=3D"00:11:22:33:44:11")/IPv6()/UDP(dport=3D8805)/PFCP(Sfie= ld=3D > 0),iface=3D"enp134s0f1") > + > sendp(Ether(dst=3D"00:11:22:33:44:11")/IPv6()/UDP(dport=3D8805)/PFCP(Sfie= ld=3D > 1),iface=3D"enp134s0f1") > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_IPV4_PFCP_SESSION > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D > + > +1. DUT create switch filter rules for MAC_IPV4_PFCP_SESSION to VF2:: > + > + flow create 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 1 /= end > actions vf id 2 / end > + > + check the rule exists in the list. > + > + testpmd> flow list 0 > + ID Group Prio Attr Rule > + 0 0 0 i-- ETH IPV4 UDP PFCP =3D> VF > + > +2. send matched packets:: > + > + > sendp(Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D8805)/PFCP(Sfield= =3D1),i > face=3D"enp134s0f1") > + > + check port 2 receive the packet. > + send mismatched packets:: > + > + > sendp(Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D8805)/PFCP(Sfield= =3D0),i > face=3D"enp134s0f1") > + > sendp(Ether(dst=3D"00:11:22:33:44:11")/IPv6()/UDP(dport=3D8805)/PFCP(Sfie= ld=3D > 0),iface=3D"enp134s0f1") > + > sendp(Ether(dst=3D"00:11:22:33:44:11")/IPv6()/UDP(dport=3D8805)/PFCP(Sfie= ld=3D > 1),iface=3D"enp134s0f1") > + > + check the packets are not to port 2. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 2. > + > + > +Test case: MAC_IPV6_PFCP_NODE > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > + > +1. DUT create switch filter rules for MAC_IPV6_PFCP_NODE to VF3:: > + > + flow create 0 ingress pattern eth / ipv6 / udp / pfcp s_field is 0 /= end > actions vf id 3 / end > + > + check the rule exists in the list. > + > + testpmd> flow list 0 > + ID Group Prio Attr Rule > + 0 0 0 i-- ETH IPV6 UDP PFCP =3D> VF > + > +2. send matched packets:: > + > + > sendp(Ether(dst=3D"00:11:22:33:44:11")/IPv6()/UDP(dport=3D8805)/PFCP(Sfie= ld=3D > 0),iface=3D"enp134s0f1") > + > + check port 3 receive the packet. > + send mismatched packets:: > + > + > sendp(Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D8805)/PFCP(Sfield= =3D0),i > face=3D"enp134s0f1") > + > sendp(Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D8805)/PFCP(Sfield= =3D1),i > face=3D"enp134s0f1") > + > sendp(Ether(dst=3D"00:11:22:33:44:11")/IPv6()/UDP(dport=3D8805)/PFCP(Sfie= ld=3D > 1),iface=3D"enp134s0f1") > + > + check the packets are not to port 3. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 3. > + > + > +Test case: MAC_IPV6_PFCP_SESSION > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D > + > +1. DUT create switch filter rules for MAC_IPV6_PFCP_SESSION to VF1:: > + > + flow create 0 ingress pattern eth / ipv6 / udp / pfcp s_field is 1 /= end > actions vf id 1 / end > + > + check the rule exists in the list. > + > + testpmd> flow list 0 > + ID Group Prio Attr Rule > + 0 0 0 i-- ETH IPV6 UDP PFCP =3D> VF > + > +2. send matched packets:: > + > + > sendp(Ether(dst=3D"00:11:22:33:44:11")/IPv6()/UDP(dport=3D8805)/PFCP(Sfie= ld=3D > 1),iface=3D"enp134s0f1") > + > + check port 1 receive the packet. > + send mismatched packets:: > + > + > sendp(Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D8805)/PFCP(Sfield= =3D0),i > face=3D"enp134s0f1") > + > sendp(Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D8805)/PFCP(Sfield= =3D1),i > face=3D"enp134s0f1") > + > sendp(Ether(dst=3D"00:11:22:33:44:11")/IPv6()/UDP(dport=3D8805)/PFCP(Sfie= ld=3D > 0),iface=3D"enp134s0f1") > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: QinQ (not supported in 20.05) > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth / vlan tci is 1 / vlan t= ci is 2 / > end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether(dst=3D"00:11:22:33:44:55",type=3D0x8100)/Dot1Q(type=3D0x8100= ,vla > n=3D1)/Dot1Q(type=3D0x0800,vlan=3D2)/IP(src=3D"192.168.0.1",dst=3D"192.16= 8.0.2")/R > aw("X"*480)],iface=3D"enp27s0f0",count=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + > sendp([Ether(dst=3D"00:11:22:33:44:55",type=3D0x8100)/Dot1Q(type=3D0x8100= ,vla > n=3D3)/Dot1Q(type=3D0x0800, > vlan=3D2)/IP(src=3D"192.168.0.1",dst=3D"192.168.0.2")/Raw("X"*480)],iface= =3D"enp27 > s0f0",count=3D1) > + > sendp([Ether(dst=3D"00:11:22:33:44:55",type=3D0x8100)/Dot1Q(type=3D0x8100= ,vla > n=3D1)/Dot1Q(type=3D0x0800, > vlan=3D5)/IP(src=3D"192.168.0.1",dst=3D"192.168.0.2")/Raw("X"*480)],iface= =3D"enp27 > s0f0",count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > +Test case: IP multicast > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 dst spec 224.0.0.= 0 dst > mask 240.0.0.0 / end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + sendp([Ether()/IP(dst=3D"239.0.0.0")/TCP()/Raw("x"*80)], > iface=3D"enp27s0f0", count=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + sendp([Ether()/IP(dst=3D"128.0.0.0")/TCP()/Raw("x"*80)], > iface=3D"enp27s0f0", count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: L2 multicast > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth dst spec 01:00:5e:00:00:= 00 dst > mask ff:ff:ff:80:00:00 / end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + sendp([Ether(dst=3D"01:00:5e:7f:00:00")/IP()/TCP()/Raw("x"*80)], > iface=3D"enp27s0f0", count=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + sendp([Ether(dst=3D"01:00:5e:ff:00:00")/IP()/TCP()/Raw("x"*80)], > iface=3D"enp27s0f0", count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: ethertype filter_PPPOD > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth type is 0x8863 / end act= ions vf > id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + sendp([Ether(dst=3D"00:11:22:33:44:55")/PPPoED()/PPP()/IP()/Raw("x" > *80)],iface=3D"enp27s0f0",count=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + sendp([Ether(dst=3D"00:11:22:33:44:55")/PPPoE()/PPP()/IP()/Raw("x" > *80)],iface=3D"enp27s0f0",count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: ethertype filter_PPPOE > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth type is 0x8864 / end act= ions vf > id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether(dst=3D"00:11:22:33:44:55")/PPPoE()/PPP()/IP()/Raw("x"*80)],i= fac > e=3D"enp27s0f0",count=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + > sendp([Ether(dst=3D"00:11:22:33:44:55")/PPPoED()/PPP()/IP()/Raw("x"*80)],= ifa > ce=3D"enp27s0f0",count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: ethertype filter_IPV6 > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth type is 0x86dd / end act= ions vf > id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8= 47 > 5:1111:3900:2020", tc=3D3)/TCP(dport=3D23)/("X"*480)], iface=3D"enp27s0f0= ", > count=3D1) > + > sendp([Ether(dst=3D"00:11:22:33:44:55",type=3D0x8100)/Dot1Q(vlan=3D1,type= =3D0x8 > 6dd)/IPv6(dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020", > tc=3D3)/TCP(dport=3D23)/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + sendp([Ether(dst=3D"00:11:22:33:44:55")/IP()/TCP(dport=3D23)/("X"*4= 80)], > iface=3D"enp27s0f0", count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > +Test case: UDP port filter_DHCP discovery > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +Description: The udp port used by DHCP server is 67, and 68 by DHCP clie= nt. > +Therefore, for DHCP discovery packets, the udp srcport is 68 and the > dstport is 67. > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 / udp src is 68 d= st is 67 / > end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP(sport=3D68,dport=3D67)/B= OOTP( > chaddr=3D"3c:fd:fe:b2:43:90")/DHCP(options=3D[("message- > type","discover"),"end"])/Raw("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + > sendp([Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP(sport=3D63,dport=3D67)/B= OOTP( > chaddr=3D"3c:fd:fe:b2:43:90")/DHCP(options=3D[("message- > type","discover"),"end"])/Raw("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > sendp([Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP(sport=3D68,dport=3D69)/B= OOTP( > chaddr=3D"3c:fd:fe:b2:43:90")/DHCP(options=3D[("message- > type","discover"),"end"])/Raw("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: UDP port filter_DHCP offer > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +Description: For DHCP offer packets, the udp srcport is 67 and the dstpo= rt is > 68. > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 / udp src is 67 d= st is 68 / > end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP(sport=3D67,dport=3D68)/B= OOTP( > chaddr=3D"3c:fd:fe:b2:43:90",yiaddr=3D"192.168.1.0")/DHCP(options=3D[("me= ssage > -type","offer"),"end"])/Raw("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + > sendp([Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP(sport=3D63,dport=3D68)/B= OOTP( > chaddr=3D"3c:fd:fe:b2:43:90",yiaddr=3D"192.168.1.0")/DHCP(options=3D[("me= ssage > -type","offer"),"end"])/Raw("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > sendp([Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP(sport=3D67,dport=3D63)/B= OOTP( > chaddr=3D"3c:fd:fe:b2:43:90",yiaddr=3D"192.168.1.0")/DHCP(options=3D[("me= ssage > -type","offer"),"end"])/Raw("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: UDP port filter_VXLAN > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D > + > +Description: The UDP dst port number used by VXLAN is 4789. > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 / udp dst is 4789= / end > actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/UDP()/VXLAN(vni=3D2)/Ether()/IP(sr= c=3D"19 > 2.168.0.2", > dst=3D"192.168.0.3",frag=3D5)/TCP()/Raw("x"*80)],iface=3D"enp27s0f0",coun= t=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D2)/Ether()/IP(src=3D"1= 92.168. > 1.2", dst=3D"192.168.1.3")/TCP()/Raw("x"*80)],iface=3D"enp27s0f0",count= =3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: MAC_VLAN filter > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55= / vlan > tci is 1 / end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether(dst=3D"00:11:22:33:44:55",type=3D0x8100)/Dot1Q(vlan=3D1)/IP(= src=3D" > 192.168.0.1",dst=3D"192.168.0.2",tos=3D4,ttl=3D2)/TCP()/Raw("X"*480)],ifa= ce=3D"enp > 27s0f0",count=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + > sendp([Ether(dst=3D"00:11:22:33:44:54",type=3D0x8100)/Dot1Q(vlan=3D1)/IP(= src=3D" > 192.168.0.1",dst=3D"192.168.0.2",tos=3D4,ttl=3D2)/TCP()/Raw("X"*480)],ifa= ce=3D"enp > 27s0f0",count=3D1) > + > sendp([Ether(dst=3D"00:11:22:33:44:55",type=3D0x8100)/Dot1Q(vlan=3D2)/IP(= src=3D" > 192.168.0.1",dst=3D"192.168.0.2",tos=3D4,ttl=3D2)/TCP()/Raw("X"*480)],ifa= ce=3D"enp > 27s0f0",count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: VLAN filter > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. create a rule:: > + > + testpmd> flow create 0 ingress pattern eth / vlan tci is 1 / end ac= tions vf > id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether(dst=3D"00:11:22:33:44:55",type=3D0x8100)/Dot1Q(vlan=3D1)/IP(= src=3D" > 192.168.0.1",dst=3D"192.168.0.2",tos=3D4,ttl=3D2)/TCP()/Raw("X"*480)],ifa= ce=3D"enp > 27s0f0",count=3D1) > + > + check port 1 receive the packets. > + send mismatched packets:: > + > + > sendp([Ether(dst=3D"00:11:22:33:44:55",type=3D0x8100)/Dot1Q(vlan=3D2)/IP(= src=3D" > 192.168.0.1",dst=3D"192.168.0.2",tos=3D4,ttl=3D2)/TCP()/Raw("X"*480)],ifa= ce=3D"enp > 27s0f0",count=3D1) > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: negative cases > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > + > +Subcase 1: actions vf id 0 > +-------------------------- > + > +1. action to vf 0, the rule can be created, but not take effect:: > + > + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8= / ipv4 > src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / tcp src is 25 d= st is 23 / end > actions vf id 0 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packet:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.1",dst=3D"192= .168.0. > 2",tos=3D4,ttl=3D3)/TCP(sport=3D25,dport=3D23)/("X"*480)], iface=3D"enp27= s0f0", > count=3D1) > + > + check the packet not to port 0, the rule doesn't take effect. > + > +Subcase 2: can not create rule on vf 1 > +-------------------------------------- > + > +1. create rule on vf 1:: > + > + testpmd> flow create 1 ingress pattern eth dst is 68:05:ca:8d:ed:a8= / ipv4 > src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 d= st is 23 / > end actions vf id 1 / end > + iavf_flow_create(): Failed to create flow > + port_flow_complain(): Caught PMD error type 2 (flow rule (handle)): > Failed to create parser engine.: Invalid argument > + > + check the rule can not be created successfully. > + > +2. list the rule:: > + > + testpmd> flow list 1 > + > + there is no rule listed. > + > +Subcase 3: unsupported pattern in comms > +--------------------------------------- > + > +1. create an SCTP rule which is not supported in comms:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.0.= 2 dst is > 192.168.0.3 / sctp src is 25 dst is 23 / end actions vf id 1 / end > + > +2. check the rule can not be created successfully, > + and testpmd provide a friendly output, showing:: > + > + ice_flow_create(): Failed to create flow > + port_flow_complain(): Caught PMD error type 2 (flow rule (handle)): > Invalid input pattern: Invalid argument > + > +3. check the rule list:: > + > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + > +Subcase 4: unsupported pattern in os default, but supported in comms > +-------------------------------------------------------------------- > + > +1. load os default package and launch testpmd as step 3-8 in Prerequisit= es. > + > +2. create a pppoe rule which is not supported in os default :: > + > + testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55= / > pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions vf id 1 / end > + > +3. check the rule can not be created successfully, and > + testpmd should provide a friendly output, showing:: > + > + ice_flow_create(): Failed to create flow > + port_flow_complain(): Caught PMD error type 2 (flow rule (handle)): > Invalid input pattern: Invalid argument > + > +4. check the rule list:: > + > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + > +5. repeat step 2-5 with also not supported pattern MAC_IPV4_PFCP_NODE, > get the same result. > + > +Subcase 5: unsupported input set > +-------------------------------- > + > +1. create an nvgre rule with unsupported input set field [inner tos]:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.= 1 / > nvgre tni is 2 / eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.1.2 d= st is > 192.168.1.3 tos is 4 / end actions vf id 1 / end > + > +2. check the rule can not be created successfully, and > + testpmd should provide a friendly output, showing:: > + > + ice_flow_create(): Failed to create flow > + port_flow_complain(): Caught PMD error type 10 (item specification)= : > cause: 0x7ffcccb26a68, Invalid input set: Invalid argument > + > +3. check the rule list:: > + > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + > +Subcase 6: invalid vf id > +------------------------ > + > +1. create a rule with invalid vf id 5:: > + > + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8= / ipv4 > src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / tcp src is 25 d= st is 23 / end > actions vf id 5 / end > + > +2. check the rule can not be created successfully, and > + testpmd provide a friendly output, showing:: > + > + ice_flow_create(): Failed to create flow > + port_flow_complain(): Caught PMD error type 2 (flow rule (handle)): > switch filter create flow fail: Invalid argument > + > +3. check the rule list:: > + > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + > +Subcase 7: delete a non-existing rule > +------------------------------------- > + > +1. check the rule list:: > + > + testpmd> flow list 0 > + > + check no rule exists in the list. > + > +2. destroy the rule 0:: > + > + testpmd> flow destroy 0 rule 0 > + > + check no error reports. > + > +3. flush rules:: > + > + testpmd> flow flush 0 > + > + check no error reports. > + > +Subcase 8: add long switch rule > +------------------------------- > + > +Description: A recipe has 5 words, one of which is reserved for switch I= D, > +so a recipe can use 4 words, and a maximum of 5 recipes can be chained, > +one of which is reserved. Therefore, a rule can use up to 4*4*2 =3D 32 b= ytes. > +This case is used to test that a rule whose input set is longer than 32 > +bytes can not be created successfully, and will not affect the creation = of > +other rules. > + > +1. create a rule with input set length longer than 32 bytes:: > + > + testpmd> flow create 0 ingress pattern eth / ipv6 src is > CDCD:910A:2222:5498:8475:1111:3900:1536 dst is > CDCD:910A:2222:5498:8475:1111:3900:2022 tc is 3 / end actions vf id 1 / e= nd > + > +2. check the rule can not be created successfully, and > + testpmd provide a friendly output, showing:: > + > + ice_flow_create(): Failed to create flow > + port_flow_complain(): Caught PMD error type 2 (flow rule (handle)): > switch filter create flow fail: Invalid argument > + > +3. check the rule list:: > + > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + > +4. create a MAC_IPV6_UDP_PAY rule:: > + > + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8= / ipv6 > dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / udp src is 25 ds= t is > 23 / end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +5. send matched packets:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IPv6(src=3D"CDCD:910A:2222:5498:8= 47 > 5:1111:3900:1518", > dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3D3)/UDP(sport=3D25,dp= ort > =3D23)/("X"*480)], iface=3D"enp27s0f0",count=3D1) > + > + check port 1 receive the packet. > + send mismatched packets:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IPv6(src=3D"CDCD:910A:2222:5498:8= 47 > 5:1111:3900:1518", > dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3D3)/UDP(sport=3D30,dp= ort > =3D23)/("X"*480)], iface=3D"enp27s0f0",count=3D1) > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IPv6(src=3D"CDCD:910A:2222:5498:8= 47 > 5:1111:3900:1518", > dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3D3)/UDP(sport=3D25,dp= ort > =3D19)/("X"*480)], iface=3D"enp27s0f0",count=3D1) > + > + check the packets are not to port 1. > + > +6. verify rules can be destroyed:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test Case: multirules test > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D > + > +Subcase 1: add existing rules but with different vfs (not support in 20.= 05) > +------------------------------------------------------------------------= --- > + > +1. Launch dpdk on VF0, VF1 and VF2, and VF0 request DCF mode:: > + > + ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w > 0000:18:01.0,cap=3Ddcf -w 0000:18:01.1 -w 0000:18:01.2 -- -i > + testpmd> set portlist 1,2 > + testpmd> set fwd rxonly > + testpmd> set verbose 1 > + testpmd> start > + > +2. create rules with same pattern items but to different vfs:: > + > + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8= / ipv4 > src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 d= st is 23 / > end actions vf id 1 / end > + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8= / ipv4 > src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 d= st is 23 / > end actions vf id 2 / end > + testpmd> flow list 0 > + > + check both rules exist in the list. > + > +3. send matched packets:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.1",dst=3D"192= .168.0. > 2",tos=3D4,ttl=3D3)/UDP(sport=3D25,dport=3D23)/("X"*480)], iface=3D"enp27= s0f0", > count=3D1) > + > + check both port 1 and 2 receive the packet. > + > +4. destroy the rule 0, and send the matched packets:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check only rule 1 exists in the list. > + send the same matched packets, check only port 2 receives the packets= . > + > +5. destroy rule 1, send the matched packets:: > + > + testpmd> flow destroy 0 rule 1 > + testpmd> flow list 0 > + > + check no rule exists in the list > + send the same matched packets, check the packets are not to port 1 an= d 2. > + > +Subcase 2: add existing rules with the same vfs > +----------------------------------------------- > + > +1. create two indentical rules:: > + > + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8= / ipv4 > src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 d= st is 23 / > end actions vf id 1 / end > + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8= / ipv4 > src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 d= st is 23 / > end actions vf id 1 / end > + > +2. check the first rule is created successfully, and > + the second one can not be created successfully, > + and testpmd provide a friendly output, showing:: > + > + ice_flow_create(): Failed to create flow > + port_flow_complain(): Caught PMD error type 2 (flow rule (handle)): > switch filter create flow fail: Invalid argument > + > +3. check the rule list:: > + > + testpmd> flow list 0 > + > + check only the first rule exists in the list. > + > +Subcase 3: add two rules with one rule's input set included in the other > +------------------------------------------------------------------------= - > + > +1. Launch dpdk on VF0, VF1 and VF2, and VF0 request DCF mode:: > + > + ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w > 0000:18:01.0,cap=3Ddcf -w 0000:18:01.1 -w 0000:18:01.2 -- -i > + testpmd> set portlist 1,2 > + testpmd> set fwd rxonly > + testpmd> set verbose 1 > + testpmd> start > + > +2. create rules with one rule's input set included in the other:: > + > + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8= / ipv4 > src is 192.168.0.1 / end actions vf id 1 / end > + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8= / ipv4 > src is 192.168.0.1 dst is 192.168.0.2 / end actions vf id 2 / end > + testpmd> flow list 0 > + > + check both rules exist in the list. > + > +3. send a packet p0 that matches both rules:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.1",dst=3D"192= .168.0. > 2")/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > + check both port 1 and 2 receive the packet. > + send a packet that only matches the rule 0 but not rule 1:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.1",dst=3D"192= .168.0. > 3")/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > + check only port 1 receives the packet. > + > +4. destroy the rule 0, and send the packet p0:: > + > + testpmd> flow destroy 0 rule 0 > + testpmd> flow list 0 > + > + check only rule 1 exists in the list. > + send the matched packet p0, check only port 2 receives the packet. > + > +5. destroy rule 1, send the packet p0:: > + > + testpmd> flow destroy 0 rule 1 > + testpmd> flow list 0 > + > + check no rule exists in the list. > + send the matched packet p0, check the packet are not to port 1 and 2. > + > +Subcase 4: different input set, same vf id > +------------------------------------------ > + > +1. DUT create switch filter rules for MAC_IPV4_PFCP_SESSION and > MAC_IPV4_PFCP_NODE to VF1:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 / udp / pfcp s_fie= ld is 0 / > end actions vf id 1 / end > + Flow rule #0 created > + testpmd> flow create 0 ingress pattern eth / ipv4 / udp / pfcp s_fie= ld is 1 / > end actions vf id 1 / end > + Flow rule #1 created > + > + check the rule exists in the list. > + > + testpmd> flow list 0 > + ID Group Prio Attr Rule > + 0 0 0 i-- ETH IPV4 UDP PFCP =3D> VF > + 1 0 0 i-- ETH IPV4 UDP PFCP =3D> VF > + > +2. send matched packets:: > + > + > sendp(Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D8805)/PFCP(Sfield= =3D0),i > face=3D"enp134s0f1") > + > sendp(Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D8805)/PFCP(Sfield= =3D1),i > face=3D"enp134s0f1") > + > + check port 1 receive the two packets. > + send mismatched packets:: > + > + > sendp(Ether(dst=3D"00:11:22:33:44:11")/IPv6()/UDP(dport=3D8805)/PFCP(Sfie= ld=3D > 1),iface=3D"enp134s0f1") > + > sendp(Ether(dst=3D"00:11:22:33:44:11")/IPv6()/UDP(dport=3D8805)/PFCP(Sfie= ld=3D > 0),iface=3D"enp134s0f1") > + > + check the packets are not to port 1. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow flush 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1. > + > +Subcase 5: different input set, different vf id > +----------------------------------------------- > + > +1. DUT create switch filter rules for MAC_IPV4_PFCP_SESSION and > MAC_IPV4_PFCP_NODE to VF1:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 / udp / pfcp s_fie= ld is 0 / > end actions vf id 1 / end > + Flow rule #0 created > + testpmd> flow create 0 ingress pattern eth / ipv4 / udp / pfcp s_fie= ld is 1 / > end actions vf id 2 / end > + Flow rule #1 created > + > + check the rule exists in the list. > + > + testpmd> flow list 0 > + ID Group Prio Attr Rule > + 0 0 0 i-- ETH IPV4 UDP PFCP =3D> VF > + 1 0 0 i-- ETH IPV4 UDP PFCP =3D> VF > + > +2. send matched packets:: > + > + > sendp(Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D8805)/PFCP(Sfield= =3D0),i > face=3D"enp134s0f1") > + > sendp(Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D8805)/PFCP(Sfield= =3D1),i > face=3D"enp134s0f1") > + > + check port 1 receive the first packet, port 2 receive the second pack= et. > + send mismatched packets:: > + > + > sendp(Ether(dst=3D"00:11:22:33:44:11")/IPv6()/UDP(dport=3D8805)/PFCP(Sfie= ld=3D > 1),iface=3D"enp134s0f1") > + > sendp(Ether(dst=3D"00:11:22:33:44:11")/IPv6()/UDP(dport=3D8805)/PFCP(Sfie= ld=3D > 0),iface=3D"enp134s0f1") > + > + check the packets are not to port 1 or port 2. > + > +3. verify rules can be destroyed:: > + > + testpmd> flow flush 0 > + testpmd> flow list 0 > + > + check the rule not exists in the list. > + send matched packets, check the packets are not to port 1 or port 2. > + > + > +Test case: test forwarding with single vf > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +Description: This case is used to test the packets that match switch fil= ter > rules can be > +received and forwarded when there is one vf for forwarding, and no > packets are dropped. > + > +1. set the forwarding mode to mac:: > + > + testpmd> set fwd mac > + > +2. create a rule with input set [Source IP], [Dest IP]:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.0.= 1 dst is > 192.168.0.2 / end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list > + > +3. send matched packets:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.1",dst=3D"192= .168.0. > 2")/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > +4. check port 1 receives the packet and forward it, and no packets are > dropped:: > + > + testpmd> stop > + ---------------------- Forward statistics for port 1 -------------= --------- > + RX-packets: 1 RX-dropped: 0 RX-total: 1 > + TX-packets: 1 TX-dropped: 0 TX-total: 1 > + --------------------------------------------------------------------= -------- > + > + +++++++++++++++ Accumulated forward statistics for all > ports+++++++++++++++ > + RX-packets: 1 RX-dropped: 0 RX-total: 1 > + TX-packets: 1 TX-dropped: 0 TX-total: 1 > + > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > ++++++++++++ > + > + check the RX-packets and TX-packets of port 1 are both 1, and the TX- > dropped in > + "Accumulated forward statistics for all ports" is 0. > + > + > +Test case: test forwarding with multi vfs > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +Description: This case is used to test the packets that match switch fil= ter > rules > +can be received and forwarded when there are multi vfs for forwarding, > and no packets > +are dropped. > + > +1. Launch dpdk on VF0, VF1 and VF2, and VF0 request DCF mode:: > + > + ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w > 0000:18:01.0,cap=3Ddcf -w 0000:18:01.1 -w 0000:18:01.2 -- -i > + testpmd> set portlist 1,2 > + testpmd> set fwd mac > + testpmd> set verbose 1 > + testpmd> start > + > +2. create a rule with input set [Source IP], [Dest IP]:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.0.= 1 dst is > 192.168.0.2 / end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list > + > +3. send matched packets:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.1",dst=3D"192= .168.0. > 2")/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > +4. check port 1 receives the packet, and forward it to port 2, and no pa= ckets > are dropped:: > + > + testpmd> stop > + ---------------------- Forward statistics for port 1 -------------= --------- > + RX-packets: 1 RX-dropped: 0 RX-total: 1 > + TX-packets: 0 TX-dropped: 0 TX-total: 0 > + -------------------------------------------------------------------= --------- > + > + ---------------------- Forward statistics for port 2 -------------= --------- > + RX-packets: 0 RX-dropped: 0 RX-total: 0 > + TX-packets: 1 TX-dropped: 0 TX-total: 1 > + -------------------------------------------------------------------= --------- > + > + +++++++++++++++ Accumulated forward statistics for all > ports+++++++++++++++ > + RX-packets: 1 RX-dropped: 0 RX-total: 1 > + TX-packets: 1 TX-dropped: 0 TX-total: 1 > + > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > ++++++++++++ > + > + > + check the RX-packets of port 1 is 1, the TX-packets of port 2 is 1, a= nd the > TX-dropped in > + "Accumulated forward statistics for all ports" is 0. > + > + > +Test case: Max vfs > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +Description: 256 VFs can be created on a CVL nic, if 2*100G card, each P= F > +can create 128 VFs, else if 4*25G card, each PF can create 64 VFs. This > +case is used to test when all VFs on a PF are used, switch filter rules = can > work. > + > +design case with 4*25G card. > + > +1. generate 64 VFs on PF:: > + > + echo 64 > /sys/bus/pci/devices/0000:18:00.0/sriov_numvfs > + > +2. Get the interface name of the VFs, for example:: > + > + ./usertools/dpdk-devbind.py -s > + > + 0000:18:01.1 'Ethernet Adaptive Virtual Function 1889' if=3Denp24s1= f1 > drv=3Diavf unused=3Digb_uio > + > +3. Start the 64 VFs in the kernel, for example:: > + > + ifconfig enp24s1f1 up > + > +4. Set VF0 as trust:: > + > + ip link set enp24s0f0 vf 0 trust on > + > +5. bind VF0 to dpdk driver:: > + > + ./usertools/dpdk-devbind.py -b vfio-pci 0000:18:01.0 > + > +6. launch dpdk on VF0, and request DCF mode:: > + > + ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w > 0000:18:01.0,cap=3Ddcf -- -i > + > +7. set a switch rule to each VF from DCF, totally 63 rules:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.0.= 1 / tcp / > end actions vf id 1 / end > + testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.0.= 2 / tcp / > end actions vf id 2 / end > + testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.0.= 3 / tcp / > end actions vf id 3 / end > + ...... > + testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.0.= 63 / tcp > / end actions vf id 63 / end > + testpmd> flow list 0 > + > + check the rules exist in the list. > + > +8. send matched packets:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.1")/TCP()/Raw= ("X"* > 480)], iface=3D"enp27s0f0", count=3D1) > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.2")/TCP()/Raw= ("X"* > 480)], iface=3D"enp27s0f0", count=3D1) > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.3")/TCP()/Raw= ("X"* > 480)], iface=3D"enp27s0f0", count=3D1) > + ...... > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.63")/TCP()/Ra= w("X" > *480)], iface=3D"enp27s0f0", count=3D1) > + > + check the VF 1-63 each receives a packet in kernel, for example:: > + > + ifconfig > + enp24s1f1: flags=3D4163 mtu 1500 > + inet6 fe80::fc5e:4aff:fe55:824b prefixlen 64 scopeid 0x20= > + ether fe:5e:4a:55:82:4b txqueuelen 1000 (Ethernet) > + RX packets 1 bytes 538 (538.0 B) > + RX errors 0 dropped 0 overruns 0 frame 0 > + TX packets 7 bytes 490 (490.0 B) > + TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 > + > + the "RX packets" number is 1. > + > + send mismatched packets:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.64")/TCP()/Ra= w("X" > *480)], iface=3D"enp27s0f0", count=3D1) > + > + check the packets are not to any VF. > + > +9. verify rules can be destroyed:: > + > + testpmd> flow flush 0 > + testpmd> flow list 0 > + > + check the rules not exist in the list. > + send matched packets, check the packets are not to any VF. > + > + > +Test case: max field vectors > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > + > +Description: 48 field vectors can be used on a CVL nic. This case is use= d > +to test when field vectors are run out of, then creating a rule, testpmd > +will not hang and provide a friendly output. > + > +1. create the following nvgre rules:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.= 1 / > nvgre tni is 0x8 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / udp= src is 50 > dst is 23 / end actions vf id 1 / end > + testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.= 2 / > nvgre tni is 0x8 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / udp= src is 50 > / end actions vf id 1 / end > + testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.= 3 / > nvgre tni is 0x8 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / udp= dst is 23 > / end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rules exist in the list. > + > +2. the three rules have run out of field vectors, and > + continue to create the following rule:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.= 10 / > nvgre tni is 0x8 / eth dst is 68:05:ca:8d:ed:a1 / ipv4 src is 192.168.1= .2 dst is > 192.168.1.3 / udp src is 25 dst is 23 / end actions vf id 1 / end > + > + check the rule can not be created successfully, and testpmd > + provide a friendly output, showing:: > + > + ice_flow_create(): Failed to create flow > + port_flow_complain(): Caught PMD error type 2 (flow rule (handle)): > switch filter create flow fail: Invalid argument > + > +3. check the rule list:: > + > + testpmd> flow list 0 > + > + check the rule in step 2 not exists in the list. > + > +4. send 3 matched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.1")/NVGRE(TNI=3D0x8)/Ether()/IP(src=3D= "192.1 > 68.0.2", > dst=3D"192.168.0.3")/UDP(sport=3D50,dport=3D23)/Raw("x"*80)],iface=3D"enp= 27s0f0 > ",count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.2")/NVGRE(TNI=3D0x8)/Ether()/IP(src=3D= "192.1 > 68.0.2", > dst=3D"192.168.0.3")/UDP(sport=3D50,dport=3D23)/Raw("x"*80)],iface=3D"enp= 27s0f0 > ",count=3D1) > + > sendp([Ether()/IP(dst=3D"192.168.0.3")/NVGRE(TNI=3D0x8)/Ether()/IP(src=3D= "192.1 > 68.0.2", > dst=3D"192.168.0.3")/UDP(sport=3D50,dport=3D23)/Raw("x"*80)],iface=3D"enp= 27s0f0 > ",count=3D1) > + > + check port 1 receives the packets > + send mismatched packets:: > + > + > sendp([Ether()/IP(dst=3D"192.168.0.5")/NVGRE(TNI=3D0x8)/Ether()/IP(src=3D= "192.1 > 68.0.2", > dst=3D"192.168.0.3")/UDP(sport=3D50,dport=3D23)/Raw("x"*80)],iface=3D"enp= 27s0f0 > ",count=3D1) > + > + check the packets are not to port 1. > + > +5. verify rules can be destroyed:: > + > + testpmd> flow flush 0 > + testpmd> flow list 0 > + > + check the rules not exist in the list. > + send matched packets, check the packets are not to port 1. > + > + > +Test case: max rule number > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D > + > +Description: 32k switch filter rules can be created on a CVL card, > +and all PFs and VFs share the 32k rules. But the system will first creat= e > +some MAC_VLAN rules in switch table, and as the number of rules > increased, > +the hash conflicts in the switch filter table are increased, so we can > +create a total of 32563 switch filter rules on a DCF. > + > +1. create 32563 rules with the same pattern, but different input set:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.0.= 0 / end > actions vf id 1 / end > + testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.0.= 1 / end > actions vf id 1 / end > + ...... > + testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.12= 7.177 / > end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rules exist in the list. > + > +2. create one more rule:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.12= 7.178 / > end actions vf id 1 / end > + > + check the rule can not be created successfully, and > + testpmd provide a friendly output, showing:: > + > + ice_flow_create(): Failed to create flow > + port_flow_complain(): Caught PMD error type 2 (flow rule (handle)): > switch filter create flow fail: Invalid argument > + > +3. check the rule list > + > + testpmd> flow list 0 > + > + check the rule in step 2 not exists in the list. > + > +4. send 32563 matched packets for rule 0-32562:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.0")/TCP(sport= =3D25,d > port=3D23)/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.1")/TCP(sport= =3D25,d > port=3D23)/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + ...... > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.127.177")/TCP(s= port > =3D25,dport=3D23)/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > + check port 1 receive the 32563 packets. > + send 1 mismatched packet:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.167.0.1")/TCP(sport= =3D25,d > port=3D23)/("X"*480)], iface=3D"enp27s0f0", count=3D1) > + > + check the packet are not to port 1. > + > +5. verify rules can be destroyed:: > + > + testpmd> flow flush 0 > + testpmd> flow list 0 > + > + check the rules not exist in the list. > + send 32563 matched packets, check the packets are not to port 1. > + > + > +Test case: flow validation > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D > + > +1. validate MAC_IPV4_UDP_PAY:: > + > + testpmd> flow validate 0 ingress pattern eth dst is 68:05:ca:8d:ed:= a8 / > ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is= 25 dst is 23 > / end actions vf id 1 / end > + > + get the message:: > + > + Flow rule validated > + > +2. repeat step 1 with MAC_IPV4_PFCP_NODE:: > + > + testpmd> flow validate 0 ingress pattern eth / ipv4 / udp / pfcp s_= field is > 0 / end actions vf id 1 / end > + > + get the same result > + > +3. validate unsupported pattern MAC_IPV4_SCTP_PAY:: > + > + testpmd> flow validate 0 ingress pattern eth / ipv4 src is 192.168.= 0.2 dst > is 192.168.0.3 / sctp src is 25 dst is 23 / end actions vf id 1 / end > + > + get the message:: > + > + Invalid input pattern: Invalid argument > + > +4. check the flow list:: > + > + testpmd> flow list 0 > + > + there is no rule listed. > + > +5. validate a rule on invalid vf:: > + > + testpmd> flow validate 1 ingress pattern eth / ipv6 / udp / pfcp s_= field is > 1 / end actions vf id 1 / end > + > + get the message:: > + > + port_flow_complain(): Caught PMD error type 2 (flow rule (handle)): > Failed to create parser engine.: Invalid argument > + > +6. check the flow list:: > + > + testpmd> flow list 1 > + > + there is no rule listed. > + > + > +Test case: Stress test > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +Subcase 1: DCF stop/DCF start > +----------------------------- > + > +1. create MAC_IPV4_UDP_PAY rule:: > + > + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8= / ipv4 > src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 d= st is 23 / > end actions vf id 1 / end > + testpmd> flow list 0 > + > + check the rule exists in the list. > + > +2. send matched packets:: > + > + > sendp([Ether(dst=3D"68:05:ca:8d:ed:a8")/IP(src=3D"192.168.0.1",dst=3D"192= .168.0. > 2",tos=3D4,ttl=3D3)/UDP(sport=3D25,dport=3D23)/("X"*480)], iface=3D"enp27= s0f0", > count=3D1) > + > + check port 1 receive the packet. > + > +3. stop the DCF, then start the DCF:: > + > + tetspmd> port stop 0 > + testpmd> port start 0 > + > +4. check the rule list:: > + > + testpmd> flow list 0 > + > + check the rule is still there. > + > +5. send matched packets, port 1 can still receive the packets. > -- > 2.17.1