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 78761A04F7; Fri, 20 Dec 2019 09:13:00 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 483821252; Fri, 20 Dec 2019 09:13:00 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id ABE33F90 for ; Fri, 20 Dec 2019 09:12:58 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Dec 2019 00:12:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,335,1571727600"; d="scan'208";a="416462881" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga005.fm.intel.com with ESMTP; 20 Dec 2019 00:12:57 -0800 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 20 Dec 2019 00:12:57 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 20 Dec 2019 00:12:56 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.19]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.214]) with mapi id 14.03.0439.000; Fri, 20 Dec 2019 16:12:55 +0800 From: "Tu, Lijuan" To: "Wang, Yinan" , "dts@dpdk.org" CC: "Wang, Yinan" Thread-Topic: [dts] [PATCH v1] test_plans: add test cases for af_xdp Thread-Index: AQHVts6VG7JbhshPVEKO+aPxTu++b6fCrOqw Date: Fri, 20 Dec 2019 08:12:54 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB8A271@SHSMSX101.ccr.corp.intel.com> References: <20191219173904.76928-1-yinan.wang@intel.com> In-Reply-To: <20191219173904.76928-1-yinan.wang@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 test cases for af_xdp 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 > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Yinan > Sent: Friday, December 20, 2019 1:39 AM > To: dts@dpdk.org > Cc: Wang, Yinan > Subject: [dts] [PATCH v1] test_plans: add test cases for af_xdp >=20 > From: Wang Yinan >=20 > Signed-off-by: Wang Yinan > --- > test_plans/af_xdp_2_test_plan.rst | 217 > ++++++++++++++++++++++++++++++ > 1 file changed, 217 insertions(+) > create mode 100644 test_plans/af_xdp_2_test_plan.rst >=20 > diff --git a/test_plans/af_xdp_2_test_plan.rst > b/test_plans/af_xdp_2_test_plan.rst > new file mode 100644 > index 0000000..01fae74 > --- /dev/null > +++ b/test_plans/af_xdp_2_test_plan.rst > @@ -0,0 +1,217 @@ > +.. Copyright (c) <2019>, 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 > +DPDK PMD for AF_XDP 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 > + > +Description > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +AF_XDP is a proposed faster version of AF_PACKET interface in Linux. > +This test plan is to analysis the performance of DPDK PMD for AF_XDP. > + > +Prerequisites > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. Hardware:: > + > + I40e 40G*1 > + enp26s0f1 <---> IXIA_port_0 > + > +2. The NIC is located on the socket 1, so we define the cores of socket = 1. > + > +3. Clone kernel branch master v5.4, make sure you turn on XDP > socket/BPF/I40E before compiling kernel:: > + > + make menuconfig > + Networking support --> > + Networking options --> > + [ * ] XDP sockets > + > +4. Build kernel and replace your host kernel with it:: > + > + cd bpf-next > + sh -c 'yes "" | make oldconfig' > + make -j64 > + make modules_install install > + make install > + make headers_install > + cd tools/lib/bpf && make clean && make install && make install_heade= rs > && cd - > + make headers_install ARCH=3Dx86_64 INSTALL_HDR_PATH=3D/usr > + grub-mkconfig -o /boot/grub/grub.cfg > + reboot > + > +5. Explicitly enable AF_XDP pmd by adding below line to > config/common_linux, then build DPDK:: > + > + CONFIG_RTE_LIBRTE_PMD_AF_XDP=3Dy > + make -j 110 install T=3Dx86_64-native-linuxapp-gcc > + > +6. Involve lib:: > + > + export LD_LIBRARY_PATH=3D/home/linux/tools/lib/bpf:$LD_LIBRARY_PATH > + > +Test case 1: single port test with PMD core and IRQ core are pinned to > +separate cores > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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. Start the testpmd:: > + > + ethtool -L enp26s0f1 combined 1 > + ./x86_64-native-linuxapp-gcc/app/testpmd -l 1-2 -n 4 --vdev > + net_af_xdp0,iface=3Denp26s0f1,start_queue=3D0,queue_count=3D1 > + --log-level=3Dpmd.net.af_xdp:8 -- -i --nb-cores=3D1 --rxq=3D1 --txq=3D= 1 > + --port-topology=3Dloop > + > +2. Assign the kernel core:: > + > + ./set_irq_affinity 3 enp26s0f1 #PMD and IRQs pinned to seper= ate > cores > + ./set_irq_affinity 2 enp26s0f1 #PMD and IRQs pinned to same = cores > + > +3. Send packets by packet generator with different packet size, from 64 > bytes to 1518 bytes, check the throughput. > + > +Test case 2: two ports test with PMD cores and IRQ cores are pinned to > +separate cores > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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. Start the testpmd:: > + > + ethtool -L enp26s0f0 combined 1 > + ethtool -L enp26s0f1 combined 1 > + ./x86_64-native-linuxapp-gcc/app/testpmd -l 1-3 --no-pci -n 4 \ > + --vdev net_af_xdp0,iface=3Denp26s0f0 --vdev net_af_xdp1,iface=3Denp2= 6s0f1 > \ > + --log-level=3Dpmd.net.af_xdp:8 -- -i --auto-start --nb-cores=3D2 > + --rxq=3D1 --txq=3D1 --port-topology=3Dloop > + > +2. Assign the kernel cores:: > + > + ./set_irq_affinity 4 enp26s0f0 > + ./set_irq_affinity 5 enp26s0f1 > + > +3. Send packets by packet generator to port0 and port1 with different > packet size, from 64 bytes to 1518 bytes, check the throughput at port0 a= nd > port1. > + > +Test case 3: multi-queue test with PMD cores and IRQ cores are pinned > +to separate cores > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =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. Set hardware queues:: > + > + ethtool -L enp26s0f1 combined 2 > + > +2. Start the testpmd with two queues:: > + > + ./x86_64-native-linuxapp-gcc/app/testpmd -l 1-3 -n 6 --no-pci \ > + --vdev net_af_xdp0,iface=3Denp26s0f1,start_queue=3D0,queue_count= =3D2 \ > + -- -i --auto-start --nb-cores=3D2 --rxq=3D2 --txq=3D2 > + --port-topology=3Dloop > + > +3. Assign the kernel cores:: > + > + ./set_irq_affinity 4-5 enp26s0f1 > + > +4. Send packets with different dst IP address by packet generator with > different packet size from 64 bytes to 1518 bytes, check the throughput a= nd > ensure the packets were distributed to the two queues. > + > +Test case 4: two ports test with PMD cores and IRQ cores pinned to same > +cores > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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. Start the testpmd:: > + > + ethtool -L enp26s0f0 combined 1 > + ethtool -L enp26s0f1 combined 1 > + ./x86_64-native-linuxapp-gcc/app/testpmd -l 29,30-31 --no-pci -n 4 \ > + --vdev net_af_xdp0,iface=3Denp26s0f0 --vdev net_af_xdp1,iface=3Denp2= 6s0f1 > \ > + -- -i --auto-start --nb-cores=3D2 --rxq=3D1 --txq=3D1 > + --port-topology=3Dloop > + > +2. Assign the kernel cores:: > + > + ./set_irq_affinity 30 enp26s0f0 > + ./set_irq_affinity 31 enp26s0f1 > + > +3. Send packets by packet generator to port0 and port1 with different > packet size, from 64 bytes to 1518 bytes, check the throughput at port0 a= nd > port1. > + > +Test case 5: multi-queue test with PMD cores and IRQ cores pinned to > +same cores > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=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. Set hardware queues:: > + > + ethtool -L enp26s0f1 combined 2 > + > +2. Start the testpmd with two queues:: > + > + ./testpmd -l 29,30-31 -n 6 --no-pci \ > + --vdev net_af_xdp0,iface=3Denp26s0f1,start_queue=3D0,queue_count= =3D2 \ > + -- -i --auto-start --nb-cores=3D2 --rxq=3D2 --txq=3D2 > + --port-topology=3Dloop > + > +3. Assign the kernel cores:: > + > + ./set_irq_affinity 30-31 enp26s0f1 > + > +4. Send packets with different dst IP address by packet generator with > different packet size from 64 bytes to 1518 bytes, check the throughput a= nd > ensure packets were distributed to the two queues. > + > +Test case 6: one port with two vdev and single queue 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=3D=3D=3D=3D=3D=3D=3D=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. Set hardware queues:: > + > + ethtool -L enp26s0f1 combined 2 > + > +2. Start the testpmd:: > + > + ./x86_64-native-linuxapp-gcc/app/testpmd -l 1-3 --no-pci -n 4 \ > + --vdev net_af_xdp0,iface=3Denp26s0f1,start_queue=3D0,queue_count=3D1= \ > + --vdev net_af_xdp1,iface=3Denp26s0f1,start_queue=3D1,queue_count=3D1= \ > + -- -i --nb-cores=3D2 --rxq=3D1 --txq=3D1 --port-topology=3Dloop > + > +3. Assign the kernel core:: > + > + ./set_irq_affinity 4-5 enp26s0f1 #PMD and IRQs pinned to seperate > cores > + ./set_irq_affinity 2-3 enp26s0f1 #PMD and IRQs pinned to same cor= es > + > +4. Set flow director rules in kernel, mapping queue0 and queue1 of the p= ort:: > + > + ethtool -N enp26s0f1 rx-flow-hash udp4 fn > + ethtool -N enp26s0f1 flow-type udp4 src-port 4242 dst-port 4242 acti= on 1 > + ethtool -N enp26s0f1 flow-type udp4 src-port 4243 dst-port 4243 > + action 0 > + > +5. Send packets match the rules to port, check the throughput at queue0 > and queue1. > + > +Test case 7: one port with two vdev and multi-queues 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=3D=3D=3D=3D=3D=3D=3D=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. Set hardware queues:: > + > + ethtool -L enp26s0f1 combined 8 > + > +2. Start the testpmd:: > + > + ./x86_64-native-linuxapp-gcc/app/testpmd -l 1-9 --no-pci -n 6 \ > + --vdev net_af_xdp0,iface=3Denp26s0f1,start_queue=3D0,queue_count=3D4= \ > + --vdev net_af_xdp1,iface=3Denp26s0f1,start_queue=3D4,queue_count=3D4= --log- > level=3Dpmd.net.af_xdp:8 \ > + -- -i --rss-ip --nb-cores=3D8 --rxq=3D4 --txq=3D4 --port-topology=3D= loop > + > +3. Assign the kernel core:: > + > + ./set_irq_affinity 10-17 enp26s0f1 #PMD and IRQs pinned to sepera= te > cores > + ./set_irq_affinity 2-9 enp26s0f1 #PMD and IRQs pinned to same cor= es > + > +4. Send random ip packets , check the packets were distributed to queue0= ~ > queue7. > \ No newline at end of file > -- > 2.17.1