From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id B9DE21B3CF for ; Wed, 18 Oct 2017 04:09:23 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Oct 2017 19:08:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,393,1503385200"; d="scan'208";a="324456175" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 17 Oct 2017 19:08:05 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 17 Oct 2017 19:08:05 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 17 Oct 2017 19:08:05 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.213]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.218]) with mapi id 14.03.0319.002; Wed, 18 Oct 2017 10:08:03 +0800 From: "Liu, Yong" To: "Peng, Yuan" , "dts@dpdk.org" CC: "Peng, Yuan" Thread-Topic: [dts] [PATCH] test_plans: add test plan of ixgbe_vf_get_extra_queue_information Thread-Index: AQHTQzsepYVektB3eU+OnhLwukc+Z6Lo5Ubg Date: Wed, 18 Oct 2017 02:08:03 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E62EF8620@SHSMSX103.ccr.corp.intel.com> References: <1507799985-5643-1-git-send-email-yuan.peng@intel.com> In-Reply-To: <1507799985-5643-1-git-send-email-yuan.peng@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.0.0.116 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] test_plans: add test plan of ixgbe_vf_get_extra_queue_information 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: Wed, 18 Oct 2017 02:09:24 -0000 Yuan,=20 Please add more background introduction in the header of test plan like wha= t kind of information is added. Thanks, Marvin > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of peng,yuan > Sent: Thursday, October 12, 2017 5:20 PM > To: dts@dpdk.org > Cc: Peng, Yuan > Subject: [dts] [PATCH] test_plans: add test plan of > ixgbe_vf_get_extra_queue_information >=20 > From: Peng Yuan >=20 > Signed-off-by: Peng Yuan >=20 > diff --git a/test_plans/ixgbe_vf_get_extra_queue_information_test_plan.rs= t > b/test_plans/ixgbe_vf_get_extra_queue_information_test_plan.rst > new file mode 100644 > index 0000000..c456050 > --- /dev/null > +++ b/test_plans/ixgbe_vf_get_extra_queue_information_test_plan.rst > @@ -0,0 +1,161 @@ > +.. Copyright (c) <2017>, 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 > +Improve ixgbe_get_vf_queue to include extra information > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > + > +Prerequisites > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. Hardware: > + Ixgbe > + connect tester to pf with cable. > + > +2. software: > + dpdk: http://dpdk.org/git/dpdk > + scapy: http://www.secdev.org/projects/scapy/ > + > +3. bind the pf to dpdk driver:: > + > + ./usertools/dpdk-devbind.py -b igb_uio 05:00.0 > + > + the mac address of 05:00.0 is 00:00:00:00:01:00 > + > +4. create 1 vf from pf:: > + > + echo 1 >/sys/bus/pci/devices/0000:05:00.0/max_vfs > + > +5. Detach VF from the host, bind them to pci-stub driver:: > + > + modprobe pci-stub > + echo "8086 10fb" > /sys/bus/pci/drivers/pci-stub/new_id > + echo "0000:05:10.0" > /sys/bus/pci/drivers/ixgbevf/unbind > + echo "0000:05:10.0" > /sys/bus/pci/drivers/pci-stub/bind > + > +6. Lauch the VM with the VF PCI passthrough:: > + > + taskset -c 2-5 qemu-system-x86_64 \ > + -enable-kvm -m 8192 -smp cores=3D4,sockets=3D1 -cpu host -name dpdk1= -vm1 > \ > + -drive file=3D/home/VM/centOS7_1.img \ > + -device pci-assign,host=3D05:10.0 \ > + -netdev tap,id=3Dipvm1,ifname=3Dtap3,script=3D/etc/qemu-ifup -device > rtl8139,netdev=3Dipvm1,id=3Dnet0,mac=3D00:00:00:00:00:01 \ > + -localtime -vnc :2 -daemonize > + > +7. login VM, get VF's mac adress is 2e:ae:7f:16:6f:e7 > + > +Test case 1: DPDK PF, kernel VF, enable DCB mode with TC=3D4 > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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 on PF:: > + > + ./x86_64-native-linuxapp-gcc/app/testpmd -c 1ffff -n 4 -- -i --rxq= =3D4 > --txq=3D4 --nb-cores=3D16 > + testpmd> port stop 0 > + testpmd> port config 0 dcb vt on 4 pfc off > + testpmd> port start 0 > + > +2. check if VF port is linked. if vf port is down, reload the ixgbevf > driver:: > + > + rmmod ixgbevf > + modprobe ixgbevf > + > + then you can see VF information in PF side:: > + > + PMD: VF 0: enabling multicast promiscuous > + PMD: VF 0: disabling multicast promiscuous > + > +3. check VF's queue number:: > + > + ethtool -S ens3 > + > + there is 1 tx queue and 4 rx queues which equals TC number. > + > +4. send packet from tester to VF:: > + > + pkt1 =3D Ether(dst=3D"2e:ae:7f:16:6f:e7", > src=3D"00:02:00:00:00:01")/Dot1Q(prio=3D0, vlan=3D0)/IP()/Raw('x'*20) > + pkt2 =3D Ether(dst=3D"2e:ae:7f:16:6f:e7", > src=3D"00:02:00:00:00:01")/Dot1Q(prio=3D1, vlan=3D0)/IP()/Raw('x'*20) > + pkt3 =3D Ether(dst=3D"2e:ae:7f:16:6f:e7", > src=3D"00:02:00:00:00:01")/Dot1Q(prio=3D2, vlan=3D0)/IP()/Raw('x'*20) > + pkt4 =3D Ether(dst=3D"2e:ae:7f:16:6f:e7", > src=3D"00:02:00:00:00:01")/Dot1Q(prio=3D3, vlan=3D0)/IP()/Raw('x'*20) > + pkt5 =3D Ether(dst=3D"2e:ae:7f:16:6f:e7", > src=3D"00:02:00:00:00:01")/Dot1Q(prio=3D4, vlan=3D0)/IP()/Raw('x'*20) > + pkt6 =3D Ether(dst=3D"2e:ae:7f:16:6f:e7", > src=3D"00:02:00:00:00:01")/Dot1Q(prio=3D5, vlan=3D0)/IP()/Raw('x'*20) > + pkt7 =3D Ether(dst=3D"2e:ae:7f:16:6f:e7", > src=3D"00:02:00:00:00:01")/Dot1Q(prio=3D6, vlan=3D0)/IP()/Raw('x'*20) > + pkt8 =3D Ether(dst=3D"2e:ae:7f:16:6f:e7", > src=3D"00:02:00:00:00:01")/Dot1Q(prio=3D7, vlan=3D0)/IP()/Raw('x'*20) > + pkt9 =3D Ether(dst=3D"2e:ae:7f:16:6f:e7", > src=3D"00:02:00:00:00:01")/Dot1Q(prio=3D0, vlan=3D1)/IP()/Raw('x'*20) > + pkt10 =3D Ether(dst=3D"2e:ae:7f:16:6f:e7", > src=3D"00:02:00:00:00:01")/IP()/Raw('x'*20) > + > +5. check the packets with different User Priority mapping to TC:: > + > + ethtool -S ens3 > + > + check the NIC statistics to check the packets increasing of different > rx queue. > + pkt1 to queue 0, pkt2 to queue 1, pkt3 to queue 2, pkt4 to queue 3, > + pkt5-pkt8 to queue 0, VF can't get pkt9, pkt10 to queue 0. > + > +Test case 2: DPDK PF, kernel VF, disable DCB mode > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=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 on PF:: > + > + ./x86_64-native-linuxapp-gcc/app/testpmd -c 1ffff -n 4 -- -i --nb- > cores=3D16 > + > +2. check if VF port is linked. if vf port is down, reload the ixgbevf > driver:: > + > + rmmod ixgbevf > + modprobe ixgbevf > + > + then you can see VF information in PF side:: > + > + PMD: VF 0: enabling multicast promiscuous > + PMD: VF 0: disabling multicast promiscuous > + > +3. set vlan insert to vf:: > + > + set vf vlan insert 0 0 1 > + > +4. check VF's queue number:: > + > + ethtool -S ens3 > + > + there is 2 tx queues and 2 rx queues as default number. > + > +4. send packet from tester to VF:: > + > + pkt1 =3D Ether(dst=3D"2e:ae:7f:16:6f:e7", > src=3D"00:02:00:00:00:01")/IP()/Raw('x'*20) > + pkt2 =3D Ether(dst=3D"2e:ae:7f:16:6f:e7", > src=3D"00:02:00:00:00:01")/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.3")/UDP(sport=3D23,dport=3D24)/Raw('x'*20) > + > +5. check the NIC statistics to verify the different packets mapping to > + different queues according RSS rule:: > + > + ethtool -S ens3 > + > + send 100 pkt1 to VF, all the packets received by queue 0, > + then, send 100 pkt2 to VF, all the packets received by queue 1. > -- > 2.5.0