From patchwork Thu Apr 1 16:34:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Yinan" X-Patchwork-Id: 90276 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 04ECDA034F; Thu, 1 Apr 2021 09:51:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EEADA141053; Thu, 1 Apr 2021 09:51:52 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id C63BF40141 for ; Thu, 1 Apr 2021 09:51:50 +0200 (CEST) IronPort-SDR: 1NujOKAwu/JbGh5HriROayJZ2B5gLbUP7CZrR3NKPmZcvwnHD3hNT/hIayyRTdQOXraPtOYZH2 IJDQphM2DiSQ== X-IronPort-AV: E=McAfee;i="6000,8403,9940"; a="277365305" X-IronPort-AV: E=Sophos;i="5.81,296,1610438400"; d="scan'208";a="277365305" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2021 00:51:46 -0700 IronPort-SDR: bKLKgCjuJVFYkZbfX+8sNzxXFTll2UKl+2V2Fe9h4C4+3z8qUo6/fM6R8xYmbEYchnUJaycMDI JdrHmiudFVHA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,296,1610438400"; d="scan'208";a="517238104" Received: from dpdk-yinan-ntb1.sh.intel.com ([10.67.119.39]) by fmsmga001.fm.intel.com with ESMTP; 01 Apr 2021 00:51:44 -0700 From: Yinan Wang To: dts@dpdk.org Cc: Yinan Wang Date: Thu, 1 Apr 2021 12:34:08 -0400 Message-Id: <20210401163408.680463-1-yinan.wang@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [dts] [PATCH V1 1/3] test_plans/vhost_virtio_pmd_interrupt_test_plan.rst X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 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 cases for cbdma packed ring tets. Signed-off-by: Yinan Wang --- .../vhost_virtio_pmd_interrupt_test_plan.rst | 39 ++++++++++++++++++- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/test_plans/vhost_virtio_pmd_interrupt_test_plan.rst b/test_plans/vhost_virtio_pmd_interrupt_test_plan.rst index 762ef72c..63095bff 100644 --- a/test_plans/vhost_virtio_pmd_interrupt_test_plan.rst +++ b/test_plans/vhost_virtio_pmd_interrupt_test_plan.rst @@ -212,7 +212,7 @@ Test Case 4: Packed ring virtio interrupt test with 16 queues Test Case 5: Basic virtio interrupt test with 16 queues and cbdma enabled ========================================================================= -1. Bind 16 cbdma ports and one NIC port to igb_uio, then launch testpmd by below command:: +1. Bind 16 cbdma channels and one NIC port to igb_uio, then launch testpmd by below command:: ./testpmd -c 0x1ffff -n 4 --vdev 'eth_vhost0,iface=vhost-net,queues=16,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' -- -i --nb-cores=16 --rxq=16 --txq=16 --rss-ip @@ -247,7 +247,7 @@ Test Case 5: Basic virtio interrupt test with 16 queues and cbdma enabled Test Case 6: Basic virtio-1.0 interrupt test with 4 queues and cbdma enabled ============================================================================ -1. Bind four cbdma port and one NIC port to igb_uio, then launch testpmd by below command:: +1. Bind four cbdma channels and one NIC port to igb_uio, then launch testpmd by below command:: ./testpmd -c 0x7c -n 4 --vdev 'net_vhost0,iface=vhost-net,queues=4,dmas=[txq0@80:04.0;txq1@80:04.1;txq2@80:04.2;txq3@80:04.3]' -- -i --nb-cores=4 --rxq=4 --txq=4 --rss-ip @@ -278,3 +278,38 @@ Test Case 6: Basic virtio-1.0 interrupt test with 4 queues and cbdma enabled 6. Change dest IP address to fixed ip, packets will distribute to 1 queue, check l3fwd-power log that only one related core is waked up. 7. Stop the date transmitter, check all related core will be back to sleep status. + +Test Case 7: Packed ring virtio interrupt test with 16 queues and cbdma enabled +========================================================================= + +1. Bind 16 cbdma channels ports and one NIC port to igb_uio, then launch testpmd by below command:: + + ./testpmd -c 0x1ffff -n 4 --vdev 'eth_vhost0,iface=vhost-net,queues=16,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' -- -i --nb-cores=16 --rxq=16 --txq=16 --rss-ip + +2. Launch VM1, set queues=16, vectors>=2xqueues+2, mq=on:: + + taskset -c 34-35 \ + 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=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:6003-:22 \ + -chardev socket,id=char1,path=./vhost-net -netdev type=vhost-user,id=mynet2,chardev=char1,vhostforce,queues=16 \ + -device virtio-net-pci,mac=52:54:00:00:00:02,netdev=mynet2,mrg_rxbuf=on,csum=on,mq=on,vectors=40,packed=on \ + -vnc :11 -daemonize + +3. Bind virtio port to vfio-pci:: + + modprobe vfio enable_unsafe_noiommu_mode=1 + modprobe vfio-pci + ./usertools/dpdk-devbind.py --bind=vfio-pci xx:xx.x + +4. In VM, launch l3fwd-power sample:: + + ./l3fwd-power -c 0x0ffff -n 4 --log-level='user1,7' -- -p 1 -P --config '(0,0,0),(0,1,1),(0,2,2),(0,3,3)(0,4,4),(0,5,5),(0,6,6),(0,7,7)(0,8,8),(0,9,9),(0,10,10),(0,11,11)(0,12,12),(0,13,13),(0,14,14),(0,15,15)' --no-numa --parse-ptype + +5. Send random dest ip address packets to host nic with packet generator, packets will distribute to all queues, check l3fwd-power log that all related cores are waked up. + +6. Change dest IP address to fixed ip, packets will distribute to 1 queue, check l3fwd-power log that only one related core is waked up. + +7. Stop the date transmitter, check all related core will be back to sleep status. \ No newline at end of file From patchwork Thu Apr 1 16:34:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Yinan" X-Patchwork-Id: 90277 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 35A51A034F; Thu, 1 Apr 2021 09:52:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2AB1F14109A; Thu, 1 Apr 2021 09:52:03 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 89B2040141 for ; Thu, 1 Apr 2021 09:52:01 +0200 (CEST) IronPort-SDR: Wc5AkgUF0Ihd4/qrl2lKlSARwVIor10o5WMRZ4F+rm1nQXUk+Y8aJndaKwVuX+QbSXYdUzGzag j2vSUyaMB04Q== X-IronPort-AV: E=McAfee;i="6000,8403,9940"; a="179305526" X-IronPort-AV: E=Sophos;i="5.81,296,1610438400"; d="scan'208";a="179305526" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2021 00:51:59 -0700 IronPort-SDR: 05UtvikqsJcM1qRtnFNi6nbxleR+7e/yG/+YW/stPTykJX5xk4PN46vswOwmUMV9B8pD7pfOWg wqMN5voUUckQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,296,1610438400"; d="scan'208";a="394405342" Received: from dpdk-yinan-ntb1.sh.intel.com ([10.67.119.39]) by orsmga002.jf.intel.com with ESMTP; 01 Apr 2021 00:51:56 -0700 From: Yinan Wang To: dts@dpdk.org Cc: Yinan Wang Date: Thu, 1 Apr 2021 12:34:19 -0400 Message-Id: <20210401163419.680532-1-yinan.wang@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [dts] [PATCH V1 2/3] test_plans/vhost_virtio_user_interrupt_test_plan.rst X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 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 cases for cbdma packed ring test. Signed-off-by: Yinan Wang --- .../vhost_virtio_user_interrupt_test_plan.rst | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/test_plans/vhost_virtio_user_interrupt_test_plan.rst b/test_plans/vhost_virtio_user_interrupt_test_plan.rst index 07c1d882..4ef4cac4 100644 --- a/test_plans/vhost_virtio_user_interrupt_test_plan.rst +++ b/test_plans/vhost_virtio_user_interrupt_test_plan.rst @@ -246,3 +246,51 @@ flow: TG --> NIC --> Vhost --> Virtio 4. Stop sending packets with packet generator, check virtio-user related core change to sleep status. 5. Restart sending packets with packet generator, check virtio-user related core change to wakeup status again. + +Test Case9: LSC event between vhost-user and virtio-user with packed ring and cbdma enabled +========================================================================================== + +flow: Vhost <--> Virtio + +1. Bind one cbdma port to igb_uio driver, then start vhost-user side:: + + ./testpmd -c 0x3000 -n 4 -w 00:04.0 --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=1,client=0,dmas=[txq0@00:04.0]' -- -i + testpmd>set fwd mac + testpmd>start + +2. Start virtio-user side:: + + ./testpmd -c 0xc000 -n 4 --no-pci --file-prefix=virtio --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,packed_vq=1 -- -i --tx-offloads=0x00 + testpmd>set fwd mac + testpmd>start + +3. Check the virtio-user side link status:: + + testpmd> show port info 0 + #it should show "up" + +4. Quit the vhost-user side with testpmd, then check the virtio-user side link status:: + + testpmd> show port info 0 + #it should show "down" + +Test Case10: Packed ring virtio-user interrupt test with vhost-user as backend and cbdma enabled +============================================================================================== + +flow: TG --> NIC --> Vhost --> Virtio + +1. Bind one cbdma port and one NIC port to igb_uio, launch testpmd with a virtual vhost device as backend:: + + ./testpmd -c 0x7c -n 4 --vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[txq0@00:04.0]' -- -i --rxq=1 --txq=1 + testpmd>start + +2. Start l3fwd-power with a virtio-user device:: + + ./l3fwd-power -c 0xc000 -n 4 --log-level='user1,7' --no-pci --file-prefix=l3fwd-pwd \ + --vdev=virtio_user0,path=./vhost-net,packed_vq=1 -- -p 1 -P --config="(0,0,14)" --parse-ptype + +3. Send packets with packet generator, check the virtio-user related core can be wakeup status. + +4. Stop sending packets with packet generator, check virtio-user related core change to sleep status. + +5. Restart sending packets with packet generator, check virtio-user related core change to wakeup status again. From patchwork Thu Apr 1 16:34:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Yinan" X-Patchwork-Id: 90278 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5B9B5A034F; Thu, 1 Apr 2021 09:52:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5632B40142; Thu, 1 Apr 2021 09:52:14 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 30E8640141 for ; Thu, 1 Apr 2021 09:52:12 +0200 (CEST) IronPort-SDR: Gv+XXSyFxHqWR20D3X0M10x2Q3IKjnnHrg+3vGGnRBhvKCPJv/UfHQpEaIywnTjoMVzCX6Veme m2nHcnDytHNw== X-IronPort-AV: E=McAfee;i="6000,8403,9940"; a="192278707" X-IronPort-AV: E=Sophos;i="5.81,296,1610438400"; d="scan'208";a="192278707" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2021 00:52:08 -0700 IronPort-SDR: oHg+S9WCrFToALHjE5urFDL03VmD1/nH2fyF18BpsnF6fbdT55dAx4DmJIrQ0qGif5AOdXUn37 zfjVWDA4CITQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,296,1610438400"; d="scan'208";a="446125535" Received: from dpdk-yinan-ntb1.sh.intel.com ([10.67.119.39]) by fmsmga002.fm.intel.com with ESMTP; 01 Apr 2021 00:52:07 -0700 From: Yinan Wang To: dts@dpdk.org Cc: Yinan Wang Date: Thu, 1 Apr 2021 12:34:31 -0400 Message-Id: <20210401163431.680612-1-yinan.wang@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [dts] [PATCH V1 3/3] test_plans/virtio_event_idx_interrupt_test_plan.rst X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 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 cases for cbdma packed ring test. Signed-off-by: Yinan Wang --- .../virtio_event_idx_interrupt_test_plan.rst | 77 ++++++++++++++++++- 1 file changed, 75 insertions(+), 2 deletions(-) diff --git a/test_plans/virtio_event_idx_interrupt_test_plan.rst b/test_plans/virtio_event_idx_interrupt_test_plan.rst index eb26a13f..f30bfd6d 100644 --- a/test_plans/virtio_event_idx_interrupt_test_plan.rst +++ b/test_plans/virtio_event_idx_interrupt_test_plan.rst @@ -261,7 +261,7 @@ Test Case 6: Wake up packed ring virtio-net cores with event idx interrupt mode Test Case 7: Split ring virtio-pci driver reload test with CBDMA enabled ======================================================================== -1. Bind one nic port and one cbdma port to igb_uio, then launch the vhost sample by below commands:: +1. Bind one nic port and one cbdma channel to igb_uio, then launch the vhost sample by below commands:: rm -rf vhost-net* ./testpmd -c 0xF0000000 -n 4 --file-prefix=vhost --vdev 'net_vhost,iface=vhost-net,queues=1,dmas=[txq0@00:04.0]' -- -i --nb-cores=1 --txd=1024 --rxd=1024 @@ -299,7 +299,7 @@ Test Case 7: Split ring virtio-pci driver reload test with CBDMA enabled Test Case 8: Wake up split ring virtio-net cores with event idx interrupt mode and cbdma enabled 16 queues test ================================================================================================================ -1. Bind one nic port to igb_uio, then launch the vhost sample by below commands:: +1. Bind one nic port and 16 cbdma channels to igb_uio, then launch the vhost sample by below commands:: rm -rf vhost-net* ./testpmd -l 1-17 -n 4 --file-prefix=vhost --vdev 'net_vhost,iface=vhost-net,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=64' -- -i --nb-cores=16 --txd=1024 --rxd=1024 --rxq=16 --txq=16 @@ -331,3 +331,76 @@ Test Case 8: Wake up split ring virtio-net cores with event idx interrupt mode a testpmd>start testpmd>stop +Test Case 9: Packed ring virtio-pci driver reload test with CBDMA enabled +======================================================================== + +1. Bind one nic port and one cbdma channel to igb_uio, then launch the vhost sample by below commands:: + + rm -rf vhost-net* + ./testpmd -c 0xF0000000 -n 4 --file-prefix=vhost --vdev 'net_vhost,iface=vhost-net,queues=1,dmas=[txq0@00:04.0]' -- -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/ubuntu2004_2.img \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -net nic,macaddr=00:00:00:08:e8:aa,addr=1f -net user,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 10: Wake up packed ring virtio-net cores with event idx interrupt mode and cbdma enabled 16 queues test +================================================================================================================ + +1. Bind one nic port and 16 cbdma channels to igb_uio, then launch the vhost sample by below commands:: + + rm -rf vhost-net* + ./testpmd -l 1-17 -n 4 --file-prefix=vhost --vdev 'net_vhost,iface=vhost-net,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=64' -- -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/ubuntu2004_2.img \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -net nic,macaddr=00:00:00:08:e8:aa,addr=1f -net user,hostfwd=tcp:127.0.0.1:6004-:22 \ + -chardev socket,id=char0,path=./vhost-net,server -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 +