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 7086FA0564; Fri, 28 Feb 2020 14:15:28 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 689AE1BFED; Fri, 28 Feb 2020 14:15:28 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id E912A1BFED for ; Fri, 28 Feb 2020 14:15:26 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Feb 2020 05:15:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,496,1574150400"; d="scan'208";a="439231558" Received: from dpdk-yinan-purley.sh.intel.com ([10.67.117.227]) by fmsmga006.fm.intel.com with ESMTP; 28 Feb 2020 05:15:25 -0800 From: Yinan To: dts@dpdk.org Cc: Wang Yinan Date: Fri, 28 Feb 2020 06:09:46 +0000 Message-Id: <20200228060947.26001-11-yinan.wang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200228060947.26001-1-yinan.wang@intel.com> References: <20200228060947.26001-1-yinan.wang@intel.com> Subject: [dts] [PATCH 10/11 v1] test_plans: add test cases for virtio_event_idx_interrupt 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 --- .../virtio_event_idx_interrupt_test_plan.rst | 123 ++++++++++++++++-- 1 file changed, 115 insertions(+), 8 deletions(-) diff --git a/test_plans/virtio_event_idx_interrupt_test_plan.rst b/test_plans/virtio_event_idx_interrupt_test_plan.rst index e51d808..8293032 100644 --- a/test_plans/virtio_event_idx_interrupt_test_plan.rst +++ b/test_plans/virtio_event_idx_interrupt_test_plan.rst @@ -37,16 +37,17 @@ virtio event idx interrupt mode test plan Description =========== -This feature is to suppress interrupts for performance improvement, need compare interrupt times with and without -virtio event idx enabled. Also need cover driver reload and live migration test. +This feature is to suppress interrupts for performance improvement, need compare +interrupt times with and without virtio event idx enabled. Also need cover driver +reload test. For packed virtqueue test, need using qemu version > 4.2.0. Test flow ========= TG --> NIC --> Vhost-user --> Virtio-net -Test Case 1: compare interrupt times with and without virtio event idx enabled -============================================================================== +Test Case 1: Compare interrupt times with and without split ring virtio event idx enabled +========================================================================================= 1. Bind one nic port to igb_uio, then launch the vhost sample by below commands:: @@ -78,8 +79,8 @@ Test Case 1: compare interrupt times with and without virtio event idx enabled 6. Compare interrupt times between virtio event_idx enabled and virtio event_idx disabled. -Test Case 2: virtio-pci driver reload test -========================================== +Test Case 2: Split ring virtio-pci driver reload test +===================================================== 1. Bind one nic port to igb_uio, then launch the vhost sample by below commands:: @@ -116,8 +117,8 @@ Test Case 2: virtio-pci driver reload test 6. Rerun step4 and step5 100 times to check event idx workable after driver reload. -Test Case 3: wake up virtio-net cores with event idx interrupt mode 16 queues test -================================================================================== +Test Case 3: Wake up split ring virtio-net cores with event idx interrupt mode 16 queues test +============================================================================================= 1. Bind one nic port to igb_uio, then launch the vhost sample by below commands:: @@ -150,3 +151,109 @@ Test Case 3: wake up virtio-net cores with event idx interrupt mode 16 queues te testpmd>stop testpmd>start testpmd>stop + +Test Case 4: Compare interrupt times with and without packed ring virtio event idx enabled +========================================================================================== + +1. Bind one nic port to igb_uio, then launch the vhost sample by below commands:: + + rm -rf vhost-net* + ./testpmd -c 0xF0000000 -n 4 --socket-mem 2048,2048 --legacy-mem --file-prefix=vhost --vdev 'net_vhost,iface=vhost-net,queues=1' -- -i + --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>start + +2. Launch VM:: + + taskset -c 32-33 \ + qemu-system-x86_64 -name us-vhost-vm1 \ + -cpu host -enable-kvm -m 2048 -object memory-backend-file,id=mem,size=2048M,mem-path=/mnt/huge,share=on -numa node,memdev=mem -mem-prealloc \ + -smp cores=2,sockets=1 -drive file=/home/osimg/ubuntu16.img \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -net nic,vlan=2,macaddr=00:00:00:08:e8:aa,addr=1f -net user,vlan=2,hostfwd=tcp:127.0.0.1:6004-:22 \ + -chardev socket,id=char0,path=./vhost-net -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce \ + -device virtio-net-pci,mac=52:54:00:00:00:01,netdev=mynet1,mrg_rxbuf=on,csum=on,gso=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,packed=on \ + -vnc :12 -daemonize + +3. On VM1, set virtio device IP:: + + ifconfig [ens3] 1.1.1.2 # [ens3] is the name of virtio-net + +4. Send 10M packets from packet generator to nic, check virtio-net interrupt times by below cmd in VM:: + + cat /proc/interrupts + +5. Disable virtio event idx feature and rerun step1 ~ step4. + +6. Compare interrupt times between virtio event_idx enabled and virtio event_idx disabled. + +Test Case 5: Packed ring virtio-pci driver reload test +====================================================== + +1. Bind one nic port to igb_uio, then launch the vhost sample by below commands:: + + rm -rf vhost-net* + ./testpmd -c 0xF0000000 -n 4 --socket-mem 2048,2048 --legacy-mem --file-prefix=vhost --vdev 'net_vhost,iface=vhost-net,queues=1' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>start + +2. Launch VM:: + + taskset -c 32-33 \ + qemu-system-x86_64 -name us-vhost-vm1 \ + -cpu host -enable-kvm -m 2048 -object memory-backend-file,id=mem,size=2048M,mem-path=/mnt/huge,share=on -numa node,memdev=mem -mem-prealloc \ + -smp cores=2,sockets=1 -drive file=/home/osimg/ubuntu16.img \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -net nic,vlan=2,macaddr=00:00:00:08:e8:aa,addr=1f -net user,vlan=2,hostfwd=tcp:127.0.0.1:6004-:22 \ + -chardev socket,id=char0,path=./vhost-net -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce \ + -device virtio-net-pci,mac=52:54:00:00:00:01,netdev=mynet1,mrg_rxbuf=on,csum=on,gso=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,packed=on \ + -vnc :12 -daemonize + +3. On VM1, set virtio device IP, send 10M packets from packet generator to nic then check virtio device can receive packets:: + + ifconfig [ens3] 1.1.1.2 # [ens3] is the name of virtio-net + tcpdump -i [ens3] + +4. Reload virtio-net driver by below cmds:: + + ifconfig [ens3] down + ./dpdk-devbind.py -u [00:03.0] # [00:03.0] is the pci addr of virtio-net + ./dpdk-devbind.py -b virtio-pci [00:03.0] + +5. Check virtio device can receive packets again:: + + ifconfig [ens3] 1.1.1.2 + tcpdump -i [ens3] + +6. Rerun step4 and step5 100 times to check event idx workable after driver reload. + +Test Case 6: Wake up packed ring virtio-net cores with event idx interrupt mode 16 queues test +============================================================================================== + +1. Bind one nic port to igb_uio, then launch the vhost sample by below commands:: + + rm -rf vhost-net* + ./testpmd -l 1-17 -n 4 --socket-mem 2048,2048 --legacy-mem --file-prefix=vhost --vdev 'net_vhost,iface=vhost-net,queues=16' -- -i --nb-cores=16 --txd=1024 --rxd=1024 --rxq=16 --txq=16 + testpmd>start + +2. Launch VM:: + + taskset -c 32-33 \ + qemu-system-x86_64 -name us-vhost-vm1 \ + -cpu host -enable-kvm -m 2048 -object memory-backend-file,id=mem,size=2048M,mem-path=/mnt/huge,share=on -numa node,memdev=mem -mem-prealloc \ + -smp cores=16,sockets=1 -drive file=/home/osimg/ubuntu16.img \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -net nic,vlan=2,macaddr=00:00:00:08:e8:aa,addr=1f -net user,vlan=2,hostfwd=tcp:127.0.0.1:6004-:22 \ + -chardev socket,id=char0,path=./vhost-net -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce,queues=16 \ + -device virtio-net-pci,mac=52:54:00:00:00:01,netdev=mynet1,mrg_rxbuf=on,mq=on,vectors=40,csum=on,gso=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,packed=on \ + -vnc :12 -daemonize + +3. On VM1, give virtio device ip addr and enable vitio-net with 16 quques:: + + ifconfig [ens3] 1.1.1.2 # [ens3] is the name of virtio-net + ethtool -L [ens3] combined 16 + +4. Send 10M different ip addr packets from packet generator to nic, check virtio-net interrupt times by below cmd in VM:: + + cat /proc/interrupts + +5. After two hours stress test, stop and restart testpmd, check each queue has new packets coming:: + + testpmd>stop + testpmd>start + testpmd>stop \ No newline at end of file -- 2.17.1