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 3B230A046B for ; Fri, 28 Jun 2019 08:34:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B28C61B949; Fri, 28 Jun 2019 08:34:16 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 4A0405B3C for ; Fri, 28 Jun 2019 08:34:15 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Jun 2019 23:34:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,426,1557212400"; d="scan'208";a="153282006" Received: from npg-dpdk-project-yinanwang-1.sh.intel.com ([10.67.110.166]) by orsmga007.jf.intel.com with ESMTP; 27 Jun 2019 23:34:12 -0700 From: Yinan To: dts@dpdk.org Cc: Wang Yinan Date: Thu, 27 Jun 2019 23:31:17 +0000 Message-Id: <20190627233117.48914-1-yinan.wang@intel.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset=Y Content-Transfer-Encoding: 8bit Subject: [dts] [PATCH v2] test_plans: add test plan for pvp virtio bonding test 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" From: Wang Yinan Signed-off-by: Wang Yinan --- test_plans/pvp_virtio_bonding_test_plan.rst | 165 ++++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 test_plans/pvp_virtio_bonding_test_plan.rst diff --git a/test_plans/pvp_virtio_bonding_test_plan.rst b/test_plans/pvp_virtio_bonding_test_plan.rst new file mode 100644 index 0000000..a90e7d3 --- /dev/null +++ b/test_plans/pvp_virtio_bonding_test_plan.rst @@ -0,0 +1,165 @@ +.. Copyright (c) <2019>, 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. + +=========================================== +vhost-user/virtio-pmd pvp bonding test plan +=========================================== + +Description +=========== + +The Link Bonding functions make it possible to dynamically create and manage link bonding devices from within testpmd interactive prompt, below are the introduction of seven bonding modes: +- Mode = 0 (balance-rr) Round-robin policy: (default). +- Mode = 1 (active-backup) Active-backup policy: Only one NIC slave in the bond is active. +- Mode = 2 (balance-xor) XOR policy: Transmit network packets based on the default transmit policy. +- Mode = 3 (broadcast) Broadcast policy: Transmit network packets on all slave network interfaces. +- Mode = 4 (802.3ad) IEEE 802.3ad Dynamic link aggregation. +- Mode = 5 (balance-tlb) Adaptive transmit load balancing. +- Mode = 6 (balance-alb) Adaptive load balancing. + +Test case 1: vhost-user/virtio-pmd pvp bonding test with mode 0 +=============================================================== +Flow: TG--> NIC --> Vhost --> Virtio3 --> Virtio4 --> Vhost--> NIC--> TG + +1. Bind one port to igb_uio,launch vhost by below command:: + + ./testpmd -l 1-6 -n 4 --socket-mem 2048,2048 --legacy-mem --file-prefix=vhost --vdev 'net_vhost,iface=vhost-net,client=1,queues=1' --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=1' --vdev 'net_vhost2,iface=vhost-net2,client=1,queues=1' --vdev 'net_vhost3,iface=vhost-net3,client=1,queues=1' -- -i --port-topology=chained --nb-cores=4 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +2. Bootup one vm with four virtio-net devices:: + + 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:c7:56:64,addr=1f \ + -net user,vlan=0,hostfwd=tcp:127.0.0.1:6008-:22 \ + -chardev socket,id=char0,path=./vhost-net,server \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01 \ + -chardev socket,id=char1,path=./vhost-net1,server \ + -netdev type=vhost-user,id=netdev1,chardev=char1,vhostforce \ + -device virtio-net-pci,netdev=netdev1,mac=52:54:00:00:00:02 \ + -chardev socket,id=char2,path=./vhost-net2,server \ + -netdev type=vhost-user,id=netdev2,chardev=char2,vhostforce \ + -device virtio-net-pci,netdev=netdev2,mac=52:54:00:00:00:03 \ + -chardev socket,id=char3,path=./vhost-net3,server \ + -netdev type=vhost-user,id=netdev3,chardev=char3,vhostforce \ + -device virtio-net-pci,netdev=netdev3,mac=52:54:00:00:00:04 \ + -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/home/osimg/ubuntu16.img -vnc :10 + +3. On vm, bind four virtio-net devices to igb_uio:: + + ./dpdk-devbind.py -b igb_uio xx:xx.x xx:xx.x xx:xx.x xx:xx.x + +4. Launch testpmd in VM:: + + ./testpmd -l 0-5 -n 4 -- -i --port-topology=chained --nb-cores=5 + +5. Create one bonded device in mode 0 on socket 0:: + + testpmd>create bonded device 0 0 # create bonded device (mode) (socket) + created new bonded device on (port 4) # in this case, already has port 0,1,2,3 for vdev, so the bonded device port is 4 + +6. Add three vdev (port 0,1,2) to link bonding device (port 4) and configure forwarding on port 3 and port 4:: + + testpmd>add bonding slave 0 4 # add bonding slave (slave id) (port id) + testpmd>add bonding slave 1 4 + testpmd>add bonding slave 2 4 + testpmd>port start 4 + testpmd>show bonding config 4 + testpmd>set portlist 3,4 + testpmd>set fwd mac + testpmd>start + +7. Send packets to nic port by packet generator. + +8. Check port stats at VM side, there are throughput between port 3 and port 4:: + + testpmd>show port stats all + +Test case 2: vhost-user/virtio-pmd pvp bonding test with different mode from 1 to 6 +=================================================================================== + +1. Bind one port to igb_uio,launch vhost by below command:: + + ./testpmd -l 1-6 -n 4 --socket-mem 2048,2048 --legacy-mem --file-prefix=vhost --vdev 'net_vhost,iface=vhost-net,client=1,queues=1' --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=1' --vdev 'net_vhost2,iface=vhost-net2,client=1,queues=1' --vdev 'net_vhost3,iface=vhost-net3,client=1,queues=1' -- -i --port-topology=chained --nb-cores=4 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +2. Bootup one vm with four virtio-net devices:: + + 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:c7:56:64,addr=1f \ + -net user,vlan=0,hostfwd=tcp:127.0.0.1:6008-:22 \ + -chardev socket,id=char0,path=./vhost-net,server \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01 \ + -chardev socket,id=char1,path=./vhost-net1,server \ + -netdev type=vhost-user,id=netdev1,chardev=char1,vhostforce \ + -device virtio-net-pci,netdev=netdev1,mac=52:54:00:00:00:02 \ + -chardev socket,id=char2,path=./vhost-net2,server \ + -netdev type=vhost-user,id=netdev2,chardev=char2,vhostforce \ + -device virtio-net-pci,netdev=netdev2,mac=52:54:00:00:00:03 \ + -chardev socket,id=char3,path=./vhost-net3,server \ + -netdev type=vhost-user,id=netdev3,chardev=char3,vhostforce \ + -device virtio-net-pci,netdev=netdev3,mac=52:54:00:00:00:04 \ + -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/home/osimg/ubuntu16.img -vnc :10 + +3. On vm, bind four virtio-net devices to igb_uio:: + + ./dpdk-devbind.py -b igb_uio xx:xx.x xx:xx.x xx:xx.x xx:xx.x + +4. Launch testpmd in VM:: + + ./testpmd -l 0-5 -n 4 -- -i --port-topology=chained --nb-cores=5 + +5. Create bonding device with mode 1 to mode 6:: + + testpmd> create bonded device (mode) 0 + +6. Add three vdev (port 0,1,2) to link bonding device (port 4) and configure forwarding on port 3 and port 4:: + + testpmd>add bonding slave 0 4 # add bonding slave (slave id) (port id) + testpmd>add bonding slave 1 4 + testpmd>add bonding slave 2 4 + testpmd>port start 4 + testpmd>show bonding config 4 + testpmd>set portlist 3,4 + testpmd>set fwd mac + testpmd>start \ No newline at end of file -- 2.17.1