From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 27F4FA054F; Tue, 2 Mar 2021 08:37:07 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F20B24067B; Tue, 2 Mar 2021 08:37:06 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id DA9914014E for ; Tue, 2 Mar 2021 08:37:04 +0100 (CET) IronPort-SDR: EK/2QyKEOyxiJp4hk3sy/EdQdodMNnWjxS6noXwHvIiXT8ZZn+jbaqQvZCj05+0KLoJdBF5+4h LXsBA0wvJ4og== X-IronPort-AV: E=McAfee;i="6000,8403,9910"; a="186046949" X-IronPort-AV: E=Sophos;i="5.81,216,1610438400"; d="scan'208";a="186046949" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2021 23:37:03 -0800 IronPort-SDR: KWLybUwwo1WCJimz+UTmwJmc2MKu6JeUMz9vZxubhpS5UTb0/NRkNcboi+DLQgMsm+3uQJ1qnF 8v5QzB6iEfZw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,216,1610438400"; d="scan'208";a="398199693" Received: from dpdk-qifu-cxl.sh.intel.com ([10.67.119.24]) by fmsmga008.fm.intel.com with ESMTP; 01 Mar 2021 23:37:01 -0800 From: qifu To: dts@dpdk.org Cc: qifu , Xueqin Lin , Peng Yuan Date: Tue, 2 Mar 2021 11:20:49 -0500 Message-Id: <20210302162049.229166-1-qi.fu@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: [dts] [PATCH V3]test_plans: add test plan for cvl supporting ecpri protocol X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" dpdk can support ecpri in CVL with wireless pkg, add test plan to cover 3 parts: 1. UDP dst port dynamically config for eCPRI. 2. RSS supporting for eCPRI. 3. FDIR supporting for eCPRI. Signed-off-by: qifu Signed-off-by: Xueqin Lin Signed-off-by: Peng Yuan --- test_plans/cvl_ecpri_test_plan.rst | 1114 ++++++++++++++++++++++++++++ 1 file changed, 1114 insertions(+) create mode 100644 test_plans/cvl_ecpri_test_plan.rst diff --git a/test_plans/cvl_ecpri_test_plan.rst b/test_plans/cvl_ecpri_test= _plan.rst new file mode 100644 index 00000000..2750c943 --- /dev/null +++ b/test_plans/cvl_ecpri_test_plan.rst @@ -0,0 +1,1114 @@ +.. Copyright (c) <2021>, Intel Corporation=0D + All rights reserved.=0D +=0D + Redistribution and use in source and binary forms, with or without=0D + modification, are permitted provided that the following conditions=0D + are met:=0D +=0D + - Redistributions of source code must retain the above copyright=0D + notice, this list of conditions and the following disclaimer.=0D +=0D + - Redistributions in binary form must reproduce the above copyright=0D + notice, this list of conditions and the following disclaimer in=0D + the documentation and/or other materials provided with the=0D + distribution.=0D +=0D + - Neither the name of Intel Corporation nor the names of its=0D + contributors may be used to endorse or promote products derived=0D + from this software without specific prior written permission.=0D +=0D + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS=0D + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT=0D + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS=0D + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE=0D + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,=0D + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES=0D + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR=0D + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)=0D + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,=0D + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)=0D + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED=0D + OF THE POSSIBILITY OF SUCH DAMAGE.=0D +=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=0D +CVL support eCPRI protocol=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=0D +eCPRI protocol is used for exchanging messages within ORAN 5G Front Haul.= =0D +According to the ORAN FH specification the eCPRI packets are sent over Eth= ernet.=0D +They can be transmitted over standard Ethernet frames, or can use IP/UDP a= s the transport mechanism.=0D +In case of the IP/UDP transport mechanism the ORAN FH standard says that=0D +the UDP destination port used for eCPRI protocol is not fixed, thus, the u= ser should be able to configure the port number dynamically.=0D +A change is required in DPDK APIs to allow it.=0D +And CVL rss and fdir rte_flow APIs are needed to support classfication of = eCPRI protocol.=0D +Therefore, this test plan contain 3 parts:=0D +* UDP dst port dynamically config for eCPRI=0D +* rss supporting for eCPRI=0D +* fdir supporting for eCPRI=0D +=0D +=0D +Prerequisites=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +1. Hardware:=0D + columbiaville_25g/columbiaville_100g=0D +=0D +2. Software:=0D + dpdk: http://dpdk.org/git/dpdk=0D + scapy: http://www.secdev.org/projects/scapy/=0D +=0D +3. Copy ice_wireless pkg to /lib/firmware/updates/intel/ice/ddp/ice.pkg=0D +=0D +4. load driver::=0D +=0D + rmmod ice=0D + insmod ice.ko=0D +=0D +5. Generate 4 VFs on PF0 and set mac address(not all the VFs are used)::=0D +=0D + echo 4 > /sys/bus/pci/devices/0000:18:00.0/sriov_numvfs=0D + ./usertools/dpdk-devbind.py -s=0D + 0000:18:01.0 'Ethernet Adaptive Virtual Function 1889' if=3Denp24s1 dr= v=3Diavf unused=3Dvfio-pci=0D + 0000:18:01.1 'Ethernet Adaptive Virtual Function 1889' if=3Denp24s1f1 = drv=3Diavf unused=3Dvfio-pci=0D + 0000:18:01.2 'Ethernet Adaptive Virtual Function 1889' if=3Denp24s1f2 = drv=3Diavf unused=3Dvfio-pci=0D + 0000:18:01.3 'Ethernet Adaptive Virtual Function 1889' if=3Denp24s1f3 = drv=3Diavf unused=3Dvfio-pci=0D +=0D + ip link set ens785f0 vf 0 mac 00:11:22:33:44:55=0D + ip link set ens785f0 vf 1 mac 00:11:22:33:44:11=0D + ip link set ens785f0 vf 2 mac 00:11:22:33:44:22=0D + ip link set ens785f0 vf 3 mac 00:11:22:33:44:33=0D +=0D +6. Set VF0 as trust::=0D +=0D + ip link set ens785f0 vf 0 trust on=0D +=0D +7. Bind 3 VFs to dpdk driver, keep one VF in kernel::=0D +=0D + modprobe vfio-pci=0D + ./usertools/dpdk-devbind.py -b vfio-pci 0000:18:01.0 0000:18:01.1 0000= :18:01.2=0D +=0D +8. Launch dpdk on VF0, VF1 and VF2, and VF0 request DCF mode::=0D +=0D + ./dpdk-testpmd -c 0xf -n 4 -a 0000:18:01.0,cap=3Ddcf -a 0000:18:01.1 -= a 0000:18:01.2 -- -i=0D +=0D + testpmd> set fwd rxonly=0D + testpmd> set verbose 1=0D + testpmd> start=0D + testpmd> show port info all=0D +=0D + check the VF0 driver is net_ice_dcf.=0D +=0D +9. For test case 01 and test case 02, need to add print log in testpmd to = show the eCPRI ptype, then compile DPDK again:=0D +=0D +diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c=0D + index af5a28d84..3dbd5ab97 100644=0D + --- a/drivers/net/iavf/iavf_rxtx.c=0D + +++ b/drivers/net/iavf/iavf_rxtx.c=0D + @@ -1314,6 +1314,8 @@ iavf_recv_pkts_flex_rxd(void *rx_queue,=0D + rxm->ol_flags =3D 0;=0D + rxm->packet_type =3D ptype_tbl[IAVF_RX_FLEX_DESC_PTYPE_M = &=0D + rte_le_to_cpu_16(rxd.wb.ptype_flex_flags0)];=0D + + printf("++++++++++++ptype=3D%u\n",=0D + + IAVF_RX_FLEX_DESC_PTYPE_M & rte_le_to_cpu_16(rxd.= wb.ptype_flex_flags0));=0D + iavf_flex_rxd_to_vlan_tci(rxm, &rxd);=0D + rxq->rxd_to_pkt_fields(rxq, rxm, &rxd);=0D + pkt_flags =3D iavf_flex_rxd_error_to_pkt_flags(rx_stat_er= r0);=0D + @@ -2346,7 +2348,7 @@ iavf_set_rx_function(struct rte_eth_dev *dev)=0D + IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);=0D + struct iavf_info *vf =3D IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_pr= ivate);=0D +=0D + -#ifdef RTE_ARCH_X86=0D + +#if 0=0D + struct iavf_rx_queue *rxq;=0D + int i;=0D + bool use_avx2 =3D false;=0D + @@ -2446,6 +2448,7 @@ iavf_set_rx_function(struct rte_eth_dev *dev)=0D + else=0D + dev->rx_pkt_burst =3D iavf_recv_pkts;=0D + }=0D + + dev->rx_pkt_burst =3D iavf_recv_pkts_flex_rxd;=0D + }=0D +=0D + /* choose tx function*/=0D + --=0D +=0D +=0D +Test case 01: add and delete eCPRI port config in DCF=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=0D +1. add eCPRI port config in DCF::=0D +=0D + port config 0 udp_tunnel_port add ecpri 0x5123=0D +=0D +2. send eCPRI pkts to VF1, check the pattern can be parsed correctly:=0D +=0D +MAC_IPV4_UDP_ECPRI_MSGTYPE0(ptype=3D372)::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00')], iface=3D"ens786f0")=0D +=0D +MAC_IPV4_UDP_ECPRI_MSGTYPE2_SEC0(ptype=3D373)::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x02')/Raw('x'*11)/Raw('\x00')], iface=3D"ens786f0")=0D +=0D +MAC_IPV4_UDP_ECPRI_MSGTYPE2_SEC1(ptype=3D374)::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x02')/Raw('x'*11)/Raw('\x01')], iface=3D"ens786f0")=0D +=0D +MAC_IPV4_UDP_ECPRI_MSGTYPE2_SEC3(ptype=3D375)::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x02')/Raw('x'*11)/Raw('\x03')], iface=3D"ens786f0")=0D +=0D +MAC_IPV4_UDP_ECPRI_MSGTYPE2_SEC5(ptype=3D376)::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x02')/Raw('x'*11)/Raw('\x05')], iface=3D"ens786f0")=0D +=0D +MAC_IPV4_UDP_ECPRI_MSGTYPE2_SEC6(ptype=3D377)::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x02')/Raw('x'*11)/Raw('\x06')], iface=3D"ens786f0")=0D +=0D +MAC_IPV4_UDP_ECPRI_MSGTYPE2_SEC7(ptype=3D378)::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x02')/Raw('x'*11)/Raw('\x07')], iface=3D"ens786f0")=0D +=0D +MAC_IPV4_UDP_ECPRI_MSGTYPE2(ptype=3D379)::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x02')/Raw('x'*11)/Raw('\x08')], iface=3D"ens786f0")=0D +=0D +MAC_IPV4_UDP_ECPRI_MSGTYPE5(ptype=3D380)::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x05')], iface=3D"ens786f0")=0D +=0D +MAC_IPV4_UDP_ECPRI(ptype=3D381)::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x06')], iface=3D"ens786f0")=0D +=0D +3. send eCPRI pkts which udp dport is not matched the config to VF1, check= the pattern can not be recognized(all the ptype is 24)::=0D +=0D +MAC_IPV4_UDP_ECPRI_MSGTYPE0::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5121)/Raw('= \x10\x00')], iface=3D"ens786f0")=0D +=0D +MAC_IPV4_UDP_ECPRI_MSGTYPE2_SEC0::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5121)/Raw('= \x10\x02')/Raw('x'*11)/Raw('\x00')], iface=3D"ens786f0")=0D +=0D +MAC_IPV4_UDP_ECPRI_MSGTYPE2_SEC1::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5121)/Raw('= \x10\x02')/Raw('x'*11)/Raw('\x01')], iface=3D"ens786f0")=0D +=0D +MAC_IPV4_UDP_ECPRI_MSGTYPE2_SEC3::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5121)/Raw('= \x10\x02')/Raw('x'*11)/Raw('\x03')], iface=3D"ens786f0")=0D +=0D +MAC_IPV4_UDP_ECPRI_MSGTYPE2_SEC5::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5121)/Raw('= \x10\x02')/Raw('x'*11)/Raw('\x05')], iface=3D"ens786f0")=0D +=0D +MAC_IPV4_UDP_ECPRI_MSGTYPE2_SEC6::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5121)/Raw('= \x10\x02')/Raw('x'*11)/Raw('\x06')], iface=3D"ens786f0")=0D +=0D +MAC_IPV4_UDP_ECPRI_MSGTYPE2_SEC7::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5121)/Raw('= \x10\x02')/Raw('x'*11)/Raw('\x07')], iface=3D"ens786f0")=0D +=0D +MAC_IPV4_UDP_ECPRI_MSGTYPE2::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5121)/Raw('= \x10\x02')/Raw('x'*11)/Raw('\x08')], iface=3D"ens786f0")=0D +=0D +MAC_IPV4_UDP_ECPRI_MSGTYPE5::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5121)/Raw('= \x10\x05')], iface=3D"ens786f0")=0D +=0D +MAC_IPV4_UDP_ECPRI::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5121)/Raw('= \x10\x06')], iface=3D"ens786f0")=0D +=0D +4. send same eCPRI pkts in step 2 to VF2, check the pattern can be parsed = correctly.=0D +=0D +5. delete eCPRI port config in DCF::=0D +=0D + port config 0 udp_tunnel_port rm ecpri 0x5123=0D +=0D +6. send same eCPRI pkts in step 2 to VF1, check the pattern can not be rec= ognized(all the ptype is 24).=0D +=0D +=0D +Test case 02: test eCPRI port config when DCF exit and reset=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +1. add eCPRI port config in DCF::=0D +=0D + port config 0 udp_tunnel_port add ecpri 0x5123=0D +=0D +2. quit testpmd, then Launch testpmd again::=0D +=0D + ./dpdk-testpmd -c 0xf -n 4 -a 0000:18:01.0,cap=3Ddcf -a 0000:18:01.1 0= 000:18:01.2 -- -i=0D + testpmd> set fwd rxonly=0D + testpmd> set verbose 1=0D + testpmd> start=0D +=0D +3. send eCPRI pkts which udp dport is match before config to VF1, check th= e pattern can not be recognized(all the ptype is 24)::=0D +=0D +MAC_IPV4_UDP_ECPRI_MSGTYPE0::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00')], iface=3D"ens786f0")=0D +=0D +MAC_IPV4_UDP_ECPRI_MSGTYPE2_SEC0::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x02')/Raw('x'*11)/Raw('\x00')], iface=3D"ens786f0")=0D +=0D +MAC_IPV4_UDP_ECPRI_MSGTYPE2_SEC1::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x02')/Raw('x'*11)/Raw('\x01')], iface=3D"ens786f0")=0D +=0D +MAC_IPV4_UDP_ECPRI_MSGTYPE2_SEC3::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x02')/Raw('x'*11)/Raw('\x03')], iface=3D"ens786f0")=0D +=0D +MAC_IPV4_UDP_ECPRI_MSGTYPE2_SEC5::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x02')/Raw('x'*11)/Raw('\x05')], iface=3D"ens786f0")=0D +=0D +MAC_IPV4_UDP_ECPRI_MSGTYPE2_SEC6::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x02')/Raw('x'*11)/Raw('\x06')], iface=3D"ens786f0")=0D +=0D +MAC_IPV4_UDP_ECPRI_MSGTYPE2_SEC7::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x02')/Raw('x'*11)/Raw('\x07')], iface=3D"ens786f0")=0D +=0D +MAC_IPV4_UDP_ECPRI_MSGTYPE2::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x02')/Raw('x'*11)/Raw('\x08')], iface=3D"ens786f0")=0D +=0D +MAC_IPV4_UDP_ECPRI_MSGTYPE5::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x05')], iface=3D"ens786f0")=0D +=0D +MAC_IPV4_UDP_ECPRI::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x06')], iface=3D"ens786f0")=0D +=0D +4. add eCPRI port config in DCF::=0D +=0D + port config 0 udp_tunnel_port add ecpri 0x5123=0D +=0D +5. reset DCF by set mac address::=0D +=0D + ip link set ens785f0 vf 0 mac 00:11:22:33:44:66=0D +=0D +6. send eCPRI pkts in step 3 to VF1, check the pattern can not be recogniz= ed(all the ptype is 24).=0D +=0D +7. quit testpmd, then Launch testpmd again, add eCPRI port config in DCF::= =0D +=0D + ./dpdk-testpmd -c 0xf -n 4 -a 0000:18:01.0,cap=3Ddcf -a 0000:18:01.1 0= 000:18:01.2 -- -i=0D + testpmd> set fwd rxonly=0D + testpmd> set verbose 1=0D + testpmd> start=0D + testpmd> port config 0 udp_tunnel_port add ecpri 0x5123=0D +=0D +8. reset DCF by set trust off::=0D +=0D + ip link set ens785f0 vf 0 trust off=0D +=0D +9. send eCPRI pkts in step 3 to VF1, check the pattern can not be recogniz= ed(all the ptype is 24).=0D +=0D +=0D +Test case 03: test DCF port config and linux port config=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=0D +1. add eCPRI port config in DCF::=0D +=0D + port config 0 udp_tunnel_port add ecpri 0x5123=0D +=0D +2. add linux port config, check the cmd can not config successfully::=0D +=0D + ip link add vx0 type vxlan id 100 local 1.1.1.1 remote 2.2.2.2 dev ens= 785f0 dstport 0x1234=0D + ifconfig vx0 up=0D + ifconfig vx0 down=0D +=0D + [1825286.116930] ice 0000:18:00.0: Cannot config tunnel, the capabilit= y is used by DCF=0D +=0D +3. delete eCPRI port config in DCF::=0D +=0D + port config 0 udp_tunnel_port rm ecpri 0x5123=0D +=0D +4. add linux port config, check the cmd can config successfully::=0D +=0D + ifconfig vx0 up=0D + ifconfig vx0 down=0D +=0D +5. quit testpmd, then Launch testpmd again::=0D +=0D + ./dpdk-testpmd -c 0xf -n 4 -a 0000:18:01.0,cap=3Ddcf -a 0000:18:01.1 -= a 0000:18:01.2 -- -i=0D + testpmd> set fwd rxonly=0D + testpmd> set verbose 1=0D + testpmd> start=0D +=0D +6. add linux port config::=0D +=0D + ip link add vx0 type vxlan id 100 local 1.1.1.1 remote 2.2.2.2 dev ens= 785f0 dstport 0x1234=0D + ifconfig vx0 up=0D +=0D +7. add eCPRI port config in DCF::=0D +=0D + testpmd> port config 0 udp_tunnel_port add ecpri 0x5123=0D + ice_dcf_send_aq_cmd(): No response (201 times) or return failure (desc= : -63 / buff: -63)=0D + udp tunneling port add error: (No such process)=0D +=0D + check the cmd can not config successfully.=0D +=0D +8. remove linux port config::=0D +=0D + ifconfig vx0 down=0D +=0D +9. add eCPRI port config in DCF::=0D +=0D + port config 0 udp_tunnel_port add ecpri 0x5123=0D +=0D + check the cmd can config successfully.=0D +=0D +=0D +Test case 04: negative eCPRI port config in DCF=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +1. try below negative cmd in testpmd::=0D +=0D + testpmd> port config 1 udp_tunnel_port add ecpri 0x5123=0D + udp tunneling port add error: (Operation not supported)=0D +=0D + testpmd> port config 5 udp_tunnel_port add ecpri 0x5123=0D + Invalid port 5=0D +=0D + testpmd> port config 15 udp_tunnel_port rm ecpri 0x5123=0D + Invalid port 15=0D +=0D + testpmd> port config a udp_tunnel_port add ecpri 0x5123=0D + Bad arguments=0D +=0D + testpmd> port config 0 udp_tunnel_port add ecpri 0=0D + udp tunneling port add error: (Permission denied)=0D +=0D + testpmd> port config 0 udp_tunnel_port rm ecpri 0=0D + udp tunneling port add error: (Operation not permitted)=0D +=0D + testpmd> port config 0 udp_tunnel_port add ecpri ffff=0D + Bad arguments=0D +=0D + testpmd> port config 0 udp_tunnel_port add ecpri 0xffff=0D + udp tunneling port add error: (Permission denied)=0D +=0D +=0D +Test case 05: rss for udp ecpri=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=0D +=0D +1. Add eCPRI port config in DCF::=0D +=0D + port config 0 udp_tunnel_port add ecpri 0x5123=0D +=0D +2. Validate rule::=0D +=0D + flow validate 1 ingress pattern eth / ipv4 / udp / ecpri common type i= q_data / end actions rss types ecpri end key_len 0 queues end / end=0D +=0D +3. Create rule and list rule::=0D +=0D + flow create 1 ingress pattern eth / ipv4 / udp / ecpri common type iq_= data / end actions rss types ecpri end key_len 0 queues end / end=0D +=0D +4. Send a basic hit pattern packet, record the hash value,=0D + check the packet is distributed to queues by RSS::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x45')], iface=3D"ens786f0")=0D +=0D +5. Send hit pattern packets with changed input set in the rule,=0D + check the received packets have different hash values with basic packet= ,=0D + check the packets are distributed to queues by rss::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x46')], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x47')], iface=3D"ens786f0")=0D +=0D +6. Destroy the rule and list rule::=0D +=0D + testpmd> flow destroy 1 rule 0=0D + testpmd> flow list 1=0D +=0D +7. Send same packets with step 4 and 5,=0D + check received packets don't have hash value or hash value is same, rul= e can't work.=0D +=0D +=0D +Test case 06: rss for eth_ecpri=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=0D +=0D +1. Start testpmd without DCF mode::=0D +=0D + dpdk-testpmd -c f -n 4 -a 18:01.1 -- -i --rxq=3D16 --txq=3D16=0D +=0D +2. Validate rule::=0D +=0D + flow validate 1 ingress pattern eth / ecpri common type iq_data / end = actions rss types ecpri end key_len 0 queues end / end=0D +=0D +3. Create rule and list rule::=0D +=0D + flow create 1 ingress pattern eth / ecpri common type iq_data / end ac= tions rss types ecpri end key_len 0 queues end / end=0D +=0D +4. Send a basic hit pattern packet, record the hash value,=0D + check the packet is distributed to queues by RSS::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11", type=3D0xAEFE)/Raw('\x10\x00\x= 02\x24\x23\x45')], iface=3D"ens786f0")=0D +=0D +5. Send hit pattern packets with changed input set in the rule,=0D + check the received packets have different hash values with basic packet= ,=0D + check the packets are distributed to queues by rss::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11", type=3D0xAEFE)/Raw('\x10\x00\x0= 2\x24\x23\x46')], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:11", type=3D0xAEFE)/Raw('\x10\x00\x0= 2\x24\x23\x47')], iface=3D"ens786f0")=0D +=0D +6. Destroy the rule and list rule::=0D +=0D + testpmd> flow destroy 1 rule 0=0D + testpmd> flow list 1=0D +=0D +7. Send same packet with step 4,=0D + check received packets don't have hash value or hash value is same, rul= e can't work.=0D +=0D +=0D +Test case 07: rss multirules + multiports=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +=0D +1. Add eCPRI port config in DCF::=0D +=0D + port config 0 udp_tunnel_port add ecpri 0x5123=0D +=0D +2. Create multi rules::=0D +=0D + flow create 1 ingress pattern eth / ipv4 / udp / ecpri common type iq_= data / end actions rss types ecpri end key_len 0 queues end / end=0D + flow create 1 ingress pattern eth / ecpri common type iq_data / end ac= tions rss types ecpri end key_len 0 queues end / end=0D + flow create 2 ingress pattern eth / ipv4 / udp / ecpri common type iq_= data / end actions rss types ecpri end key_len 0 queues end / end=0D + flow create 2 ingress pattern eth / ecpri common type iq_data / end ac= tions rss types ecpri end key_len 0 queues end / end=0D +=0D +3. Send a basic hit pattern packet, record the hash value,=0D + check the packets are distributed to queues by RSS::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x45')], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:11", type=3D0xAEFE)/Raw('\x10\x00\x= 02\x24\x23\x45')], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:22")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x45')], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:22", type=3D0xAEFE)/Raw('\x10\x00\x= 02\x24\x23\x45')], iface=3D"ens786f0")=0D +=0D +4. Send hit pattern packets with changed input set in the rule,=0D + check the received packets have different hash value with basic packet,= =0D + check the packets are distributed to queues by rss::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x46')], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:11", type=3D0xAEFE)/Raw('\x10\x00\x= 02\x24\x23\x46')], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:22")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x46')], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:22", type=3D0xAEFE)/Raw('\x10\x00\x= 02\x24\x23\x46')], iface=3D"ens786f0")=0D +=0D +5. Destroy the rule and list rule::=0D +=0D + testpmd> flow destroy 1 rule 0=0D + testpmd> flow list 1=0D + testpmd> flow destroy 2 rule 0=0D + testpmd> flow list 2=0D +=0D +6. Send same packet with step 3,=0D + check received packets don't have hash value or hash value is same, rul= e can't work.=0D +=0D +=0D +Test case 08: rss without/with udp port set for udp ecpri rule=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +=0D +1. Create rule and list rule without udp port config::=0D +=0D + flow create 1 ingress pattern eth / ipv4 / udp / ecpri common type iq_= data / end actions rss types ecpri end key_len 0 queues end / end=0D +=0D +2. Send basic hit pattern packets, record the hash value,=0D + check parser is wrong, hash value is same,=0D + RSS eCPRI UDP rule will return success, but not work::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x45')], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x46')], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x47')], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x48')], iface=3D"ens786f0")=0D +=0D +3. Add eCPRI port config in DCF::=0D +=0D + port config 0 udp_tunnel_port add ecpri 0x5123=0D +=0D +4. Send basic hit pattern packets, check hash values are different.=0D + check the packets are distributed to queues by RSS::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x45')], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x46')], iface=3D"ens786f0")=0D +=0D +=0D +Test case 09: DCF reset for udp ecpri rss=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +=0D +1. Add eCPRI port config in DCF::=0D +=0D + port config 0 udp_tunnel_port add ecpri 0x5123=0D +=0D +2. Create rule::=0D +=0D + flow create 1 ingress pattern eth / ipv4 / udp / ecpri common type iq_= data / end actions rss types ecpri end key_len 0 queues end / end=0D +=0D +3. Send a basic hit pattern packet, record the hash value,=0D + check the packet is distributed to queues by RSS::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x45')], iface=3D"ens786f0")=0D +=0D +4. Send hit pattern packet with changed input set in the rule,=0D + check the received packet has different hash value with basic packet,=0D + check the packet is distributed to queues by rss::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x46')], iface=3D"ens786f0")=0D +=0D +5. Reset DCF by set mac address::=0D +=0D + ip link set ens785f0 vf 0 mac 00:11:22:33:44:11=0D +=0D +6. Send packets, check packets parser are wrong, check don't have or hash = value is same::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x45')], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x46')], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x47')], iface=3D"ens786f0")=0D +=0D +7. Reset DCF by set mac address::=0D +=0D + ip link set ens785f0 vf 0 mac 00:11:22:33:44:55=0D +=0D +8. Quit testpmd and repeat step 1~6, get same result.=0D +=0D +8. Reset DCF by set trust off::=0D +=0D + ip link set ens785f0 vf 0 trust off=0D +=0D +9. Repeat step 6, result is same.=0D +=0D +10. Set VF0 as trust::=0D +=0D + ip link set ens785f0 vf 0 trust on=0D +=0D +=0D +Test case 10: DCF reset for eth ecpri rss=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +=0D +1. Create rule::=0D +=0D + flow create 1 ingress pattern eth / ecpri common type iq_data / end ac= tions rss types ecpri end key_len 0 queues end / end=0D +=0D +2. Send a basic hit pattern packet, record the hash value,=0D + check the packet is distributed to queues by RSS::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11", type=3D0xAEFE)/Raw('\x10\x00\x= 02\x24\x23\x45')], iface=3D"ens786f0")=0D +=0D +3. Send hit pattern packet with changed input set in the rule,=0D + check the received packet has different hash value with basic packet,=0D + check the packet is distributed to queues by rss::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11", type=3D0xAEFE)/Raw('\x10\x00\x= 02\x24\x23\x46')], iface=3D"ens786f0")=0D +=0D +4. Reset DCF by set mac address::=0D +=0D + ip link set ens785f0 vf 0 mac 00:11:22:33:44:11=0D +=0D +5. Send packets, check the received packets have different hash values, ru= le can work::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11", type=3D0xAEFE)/Raw('\x10\x00\x= 02\x24\x23\x46')], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:11", type=3D0xAEFE)/Raw('\x10\x00\x= 02\x24\x23\x47')], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:11", type=3D0xAEFE)/Raw('\x10\x00\x= 02\x24\x23\x48')], iface=3D"ens786f0")=0D +=0D +6. Reset DCF by set trust off::=0D +=0D + ip link set ens785f0 vf 0 trust off=0D +=0D +7. Repeat step 1~5, result is same.=0D +=0D +8. Set VF0 as trust::=0D +=0D + ip link set ens785f0 vf 0 trust on=0D +=0D +9. Reset DCF by set mac address::=0D +=0D + ip link set ens785f0 vf 0 mac 00:11:22:33:44:55=0D +=0D +=0D +Test case 11: DCF exit for eth ecpri and udp ecpri rss=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=0D +=0D +1. Start testpmd with dcf mode on vf0::=0D +=0D + ./dpdk-testpmd -c 0xff -n 6 -a 0000:18:01.0,cap=3Ddcf --file-prefix=3D= test1 -- -i=0D + port config 0 udp_tunnel_port add ecpri 0x5123=0D +=0D +2. Start testpmd with iavf mode on vf1 and vf2::=0D +=0D + ./dpdk-testpmd -c 0xff -n 6 -a 0000:60:01.1 -a 0000:60:01.2 --file-pre= fix=3Dtest2 -- -i --rxq=3D16 --txq=3D16=0D + flow create 0 ingress pattern eth / ipv4 / udp / ecpri common type iq_= data / end actions rss types ecpri end key_len 0 queues end / end=0D + flow create 1 ingress pattern eth / ecpri common type iq_data / end ac= tions rss types ecpri end key_len 0 queues end / end=0D +=0D +3. Send a basic hit pattern packet, record the hash value,=0D + check the packets are distributed to queues by RSS::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x45')], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:22", type=3D0xAEFE)/Raw('\x10\x00\x= 02\x24\x23\x45')], iface=3D"ens786f0")=0D +=0D +4. Send hit pattern packets with changed input set in the rule,=0D + check the received packets have different hash values with basic packet= ,=0D + check the packets are distributed to queues by rss::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x46')], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:22", type=3D0xAEFE)/Raw('\x10\x00\x= 02\x24\x23\x46')], iface=3D"ens786f0")=0D +=0D +5. Quit dcf testpmd.=0D +=0D +6. Repeat 3 and 4 steps, check udp ecpri parser is wrong and rule can't wo= rk.=0D + Check eth ecpri rule can work, has different hash values.=0D +=0D +=0D +Test case 12: eCPRI over Ethernet header pattern fdir=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=0D +matched packets::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11", type=3D0xAEFE)/Raw('\x10\x00\x= 02\x24\x23\x45')], iface=3D"ens786f0")=0D +=0D +unmatched packets::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11", type=3D0xAEFE)/Raw('\x10\x00\x= 02\x24\x23\x46')], iface=3D"ens786f0")=0D +=0D +Enable RSS of eCPRI over Ethernet header in advance::=0D +=0D + flow create 1 ingress pattern eth / ecpri common type iq_data / end ac= tions rss types ecpri end key_len 0 queues end / end=0D +=0D +Subcase 1: queue index=0D +----------------------=0D +=0D +1. validate fdir rule, and no rule listed::=0D +=0D + flow validate 1 ingress pattern eth / ecpri common type iq_data pc_id = is 0x2345 / end actions queue index 3 / mark id 1 / end=0D +=0D +2. create filter rules::=0D +=0D + flow create 1 ingress pattern eth / ecpri common type iq_data pc_id is= 0x2345 / end actions queue index 3 / mark id 1 / end=0D +=0D +3. send matched packets, check the packets are distributed to queue 3 with= FDIR matched ID=3D0x1.=0D + send unmatched packets, check the packets are distributed by RSS withou= t FDIR matched ID.=0D +=0D +4. verify rules can be listed and destroyed::=0D +=0D + testpmd> flow list 1=0D +=0D + check the rule listed.=0D + destroy the rule::=0D +=0D + testpmd> flow destroy 1 rule 1=0D +=0D +5. verify matched packets are distributed by RSS without FDIR matched ID.= =0D + check there is no fdir rule listed.=0D +=0D +subcase 2: rss queues=0D +---------------------=0D +1. validate fdir rule, and no rule listed::=0D +=0D + flow validate 1 ingress pattern eth / ecpri common type iq_data pc_id = is 0x2345 / end actions rss queues 5 6 end / mark id 2 / end=0D +=0D +2. create fdir rule::=0D +=0D + flow create 1 ingress pattern eth / ecpri common type iq_data pc_id is= 0x2345 / end actions rss queues 5 6 end / mark id 2 / end=0D +=0D +3. send matched packets, check the packets are distributed to queue 5 or 6= with FDIR matched ID=3D0x2.=0D + send unmatched packets, check the packets are distributed by RSS withou= t FDIR matched ID.=0D +=0D +4. verify rules can be listed and destroyed::=0D +=0D + testpmd> flow list 1=0D +=0D + check the rule listed.=0D + destroy the rule::=0D +=0D + testpmd> flow destroy 1 rule 1=0D +=0D +5. verify matched packets are distributed by RSS without FDIR matched ID.= =0D + check there is no fdir rule listed.=0D +=0D +subcase 3: drop=0D +---------------=0D +1. validate fdir rule, and no rule listed::=0D +=0D + flow validate 1 ingress pattern eth / ecpri common type iq_data pc_id = is 0x2345 / end actions drop / end=0D +=0D +2. create fdir rule::=0D +=0D + flow create 1 ingress pattern eth / ecpri common type iq_data pc_id is= 0x2345 / end actions drop / end=0D +=0D +3. send matched packets, check the packets are dropped.=0D + send unmatched packets, check the packets are distributed by RSS withou= t FDIR matched ID.=0D +=0D +4. verify rules can be listed and destroyed::=0D +=0D + testpmd> flow list 1=0D +=0D + check the rule listed.=0D + destroy the rule::=0D +=0D + testpmd> flow destroy 1 rule 1=0D +=0D +5. verify matched packets are distributed by RSS without FDIR matched ID.= =0D + check there is no fdir rule listed.=0D +=0D +subcase 4: passthru=0D +-------------------=0D +1. validate fdir rule, and no rule listed::=0D +=0D + flow validate 1 ingress pattern eth / ecpri common type iq_data pc_id = is 0x2345 / end actions passthru / mark id 1 / end=0D +=0D +2. create fdir rule::=0D +=0D + flow create 1 ingress pattern eth / ecpri common type iq_data pc_id is= 0x2345 / end actions passthru / mark id 1 / end=0D +=0D +3. send matched packets, check the packets are distributed by RSS with FDI= R matched ID=3D0x1.=0D + send unmatched packets, check the packets are distributed by RSS withou= t FDIR matched ID.=0D +=0D +4. verify rules can be listed and destroyed::=0D +=0D + testpmd> flow list 1=0D +=0D + check the rule listed.=0D + destroy the rule::=0D +=0D + testpmd> flow destroy 1 rule 1=0D +=0D +5. verify matched packets are distributed by RSS without FDIR matched ID.= =0D + check there is no fdir rule listed.=0D +=0D +subcase 5: mark + rss=0D +---------------------=0D +1. validate fdir rule, and no rule listed::=0D +=0D + flow validate 1 ingress pattern eth / ecpri common type iq_data pc_id = is 0x2345 / end actions mark / rss / end=0D +=0D +2. create fdir rule::=0D +=0D + flow create 1 ingress pattern eth / ecpri common type iq_data pc_id is= 0x2345 / end actions mark / rss / end=0D +=0D +3. send matched packets, check the packets are distributed by RSS with FDI= R matched ID=3D0x0.=0D + send unmatched packets, check the packets are distributed by RSS withou= t FDIR matched ID.=0D +=0D +4. verify rules can be listed and destroyed::=0D +=0D + testpmd> flow list 1=0D +=0D + check the rule listed.=0D + destroy the rule::=0D +=0D + testpmd> flow destroy 1 rule 1=0D +=0D +5. verify matched packets are distributed by RSS without FDIR matched ID.= =0D + check there is no fdir rule listed.=0D +=0D +subcase 6: mark=0D +---------------=0D +1. validate fdir rule, and no rule listed::=0D +=0D + flow validate 1 ingress pattern eth / ecpri common type iq_data pc_id = is 0x2345 / end actions mark / end=0D +=0D +2. create fdir rule::=0D +=0D + flow create 1 ingress pattern eth / ecpri common type iq_data pc_id is= 0x2345 / end actions mark / end=0D +=0D +3. send matched packets, check the packets are distributed by RSS with FDI= R matched ID=3D0x0.=0D + send unmatched packets, check the packets are distributed by RSS withou= t FDIR matched ID.=0D +=0D +4. verify rules can be listed and destroyed::=0D +=0D + testpmd> flow list 1=0D +=0D + check the rule listed.=0D + destroy the rule::=0D +=0D + testpmd> flow destroy 1 rule 1=0D +=0D +5. verify matched packets are distributed by RSS without FDIR matched ID.= =0D + check there is no fdir rule listed.=0D +=0D +=0D +Test case 13: eCPRI over IP/UDP header pattern fdir=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=0D +matched packets::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x45')], iface=3D"ens786f0")=0D +=0D +unmatched packets::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x46')], iface=3D"ens786f0")=0D +=0D +Add eCPRI port config in DCF::=0D +=0D + port config 0 udp_tunnel_port add ecpri 0x5123=0D +=0D +Enable RSS of eCPRI over IP/UDP header in advance::=0D +=0D + flow create 1 ingress pattern eth / ipv4 / udp / ecpri common type iq_= data / end actions rss types ecpri end key_len 0 queues end / end=0D +=0D +Subcase 1: queue index=0D +----------------------=0D +=0D +1. validate fdir rule, and no rule listed::=0D +=0D + flow validate 1 ingress pattern eth / ipv4 / udp / ecpri common type i= q_data pc_id is 0x2345 / end actions queue index 2 / mark / end=0D +=0D +2. create filter rules::=0D +=0D + flow create 1 ingress pattern eth / ipv4 / udp / ecpri common type iq_= data pc_id is 0x2345 / end actions queue index 2 / mark / end=0D +=0D +3. send matched packets, check the packets are distributed to queue 2 with= FDIR matched ID=3D0x0.=0D + send unmatched packets, check the packets are distributed by RSS withou= t FDIR matched ID.=0D +=0D +4. verify rules can be listed and destroyed::=0D +=0D + testpmd> flow list 1=0D +=0D + check the rule listed.=0D + destroy the rule::=0D +=0D + testpmd> flow destroy 1 rule 1=0D +=0D +5. verify matched packets are distributed by RSS without FDIR matched ID.= =0D + check there is no fdir rule listed.=0D +=0D +subcase 2: rss queues=0D +---------------------=0D +1. validate fdir rule, and no rule listed::=0D +=0D + flow validate 1 ingress pattern eth / ipv4 / udp / ecpri common type i= q_data pc_id is 0x2345 / end actions rss queues 5 6 end / mark id 2 / end=0D +=0D +2. create fdir rule::=0D +=0D + flow create 1 ingress pattern eth / ipv4 / udp / ecpri common type iq_= data pc_id is 0x2345 / end actions rss queues 5 6 end / mark id 2 / end=0D +=0D +3. send matched packets, check the packets are distributed to queue 5 or 6= with FDIR matched ID=3D0x2.=0D + send unmatched packets, check the packets are distributed by RSS withou= t FDIR matched ID.=0D +=0D +4. verify rules can be listed and destroyed::=0D +=0D + testpmd> flow list 1=0D +=0D + check the rule listed.=0D + destroy the rule::=0D +=0D + testpmd> flow destroy 1 rule 1=0D +=0D +5. verify matched packets are distributed by RSS without FDIR matched ID.= =0D + check there is no fdir rule listed.=0D +=0D +subcase 3: drop=0D +---------------=0D +1. validate fdir rule, and no rule listed::=0D +=0D + flow validate 1 ingress pattern eth / ipv4 / udp / ecpri common type i= q_data pc_id is 0x2345 / end actions drop / end=0D +=0D +2. create fdir rule::=0D +=0D + flow create 1 ingress pattern eth / ipv4 / udp / ecpri common type iq_= data pc_id is 0x2345 / end actions drop / end=0D +=0D +3. send matched packets, check the packets are dropped.=0D + send unmatched packets, check the packets are distributed by RSS withou= t FDIR matched ID.=0D +=0D +4. verify rules can be listed and destroyed::=0D +=0D + testpmd> flow list 1=0D +=0D + check the rule listed.=0D + destroy the rule::=0D +=0D + testpmd> flow destroy 1 rule 1=0D +=0D +5. verify matched packets are distributed by RSS without FDIR matched ID.= =0D + check there is no fdir rule listed.=0D +=0D +subcase 4: passthru=0D +-------------------=0D +1. validate fdir rule, and no rule listed::=0D +=0D + flow validate 1 ingress pattern eth / ipv4 / udp / ecpri common type i= q_data pc_id is 0x2345 / end actions passthru / mark id 1 / end=0D +=0D +2. create fdir rule::=0D +=0D + flow create 1 ingress pattern eth / ipv4 / udp / ecpri common type iq_= data pc_id is 0x2345 / end actions passthru / mark id 1 / end=0D +=0D +3. send matched packets, check the packets are distributed by RSS with FDI= R matched ID=3D0x1.=0D + send unmatched packets, check the packets are distributed by RSS withou= t FDIR matched ID.=0D +=0D +4. verify rules can be listed and destroyed::=0D +=0D + testpmd> flow list 1=0D +=0D + check the rule listed.=0D + destroy the rule::=0D +=0D + testpmd> flow destroy 1 rule 1=0D +=0D +5. verify matched packets are distributed by RSS without FDIR matched ID.= =0D + check there is no fdir rule listed.=0D +=0D +subcase 5: mark + rss=0D +---------------------=0D +1. validate fdir rule, and no rule listed::=0D +=0D + flow validate 1 ingress pattern eth / ipv4 / udp / ecpri common type i= q_data pc_id is 0x2345 / end actions mark / rss / end=0D +=0D +2. create fdir rule::=0D +=0D + flow create 1 ingress pattern eth / ipv4 / udp / ecpri common type iq_= data pc_id is 0x2345 / end actions mark / rss / end=0D +=0D +3. send matched packets, check the packets are distributed by RSS with FDI= R matched ID=3D0x0.=0D + send unmatched packets, check the packets are distributed by RSS withou= t FDIR matched ID.=0D +=0D +4. verify rules can be listed and destroyed::=0D +=0D + testpmd> flow list 1=0D +=0D + check the rule listed.=0D + destroy the rule::=0D +=0D + testpmd> flow destroy 1 rule 1=0D +=0D +5. verify matched packets are distributed by RSS without FDIR matched ID.= =0D + check there is no fdir rule listed.=0D +=0D +subcase 6: mark=0D +---------------=0D +1. validate fdir rule, and no rule listed::=0D +=0D + flow validate 1 ingress pattern eth / ipv4 / udp / ecpri common type i= q_data pc_id is 0x2345 / end actions mark / end=0D +=0D +2. create fdir rule::=0D +=0D + flow create 1 ingress pattern eth / ipv4 / udp / ecpri common type iq_= data pc_id is 0x2345 / end actions mark / end=0D +=0D +3. send matched packets, check the packets are distributed by RSS with FDI= R matched ID=3D0x0.=0D + send unmatched packets, check the packets are distributed by RSS withou= t FDIR matched ID.=0D +=0D +4. verify rules can be listed and destroyed::=0D +=0D + testpmd> flow list 1=0D +=0D + check the rule listed.=0D + destroy the rule::=0D +=0D + testpmd> flow destroy 1 rule 1=0D +=0D +5. verify matched packets are distributed by RSS without FDIR matched ID.= =0D + check there is no fdir rule listed.=0D +=0D +=0D +Test case 14: ecpri fdir multirules=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +Add eCPRI port config in DCF::=0D +=0D + port config 0 udp_tunnel_port add ecpri 0x5123=0D +=0D +Enable RSS for eCPRI over MAC/UDP::=0D +=0D + flow create 1 ingress pattern eth / ecpri common type iq_data / end ac= tions rss types ecpri end key_len 0 queues end / end=0D + flow create 1 ingress pattern eth / ipv4 / udp / ecpri common type iq_= data / end actions rss types ecpri end key_len 0 queues end / end=0D + flow create 2 ingress pattern eth / ecpri common type iq_data / end ac= tions rss types ecpri end key_len 0 queues end / end=0D + flow create 2 ingress pattern eth / ipv4 / udp / ecpri common type iq_= data / end actions rss types ecpri end key_len 0 queues end / end=0D +=0D +1. create multi rules::=0D +=0D + flow create 1 ingress pattern eth / ipv4 / udp / ecpri common type iq_= data pc_id is 0x2345 / end actions rss queues 5 6 end / mark id 0 / end=0D + flow create 1 ingress pattern eth / ipv4 / udp / ecpri common type iq_= data pc_id is 0x2346 / end actions passthru / mark id 1 / end=0D + flow create 1 ingress pattern eth / ecpri common type iq_data pc_id is= 0x2345 / end actions drop / end=0D + flow create 1 ingress pattern eth / ecpri common type iq_data pc_id is= 0x2346 / end actions queue index 1 / mark id 2 / end=0D + flow create 2 ingress pattern eth / ecpri common type iq_data pc_id is= 0x2346 / end actions mark id 3 / end=0D + flow create 2 ingress pattern eth / ipv4 / udp / ecpri common type iq_= data pc_id is 0x2346 / end actions mark / rss / end=0D +=0D +2. send matched packets and unmatched packets::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x45')], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x46')], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:11", type=3D0xAEFE)/Raw('\x10\x00\x= 02\x24\x23\x45')], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:11", type=3D0xAEFE)/Raw('\x10\x00\x= 02\x24\x23\x46')], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:22", type=3D0xAEFE)/Raw('\x10\x00\x= 02\x24\x23\x45')], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:22", type=3D0xAEFE)/Raw('\x10\x00\x= 02\x24\x23\x46')], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:22")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x45')], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:22")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x46')], iface=3D"ens786f0")=0D +=0D +3. check results:=0D + pkt1 to queue 5 or 6 with mark id 0=0D + pkt2 is distributed by rss with mark id 1=0D + pkt3 drop=0D + pkt4 to queue 1 with mark id 2=0D + pkt5 is distributed by rss=0D + pkt6 is distributed by rss with mark id 3=0D + pkt7 is distributed by rss=0D + pkt8 is distributed by rss with mark id 0=0D +=0D +=0D +Test case 15: ecpri fdir negative case=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +1. create ecpri over IP/UDP fdir rule without setting DCF eCPRI port::=0D +=0D + testpmd> flow create 1 ingress pattern eth / ipv4 / udp / ecpri common= type iq_data pc_id is 0x2345 / end actions rss queues 5 6 end / mark id 0 = / end=0D + iavf_fdir_add(): Failed to add rule request due to no hw resource=0D + iavf_flow_create(): Failed to create flow=0D + port_flow_complain(): Caught PMD error type 2 (flow rule (handle)): Fa= iled to create parser engine.: Invalid argument=0D +=0D +2. check there is no rule listed.=0D +=0D +=0D +Test case 16: ecpri fdir when DCF reset=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +1. add eCPRI port config in DCF::=0D +=0D + port config 0 udp_tunnel_port add ecpri 0x5123=0D +=0D + create two fdir rules::=0D +=0D + flow create 1 ingress pattern eth / ipv4 / udp / ecpri common type iq_= data pc_id is 0x2345 / end actions queue index 1 / mark id 1 / end=0D + flow create 1 ingress pattern eth / ecpri common type iq_data pc_id is= 0x2345 / end actions queue index 2 / mark id 2 / end=0D +=0D +2. send packets::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x45')], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:11", type=3D0xAEFE)/Raw('\x10\x00\x= 02\x24\x23\x45')], iface=3D"ens786f0")=0D +=0D + check pkt1 is to queue 1 with mark id 1, pkt2 is to queue 2 with mark i= d 2=0D +=0D +3. reset DCF by set mac address::=0D +=0D + ip link set enp59s0f0 vf 0 mac 00:11:22:33:44:11=0D +=0D +4. send same packets, check pkt1 is distributed by rss without mark id, pk= t2 is to queue 2 with mark id 2=0D +=0D +5. quit testpmd and repeat step 1 and step 2, get same results.=0D +=0D +6. reset DCF by set trust off::=0D +=0D + ip link set enp59s0f0 vf 0 trust off=0D +=0D +7. send same packets check pkt1 is distributed by rss without mark id, pkt= 2 is to queue 2 with mark id 2.=0D +=0D +=0D +Test case 17: ecpri fdir when DCF exit=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +1. start testpmd with dcf mode on vf0::=0D +=0D + ./dpdk-testpmd -c 0xff -n 6 -a 0000:18:01.0,cap=3Ddcf --file-prefix=3D= vf0 -- -i=0D +=0D + add eCPRI port config in DCF::=0D +=0D + port config 0 udp_tunnel_port add ecpri 0x5123=0D +=0D +2. start testpmd with iavf mode on vf1 and vf2::=0D +=0D + ./dpdk-testpmd -c 0xff00 -n 6 -a 0000:18:01.1 -a 0000:18:01.2 --file-p= refix=3Dvf1 -- -i --rxq=3D16 --txq=3D16=0D +=0D + create two fdir rules::=0D +=0D + flow create 0 ingress pattern eth / ipv4 / udp / ecpri common type iq_= data pc_id is 0x2345 / end actions queue index 1 / mark id 1 / end=0D + flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is= 0x2345 / end actions queue index 2 / mark id 2 / end=0D +=0D +3. send packets::=0D +=0D + sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/UDP(dport=3D0x5123)/Raw('= \x10\x00\x02\x24\x23\x45')], iface=3D"ens786f0")=0D + sendp([Ether(dst=3D"00:11:22:33:44:11", type=3D0xAEFE)/Raw('\x10\x00\x= 02\x24\x23\x45')], iface=3D"ens786f0")=0D +=0D + check pkt1 is to queue 1 with mark id 1, pkt2 is to queue 2 with mark i= d 2=0D +=0D +4. quit dcf testpmd, send same packets,=0D + check pkt1 is distributed by rss without mark id, pkt2 is to queue 2 wi= th mark id 2.=0D --=20 2.25.1