From: "Fu, JingguoX" <jingguox.fu@intel.com>
To: "Pei, Yulong" <yulong.pei@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "Fu, JingguoX" <jingguox.fu@intel.com>
Subject: Re: [dts] [DTS][PATCH V1 2/3] virt: vf to vf nic bridge test plan
Date: Mon, 1 Feb 2016 06:35:26 +0000 [thread overview]
Message-ID: <6BD6202160B55B409D423293115822622BA9C9C0@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <188971FCDA171749BED5DA74ABF3E6F0035219E2@shsmsx102.ccr.corp.intel.com>
Update in v3 patch sutie
Thanks,
Jingguo Fu
-----Original Message-----
From: Pei, Yulong
Sent: Tuesday, January 12, 2016 4:10 PM
To: Fu, JingguoX; dts@dpdk.org
Cc: Liu, Yong; Xu, Qian Q; Xu, HuilongX
Subject: RE: [DTS][PATCH V1 2/3] virt: vf to vf nic bridge test plan
One comment about the test plan, can we verify if recevice_pkts == send_pkts ?
Best Regards
Yulong Pei
-----Original Message-----
From: Fu, JingguoX
Sent: Friday, January 8, 2016 4:30 PM
To: dts@dpdk.org
Cc: Liu, Yong <yong.liu@intel.com>; Xu, Qian Q <qian.q.xu@intel.com>; Pei, Yulong <yulong.pei@intel.com>; Xu, HuilongX <huilongx.xu@intel.com>; lijuanx.tu@intel.com; Fu, JingguoX <jingguox.fu@intel.com>
Subject: [DTS][PATCH V1 2/3] virt: vf to vf nic bridge test plan
Signed-off-by: Jingguo Fu <jingguox.fu@intel.com>
---
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_to_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
+========================
+This test suite aims to validate the bridge function on physical
+functional for virtual functional to virtual functional communication.
+Cases of the suite based on the vm to vm test scenario, echo vm needs
+on vf, and both of the vfs generated from the same pf port.
+
+Prerequisites:
+==============
+
+On host:
+
+ Hugepages: at least 10 G hugepages, 6G(for vm on which run
+ pktgen as stream source end) + 2G(for vm on which run testpmd as
+ 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
+ it's named: pktgen-dpdk.tar.gz
+
+On Guest:
+
+ Stream Source end: scapy pcpay and essential tarballs for
+ compile pktgen-dpdk tools
+
+
+Set up basic virtual scenario:
+==============================
+
+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
+
+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/unbind
+ 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/unbind
+ 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-system-x86_64 \
+ -name vm0 -enable-kvm -chardev socket,path=/tmp/vm0_qga0.sock,server,nowait,id=vm0_qga0 \
+ -device virtio-serial -device virtserialport,chardev=vm0_qga0,name=org.qemu.guest_agent.0 \
+ -daemonize -monitor unix:/tmp/vm0_monitor.sock,server,nowait \
+ -net nic,vlan=0,macaddr=00:00:00:e2:4f:fb,addr=1f \
+ -net user,vlan=0,hostfwd=tcp:10.239.128.125:6064-:22 \
+ -device pci-assign,host=85:10.0,id=pt_0 -cpu host -smp 4 -m 6144 \
+ -object memory-backend-file,id=mem,size=6144M,mem-path=/mnt/huge,share=on \
+ -numa node,memdev=mem -mem-prealloc -drive
+ file=/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-system-x86_64 \
+ -name vm1 -enable-kvm -chardev socket,path=/tmp/vm1_qga0.sock,server,nowait,id=vm1_qga0 \
+ -device virtio-serial -device virtserialport,chardev=vm1_qga0,name=org.qemu.guest_agent.0 \
+ -daemonize -monitor unix:/tmp/vm1_monitor.sock,server,nowait \
+ -net nic,vlan=0,macaddr=00:00:00:7b:d5:cb,addr=1f \
+ -net user,vlan=0,hostfwd=tcp:10.239.128.125:6126-:22 \
+ -device pci-assign,host=85:10.2,id=pt_0 -cpu host -smp 4 -m 6144 \
+ -object memory-backend-file,id=mem,size=6144M,mem-path=/mnt/huge,share=on \
+ -numa node,memdev=mem -mem-prealloc -drive
+ file=/home/img/vm1.img -vnc :5
+
+
+Test Case1: test_2vf_d2d_pktgen_stream
+===========================================
+both vfs in the two vms using the dpdk driver, send stream from vf1 in
+vm1 by dpdk pktgen to vf in vm0, and verify the vf on vm0 can receive stream.
+
+step 1: run testpmd on vm0:
+
+ ./x86_64-native-linuxapp-gcc/app/testpmd -c 0x7 -n 1 -- -i
+ --txqflags=0
+
+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="52:54:12:45:67:10",
+ src="52:54:12:45:67:11")/IP()/Raw(load='X'\*46)]
+
+step 5: send stream by pkt-gen on vm1:
+
+ ./app/app/x86_64-native-linuxapp-gcc/app/pktgen -c 0xf -n 2
+ --proc-type auto -- -P -T -m '1.0' -s P:flow.pcap
+
+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: 58832938560
+ RX-errors: 0
+ RX-nombuf: 0
+ TX-packets: 0 TX-errors: 0 TX-bytes: 0
+ ############################################################################
+
+Test Case2: test_2vf_d2k_pktgen_stream
+======================================
+step 1: bind vf to kernel driver on vm0
+
+step 2: start up vf interface and using tcpdump to capature received
+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="52:54:12:45:67:10",
+ src="52:54:12:45:67:11")/IP()/Raw(load='X'\*46)]
+
+step 5: send stream by pkt-gen on vm1:
+
+ ./app/app/x86_64-native-linuxapp-gcc/app/pktgen -c 0xf -n 2
+ --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
+======================================
+step 1: run testpmd on vm0:
+
+ ./x86_64-native-linuxapp-gcc/app/testpmd -c 0x7 -n 1 -- -i
+ --txqflags=0
+
+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
+
+ ######################################################################
+ ######
--
2.1.0
next prev parent reply other threads:[~2016-02-01 6:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-08 8:29 [dts] [DTS][PATCH V1 1/3] virt: vf to vf bridge config file Jingguo Fu
2016-01-08 8:29 ` [dts] [DTS][PATCH V1 2/3] virt: vf to vf nic bridge test plan Jingguo Fu
2016-01-12 8:10 ` Pei, Yulong
2016-01-18 9:49 ` Fu, JingguoX
2016-02-01 6:35 ` Fu, JingguoX [this message]
2016-01-08 8:29 ` [dts] [DTS][PATCH V1 3/3] virt: vf to vf nic bridge test suite Jingguo Fu
2016-01-12 7:48 ` [dts] [DTS][PATCH V1 1/3] virt: vf to vf bridge config file Pei, Yulong
2016-01-18 9:49 ` Fu, JingguoX
2016-02-01 6:35 ` Fu, JingguoX
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6BD6202160B55B409D423293115822622BA9C9C0@shsmsx102.ccr.corp.intel.com \
--to=jingguox.fu@intel.com \
--cc=dts@dpdk.org \
--cc=yulong.pei@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).