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 D9B5BA046B for ; Mon, 22 Jul 2019 04:58:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A0F352BAC; Mon, 22 Jul 2019 04:58:45 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 5F6E0271 for ; Mon, 22 Jul 2019 04:58:44 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jul 2019 19:58:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,293,1559545200"; d="scan'208";a="196608744" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.240.176.135]) by fmsmga002.fm.intel.com with ESMTP; 21 Jul 2019 19:58:42 -0700 From: "zhang,yan" To: dts@dpdk.org Cc: "zhang,yan" Date: Mon, 22 Jul 2019 11:03:21 +0800 Message-Id: <1563764601-16521-1-git-send-email-yanx.a.zhang@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V1] test_plans/vf_to_vf_nic_bridge_test_plan:change the way of packet distribute 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" change the way of packet distribute Signed-off-by: zhang,yan --- test_plans/vf_to_vf_nic_bridge_test_plan.rst | 73 ++++++++------------ 1 file changed, 30 insertions(+), 43 deletions(-) diff --git a/test_plans/vf_to_vf_nic_bridge_test_plan.rst b/test_plans/vf_to_vf_nic_bridge_test_plan.rst index 576c9d7..1d4a7ca 100644 --- a/test_plans/vf_to_vf_nic_bridge_test_plan.rst +++ b/test_plans/vf_to_vf_nic_bridge_test_plan.rst @@ -44,19 +44,13 @@ 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) - * Guest: two img with os for kvm qemu * NIC: one pf port -* pktgen-dpdk: copy $DTS/dep/tgen.tgz to guest from which send the stream - On Guest: -* Stream Source end: scapy pcpay and essential tarballs for compile pktgen-dpdk tools +* Stream Source end: scapy pcpay Set up basic virtual scenario: @@ -66,13 +60,10 @@ 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:: +Step 2: bind the two vfs to vfio-pci:: - 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 + modprobe vfio-pci + ./dpdk/usertools/dpdk-devbind.py -b vfio-pci 0000:85:02.0 0000:85:02.1 Step 3: passthrough vf 0 to vm0 and start vm0:: @@ -82,7 +73,7 @@ Step 3: passthrough vf 0 to vm0 and start vm0:: -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 \ + -device vfio-pci,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 @@ -94,16 +85,16 @@ Step 4: passthrough vf 1 to vm1 and start vm1:: -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 \ + -device vfio-pci,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 -====================================== +Test Case1: test_2vf_d2d_testpmd_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. +dpdk testpmd to vf in vm0, and verify the vf on vm0 can receive stream. Step 1: run testpmd on vm0:: @@ -114,20 +105,18 @@ Step 2: set rxonly and start on vm0:: set fwd rxonly start -Step 3: copy pktgen-dpdk tarball to vm1:: - - scp tgen.tgz to vm1 - tar xvf tgen.tgz - -Step 4: generate pcap file on vm1:: +Step 3: run testpmd on vm1:: - Context: [Ether(dst="52:54:12:45:67:10", src="52:54:12:45:67:11")/IP()/Raw(load='X'\*46)] + ./x86_64-native-linuxapp-gcc/app/testpmd -c 0x7 -n 1 -- -i -Step 5: send stream by pkt-gen on vm1:: +Step 4: Set forward, specifying that the opposing MAC sends 100 packets 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 + set fwd mac + set eth-peer 0 52:54:12:45:67:10(vm0_mac) + set burst 50 + start tx_first 2 -Step 6: verify vf 0 receive status on vm0: Rx-packets equal to send packets count, 100:: +Step 5: verify vf 0 receive status on vm0: Rx-packets equal to send packets count, 100:: show port stats 0 ######################## NIC statistics for port 0 ######################## @@ -137,27 +126,23 @@ Step 6: verify vf 0 receive status on vm0: Rx-packets equal to send packets coun TX-packets: 0 TX-errors: 0 TX-bytes: 0 ############################################################################ -Test Case2: test_2vf_d2k_pktgen_stream -====================================== +Test Case2: test_2vf_d2k_testpmd_stream +======================================= Step 1: bind vf to kernel driver on vm0 -Step 2: start up vf interface and using tcpdump to capture received packets +Step 2: start up vf interface and using tcpdump to capture received packets:: -Step 3: copy pktgen-dpdk tarball to vm1:: + tcpdump -i vm0_vf ether dst vm0_mac -w m.pcap - scp tgen.tgz to vm1 - tar xvf tgen.tgz +Step 3: Set forward, specifying that the opposing MAC sends 100 packets on vm1:: -Step 4: generate pcap file on vm1:: + set fwd mac + set eth-peer 0 52:54:12:45:67:10(vm0_mac) + set burst 50 + start tx_first 2 - 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 equal to send packets count, 100 +Step 4: verify vf 0 receive status on vm0: packet captured equal to send packets count, 100 Test Case3: test_2vf_k2d_scapy_stream ===================================== @@ -173,7 +158,9 @@ Step 2: set rxonly and start on vm0:: Step 3: bind vf to kernel driver on vm0 -Step 4: using scapy to send packets +Step 4: using scapy to send packets on vm1:: + + sendp([Ether(dst="vm0_mac", src="vm1_mac"") / IP() / Raw(load="X" * 46)], iface="ens4", count=100) Step 5:verify vf 0 receive status on vm0: Rx-packets equal to send packets count, 100:: -- 2.17.2