From patchwork Thu Aug 27 16:43:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Yinan" X-Patchwork-Id: 76067 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 492E1A04B1; Thu, 27 Aug 2020 09:54:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0A5861C0B5; Thu, 27 Aug 2020 09:54:04 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id BAB541C0B0 for ; Thu, 27 Aug 2020 09:54:01 +0200 (CEST) IronPort-SDR: 8rHEKpxmW82IcaQKYUncb8A6URTELUVv9gqIcST3JpQgiEm52zz3U/TH07+wp7pXlYp206OO4s nst7J1zmbsLA== X-IronPort-AV: E=McAfee;i="6000,8403,9725"; a="153859973" X-IronPort-AV: E=Sophos;i="5.76,359,1592895600"; d="scan'208";a="153859973" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Aug 2020 00:54:00 -0700 IronPort-SDR: TOVWEtHYXlUPmhxerSjR2iunA3I2QbzqvjLrqVDfMT1NFf2MeruXwELXxPHNMgS5TOyQIw0Qy9 jb2zUOI0/+oQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,359,1592895600"; d="scan'208";a="444353062" Received: from dpdk-yinan-ntb1.sh.intel.com ([10.67.119.39]) by orsmga004.jf.intel.com with ESMTP; 27 Aug 2020 00:53:59 -0700 From: Yinan Wang To: dts@dpdk.org Cc: Yinan Wang Date: Thu, 27 Aug 2020 12:43:18 -0400 Message-Id: <20200827164318.42326-1-yinan.wang@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH v1] test_plans/vhost_event_idx_interrupt_test_plan.rst 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" Add cbdma test cases in vhost_event_idx_interrupt test plan Signed-off-by: Yinan Wang --- .../vhost_event_idx_interrupt_test_plan.rst | 218 ++++++++++++++---- 1 file changed, 176 insertions(+), 42 deletions(-) diff --git a/test_plans/vhost_event_idx_interrupt_test_plan.rst b/test_plans/vhost_event_idx_interrupt_test_plan.rst index 28f079d..82e02bd 100644 --- a/test_plans/vhost_event_idx_interrupt_test_plan.rst +++ b/test_plans/vhost_event_idx_interrupt_test_plan.rst @@ -53,7 +53,7 @@ Test Case 1: wake up split ring vhost-user core with event idx interrupt mode 1. Launch l3fwd-power example app with client mode:: ./l3fwd-power -l 1 \ - -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci\ + -n 4 --no-pci\ --log-level=9 \ --vdev 'eth_vhost0,iface=/vhost-net0,queues=1,client=1' \ -- -p 0x1 \ @@ -62,18 +62,21 @@ Test Case 1: wake up split ring vhost-user core with event idx interrupt mode 2. Launch VM1 with server mode:: - taskset -c 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 -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:6001-:22 \ - -smp cores=1,sockets=1 -drive file=/home/osimg/ubuntu16.img \ - -chardev socket,server,id=char0,path=/vhost-net0 \ - -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce \ - -device virtio-net-pci,mac=52:54:00:00:00:01,netdev=mynet1,csum=on -vnc :10 -daemonize + taskset -c 17-18 qemu-system-x86_64 -name us-vhost-vm1 -enable-kvm -cpu host -smp 1 -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/ubuntu1910.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=./vhost-net0 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=on,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on -vnc :12 3. Relauch l3fwd-power sample for port up:: - ./l3fwd-power -l 0-3 \ - -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci\ + ./l3fwd-power -l 1 \ + -n 4 --no-pci\ --log-level=9 \ --vdev 'eth_vhost0,iface=/vhost-net0,queues=1,client=1' \ -- -p 0x1 \ @@ -95,7 +98,7 @@ Test Case 2: wake up split ring vhost-user cores with event idx interrupt mode 1 1. Launch l3fwd-power example app with client mode:: ./l3fwd-power -l 1-16 \ - -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci\ + -n 4 --no-pci\ --log-level=9 \ --vdev 'eth_vhost0,iface=/vhost-net0,queues=16,client=1' \ -- -p 0x1 \ @@ -104,18 +107,21 @@ Test Case 2: wake up split ring vhost-user cores with event idx interrupt mode 1 2. Launch VM1 with server mode:: - taskset -c 17-18 \ - 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 -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:6001-:22 \ - -smp cores=16,sockets=1 -drive file=/home/osimg/ubuntu16.img \ - -chardev socket,server,id=char0,path=/vhost-net0 \ - -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce,queues=16 \ - -device virtio-net-pci,mac=52:54:00:00:00:01,netdev=mynet1,csum=on,mq=on,vectors=40 -vnc :10 -daemonize + taskset -c 17-18 qemu-system-x86_64 -name us-vhost-vm1 -enable-kvm -cpu host -smp 1 -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/ubuntu1910.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=./vhost-net0 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=16 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=on,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,mq=on,vectors=40 -vnc :12 3. Relauch l3fwd-power sample for port up:: ./l3fwd-power -l 1-16 \ - -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci\ + -n 4 --no-pci\ --log-level=9 \ --vdev 'eth_vhost0,iface=/vhost-net0,queues=16,client=1' \ -- -p 0x1 \ @@ -159,7 +165,7 @@ Test Case 3: wake up split ring vhost-user cores by multi virtio-net in VMs with 1. Launch l3fwd-power example app with client mode:: ./l3fwd-power -l 1-2 \ - -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci\ + -n 4 --no-pci\ --log-level=9 \ --vdev 'eth_vhost0,iface=/vhost-net0,queues=1,client=1' \ --vdev 'eth_vhost1,iface=/vhost-net1,queues=1,client=1' \ @@ -171,24 +177,28 @@ Test Case 3: wake up split ring vhost-user cores by multi virtio-net in VMs with taskset -c 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 -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:6001-:22 \ - -smp cores=1,sockets=1 -drive file=/home/osimg/ubuntu16.img \ + -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=1,sockets=1 -drive file=/home/osimg/ubuntu1910.img \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ -chardev socket,server,id=char0,path=/vhost-net0 \ -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce \ -device virtio-net-pci,mac=52:54:00:00:00:01,netdev=mynet1,csum=on -vnc :10 -daemonize taskset -c 34 \ qemu-system-x86_64 -name us-vhost-vm2 \ - -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 -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:6002-:22 \ - -smp cores=1,sockets=1 -drive file=/home/osimg/ubuntu16-2.img \ + -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=1,sockets=1 -drive file=/home/osimg/ubuntu1910-2.img \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6004-:22 \ -chardev socket,server,id=char0,path=/vhost-net1 \ -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce \ -device virtio-net-pci,mac=52:54:00:00:00:02,netdev=mynet1,csum=on -vnc :11 -daemonize 3. Relauch l3fwd-power sample for port up:: - ./l3fwd-power -l 0-3 \ - -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci\ + ./l3fwd-power -l 1-2 \ + -n 4 --no-pci\ --log-level=9 \ --vdev 'eth_vhost0,iface=/vhost-net0,queues=1,client=1' \ --vdev 'eth_vhost1,iface=/vhost-net1,queues=1,client=1' \ @@ -218,7 +228,7 @@ Test Case 4: wake up packed ring vhost-user core with event idx interrupt mode 1. Launch l3fwd-power example app with client mode:: ./l3fwd-power -l 1 \ - -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci\ + -n 4 --no-pci\ --log-level=9 \ --vdev 'eth_vhost0,iface=/vhost-net0,queues=1,client=1' \ -- -p 0x1 \ @@ -229,16 +239,18 @@ Test Case 4: wake up packed ring vhost-user core with event idx interrupt mode taskset -c 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 -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:6001-:22 \ - -smp cores=1,sockets=1 -drive file=/home/osimg/ubuntu16.img \ + -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=1,sockets=1 -drive file=/home/osimg/ubuntu1910.img \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6004-:22 \ -chardev socket,server,id=char0,path=/vhost-net0 \ -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce \ -device virtio-net-pci,mac=52:54:00:00:00:01,netdev=mynet1,csum=on,packed=on -vnc :10 -daemonize 3. Relauch l3fwd-power sample for port up:: - ./l3fwd-power -l 0-3 \ - -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci\ + ./l3fwd-power -l 1 \ + -n 4 --no-pci\ --log-level=9 \ --vdev 'eth_vhost0,iface=/vhost-net0,queues=1,client=1' \ -- -p 0x1 \ @@ -260,7 +272,7 @@ Test Case 5: wake up packed ring vhost-user cores with event idx interrupt mode 1. Launch l3fwd-power example app with client mode:: ./l3fwd-power -l 1-16 \ - -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci\ + -n 4 --no-pci\ --log-level=9 \ --vdev 'eth_vhost0,iface=/vhost-net0,queues=16,client=1' \ -- -p 0x1 \ @@ -271,8 +283,10 @@ Test Case 5: wake up packed ring vhost-user cores with event idx interrupt mode taskset -c 17-18 \ 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 -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:6001-:22 \ - -smp cores=16,sockets=1 -drive file=/home/osimg/ubuntu16.img \ + -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/ubuntu1910.img \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6004-:22 \ -chardev socket,server,id=char0,path=/vhost-net0 \ -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce,queues=16 \ -device virtio-net-pci,mac=52:54:00:00:00:01,netdev=mynet1,csum=on,mq=on,packed=on,vectors=40 -vnc :10 -daemonize @@ -280,7 +294,7 @@ Test Case 5: wake up packed ring vhost-user cores with event idx interrupt mode 3. Relauch l3fwd-power sample for port up:: ./l3fwd-power -l 1-16 \ - -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci\ + -n 4 --no-pci\ --log-level=9 \ --vdev 'eth_vhost0,iface=/vhost-net0,queues=16,client=1' \ -- -p 0x1 \ @@ -324,7 +338,7 @@ Test Case 6: wake up packed ring vhost-user cores by multi virtio-net in VMs wit 1. Launch l3fwd-power example app with client mode:: ./l3fwd-power -l 1-2 \ - -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci\ + -n 4 --no-pci\ --log-level=9 \ --vdev 'eth_vhost0,iface=/vhost-net0,queues=1,client=1' \ --vdev 'eth_vhost1,iface=/vhost-net1,queues=1,client=1' \ @@ -336,24 +350,28 @@ Test Case 6: wake up packed ring vhost-user cores by multi virtio-net in VMs wit taskset -c 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 -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:6001-:22 \ - -smp cores=1,sockets=1 -drive file=/home/osimg/ubuntu16.img \ + -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=1,sockets=1 -drive file=/home/osimg/ubuntu1910.img \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6004-:22 \ -chardev socket,server,id=char0,path=/vhost-net0 \ -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce \ -device virtio-net-pci,mac=52:54:00:00:00:01,netdev=mynet1,csum=on,packed=on -vnc :10 -daemonize taskset -c 34 \ qemu-system-x86_64 -name us-vhost-vm2 \ - -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 -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:6002-:22 \ - -smp cores=1,sockets=1 -drive file=/home/osimg/ubuntu16-2.img \ + -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=1,sockets=1 -drive file=/home/osimg/ubuntu1910-2.img \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6004-:22 \ -chardev socket,server,id=char0,path=/vhost-net1 \ -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce \ -device virtio-net-pci,mac=52:54:00:00:00:02,netdev=mynet1,csum=on,packed=on -vnc :11 -daemonize 3. Relauch l3fwd-power sample for port up:: - ./l3fwd-power -l 0-3 \ - -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci\ + ./l3fwd-power -l 1-2 \ + -n 4 --no-pci\ --log-level=9 \ --vdev 'eth_vhost0,iface=/vhost-net0,queues=1,client=1' \ --vdev 'eth_vhost1,iface=/vhost-net1,queues=1,client=1' \ @@ -376,3 +394,119 @@ Test Case 6: wake up packed ring vhost-user cores by multi virtio-net in VMs wit #send packets to vhost 6. Check vhost related cores are waked up with l3fwd-power log. + +Test Case 7: wake up split ring vhost-user cores with event idx interrupt mode and cbdma enabled 16 queues test +=============================================================================================================== + +1. Bind 16 cbdma ports to igb_uio driver, then launch l3fwd-power example app with client mode:: + + ./l3fwd-power -l 1-16 -n 4 --log-level=9 \ + --vdev 'eth_vhost0,iface=/vhost-net0,queues=16,client=1,dmas=[txq0@80:04.0;txq1@80:04.1;txq2@80:04.2;txq3@80:04.3;txq4@80:04.4;txq5@80:04.5;txq6@80:04.6;txq7@80:04.7;txq8@00:04.0;txq9@00:04.1;txq10@00:04.2;txq11@00:04.3;txq12@00:04.4;txq13@00:04.5;txq14@00:04.6;txq15@00:04.7],dmathr=1024' \ + -- -p 0x1 --parse-ptype 1 \ + --config "(0,0,1),(0,1,2),(0,2,3),(0,3,4),(0,4,5),(0,5,6),(0,6,7),(0,7,8),(0,8,9),(0,9,10),(0,10,11),(0,11,12),(0,12,13),(0,13,14),(0,14,15),(0,15,16)" + +2. Launch VM1 with server mode:: + + taskset -c 17-18 qemu-system-x86_64 -name us-vhost-vm1 -enable-kvm -cpu host -smp 1 -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/ubuntu1910.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=./vhost-net0 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=16 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=on,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,mq=on,vectors=40 -vnc :12 + +3. Relauch l3fwd-power sample for port up:: + + ./l3fwd-power -l 1-16 -n 4 --log-level=9 \ + --vdev 'eth_vhost0,iface=/vhost-net0,queues=16,client=1,dmas=[txq0@80:04.0;txq1@80:04.1;txq2@80:04.2;txq3@80:04.3;txq4@80:04.4;txq5@80:04.5;txq6@80:04.6;txq7@80:04.7;txq8@00:04.0;txq9@00:04.1;txq10@00:04.2;txq11@00:04.3;txq12@00:04.4;txq13@00:04.5;txq14@00:04.6;txq15@00:04.7],dmathr=1024' \ + -- -p 0x1 --parse-ptype 1 \ + --config "(0,0,1),(0,1,2),(0,2,3),(0,3,4),(0,4,5),(0,5,6),(0,6,7),(0,7,8),(0,8,9),(0,9,10),(0,10,11),(0,11,12),(0,12,13),(0,13,14),(0,14,15),(0,15,16)" + +4. Set vitio-net with 16 quques and give vitio-net ip address:: + + ethtool -L [ens3] combined 16 # [ens3] is the name of virtio-net + ifconfig [ens3] 1.1.1.1 + +5. Send packets with different IPs from virtio-net, notice to bind each vcpu to different send packets process:: + + taskset -c 0 ping 1.1.1.2 + taskset -c 1 ping 1.1.1.3 + taskset -c 2 ping 1.1.1.4 + taskset -c 3 ping 1.1.1.5 + taskset -c 4 ping 1.1.1.6 + taskset -c 5 ping 1.1.1.7 + taskset -c 6 ping 1.1.1.8 + taskset -c 7 ping 1.1.1.9 + taskset -c 8 ping 1.1.1.2 + taskset -c 9 ping 1.1.1.2 + taskset -c 10 ping 1.1.1.2 + taskset -c 11 ping 1.1.1.2 + taskset -c 12 ping 1.1.1.2 + taskset -c 13 ping 1.1.1.2 + taskset -c 14 ping 1.1.1.2 + taskset -c 15 ping 1.1.1.2 + +6. Check vhost related cores are waked up with l3fwd-power log, such as following:: + + L3FWD_POWER: lcore 0 is waked up from rx interrupt on port 0 queue 0 + ... + ... + L3FWD_POWER: lcore 15 is waked up from rx interrupt on port 0 queue 15 + +Test Case 8: wake up split ring vhost-user cores by multi virtio-net in VMs with event idx interrupt mode and cbdma enabled test +================================================================================================================================ + +1. Bind two cbdma ports to igb_uio driver, then launch l3fwd-power example app with client mode:: + + ./l3fwd-power -l 1-2 -n 4 --log-level=9 \ + --vdev 'eth_vhost0,iface=/vhost-net0,queues=1,client=1,dmas=[txq0@00:04.0]' \ + --vdev 'eth_vhost1,iface=/vhost-net1,queues=1,client=1,dmas=[txq0@80:04.0]' \ + -- -p 0x3 --parse-ptype 1 --config "(0,0,1),(1,0,2)" + +2. Launch VM1 and VM2 with server mode:: + + taskset -c 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=1,sockets=1 -drive file=/home/osimg/ubuntu1910.img \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,server,id=char0,path=/vhost-net0 \ + -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce \ + -device virtio-net-pci,mac=52:54:00:00:00:01,netdev=mynet1,csum=on -vnc :10 -daemonize + + taskset -c 34 \ + qemu-system-x86_64 -name us-vhost-vm2 \ + -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=1,sockets=1 -drive file=/home/osimg/ubuntu1910-2.img \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6004-:22 \ + -chardev socket,server,id=char0,path=/vhost-net1 \ + -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce \ + -device virtio-net-pci,mac=52:54:00:00:00:02,netdev=mynet1,csum=on -vnc :11 -daemonize + +3. Relauch l3fwd-power sample for port up:: + + ./l3fwd-power -l 1-2 -n 4 --log-level=9 \ + --vdev 'eth_vhost0,iface=/vhost-net0,queues=1,client=1,dmas=[txq0@00:04.0]' \ + --vdev 'eth_vhost1,iface=/vhost-net1,queues=1,client=1,dmas=[txq0@80:04.0]' \ + -- -p 0x3 --parse-ptype 1 --config "(0,0,1),(1,0,2)" + +4. On VM1, set ip for virtio device and send packets to vhost:: + + ifconfig [ens3] 1.1.1.2 + #[ens3] is the virtual device name + ping 1.1.1.3 + #send packets to vhost + +5. On VM2, also set ip for virtio device and send packets to vhost:: + + ifconfig [ens3] 1.1.1.4 + #[ens3] is the virtual device name + ping 1.1.1.5 + #send packets to vhost + +6. Check vhost related cores are waked up with l3fwd-power log.