From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 8FBB42EDA for ; Tue, 12 Jan 2016 09:10:52 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP; 12 Jan 2016 00:10:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,556,1444719600"; d="scan'208";a="725210749" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga003.jf.intel.com with ESMTP; 12 Jan 2016 00:10:31 -0800 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 12 Jan 2016 00:10:31 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 12 Jan 2016 00:10:31 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.133]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.220]) with mapi id 14.03.0248.002; Tue, 12 Jan 2016 16:10:24 +0800 From: "Pei, Yulong" To: "Fu, JingguoX" , "dts@dpdk.org" Thread-Topic: [DTS][PATCH V1 2/3] virt: vf to vf nic bridge test plan Thread-Index: AQHRSe7gmYAt3plwukqFv7r9r7CPlJ73jXJg Date: Tue, 12 Jan 2016 08:10:24 +0000 Message-ID: <188971FCDA171749BED5DA74ABF3E6F0035219E2@shsmsx102.ccr.corp.intel.com> References: <1452241777-29665-1-git-send-email-jingguox.fu@intel.com> <1452241777-29665-2-git-send-email-jingguox.fu@intel.com> In-Reply-To: <1452241777-29665-2-git-send-email-jingguox.fu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTAyNjRhNzAtNTNlMS00ODRiLThkNzUtMzY0NzNlODVjNTZmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjQuMTAuMTkiLCJUcnVzdGVkTGFiZWxIYXNoIjoieVpKV3pxQUFnSytoZDZkaGdIb3dhWjVuVjkwaFBGTDJVWWxqQVNrQXBWbz0ifQ== 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] [DTS][PATCH V1 2/3] virt: vf to vf nic bridge 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: Tue, 12 Jan 2016 08:10:53 -0000 One comment about the test plan, can we verify if recevice_pkts =3D=3D sen= d_pkts ? Best Regards Yulong Pei -----Original Message----- From: Fu, JingguoX=20 Sent: Friday, January 8, 2016 4:30 PM To: dts@dpdk.org Cc: Liu, Yong ; Xu, Qian Q ; Pei, = Yulong ; Xu, HuilongX ; lijuan= x.tu@intel.com; Fu, JingguoX Subject: [DTS][PATCH V1 2/3] virt: vf to vf nic bridge test plan Signed-off-by: Jingguo Fu --- test_plans/vf_to_vf_nic_bridge_test_plan.rst | 181 +++++++++++++++++++++++= ++++ 1 file changed, 181 insertions(+) create mode 100644 test_plans/vf_to_vf_nic_bridge_test_plan.rst diff --git a/test_plans/vf_to_vf_nic_bridge_test_plan.rst b/test_plans/vf_t= o_vf_nic_bridge_test_plan.rst new file mode 100644 index 0000000..8237694 --- /dev/null +++ b/test_plans/vf_to_vf_nic_bridge_test_plan.rst @@ -0,0 +1,181 @@ +.. Copyright (c) <2015>, 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. + +VF to VF Bridge testplan +=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 test suite aims to validate the bridge function on physical=20 +functional for virtual functional to virtual functional communication.=20 +Cases of the suite based on the vm to vm test scenario, echo vm needs=20 +on vf, and both of the vfs generated from the same pf port. + +Prerequisites:=20 +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +On host: + + Hugepages: at least 10 G hugepages, 6G(for vm on which run=20 + pktgen as stream source end) + 2G(for vm on which run testpmd as=20 + receive end) + 2G(for host used) + + Guset: two img with os for kvm qemu + + NIC: one pf port + + pktgen-dpdk: need a pktgen-dpdk tarball under $DTS/dep/, as=20 + it's named: pktgen-dpdk.tar.gz + +On Guest: + + Stream Source end: scapy pcpay and essential tarballs for=20 + compile pktgen-dpdk tools + + +Set up basic virtual scenario: +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D + +step 1: generate two vfs on the target pf port (i.e. 0000:85:00.0): + + echo 2 > /sys/bus/pci/devices/0000\:85\:00.0/sriov_numvfs + =20 +step 2: bind the two vfs to pci-stub: + + echo "8086 10ed" > /sys/bus/pci/drivers/pci-stub/new_id + echo 0000:85:10.0 > /sys/bus/pci/devices/0000:85:10.0/driver/unbin= d + echo 0000:85:10.0 > /sys/bus/pci/drivers/pci-stub/bind + echo 0000:85:10.2 > /sys/bus/pci/devices/0000:85:10.2/driver/unbin= d + echo 0000:85:10.2 > /sys/bus/pci/drivers/pci-stub/bind + +step 3: passthrough vf 0 to vm0 and start vm0: + + taskset -c 20,21,22,23 /usr/local/qemu-2.4.0/x86_64-softmmu/qemu-s= ystem-x86_64 \ + -name vm0 -enable-kvm -chardev socket,path=3D/tmp/vm0_qga0.sock,se= rver,nowait,id=3Dvm0_qga0 \ + -device virtio-serial -device virtserialport,chardev=3Dvm0_qga0,na= me=3Dorg.qemu.guest_agent.0 \ + -daemonize -monitor unix:/tmp/vm0_monitor.sock,server,nowait \ + -net nic,vlan=3D0,macaddr=3D00:00:00:e2:4f:fb,addr=3D1f \ + -net user,vlan=3D0,hostfwd=3Dtcp:10.239.128.125:6064-:22 \ + -device pci-assign,host=3D85:10.0,id=3Dpt_0 -cpu host -smp 4 -m 61= 44 \ + -object memory-backend-file,id=3Dmem,size=3D6144M,mem-path=3D/mnt/= huge,share=3Don \ + -numa node,memdev=3Dmem -mem-prealloc -drive=20 + file=3D/home/img/vm0.img -vnc :4 + +step 4: passthrough vf 1 to vm1 and start vm1: + + taskset -c 30,31,32,33 /usr/local/qemu-2.4.0/x86_64-softmmu/qemu-s= ystem-x86_64 \ + -name vm1 -enable-kvm -chardev socket,path=3D/tmp/vm1_qga0.sock,se= rver,nowait,id=3Dvm1_qga0 \ + -device virtio-serial -device virtserialport,chardev=3Dvm1_qga0,na= me=3Dorg.qemu.guest_agent.0 \ + -daemonize -monitor unix:/tmp/vm1_monitor.sock,server,nowait \ + -net nic,vlan=3D0,macaddr=3D00:00:00:7b:d5:cb,addr=3D1f \ + -net user,vlan=3D0,hostfwd=3Dtcp:10.239.128.125:6126-:22 \ + -device pci-assign,host=3D85:10.2,id=3Dpt_0 -cpu host -smp 4 -m 61= 44 \ + -object memory-backend-file,id=3Dmem,size=3D6144M,mem-path=3D/mnt/= huge,share=3Don \ + -numa node,memdev=3Dmem -mem-prealloc -drive=20 + file=3D/home/img/vm1.img -vnc :5 + + +Test Case1: test_2vf_d2d_pktgen_stream +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +both vfs in the two vms using the dpdk driver, send stream from vf1 in=20 +vm1 by dpdk pktgen to vf in vm0, and verify the vf on vm0 can receive stre= am. + +step 1: run testpmd on vm0: + + ./x86_64-native-linuxapp-gcc/app/testpmd -c 0x7 -n 1 -- -i =20 + --txqflags=3D0 + +step 2: set rxonly and start on vm0: + + set fwd rxonly + start + +step 3: prepare pktgen-dpdk tarball and compile on vm1: + + scp pktgen-dpdk.tar.gz to vm1 + tar zxvf pktgen-dpdk.tar.gz + cd ./pktgen-dpdk + make +step 4: generate pcap file on vm1: + + Context: [Ether(dst=3D"52:54:12:45:67:10",=20 + src=3D"52:54:12:45:67:11")/IP()/Raw(load=3D'X'\*46)] + +step 5: send stream by pkt-gen on vm1: + + ./app/app/x86_64-native-linuxapp-gcc/app/pktgen -c 0xf -n 2=20 + --proc-type auto -- -P -T -m '1.0' -s P:flow.pcap + =20 +step 6: verify vf 0 receive status on vm0: Rx-packets > 0 + + show port stats 0 + ######################## NIC statistics for port 0 ##############= ########## + RX-packets: 735411719 RX-missed: 0 RX-bytes: 5883293856= 0 + RX-errors: 0 + RX-nombuf: 0 =20 + TX-packets: 0 TX-errors: 0 TX-bytes: 0 + ##################################################################= ########## =20 + +Test Case2: test_2vf_d2k_pktgen_stream +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +step 1: bind vf to kernel driver on vm0 + +step 2: start up vf interface and using tcpdump to capature received=20 +packets + +step 3: prepare pktgen-dpdk tarball and compile on vm1: + + scp pktgen-dpdk.tar.gz to vm1 + tar zxvf pktgen-dpdk.tar.gz + cd ./pktgen-dpdk + make +step 4: generate pcap file on vm1: + + Context: [Ether(dst=3D"52:54:12:45:67:10",=20 + src=3D"52:54:12:45:67:11")/IP()/Raw(load=3D'X'\*46)] + +step 5: send stream by pkt-gen on vm1: + + ./app/app/x86_64-native-linuxapp-gcc/app/pktgen -c 0xf -n 2=20 + --proc-type auto -- -P -T -m '1.0' -s P:flow.pcap + +step 6: verify vf 0 receive status on vm0: + +Test Case3: test_2vf_k2d_scapy_stream +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +step 1: run testpmd on vm0: + + ./x86_64-native-linuxapp-gcc/app/testpmd -c 0x7 -n 1 -- -i =20 + --txqflags=3D0 + +step 2: set rxonly and start on vm0: + + set fwd rxonly + start + +step 3: bind vf to kernel driver on vm0 + +step 4: using scapy to send packets + +step 5:verify vf 0 receive status on vm0: Rx-packets > 0 + + show port stats 0 + ######################## NIC statistics for port 0 ##############= ########## + RX-packets: 100 RX-missed: 0 RX-bytes: 6000 + RX-errors: 0 + RX-nombuf: 0 + TX-packets: 0 TX-errors: 0 TX-bytes: 0 + =20 + ###################################################################### + ###### -- 2.1.0