From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 4E3768E6A for ; Thu, 14 Jan 2016 04:36:23 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP; 13 Jan 2016 19:36:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,292,1449561600"; d="scan'208";a="29039352" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 13 Jan 2016 19:36:22 -0800 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 13 Jan 2016 19:36:22 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 13 Jan 2016 19:36:21 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.172]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.209]) with mapi id 14.03.0248.002; Thu, 14 Jan 2016 11:36:20 +0800 From: "Pei, Yulong" To: "Xu, HuilongX" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH V1 1/3] add vf rss test plan Thread-Index: AQHRTSgjmfvgMF8KRUK7oz2Z8Uq+Vp74+8eQ//+eKYCAAbx6kA== Date: Thu, 14 Jan 2016 03:36:19 +0000 Message-ID: <188971FCDA171749BED5DA74ABF3E6F0035281C6@shsmsx102.ccr.corp.intel.com> References: <1452595994-16505-1-git-send-email-huilongx.xu@intel.com> <188971FCDA171749BED5DA74ABF3E6F003521CDD@shsmsx102.ccr.corp.intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiN2RjOGI3N2UtYjRmNi00NDFkLTg1NmMtZjAwYmYwY2FmMDU0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjQuMTAuMTkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiNFhSWGxHbW9ZbnFaYW5pXC8xbTI2VDh1d0xmbURuV3phRm9lTkVZcjBiZVE9In0= x-ctpclassification: CTP_IC 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 1/3] add vf rss test plan 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: , X-List-Received-Date: Thu, 14 Jan 2016 03:36:24 -0000 In your test plan: > +#2. A hash calculation is performed. The Fortville supports four=20 > +hash > function: > +Toeplitz, simple XOR and their Symmetric RSS. Should be three. > +#3. The seven LSBs of the hash result are used as an index into a > +128/512 entry 'redirection table'. seven LSBs also not correct for Fortville and Fortville VF > +2x Intel? 82599 (Niantic) NICs (2x 10GbE full duplex optical ports=20 > +per > +NIC) 1x Fortville_eagle NIC (4x 10G) 1x Fortville_spirit NIC (2x 40G)=20 > +2x Fortville_spirit_single NIC (1x 40G) > + > +The one port of the 82599 connect to the Fortville_eagle; The one=20 > +port of Fortville_spirit connect to Fortville_spirit_single. > +The three kinds of NICs are the target NICs. the connected NICs can=20 > +send packets to these three NICs using scapy. > + We come to agreement to simply it. Best Regards Yulong Pei -----Original Message----- From: Xu, HuilongX=20 Sent: Wednesday, January 13, 2016 4:34 PM To: Pei, Yulong ; dts@dpdk.org Subject: RE: [dts] [PATCH V1 1/3] add vf rss test plan Hi yulong, Which changed loss in last check by telephone? > -----Original Message----- > From: Pei, Yulong > Sent: Wednesday, January 13, 2016 2:25 PM > To: Xu, HuilongX; dts@dpdk.org > Subject: RE: [dts] [PATCH V1 1/3] add vf rss test plan >=20 > Hi Huilong, >=20 > It seems that you also did not change the plan according to our=20 > discussion by telephone. >=20 > Best Regards > Yulong Pei >=20 > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xu,huilong > Sent: Tuesday, January 12, 2016 6:53 PM > To: dts@dpdk.org > Subject: [dts] [PATCH V1 1/3] add vf rss test plan >=20 > Signed-off-by: xu,huilong > --- > test_plans/vf_rss_test_plan.rst | 182 > ++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 182 insertions(+) > create mode 100644 test_plans/vf_rss_test_plan.rst >=20 > diff --git a/test_plans/vf_rss_test_plan.rst=20 > b/test_plans/vf_rss_test_plan.rst new file mode 100644 index > 0000000..f832924 > --- /dev/null > +++ b/test_plans/vf_rss_test_plan.rst > @@ -0,0 +1,182 @@ > +.. Copyright (c) <2016>, 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=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +Fortville RSS full support - Support configuring hash functions=20 > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +This document provides test plan for testing the function of Fortville: > +Support configuring hash functions. > + > +Prerequisites > +------------- > + > +2x Intel? 82599 (Niantic) NICs (2x 10GbE full duplex optical ports=20 > +per > +NIC) 1x Fortville_eagle NIC (4x 10G) 1x Fortville_spirit NIC (2x 40G)=20 > +2x Fortville_spirit_single NIC (1x 40G) > + > +The one port of the 82599 connect to the Fortville_eagle; The one=20 > +port of Fortville_spirit connect to Fortville_spirit_single. > +The three kinds of NICs are the target NICs. the connected NICs can=20 > +send packets to these three NICs using scapy. > + > +Network Traffic > +--------------- > + > +The RSS feature is designed to improve networking performance by load=20 > +balancing the packets received from a NIC port to multiple NIC RX=20 > +queues, with each queue handled by a different logical core. > + > +#1. The receive packet is parsed into the header fields used by the=20 > +hash operation (such as IP addresses, TCP port, etc.) > + > +#2. A hash calculation is performed. The Fortville supports four=20 > +hash > function: > +Toeplitz, simple XOR and their Symmetric RSS. > + > +#3. The seven LSBs of the hash result are used as an index into a > +128/512 entry 'redirection table'. > + > +The RSS RETA update feature is designed to make RSS more flexible by=20 > +allowing users to define the correspondence between the seven LSBs of=20 > +hash result and the queue id(RSS output index) by themself. > + > + > +Test Case: test_rss_hash > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +The following RX Ports/Queues configurations have to be benchmarked: > + > +- 1 RX port / 4 RX queues (1P/4Q) > + > + > +Testpmd configuration - 4 RX/TX queues per port=20 > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > + > +:: > + > + testpmd -c 1f -n 3 -- -i --rxq=3D4 --txq=3D4 > + > +Testpmd Configuration Options > +----------------------------- > + > +By default, a single logical core runs the test. > +The CPU IDs and the number of logical cores running the test in=20 > +parallel can be manually set with the ``set corelist X,Y`` and the=20 > +``set nbcore N`` interactive commands of the ``testpmd`` application. > +#1. got the pci device id of DUT, for example, > + > +./dpdk_nic_bind.py --st > + > +0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259f0=20 > +drv=3Di40e unused=3D > +0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259f1=20 > +drv=3Di40e unused=3D > + > +#2. create 2 VFs from 2 PFs, > + > +echo 1 > /sys/bus/pci/devices/0000\:81\:00.0/sriov_numvfs > +echo 1 > /sys/bus/pci/devices/0000\:81\:00.1/sriov_numvfs > +./dpdk_nic_bind.py --st > + > +0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259f0=20 > +drv=3Di40e unused=3D > +0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259f1=20 > +drv=3Di40e unused=3D > +0000:81:02.0 'XL710/X710 Virtual Function' unused=3D > +0000:81:0a.0 'XL710/X710 Virtual Function' unused=3D > + > +#3. detach VFs from the host, bind them to pci-stub driver, > + > +/sbin/modprobe pci-stub > + > +using `lspci -nn|grep -i ethernet` got VF device id, for example=20 > +"8086 154c", > + > +echo "8086 154c" > /sys/bus/pci/drivers/pci-stub/new_id > +echo 0000:81:02.0 > /sys/bus/pci/devices/0000:08:02.0/driver/unbind > +echo 0000:81:02.0 > /sys/bus/pci/drivers/pci-stub/bind > + > +echo "8086 154c" > /sys/bus/pci/drivers/pci-stub/new_id > +echo 0000:81:0a.0 > /sys/bus/pci/devices/0000:08:0a.0/driver/unbind > +echo 0000:81:0a.0 > /sys/bus/pci/drivers/pci-stub/bind > + > + or using the following more easy way, > + > + virsh nodedev-detach pci_0000_81_02_0; virsh nodedev-detach=20 > + pci_0000_81_0a_0; > + > + ./dpdk_nic_bind.py --st > + > + 0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259f0=20 > + drv=3Di40e unused=3D > + 0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259f1=20 > + drv=3Di40e unused=3D > + 0000:81:02.0 'XL710/X710 Virtual Function' if=3D drv=3Dpci-stub unused= =3D > + 0000:81:0a.0 'XL710/X710 Virtual Function' if=3D drv=3Dpci-stub unused= =3D > + > + it can be seen that VFs 81:02.0 & 81:0a.0 's drv is pci-stub. > + > +#4. passthrough VFs 81:02.0 & 81:0a.0 to vm0, and start vm0, > + > + /usr/bin/qemu-system-x86_64 -name vm0 -enable-kvm \ -cpu host=20 > + -smp > + 4 -m 2048 -drive file=3D/home/image/sriov-fc20-1.img -vnc :1 \ =20 > + -device > + pci-assign,host=3D81:02.0,id=3Dpt_0 \ -device > + pci-assign,host=3D81:0a.0,id=3Dpt_1 > + > +#5. login vm0, got VFs pci device id in vm0, assume they are 00:06.0=20 > +& 00:07.0, bind them to igb_uio driver, and then start testpmd, set=20 > +it in mac forward mode, > + > +./tools/dpdk_nic_bind.py --bind=3Digb_uio 00:06.0 00:07.0 > + > +#6. Reta Configuration. 128 reta entries configuration:: > + > + testpmd command: port config 0 rss reta (hash_index,queue_id) > + > +#7. PMD fwd only receive the packets:: > + > + testpmd command: set fwd rxonly > + > +#8. rss recived package type configuration two received packet types > configuration:: > + > + testpmd command: port config 0 rss ip/udp/tcp > + > +#9. verbose configuration:: > + > + testpmd command: set verbose 8 > + > +#10. start packet receive:: > + > + testpmd command: start > +#11. send packet and check rx port received packet by different queue. > + different hash type send different packet, example hash type is ip,=20 > +packet src and dts ip not different > + sendp([Ether(dst=3D"90:e2:ba:36:99:3c")/IP(src=3D"192.168.0.4", > dst=3D"192.168.0.5")], iface=3D"eth3") > + sendp([Ether(dst=3D"90:e2:ba:36:99:3c")/IP(src=3D"192.168.0.5", > dst=3D"192.168.0.4")], iface=3D"eth3") > +Test Case: test_reta > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + this case test hash reta table, the test steps same with=20 > +test_rss_hash except config hash reta table > +#1 before send packet, config hash reta,512(niantic nic have 128=20 > +reta) > reta entries configuration:: > + > + testpmd command: port config 0 rss reta (hash_index,queue_id) > -- > 1.9.3