From patchwork Thu Nov 10 03:20:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 119692 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 97B15A04FD; Thu, 10 Nov 2022 04:27:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8EEF340156; Thu, 10 Nov 2022 04:27:13 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id CF2BC400D4 for ; Thu, 10 Nov 2022 04:27:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668050832; x=1699586832; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Oe61aj5yLq+J05LW0DSlW57MYOkqjNwKaP8bq2XMAfw=; b=Pl3WXFMrYMD94hLnTlzPiwLtmhnnCiADoIhj+zT9NcIbdkRE3lowQXlC IsRD6alYlJmiPjqLkuws6vL69RMUYtX6kjDIZo+ci/OXP3Qi35MmfmUWP MFfs/xUm97GIJRBBsk2VKZlOOrsSLvCq8rJMp7LE4EfKW2dzJd51ZoGnK swPn9xA7po4TqP8Fkw+QZ4kqCaZUcJN4gG6jv5+630E8VVciQA9aBYHBj QWah+NQWe/Sz0sKjvn1kJkS9zbjPibMijuUCqzAKTLZOVMtemV21dYHFd gLLILIPdESLyY9Uf46wHt+vafa4CFSPDLsSugR38lHQT0hSaBjNaLD03n g==; X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="290917143" X-IronPort-AV: E=Sophos;i="5.96,152,1665471600"; d="scan'208,223";a="290917143" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 19:27:10 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="668241192" X-IronPort-AV: E=Sophos;i="5.96,152,1665471600"; d="scan'208,223";a="668241192" Received: from unknown (HELO localhost.localdomain) ([10.239.252.222]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 19:27:08 -0800 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V1 1/2] test_plans/vm2vm_virtio_user_cbdma_test_plan: modify the dmas parameter by DPDK changed Date: Thu, 10 Nov 2022 11:20:39 +0800 Message-Id: <20221110032039.1813921-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 From DPDK-22.11, the dmas parameter have changed, so modify the dmas parameter in the testplan. Signed-off-by: Wei Ling --- .../vm2vm_virtio_user_cbdma_test_plan.rst | 467 ++++++++---------- 1 file changed, 212 insertions(+), 255 deletions(-) diff --git a/test_plans/vm2vm_virtio_user_cbdma_test_plan.rst b/test_plans/vm2vm_virtio_user_cbdma_test_plan.rst index caf1a96b..eff4aef0 100644 --- a/test_plans/vm2vm_virtio_user_cbdma_test_plan.rst +++ b/test_plans/vm2vm_virtio_user_cbdma_test_plan.rst @@ -2,17 +2,31 @@ Copyright(c) 2022 Intel Corporation -================================================== +================================================= VM2VM vhost-user/virtio-user with CBDMA test plan -================================================== +================================================= Description =========== -Vhost asynchronous data path leverages DMA devices to offload memory copies from the CPU and it is implemented in an asynchronous way. -In addition, vhost supports M:N mapping between vrings and DMA virtual channels. Specifically, one vring can use multiple different DMA -channels and one DMA channel can be shared by multiple vrings at the same time. From DPDK22.07, Vhost enqueue and dequeue operation with -CBDMA channels is supported in both split and packed ring. +CBDMA is a kind of DMA engine, Vhost asynchronous data path leverages DMA devices +to offload memory copies from the CPU and it is implemented in an asynchronous way. +As a result, large packet copy can be accelerated by the DMA engine, and vhost can +free CPU cycles for higher level functions. + +Asynchronous data path is enabled per tx/rx queue, and users need +to specify the DMA device used by the tx/rx queue. Each tx/rx queue +only supports to use one DMA device, but one DMA device can be shared +among multiple tx/rx queues of different vhostpmd ports. + +Two PMD parameters are added: +- dmas: specify the used DMA device for a tx/rx queue +(Default: no queues enable asynchronous data path) +- dma-ring-size: DMA ring size. +(Default: 4096). + +Here is an example: +--vdev 'eth_vhost0,iface=./s0,dmas=[txq0@0000:00.01.0;rxq0@0000:00.01.1],dma-ring-size=4096' This document provides the test plan for testing the following features when Vhost-user using asynchronous data path with CBDMA channels in VM2VM virtio-user topology. @@ -26,7 +40,7 @@ The split ring mergeable path use indirect descriptor, the 2000,2000,2000,2000 c Note: 1.When DMA devices are bound to vfio driver, VA mode is the default and recommended. For PA mode, page by page mapping may exceed IOMMU's max capability, better to use 1G guest hugepage. -2.DPDK local patch that about vhost pmd is needed when testing Vhost asynchronous data path with testpmd. +2. DPDK local patch that about vhost pmd is needed when testing Vhost asynchronous data path with testpmd. For more about dpdk-testpmd sample, please refer to the DPDK docments: https://doc.dpdk.org/guides/testpmd_app_ug/run_app.html @@ -78,23 +92,22 @@ Common steps Test Case 1: VM2VM split ring non-mergeable path multi-queues payload check with cbdma enable --------------------------------------------------------------------------------------------- -This case uses testpmd to test the payload is valid after packets forwarding in vhost-user/virtio-user split ring non-mergeable path -and multi-queues when vhost uses the asynchronous operations with CBDMA channels. Both iova as VA and PA mode test. +This case uses testpmd to test the payload is valid after packets forwarding in vhost-user/virtio-user +split ring non-mergeable path and multi-queues when vhost uses the asynchronous operations with CBDMA channels. -1. Launch vhost by below command:: +1. Bind 2 CBDMA devices to vfio-pci, then launch vhost by below command:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:00:04.0 -a 0000:00:04.1 \ - --vdev 'eth_vhost0,iface=/root/dpdk/vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0]' \ - --vdev 'eth_vhost1,iface=/root/dpdk/vhost-net1,queues=2,client=1,dmas=[txq0;rxq0;rxq1]' \ - --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx \ - --lcore-dma=[lcore11@0000:00:04.0,lcore11@0000:00:04.1] + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:00:04.0 \ + --vdev 'eth_vhost0,iface=./vhost-net0,queues=2,client=1,dmas=[txq0@0000:00:04.0;txq1@0000:00:04.0;rxq0@0000:00:04.0]' \ + --vdev 'eth_vhost1,iface=./vhost-net1,queues=2,client=1,dmas=[txq1@0000:00:04.0;rxq0@0000:00:04.0;rxq1@0000:00:04.0]' \ + --iova=va -- -i --nb-cores=2 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx 2. Launch virtio-user1 by below command:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 7-8 \ + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 6-8 \ --no-pci --file-prefix=virtio1 \ - --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=/root/dpdk/vhost-net1,queues=2,server=1,mrg_rxbuf=0,in_order=0,queue_size=4096 \ - -- -i --enable-hw-vlan-strip --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 + --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=2,server=1,mrg_rxbuf=0,in_order=0,queue_size=4096 \ + -- -i --enable-hw-vlan-strip --nb-cores=2 --rxq=2 --txq=2 --txd=4096 --rxd=4096 testpmd>set fwd rxonly testpmd>start @@ -104,10 +117,9 @@ and multi-queues when vhost uses the asynchronous operations with CBDMA channels 4. Launch virtio-user0 and send packets:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 \ - --no-pci --file-prefix=virtio \ - --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/root/dpdk/vhost-net0,queues=2,server=1,mrg_rxbuf=0,in_order=0,queue_size=4096 \ - -- -i --enable-hw-vlan-strip --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 3-5 --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,mrg_rxbuf=0,in_order=0,queue_size=4096 \ + -- -i --enable-hw-vlan-strip --nb-cores=2 --rxq=2 --txq=2 --txd=4096 --rxd=4096 testpmd>set burst 1 testpmd>set txpkts 64,128,256,512 testpmd>start tx_first 27 @@ -127,13 +139,12 @@ and multi-queues when vhost uses the asynchronous operations with CBDMA channels testpmd>clear port stats all testpmd>start -7. Quit and relaunch vhost with iova=pa by below command:: +7. Quit and relaunch vhost by below command:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:00:04.0 -a 0000:00:04.1 \ - --vdev 'eth_vhost0,iface=/root/dpdk/vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0]' \ - --vdev 'eth_vhost1,iface=/root/dpdk/vhost-net1,queues=2,client=1,dmas=[txq0;rxq0;rxq1]' \ - --iova=pa -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx \ - --lcore-dma=[lcore11@0000:00:04.0,lcore11@0000:00:04.1] + --vdev 'eth_vhost0,iface=./vhost-net0,queues=2,client=1,dmas=[txq0@0000:00:04.0;txq1@0000:00:04.0;rxq0@0000:00:04.1;rxq1@0000:00:04.1]' \ + --vdev 'eth_vhost1,iface=./vhost-net1,queues=2,client=1,dmas=[txq0@0000:00:04.2;txq1@0000:00:04.2;rxq0@0000:00:04.3;rxq1@0000:00:04.3]' \ + --iova=va -- -i --nb-cores=2 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx 8. Attach pdump secondary process to primary process by same file-prefix:: @@ -156,22 +167,20 @@ and multi-queues when vhost uses the asynchronous operations with CBDMA channels Test Case 2: VM2VM split ring inorder non-mergeable path multi-queues payload check with cbdma enable ----------------------------------------------------------------------------------------------------- -This case uses testpmd to test the payload is valid after packets forwarding in vhost-user/virtio-user split ring inorder non-mergeable path -and multi-queues when vhost uses the asynchronous operations with CBDMA channels. Both iova as VA and PA mode test. +This case uses testpmd to test the payload is valid after packets forwarding in vhost-user/virtio-user +split ring inorder non-mergeable path and multi-queues when vhost uses the asynchronous operations with CBDMA channels. -1. Launch vhost by below command:: +1. Bind 4 CBDMA devices to vfio-pci, launch vhost by below command:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 \ - -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 -a 0000:00:04.4 \ - --vdev 'eth_vhost0,iface=/root/dpdk/vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0]' \ - --vdev 'eth_vhost1,iface=/root/dpdk/vhost-net1,queues=2,client=1,dmas=[txq0;rxq0;rxq1]' \ - --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx \ - --lcore-dma=[lcore11@0000:00:04.0,lcore11@0000:00:04.1,lcore11@0000:00:04.2,lcore11@0000:00:04.3,lcore11@0000:00:04.4] + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:00:04.0 \ + --vdev 'eth_vhost0,iface=./vhost-net0,queues=2,client=1,dmas=[txq0@0000:00:04.0;txq1@0000:00:04.0;rxq0@0000:00:04.0]' \ + --vdev 'eth_vhost1,iface=./vhost-net1,queues=2,client=1,dmas=[txq1@0000:00:04.0;rxq0@0000:00:04.0;rxq1@0000:00:04.0]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx 2. Launch virtio-user1 by below command:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 7-8 --no-pci --file-prefix=virtio1 \ - --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=/root/dpdk/vhost-net1,queues=2,server=1,mrg_rxbuf=0,in_order=1,queue_size=4096 \ + --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=2,server=1,mrg_rxbuf=0,in_order=1,queue_size=4096 \ -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 testpmd>set fwd rxonly testpmd>start @@ -183,17 +192,17 @@ and multi-queues when vhost uses the asynchronous operations with CBDMA channels 4. Launch virtio-user0 and send packets:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio \ - --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/root/dpdk/vhost-net0,queues=2,server=1,mrg_rxbuf=0,in_order=1,queue_size=4096 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,mrg_rxbuf=0,in_order=1,queue_size=4096 \ -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 testpmd>set burst 1 testpmd>set txpkts 64 - testpmd>start tx_first 27 - testpmd>stop + testpmd>start tx_first 27 + testpmd>stop testpmd>set burst 32 testpmd>start tx_first 7 testpmd>stop testpmd>set txpkts 64,256,2000,64,256,2000 - testpmd>start tx_first 1 + testpmd>start tx_first 1 testpmd>stop 5. Start vhost testpmd, check 502 packets and 32128 bytes received by virtio-user1 and 502 packets with 64 length in pdump-virtio-rx.pcap. @@ -204,14 +213,12 @@ and multi-queues when vhost uses the asynchronous operations with CBDMA channels testpmd>clear port stats all testpmd>start -7. Quit and relaunch vhost with iova=pa by below command:: +7. Quit and relaunch vhost by below command:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 \ - -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 -a 0000:00:04.4 \ - --vdev 'eth_vhost0,iface=/root/dpdk/vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0]' \ - --vdev 'eth_vhost1,iface=/root/dpdk/vhost-net1,queues=2,client=1,dmas=[txq0;rxq0;rxq1]' \ - --iova=pa -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx \ - --lcore-dma=[lcore11@0000:00:04.0,lcore11@0000:00:04.1,lcore11@0000:00:04.2,lcore11@0000:00:04.3,lcore11@0000:00:04.4] + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 \ + --vdev 'eth_vhost0,iface=./vhost-net0,queues=2,client=1,dmas=[txq0@0000:00:04.0;txq1@0000:00:04.0;rxq0@0000:00:04.1;rxq1@0000:00:04.1]' \ + --vdev 'eth_vhost1,iface=./vhost-net1,queues=2,client=1,dmas=[txq0@0000:00:04.2;txq1@0000:00:04.2;rxq0@0000:00:04.3;rxq1@0000:00:04.3]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx 8. Attach pdump secondary process to primary process by same file-prefix:: @@ -220,35 +227,33 @@ and multi-queues when vhost uses the asynchronous operations with CBDMA channels 9. Virtio-user0 send packets:: testpmd>set burst 1 - testpmd>start tx_first 27 - testpmd>stop + testpmd>start tx_first 27 + testpmd>stop testpmd>set burst 32 testpmd>start tx_first 7 testpmd>stop testpmd>set txpkts 64,256,2000,64,256,2000 - testpmd>start tx_first 1 + testpmd>start tx_first 1 testpmd>stop 10. Rerun step 5. Test Case 3: VM2VM split ring vectorized path multi-queues payload check with cbdma enable ------------------------------------------------------------------------------------------ -This case uses testpmd to test the payload is valid after packets forwarding in vhost-user/virtio-user split ring vectorized path -and multi-queues when vhost uses the asynchronous operations with CBDMA channels. Both iova as VA and PA mode test. +This case uses testpmd to test the payload is valid after packets forwarding in vhost-user/virtio-user +split ring vectorized path and multi-queues when vhost uses the asynchronous operations with CBDMA channels. -1. Launch vhost by below command:: +1. Bind 8 CBDMA devices to vfio-pci, launch vhost by below command:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 \ - -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 -a 0000:00:04.4 -a 0000:00:04.5 -a 0000:00:04.6 -a 0000:00:04.7 \ - --vdev 'eth_vhost0,iface=/root/dpdk/vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0]' \ - --vdev 'eth_vhost1,iface=/root/dpdk/vhost-net1,queues=2,client=1,dmas=[txq0;rxq0;rxq1]' \ - --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx \ - --lcore-dma=[lcore11@0000:00:04.0,lcore11@0000:00:04.1,lcore11@0000:00:04.2,lcore11@0000:00:04.3,lcore11@0000:00:04.4,lcore11@0000:00:04.5,lcore11@0000:00:04.6,lcore11@0000:00:04.7] + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:00:04.0 0 \ + --vdev 'eth_vhost0,iface=./vhost-net0,queues=2,client=1,dmas=[txq0@0000:00:04.0;txq1@0000:00:04.0;rxq0@0000:00:04.0]' \ + --vdev 'eth_vhost1,iface=./vhost-net1,queues=2,client=1,dmas=[txq1@0000:00:04.0;rxq0@0000:00:04.0;rxq1@0000:00:04.0]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx 2. Launch virtio-user1 by below command:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 7-8 --no-pci --file-prefix=virtio1 \ - --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=/root/dpdk/vhost-net1,queues=2,server=1,mrg_rxbuf=0,in_order=0,vectorized=1,queue_size=4096 \ + --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=2,server=1,mrg_rxbuf=0,in_order=0,vectorized=1,queue_size=4096 \ -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 testpmd>set fwd rxonly testpmd>start @@ -260,9 +265,8 @@ and multi-queues when vhost uses the asynchronous operations with CBDMA channels 4. Launch virtio-user0 and send packets:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio \ - --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/root/dpdk/vhost-net0,queues=2,server=1,mrg_rxbuf=0,in_order=0,,vectorized=1,queue_size=4096 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,mrg_rxbuf=0,in_order=0,,vectorized=1,queue_size=4096 \ -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 - testpmd>set burst 32 testpmd>set txpkts 64 testpmd>start tx_first 7 @@ -280,14 +284,13 @@ and multi-queues when vhost uses the asynchronous operations with CBDMA channels testpmd>clear port stats all testpmd>start -7. Quit and relaunch vhost with iova=pa by below command:: +7. Quit and relaunch vhost by below command:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 \ - -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 -a 0000:00:04.4 -a 0000:00:04.5 -a 0000:00:04.6 -a 0000:00:04.7 \ - --vdev 'eth_vhost0,iface=/root/dpdk/vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0]' \ - --vdev 'eth_vhost1,iface=/root/dpdk/vhost-net1,queues=2,client=1,dmas=[txq0;rxq0;rxq1]' \ - --iova=pa -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx \ - --lcore-dma=[lcore11@0000:00:04.0,lcore11@0000:00:04.1,lcore11@0000:00:04.2,lcore11@0000:00:04.3,lcore11@0000:00:04.4,lcore11@0000:00:04.5,lcore11@0000:00:04.6,lcore11@0000:00:04.7] + -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 -a 0000:00:04.4 -a 0000:00:04.5 -a 0000:00:04.6 -a 0000:00:04.7 \ + --vdev 'eth_vhost0,iface=./vhost-net0,queues=2,client=1,dmas=[txq0@0000:00:04.0;txq1@0000:00:04.1;rxq0@0000:00:04.2;rxq1@0000:00:04.3]' \ + --vdev 'eth_vhost1,iface=./vhost-net1,queues=2,client=1,dmas=[txq0@0000:00:04.4;txq1@0000:00:04.5;rxq0@0000:00:04.6;rxq1@0000:00:04.7]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx 8. Attach pdump secondary process to primary process by same file-prefix:: @@ -308,24 +311,21 @@ and multi-queues when vhost uses the asynchronous operations with CBDMA channels Test Case 4: VM2VM split ring inorder mergeable path test non-indirect descriptor with cbdma enable --------------------------------------------------------------------------------------------------- -This case uses testpmd to test the payload is valid and non-indirect descriptor after packets forwarding in vhost-user/virtio-user -split ring inorder mergeable path and multi-queues when vhost uses the asynchronous operations with CBDMA channels. Both -iova as VA and PA mode test. +This case uses testpmd to test the payload is valid and non-indirect descriptor after packets forwarding +in vhost-user/virtio-user split ring inorder mergeable path and multi-queues when vhost uses the asynchronous +operations with CBDMA channels. Both iova as VA and PA mode test. -1. Launch testpmd by below command:: +1. Bind 8 CBDMA devices to vfio-pci, launch testpmd by below command:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 \ - -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 \ - --vdev 'eth_vhost0,iface=/root/dpdk/vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0]' \ - --vdev 'eth_vhost1,iface=/root/dpdk/vhost-net1,queues=2,client=1,dmas=[txq0;rxq0;rxq1]' \ - --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx \ - --lcore-dma=[lcore11@0000:00:04.0,lcore11@0000:00:04.1,lcore11@0000:00:04.2,lcore11@0000:00:04.3] + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:00:04.0 -a 0000:00:04.1 \ + --vdev 'eth_vhost0,iface=./vhost-net0,queues=2,client=1,dmas=[txq0@0000:00:04.0;txq1@0000:00:04.0;rxq0@0000:00:04.0]' \ + --vdev 'eth_vhost1,iface=./vhost-net1,queues=2,client=1,dmas=[txq0@0000:00:04.0;rxq0@0000:00:04.0;rxq1@0000:00:04.0]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx 2. Launch virtio-user1 by below command:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 7-8 \ - --no-pci --file-prefix=virtio1 \ - --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=/root/dpdk/vhost-net1,queues=2,server=1,mrg_rxbuf=1,in_order=1,queue_size=256 \ + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 7-8 --no-pci --file-prefix=virtio1 \ + --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=2,server=1,mrg_rxbuf=1,in_order=1,queue_size=256 \ -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 testpmd>set fwd rxonly testpmd>start @@ -336,9 +336,8 @@ iova as VA and PA mode test. 4. Launch virtio-user0 and send packets(include 251 small packets and 32 8K packets):: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 \ - --no-pci --file-prefix=virtio \ - --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/root/dpdk/vhost-net0,queues=2,server=1,mrg_rxbuf=1,in_order=1,queue_size=256 \ + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,mrg_rxbuf=1,in_order=1,queue_size=256 \ -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 testpmd>set burst 1 testpmd>set txpkts 64 @@ -354,35 +353,32 @@ iova as VA and PA mode test. 5. Start vhost, then quit pdump and three testpmd, about split virtqueue inorder mergeable path, it use the non-direct descriptors, the 8k length pkt will occupies 5 ring:2000,2000,2000,2000 will need 4 consequent ring, still need one ring put header. So check 504 packets and 48128 bytes received by virtio-user1 and 502 packets with 64 length and 2 packets with 8K length in pdump-virtio-rx.pcap. -6. Relaunch vhost with iova=pa by below command:: +6. Relaunch vhost by below command:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 \ - -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 \ - --vdev 'eth_vhost0,iface=/root/dpdk/vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0]' \ - --vdev 'eth_vhost1,iface=/root/dpdk/vhost-net1,queues=2,client=1,dmas=[txq0;rxq0;rxq1]' \ - --iova=pa -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx \ - --lcore-dma=[lcore11@0000:00:04.0,lcore11@0000:00:04.1,lcore11@0000:00:04.2,lcore11@0000:00:04.3] + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 -a 0000:00:04.4 -a 0000:00:04.5 -a 0000:00:04.6 -a 0000:00:04.7 \ + --vdev 'eth_vhost0,iface=./vhost-net0,queues=2,client=1,dmas=[txq0@0000:00:04.0;txq1@0000:00:04.1;rxq0@0000:00:04.2;rxq1@0000:00:04.3]' \ + --vdev 'eth_vhost1,iface=./vhost-net1,queues=2,client=1,dmas=[txq0@0000:00:04.4;txq1@0000:00:04.5;rxq0@0000:00:04.6;rxq1@0000:00:04.7]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx 7. Rerun step 2-5. Test Case 5: VM2VM split ring mergeable path test indirect descriptor with cbdma enable --------------------------------------------------------------------------------------- -This case uses testpmd to test the payload is valid and indirect descriptor after packets forwarding in vhost-user/virtio-user -split ring mergeable path and multi-queues when vhost uses the asynchronous operations with CBDMA channels. Both iova as VA and PA mode test. +This case uses testpmd to test the payload is valid and indirect descriptor after packets +forwarding in vhost-user/virtio-user split ring mergeable path and multi-queues when vhost +uses the asynchronous operations with CBDMA channels. -1. Launch testpmd by below command:: +1. Bind 8 CBDMA devices to vfio-pci, launch testpmd by below command:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 \ - -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 \ - --vdev 'eth_vhost0,iface=/root/dpdk/vhost-net0,queues=2,client=1,dmas=[txq0;rxq0;rxq1]' \ - --vdev 'eth_vhost1,iface=/root/dpdk/vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0]' \ - --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx \ - --lcore-dma=[lcore11@0000:00:04.0,lcore11@0000:00:04.1,lcore11@0000:00:04.2,lcore11@0000:00:04.3] + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:00:04.0 -a 0000:00:04.1 \ + --vdev 'eth_vhost0,iface=./vhost-net0,queues=2,client=1,dmas=[txq0@0000:00:04.0;rxq0@0000:00:04.0;rxq1@0000:00:04.0]' \ + --vdev 'eth_vhost1,iface=./vhost-net1,queues=2,client=1,dmas=[txq0@0000:00:04.1;txq1@0000:00:04.1;rxq0@0000:00:04.1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx 2. Launch virtio-user1 by below command:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 7-8 --no-pci --file-prefix=virtio1 \ - --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=/root/dpdk/vhost-net1,queues=2,server=1,mrg_rxbuf=1,in_order=0,queue_size=256 \ + --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=2,server=1,mrg_rxbuf=1,in_order=0,queue_size=256 \ -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 testpmd>set fwd rxonly testpmd>start @@ -393,9 +389,8 @@ split ring mergeable path and multi-queues when vhost uses the asynchronous oper 4. Launch virtio-user0 and send packets(include 251 small packets and 32 8K packets):: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 \ - --no-pci --file-prefix=virtio \ - --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/root/dpdk/vhost-net0,queues=2,server=1,mrg_rxbuf=1,in_order=0,queue_size=256 \ + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,mrg_rxbuf=1,in_order=0,queue_size=256 \ -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 testpmd>set burst 1 testpmd>set txpkts 64 @@ -411,35 +406,31 @@ split ring mergeable path and multi-queues when vhost uses the asynchronous oper 5. Start vhost, then quit pdump and three testpmd, about split virtqueue mergeable path, it use the indirect descriptors, the 8k length pkt will just occupies one ring. So check 512 packets and 112128 bytes received by virtio-user1 and 502 packets with 64 length and 10 packets with 8K length in pdump-virtio-rx.pcap. -6. Quit and relaunch vhost with iova=pa by below command:: +6. Quit and relaunch vhost by below command:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 \ - -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 \ - --vdev 'eth_vhost0,iface=/root/dpdk/vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]' \ - --vdev 'eth_vhost1,iface=/root/dpdk/vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]' \ - --iova=pa -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx \ - --lcore-dma=[lcore11@0000:00:04.0,lcore11@0000:00:04.1,lcore11@0000:00:04.2,lcore11@0000:00:04.3] + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 -a 0000:00:04.4 -a 0000:00:04.5 -a 0000:00:04.6 -a 0000:00:04.7 \ + --vdev 'eth_vhost0,iface=./vhost-net0,queues=2,client=1,dmas=[txq0@0000:00:04.0;txq0@0000:00:04.1;rxq0@0000:00:04.2;rxq1@0000:00:04.3]' \ + --vdev 'eth_vhost1,iface=./vhost-net1,queues=2,client=1,dmas=[txq0@0000:00:04.4;txq0@0000:00:04.5;rxq0@0000:00:04.6;rxq1@0000:00:04.7]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx 7. Rerun step 2-5. Test Case 6: VM2VM packed ring non-mergeable path multi-queues payload check with cbdma enable ---------------------------------------------------------------------------------------------- -This case uses testpmd to test the payload is valid after packets forwarding in vhost-user/virtio-user packed ring non-mergeable path -and multi-queues when vhost uses the asynchronous operations with CBDMA channels. Both iova as VA and PA mode test. +This case uses testpmd to test the payload is valid after packets forwarding in vhost-user/virtio-user +packed ring non-mergeable path and multi-queues when vhost uses the asynchronous operations with CBDMA channels. -1. Launch vhost by below command:: +1. Bind 2 CBDMA devices to vfio-pci, launch vhost by below command:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:00:04.0 -a 0000:00:04.1 \ - --vdev 'eth_vhost0,iface=/root/dpdk/vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]' \ - --vdev 'eth_vhost1,iface=/root/dpdk/vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]' \ - --iova=va -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx \ - --lcore-dma=[lcore11@0000:00:04.0,lcore11@0000:00:04.1] + --vdev 'eth_vhost0,iface=./vhost-net0,queues=2,client=1,dmas=[txq0@0000:00:04.0;txq1@0000:00:04.1;rxq0@0000:00:04.0;rxq1@0000:00:04.1]' \ + --vdev 'eth_vhost1,iface=./vhost-net1,queues=2,client=1,dmas=[txq0@0000:00:04.0;txq1@0000:00:04.1;rxq0@0000:00:04.0;rxq1@0000:00:04.1]' \ + --iova=va -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx 2. Launch virtio-user1 by below command:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 7-8 \ - --no-pci --file-prefix=virtio1 \ - --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=/root/dpdk/vhost-net1,queues=2,server=1,packed_vq=1,mrg_rxbuf=0,in_order=0,queue_size=4096 \ + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 7-8 --no-pci --file-prefix=virtio1 \ + --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=2,server=1,packed_vq=1,mrg_rxbuf=0,in_order=0,queue_size=4096 \ -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 testpmd>set fwd rxonly testpmd>start @@ -450,11 +441,9 @@ and multi-queues when vhost uses the asynchronous operations with CBDMA channels 4. Launch virtio-user0 and send packets:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 \ - --no-pci --file-prefix=virtio \ - --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/root/dpdk/vhost-net0,queues=2,server=1,packed_vq=1,mrg_rxbuf=0,in_order=0,queue_size=4096 \ + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,packed_vq=1,mrg_rxbuf=0,in_order=0,queue_size=4096 \ -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 - testpmd>set burst 32 testpmd>set txpkts 64 testpmd>start tx_first 7 @@ -475,10 +464,9 @@ and multi-queues when vhost uses the asynchronous operations with CBDMA channels 7. Quit and relaunch vhost with iova=pa by below command:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:00:04.0 -a 0000:00:04.1 \ - --vdev 'eth_vhost0,iface=/root/dpdk/vhost-net0,queues=2,client=1,dmas=[txq0;rxq0;rxq1]' \ - --vdev 'eth_vhost1,iface=/root/dpdk/vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0]' \ - --iova=pa -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx \ - --lcore-dma=[lcore11@0000:00:04.0,lcore11@0000:00:04.1] + --vdev 'eth_vhost0,iface=./vhost-net0,queues=2,client=1,dmas=[txq0@0000:00:04.0;rxq0@0000:00:04.0;rxq1@0000:00:04.1]' \ + --vdev 'eth_vhost1,iface=./vhost-net1,queues=2,client=1,dmas=[txq0@0000:00:04.0;txq1@0000:00:04.1;rxq0@0000:00:04.0]' \ + --iova=va -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx 8. Attach pdump secondary process to primary process by same file-prefix:: @@ -499,22 +487,21 @@ and multi-queues when vhost uses the asynchronous operations with CBDMA channels Test Case 7: VM2VM packed ring mergeable path multi-queues payload check with cbdma enable ------------------------------------------------------------------------------------------ -This case uses testpmd to test the payload is valid after packets forwarding in vhost-user/virtio-user packed ring mergeable path -and multi-queues when vhost uses the asynchronous operations with CBDMA channels. Both iova as VA and PA mode test. +This case uses testpmd to test the payload is valid after packets forwarding in vhost-user/virtio-user +packed ring mergeable path and multi-queues when vhost uses the asynchronous operations with CBDMA channels. -1. Launch vhost by below command:: +1. Bind 8 CBDMA devices to vfio-pci, launch vhost by below command:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:00:04.0 \ - --vdev 'eth_vhost0,iface=/root/dpdk/vhost-net0,queues=2,client=1,dmas=[txq0;rxq0;rxq1]' \ - --vdev 'eth_vhost1,iface=/root/dpdk/vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0]' \ - --iova=va -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx \ - --lcore-dma=[lcore11@0000:00:04.0] + --vdev 'eth_vhost0,iface=./vhost-net0,queues=2,client=1,dmas=[txq0@0000:00:04.0;rxq0@0000:00:04.0;rxq1@0000:00:04.0]' \ + --vdev 'eth_vhost1,iface=./vhost-net1,queues=2,client=1,dmas=[txq0@0000:00:04.0;txq1@0000:00:04.0;rxq0@0000:00:04.0]' \ + --iova=va -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx 2. Launch virtio-user1 by below command:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 7-8 \ --no-pci --file-prefix=virtio1 \ - --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=/root/dpdk/vhost-net1,queues=2,server=1,packed_vq=1,mrg_rxbuf=1,in_order=0,queue_size=4096 \ + --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=2,server=1,packed_vq=1,mrg_rxbuf=1,in_order=0,queue_size=4096 \ -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 testpmd>set fwd rxonly testpmd>start @@ -525,9 +512,8 @@ and multi-queues when vhost uses the asynchronous operations with CBDMA channels 4. Launch virtio-user0 and send packets:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 \ - --no-pci --file-prefix=virtio \ - --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/root/dpdk/vhost-net0,queues=2,server=1,packed_vq=1,mrg_rxbuf=1,in_order=0,queue_size=4096 \ + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,packed_vq=1,mrg_rxbuf=1,in_order=0,queue_size=4096 \ -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 testpmd>set burst 1 testpmd>set txpkts 64,256,2000,64,256,2000 @@ -546,13 +532,12 @@ and multi-queues when vhost uses the asynchronous operations with CBDMA channels testpmd>clear port stats all testpmd>start -7. Quit and relaunch vhost with iova=pa by below command:: +7. Quit and relaunch vhost by below command:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:00:04.0 \ - --vdev 'eth_vhost0,iface=/root/dpdk/vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]' \ - --vdev 'eth_vhost1,iface=/root/dpdk/vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]' \ - --iova=pa -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx \ - --lcore-dma=[lcore11@0000:00:04.0] + --vdev 'eth_vhost0,iface=./vhost-net0,queues=2,client=1,dmas=[txq0@0000:00:04.0;txq0@0000:00:04.1;rxq0@0000:00:04.2;rxq1@0000:00:04.3]' \ + --vdev 'eth_vhost1,iface=./vhost-net1,queues=2,client=1,dmas=[txq0@0000:00:04.4;txq0@0000:00:04.5;rxq0@0000:00:04.6;rxq1@0000:00:04.7]' \ + --iova=va -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx 8. Attach pdump secondary process to primary process by same file-prefix:: @@ -573,23 +558,20 @@ and multi-queues when vhost uses the asynchronous operations with CBDMA channels Test Case 8: VM2VM packed ring inorder mergeable path multi-queues payload check with cbdma enable -------------------------------------------------------------------------------------------------- -This case uses testpmd to test the payload is valid after packets forwarding in vhost-user/virtio-user packed ring inorder mergeable path -and multi-queues when vhost uses the asynchronous operations with CBDMA channels. Both iova as VA and PA mode test. +This case uses testpmd to test the payload is valid after packets forwarding in vhost-user/virtio-user +packed ring inorder mergeable path and multi-queues when vhost uses the asynchronous operations with CBDMA channels. -1. Launch vhost by below command:: +1. Bind 4 CBDMA devices to vfio-pci, launch vhost by below command:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 \ - -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 -a 0000:00:04.4 \ - --vdev 'eth_vhost0,iface=/root/dpdk/vhost-net0,queues=2,client=1,dmas=[txq0;rxq0;rxq1]' \ - --vdev 'eth_vhost1,iface=/root/dpdk/vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0]' \ - --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx \ - --lcore-dma=[lcore11@0000:00:04.0,lcore11@0000:00:04.1,lcore11@0000:00:04.2,lcore11@0000:00:04.3,lcore11@0000:00:04.4] + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:00:04.0 \ + --vdev 'eth_vhost0,iface=./vhost-net0,queues=2,client=1,dmas=[txq0@0000:00:04.0;rxq0@0000:00:04.0;rxq1@0000:00:04.0]' \ + --vdev 'eth_vhost1,iface=./vhost-net1,queues=2,client=1,dmas=[txq0@0000:00:04.0;txq1@0000:00:04.0;rxq0@0000:00:04.0]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx 2. Launch virtio-user1 by below command:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 7-8 \ - --no-pci --file-prefix=virtio1 \ - --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=/root/dpdk/vhost-net1,queues=2,server=1,packed_vq=1,mrg_rxbuf=1,in_order=1,queue_size=4096 \ + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 7-8 --no-pci --file-prefix=virtio1 \ + --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=2,server=1,packed_vq=1,mrg_rxbuf=1,in_order=1,queue_size=4096 \ -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 testpmd>set fwd rxonly testpmd>start @@ -600,9 +582,8 @@ and multi-queues when vhost uses the asynchronous operations with CBDMA channels 4. Launch virtio-user0 and send 8k length packets:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 \ - --no-pci --file-prefix=virtio \ - --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/root/dpdk/vhost-net0,queues=2,server=1,packed_vq=1,mrg_rxbuf=1,in_order=1,queue_size=4096 \ + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,packed_vq=1,mrg_rxbuf=1,in_order=1,queue_size=4096 \ -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 testpmd>set burst 1 testpmd>set txpkts 64,256,2000,64,256,2000 @@ -621,14 +602,12 @@ and multi-queues when vhost uses the asynchronous operations with CBDMA channels testpmd>clear port stats all testpmd>start -7. Quit and relaunch vhost with iova=pa by below command:: +7. Quit and relaunch vhost by below command:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 \ - -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 -a 0000:00:04.4 \ - --vdev 'eth_vhost0,iface=/root/dpdk/vhost-net0,queues=2,client=1,dmas=[txq0;rxq0;rxq1]' \ - --vdev 'eth_vhost1,iface=/root/dpdk/vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0]' \ - --iova=pa -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx \ - --lcore-dma=[lcore11@0000:00:04.0,lcore11@0000:00:04.1,lcore11@0000:00:04.2,lcore11@0000:00:04.3,lcore11@0000:00:04.4] + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 \ + --vdev 'eth_vhost0,iface=./vhost-net0,queues=2,client=1,dmas=[txq0@0000:00:04.0;txq0@0000:00:04.1;rxq0@0000:00:04.2;rxq1@0000:00:04.3]' \ + --vdev 'eth_vhost1,iface=./vhost-net1,queues=2,client=1,dmas=[txq0@0000:00:04.0;txq0@0000:00:04.1;rxq0@0000:00:04.2;rxq1@0000:00:04.3]' \ + --iova=pa -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx 8. Attach pdump secondary process to primary process by same file-prefix:: @@ -649,23 +628,21 @@ and multi-queues when vhost uses the asynchronous operations with CBDMA channels Test Case 9: VM2VM packed ring inorder non-mergeable path multi-queues payload check with cbdma enable ------------------------------------------------------------------------------------------------------ -This case uses testpmd to test the payload is valid after packets forwarding in vhost-user/virtio-user packed ring inorder non-mergeable path -and multi-queues when vhost uses the asynchronous operations with CBDMA channels. Both iova as VA and PA mode test. +This case uses testpmd to test the payload is valid after packets forwarding in vhost-user/virtio-user +packed ring inorder non-mergeable path and multi-queues when vhost uses the asynchronous operations with CBDMA channels. -1. Launch vhost by below command:: +1. Bind 4 CBDMA devices to vfio-pci, launch vhost by below command:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 \ - -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 -a 0000:00:04.4 -a 0000:00:04.5 -a 0000:00:04.6 -a 0000:00:04.7 \ - --vdev 'eth_vhost0,iface=/root/dpdk/vhost-net0,queues=2,client=1,dmas=[txq0;rxq0]' \ - --vdev 'eth_vhost1,iface=/root/dpdk/vhost-net1,queues=2,client=1,dmas=[txq1;rxq1]' \ - --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx \ - --lcore-dma=[lcore11@0000:00:04.0,lcore11@0000:00:04.1,lcore11@0000:00:04.2,lcore11@0000:00:04.3,lcore11@0000:00:04.4,lcore11@0000:00:04.5,lcore11@0000:00:04.6,lcore11@0000:00:04.7] + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:00:04.0 -a 0000:00:04.1 \ + --vdev 'eth_vhost0,iface=./vhost-net0,queues=2,client=1,dmas=[txq0@0000:00:04.0;rxq0@0000:00:04.1]' \ + --vdev 'eth_vhost1,iface=./vhost-net1,queues=2,client=1,dmas=[txq1@0000:00:04.0;rxq1@0000:00:04.1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx 2. Launch virtio-user1 by below command:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 7-8 \ --no-pci --file-prefix=virtio1 \ - --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=/root/dpdk/vhost-net1,queues=2,server=1,packed_vq=1,mrg_rxbuf=0,in_order=1,queue_size=4096 \ + --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=2,server=1,packed_vq=1,mrg_rxbuf=0,in_order=1,queue_size=4096 \ -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 testpmd>set fwd rxonly testpmd>start @@ -676,11 +653,9 @@ and multi-queues when vhost uses the asynchronous operations with CBDMA channels 4. Launch virtio-user0 and send 8k length packets:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 \ - --no-pci --file-prefix=virtio \ - --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/root/dpdk/vhost-net0,queues=2,server=1,packed_vq=1,mrg_rxbuf=0,in_order=1,queue_size=4096 \ + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,packed_vq=1,mrg_rxbuf=0,in_order=1,queue_size=4096 \ -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 - testpmd>set burst 32 testpmd>set txpkts 64 testpmd>start tx_first 7 @@ -698,14 +673,12 @@ and multi-queues when vhost uses the asynchronous operations with CBDMA channels testpmd>clear port stats all testpmd>start -7. Quit and relaunch vhost with iova=pa by below command:: +7. Quit and relaunch vhost by below command:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 \ - -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 -a 0000:00:04.4 -a 0000:00:04.5 -a 0000:00:04.6 -a 0000:00:04.7 \ - --vdev 'eth_vhost0,iface=/root/dpdk/vhost-net0,queues=2,client=1,dmas=[txq0;rxq0]' \ - --vdev 'eth_vhost1,iface=/root/dpdk/vhost-net1,queues=2,client=1,dmas=[txq1;rxq1]' \ - --iova=pa -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx \ - --lcore-dma=[lcore11@0000:00:04.0,lcore11@0000:00:04.1,lcore11@0000:00:04.2,lcore11@0000:00:04.3,lcore11@0000:00:04.4,lcore11@0000:00:04.5,lcore11@0000:00:04.6,lcore11@0000:00:04.7] + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.3 -a 0000:00:04.4 \ + --vdev 'eth_vhost0,iface=./vhost-net0,queues=2,client=1,dmas=[txq0@0000:00:04.0;txq0@0000:00:04.1;rxq0@0000:00:04.2;rxq1@0000:00:04.3]' \ + --vdev 'eth_vhost1,iface=./vhost-net1,queues=2,client=1,dmas=[txq0@0000:00:04.0;txq0@0000:00:04.1;rxq0@0000:00:04.2;rxq1@0000:00:04.3]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx 8. Attach pdump secondary process to primary process by same file-prefix:: @@ -726,21 +699,20 @@ and multi-queues when vhost uses the asynchronous operations with CBDMA channels Test Case 10: VM2VM packed ring vectorized-rx path multi-queues payload check with cbdma enable ----------------------------------------------------------------------------------------------- -This case uses testpmd to test the payload is valid after packets forwarding in vhost-user/virtio-user packed ring vectorized-rx path -and multi-queues when vhost uses the asynchronous operations with CBDMA channels. Both iova as VA and PA mode test. +This case uses testpmd to test the payload is valid after packets forwarding in vhost-user/virtio-user +packed ring vectorized-rx path and multi-queues when vhost uses the asynchronous operations with CBDMA channels. -1. Launch vhost by below command:: +1. Bind 4 CBDMA devices to vfio-pci, launch vhost by below command:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 -a 0000:00:04.4 -a 0000:00:04.5 -a 0000:00:04.6 -a 0000:00:04.7 \ - --vdev 'eth_vhost0,iface=/root/dpdk/vhost-net0,queues=2,client=1,dmas=[txq0;rxq0]' \ - --vdev 'eth_vhost1,iface=/root/dpdk/vhost-net1,queues=2,client=1,dmas=[txq1;rxq1]' \ - --iova=va -- -i --nb-cores=2 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx \ - --lcore-dma=[lcore11@0000:00:04.0,lcore11@0000:00:04.1,lcore11@0000:00:04.2,lcore11@0000:00:04.3,lcore12@0000:00:04.4,lcore12@0000:00:04.5,lcore12@0000:00:04.6,lcore12@0000:00:04.7] + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:00:04.0 \ + --vdev 'eth_vhost0,iface=./vhost-net0,queues=2,client=1,dmas=[txq0@0000:00:04.0;rxq0@0000:00:04.0]' \ + --vdev 'eth_vhost1,iface=./vhost-net1,queues=2,client=1,dmas=[txq1@0000:00:04.0;rxq1@0000:00:04.0]' \ + --iova=va -- -i --nb-cores=2 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx 2. Launch virtio-user1 by below command:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 7-8 --no-pci --file-prefix=virtio1 --force-max-simd-bitwidth=512 \ - --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=/root/dpdk/vhost-net1,queues=2,server=1,packed_vq=1,mrg_rxbuf=0,in_order=1,vectorized=1,queue_size=4096 \ + --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=2,server=1,packed_vq=1,mrg_rxbuf=0,in_order=1,vectorized=1,queue_size=4096 \ -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 testpmd>set fwd rxonly testpmd>start @@ -752,9 +724,8 @@ and multi-queues when vhost uses the asynchronous operations with CBDMA channels 4. Launch virtio-user0 and send 8k length packets:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --force-max-simd-bitwidth=512 --no-pci --file-prefix=virtio \ - --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/root/dpdk/vhost-net0,queues=2,server=1,packed_vq=1,mrg_rxbuf=0,in_order=1,vectorized=1,queue_size=4096 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,packed_vq=1,mrg_rxbuf=0,in_order=1,vectorized=1,queue_size=4096 \ -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 - testpmd>set burst 32 testpmd>set txpkts 64 testpmd>start tx_first 7 @@ -772,14 +743,12 @@ and multi-queues when vhost uses the asynchronous operations with CBDMA channels testpmd>clear port stats all testpmd>start -7. Quit and relaunch vhost with iova=pa by below command:: +7. Quit and relaunch vhost by below command:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 \ - -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 -a 0000:00:04.4 -a 0000:00:04.5 -a 0000:00:04.6 -a 0000:00:04.7 \ - --vdev 'eth_vhost0,iface=/root/dpdk/vhost-net0,queues=2,client=1,dmas=[txq0;rxq0]' \ - --vdev 'eth_vhost1,iface=/root/dpdk/vhost-net1,queues=2,client=1,dmas=[txq1;rxq1]' \ - --iova=pa -- -i --nb-cores=2 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx \ - --lcore-dma=[lcore11@0000:00:04.0,lcore11@0000:00:04.1,lcore11@0000:00:04.2,lcore11@0000:00:04.3,lcore12@0000:00:04.4,lcore12@0000:00:04.5,lcore12@0000:00:04.6,lcore12@0000:00:04.7] + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:00:04.0 \ + --vdev 'eth_vhost0,iface=./vhost-net0,queues=2,client=1,dmas=[txq0@0000:00:04.0;txq0@0000:00:04.1;rxq0@0000:00:04.2;rxq1@0000:00:04.3]' \ + --vdev 'eth_vhost1,iface=./vhost-net1,queues=2,client=1,dmas=[txq0@0000:00:04.0;txq0@0000:00:04.1;rxq0@0000:00:04.2;rxq1@0000:00:04.3]' \ + --iova=pa -- -i --nb-cores=2 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx 8. Attach pdump secondary process to primary process by same file-prefix:: @@ -800,22 +769,20 @@ and multi-queues when vhost uses the asynchronous operations with CBDMA channels Test Case 11: VM2VM packed ring vectorized path multi-queues payload check test with ring size is not power of 2 with cbdma enable ---------------------------------------------------------------------------------------------------------------------------------- -This case uses testpmd to test the payload is valid after packets forwarding in vhost-user/virtio-user packed ring vectorized path with ring size is not power of 2 -and multi-queues when vhost uses the asynchronous operations with CBDMA channels. Both iova as VA and PA mode test. +This case uses testpmd to test the payload is valid after packets forwarding in vhost-user/virtio-user packed ring vectorized path +with ring size is not power of 2 and multi-queues when vhost uses the asynchronous operations with CBDMA channels. -1. Launch vhost by below command:: +1. Bind 8 CBDMA devices to vfio-pci, launch vhost by below command:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 \ - -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 -a 0000:00:04.4 -a 0000:00:04.5 -a 0000:00:04.6 -a 0000:00:04.7 \ - --vdev 'eth_vhost0,iface=/root/dpdk/vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]' \ - --vdev 'eth_vhost1,iface=/root/dpdk/vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]' \ - --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx \ - --lcore-dma=[lcore11@0000:00:04.0,lcore11@0000:00:04.1,lcore11@0000:00:04.2,lcore11@0000:00:04.3,lcore11@0000:00:04.4,lcore11@0000:00:04.5,lcore11@0000:00:04.6,lcore11@0000:00:04.7] + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:00:04.0 \ + --vdev 'eth_vhost0,iface=./vhost-net0,queues=2,client=1,dmas=[txq0@0000:00:04.0;txq1@0000:00:04.0;rxq0@0000:00:04.0;rxq1@0000:00:04.0]' \ + --vdev 'eth_vhost1,iface=./vhost-net1,queues=2,client=1,dmas=[txq0@0000:00:04.0;txq1@0000:00:04.0;rxq0@0000:00:04.0;rxq1@0000:00:04.0]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx 2. Launch virtio-user1 by below command:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 7-8 --force-max-simd-bitwidth=512 --no-pci --file-prefix=virtio1 \ - --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=/root/dpdk/vhost-net1,queues=2,server=1,packed_vq=1,mrg_rxbuf=0,in_order=1,vectorized=1,queue_size=4097 \ + --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=2,server=1,packed_vq=1,mrg_rxbuf=0,in_order=1,vectorized=1,queue_size=4097 \ -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4097 --rxd=4097 testpmd>set fwd rxonly testpmd>start @@ -827,9 +794,8 @@ and multi-queues when vhost uses the asynchronous operations with CBDMA channels 4. Launch virtio-user0 and send 8k length packets:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --force-max-simd-bitwidth=512 --no-pci --file-prefix=virtio \ - --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/root/dpdk/vhost-net0,queues=2,server=1,packed_vq=1,mrg_rxbuf=0,in_order=1,vectorized=1,queue_size=4097 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,packed_vq=1,mrg_rxbuf=0,in_order=1,vectorized=1,queue_size=4097 \ -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4097 --rxd=4097 - testpmd>set burst 32 testpmd>set txpkts 64 testpmd>start tx_first 7 @@ -847,14 +813,12 @@ and multi-queues when vhost uses the asynchronous operations with CBDMA channels testpmd>clear port stats all testpmd>start -7. Quit and relaunch vhost with iova=pa by below command:: +7. Quit and relaunch vhost by below command:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 \ - -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 -a 0000:00:04.4 -a 0000:00:04.5 -a 0000:00:04.6 -a 0000:00:04.7 \ - --vdev 'eth_vhost0,iface=/root/dpdk/vhost-net0,queues=2,client=1,dmas=[rxq0]' \ - --vdev 'eth_vhost1,iface=/root/dpdk/vhost-net1,queues=2,client=1,dmas=[txq1]' \ - --iova=pa -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx \ - --lcore-dma=[lcore11@0000:00:04.0,lcore11@0000:00:04.1,lcore11@0000:00:04.2,lcore12@0000:00:04.3,lcore12@0000:00:04.4,lcore12@0000:00:04.5,lcore12@0000:00:04.6,lcore12@0000:00:04.7] + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 \ + --vdev 'eth_vhost0,iface=./vhost-net0,queues=2,client=1,dmas=[txq0@0000:00:04.0;txq1@0000:00:04.1;rxq0@0000:00:04.0;rxq1@0000:00:04.1]' \ + --vdev 'eth_vhost1,iface=./vhost-net1,queues=2,client=1,dmas=[txq0@0000:00:04.2;txq1@0000:00:04.3;rxq0@0000:00:04.2;rxq1@0000:00:04.3]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx 8. Attach pdump secondary process to primary process by same file-prefix:: @@ -876,21 +840,19 @@ and multi-queues when vhost uses the asynchronous operations with CBDMA channels Test Case 12: VM2VM packed ring vectorized-tx path multi-queues test indirect descriptor and payload check with cbdma enable ---------------------------------------------------------------------------------------------------------------------------- This case uses testpmd to test the payload is valid and indirect descriptor after packets forwarding in vhost-user/virtio-user -packed ring vectorized-tx path and multi-queues when vhost uses the asynchronous operations with CBDMA channels. Both iova as VA and PA mode test. +packed ring vectorized-tx path and multi-queues when vhost uses the asynchronous operations with CBDMA channels. -1. Launch vhost by below command:: +1. Bind 4 CBDMA devices to vfio-pci, launch vhost by below command:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 \ - -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 -a 0000:00:04.4 -a 0000:00:04.5 -a 0000:00:04.6 -a 0000:00:04.7 \ - --vdev 'eth_vhost0,iface=/root/dpdk/vhost-net0,queues=2,client=1,dmas=[rxq0]' \ - --vdev 'eth_vhost1,iface=/root/dpdk/vhost-net1,queues=2,client=1,dmas=[txq1]' \ - --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx \ - --lcore-dma=[lcore11@0000:00:04.0,lcore11@0000:00:04.1,lcore11@0000:00:04.2,lcore11@0000:00:04.3,lcore11@0000:00:04.4,lcore11@0000:00:04.5,lcore11@0000:00:04.6,lcore11@0000:00:04.7] + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:00:04.0 \ + --vdev 'eth_vhost0,iface=./vhost-net0,queues=2,client=1,dmas=[rxq0@0000:00:04.0]' \ + --vdev 'eth_vhost1,iface=./vhost-net1,queues=2,client=1,dmas=[txq1@0000:00:04.0]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx 2. Launch virtio-user1 by below command:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 7-8 --no-pci --file-prefix=virtio1 --force-max-simd-bitwidth=512 \ - --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=/root/dpdk/vhost-net1,queues=2,server=1,packed_vq=1,mrg_rxbuf=1,in_order=1,vectorized=1,queue_size=256 \ + --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=2,server=1,packed_vq=1,mrg_rxbuf=1,in_order=1,vectorized=1,queue_size=256 \ -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 testpmd>set fwd rxonly testpmd>start @@ -902,9 +864,8 @@ packed ring vectorized-tx path and multi-queues when vhost uses the asynchronous 4. Launch virtio-user0 and send 8k length packets:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --force-max-simd-bitwidth=512 --no-pci --file-prefix=virtio \ - --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/root/dpdk/vhost-net0,queues=2,server=1,packed_vq=1,mrg_rxbuf=1,in_order=1,vectorized=1,queue_size=256 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,packed_vq=1,mrg_rxbuf=1,in_order=1,vectorized=1,queue_size=256 \ -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 - testpmd>set burst 1 testpmd>set txpkts 64 testpmd>start tx_first 27 @@ -919,35 +880,31 @@ packed ring vectorized-tx path and multi-queues when vhost uses the asynchronous 5. Start vhost, then quit pdump and three testpmd, about packed virtqueue vectorized-tx path, it use the indirect descriptors, the 8k length pkt will just occupies one ring. So check 512 packets and 112128 bytes received by virtio-user1 and 502 packets with 64 length and 10 packets with 8K length in pdump-virtio-rx.pcap. -6. Quit and relaunch vhost with iova=pa by below command:: +6. Quit and relaunch vhost by below command:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 \ - -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 -a 0000:00:04.4 -a 0000:00:04.5 -a 0000:00:04.6 -a 0000:00:04.7 \ - --vdev 'eth_vhost0,iface=/root/dpdk/vhost-net0,queues=2,client=1,dmas=[rxq0;rxq1]' \ - --vdev 'eth_vhost1,iface=/root/dpdk/vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ - --iova=pa -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx \ - --lcore-dma=[lcore11@0000:00:04.0,lcore11@0000:00:04.1,lcore11@0000:00:04.2,lcore11@0000:00:04.3,lcore11@0000:00:04.4,lcore11@0000:00:04.5,lcore11@0000:00:04.6,lcore11@0000:00:04.7] + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 \ + --vdev 'eth_vhost0,iface=./vhost-net0,queues=2,client=1,dmas=[txq0@0000:00:04.0;txq0@0000:00:04.1;rxq0@0000:00:04.2;rxq1@0000:00:04.3]' \ + --vdev 'eth_vhost1,iface=./vhost-net1,queues=2,client=1,dmas=[txq0@0000:00:04.0;txq0@0000:00:04.1;rxq0@0000:00:04.2;rxq1@0000:00:04.3]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx 7. Rerun step 2-5. Test Case 13: VM2VM packed ring vectorized-tx path test batch processing with cbdma enable ------------------------------------------------------------------------------------------ -This case uses testpmd to test that one packet can forwarding in vhost-user/virtio-user packed ring vectorized-tx path -when vhost uses the asynchronous operations with CBDMA channels. +This case uses testpmd to test that one packet can forwarding in vhost-user/virtio-user +packed ring vectorized-tx path when vhost uses the asynchronous operations with CBDMA channels. -1. Launch vhost by below command:: +1. Bind 1 CBDMA devices to vfio-pci, launch vhost by below command:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 \ - -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 -a 0000:00:04.4 -a 0000:00:04.5 -a 0000:00:04.6 -a 0000:00:04.7 \ - --vdev 'eth_vhost0,iface=/root/dpdk/vhost-net0,queues=1,client=1,dmas=[txq0;rxq0]' \ - --vdev 'eth_vhost1,iface=/root/dpdk/vhost-net1,queues=1,client=1,dmas=[txq0;rxq0]' \ - --iova=va -- -i --nb-cores=1 --txd=256 --rxd=256 --no-flush-rx \ - --lcore-dma=[lcore11@0000:00:04.0,lcore11@0000:00:04.1,lcore11@0000:00:04.2,lcore11@0000:00:04.3,lcore11@0000:00:04.4,lcore11@0000:00:04.5,lcore11@0000:00:04.6,lcore11@0000:00:04.7] + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:00:04.0 \ + --vdev 'eth_vhost0,iface=./vhost-net0,queues=1,client=1,dmas=[txq0@0000:00:04.0;rxq0@0000:00:04.0]' \ + --vdev 'eth_vhost1,iface=./vhost-net1,queues=1,client=1,dmas=[txq0@0000:00:04.0;rxq0@0000:00:04.0]' \ + --iova=va -- -i --nb-cores=1 --txd=256 --rxd=256 --no-flush-rx 2. Launch virtio-user1 by below command:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 7-8 --no-pci --file-prefix=virtio1 --force-max-simd-bitwidth=512 \ - --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=/root/dpdk/vhost-net1,queues=1,server=1,packed_vq=1,mrg_rxbuf=1,in_order=1,vectorized=1,queue_size=256 \ + --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=1,server=1,packed_vq=1,mrg_rxbuf=1,in_order=1,vectorized=1,queue_size=256 \ -- -i --nb-cores=1 --txd=256 --rxd=256 testpmd>set fwd rxonly testpmd>start @@ -959,7 +916,7 @@ when vhost uses the asynchronous operations with CBDMA channels. 4. Launch virtio-user0 and send 1 packet:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --force-max-simd-bitwidth=512 --no-pci --file-prefix=virtio \ - --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/root/dpdk/vhost-net0,queues=1,server=1,packed_vq=1,mrg_rxbuf=1,in_order=1,vectorized=1,queue_size=256 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=1,server=1,packed_vq=1,mrg_rxbuf=1,in_order=1,vectorized=1,queue_size=256 \ -- -i --nb-cores=1 --txd=256 --rxd=256 testpmd>set burst 1 testpmd>start tx_first 1 From patchwork Thu Nov 10 03:20:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 119693 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 BC6C5A04FD; Thu, 10 Nov 2022 04:27:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B56E740150; Thu, 10 Nov 2022 04:27:25 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 457E6400D4 for ; Thu, 10 Nov 2022 04:27:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668050843; x=1699586843; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=gIDrdD2+HOURaq5b7NMVTRJpapRruzD5uJdEXHVVZXY=; b=HnJGtiZtrYbuQ+fZf5PfeLBgxOWmtyCZwveakAEGKCYCkM46ms5fbkbK qYYfJuVE6PRlIeow8Flyufpj/1Hap7By6aDh8mhhsZaURC14GgkBPS0mi pZMdA65R8piZkc2eXE2omB1DlUTGlBqLtpKEBe+zt9DYMfLbWrbFelIlu J0TkDTpZAySDSS6xEd5oT0JITUmL6sVWiaHQD1+gATxHC317dIrYfhl2Q payyleQNqL1Pi3OeullRRAPhK9Ot5hd6Zt480S7bpKTvlIrqeHjoY84gK Dz557SSIhdu0wQsFtAwsZnlxJLrdsHDmwaADAk77upjb1dDH6QxT05j6Q g==; X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="312326571" X-IronPort-AV: E=Sophos;i="5.96,152,1665471600"; d="scan'208,223";a="312326571" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 19:27:22 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="668241242" X-IronPort-AV: E=Sophos;i="5.96,152,1665471600"; d="scan'208,223";a="668241242" Received: from unknown (HELO localhost.localdomain) ([10.239.252.222]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 19:27:20 -0800 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V1 2/2] tests/vm2vm_virtio_user_cbdma: modify the dmas parameter by DPDK changed Date: Thu, 10 Nov 2022 11:20:48 +0800 Message-Id: <20221110032049.1813981-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 From DPDK-22.11, the dmas parameter have changed, so modify the dmas parameter in the testsuite. Signed-off-by: Wei Ling --- tests/TestSuite_vm2vm_virtio_user_cbdma.py | 1150 ++++++++++---------- 1 file changed, 596 insertions(+), 554 deletions(-) diff --git a/tests/TestSuite_vm2vm_virtio_user_cbdma.py b/tests/TestSuite_vm2vm_virtio_user_cbdma.py index 47d67846..cac9fe82 100644 --- a/tests/TestSuite_vm2vm_virtio_user_cbdma.py +++ b/tests/TestSuite_vm2vm_virtio_user_cbdma.py @@ -29,7 +29,7 @@ class TestVM2VMVirtioUserCbdma(TestCase): self.cores_list = self.dut.get_core_list(config="all", socket=self.ports_socket) self.vhost_core_list = self.cores_list[0:9] self.virtio0_core_list = self.cores_list[10:13] - self.virtio1_core_list = self.cores_list[13:15] + self.virtio1_core_list = self.cores_list[13:16] self.vhost_user = self.dut.new_session(suite="vhost-user") self.virtio_user0 = self.dut.new_session(suite="virtio-user0") self.virtio_user1 = self.dut.new_session(suite="virtio-user1") @@ -328,32 +328,35 @@ class TestVM2VMVirtioUserCbdma(TestCase): """ Test Case 1: VM2VM split ring non-mergeable path multi-queues payload check with cbdma enable """ - self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=2) - lcore_dma = "lcore%s@%s," "lcore%s@%s" % ( - self.vhost_core_list[1], + self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=4) + dmas1 = "txq0@%s;txq1@%s;rxq0@%s" % ( + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + ) + dmas2 = "txq1@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[0], self.cbdma_list[0], - self.vhost_core_list[1], - self.cbdma_list[1], ) vhost_eal_param = ( - "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0]'" - + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;rxq0;rxq1]'" + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[%s]' " + "--vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[%s]'" + % (dmas1, dmas2) ) vhost_param = ( - " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" - + " --lcore-dma=[%s]" % lcore_dma + " --nb-cores=2 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" ) self.start_vhost_testpmd( cores=self.vhost_core_list, eal_param=vhost_eal_param, param=vhost_param, - ports=self.cbdma_list, + ports=self.cbdma_list[0:1], iova_mode="va", ) - virtio1_eal_param = "--vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=2,server=1,mrg_rxbuf=0,in_order=0,queue_size=4096" virtio1_param = ( - " --enable-hw-vlan-strip --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096" + " --enable-hw-vlan-strip --nb-cores=2 --rxq=2 --txq=2 --txd=4096 --rxd=4096" ) self.start_virtio_testpmd_with_vhost_net1( cores=self.virtio1_core_list, @@ -364,7 +367,7 @@ class TestVM2VMVirtioUserCbdma(TestCase): virtio0_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,mrg_rxbuf=0,in_order=0,queue_size=4096" virtio0_param = ( - " --enable-hw-vlan-strip --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096" + " --enable-hw-vlan-strip --nb-cores=2 --rxq=2 --txq=2 --txd=4096 --rxd=4096" ) self.start_virtio_testpmd_with_vhost_net0( cores=self.virtio0_core_list, @@ -377,22 +380,41 @@ class TestVM2VMVirtioUserCbdma(TestCase): self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) - if not self.check_2M_env: - self.vhost_user_pmd.execute_cmd("quit", "#", 60) - self.clear_virtio_user1_stats() - self.start_vhost_testpmd( - cores=self.vhost_core_list, - eal_param=vhost_eal_param, - param=vhost_param, - ports=self.cbdma_list, - iova_mode="pa", - ) - self.start_pdump_to_capture_pkt() + self.vhost_user_pmd.execute_cmd("quit", "#", 60) + self.clear_virtio_user1_stats() + dmas1 = "txq0@%s;txq1@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[1], + ) + dmas2 = "txq0@%s;txq1@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[2], + self.cbdma_list[2], + self.cbdma_list[3], + self.cbdma_list[3], + ) + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[%s]' " + "--vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[%s]'" + % (dmas1, dmas2) + ) + vhost_param = ( + " --nb-cores=2 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" + ) + self.start_vhost_testpmd( + cores=self.vhost_core_list, + eal_param=vhost_eal_param, + param=vhost_param, + ports=self.cbdma_list, + iova_mode="va", + ) + self.start_pdump_to_capture_pkt() - self.send_502_960byte_and_64_64byte_pkts() - check_dict = {960: 502, 64: 64} - self.check_virtio_user1_stats(check_dict) - self.check_packet_payload_valid(check_dict) + self.send_502_960byte_and_64_64byte_pkts() + check_dict = {960: 502, 64: 64} + self.check_virtio_user1_stats(check_dict) + self.check_packet_payload_valid(check_dict) def test_split_ping_inorder_non_mergeable_path_multi_queues_payload_check_with_cbdma_enable( self, @@ -400,39 +422,30 @@ class TestVM2VMVirtioUserCbdma(TestCase): """ Test Case 2: VM2VM split ring inorder non-mergeable path multi-queues payload check with cbdma enable """ - self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=5) - lcore_dma = ( - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s" - % ( - self.vhost_core_list[1], - self.cbdma_list[0], - self.vhost_core_list[1], - self.cbdma_list[1], - self.vhost_core_list[1], - self.cbdma_list[2], - self.vhost_core_list[1], - self.cbdma_list[3], - self.vhost_core_list[1], - self.cbdma_list[4], - ) + self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=4) + dmas1 = "txq0@%s;txq1@%s;rxq0@%s" % ( + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + ) + dmas2 = "txq1@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], ) vhost_eal_param = ( - "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0]'" - + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;rxq0;rxq1]'" + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[%s]' " + "--vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[%s]'" + % (dmas1, dmas2) ) vhost_param = ( - " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" - + " --lcore-dma=[%s]" % lcore_dma + " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" ) self.start_vhost_testpmd( cores=self.vhost_core_list, eal_param=vhost_eal_param, param=vhost_param, - ports=self.cbdma_list, + ports=self.cbdma_list[0:1], iova_mode="va", ) @@ -458,22 +471,41 @@ class TestVM2VMVirtioUserCbdma(TestCase): self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) - if not self.check_2M_env: - self.vhost_user_pmd.execute_cmd("quit", "#", 60) - self.clear_virtio_user1_stats() - self.start_vhost_testpmd( - cores=self.vhost_core_list, - eal_param=vhost_eal_param, - param=vhost_param, - ports=self.cbdma_list, - iova_mode="pa", - ) - self.start_pdump_to_capture_pkt() + self.vhost_user_pmd.execute_cmd("quit", "#", 60) + self.clear_virtio_user1_stats() + dmas1 = "txq0@%s;txq1@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[1], + ) + dmas2 = "txq0@%s;txq1@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[2], + self.cbdma_list[2], + self.cbdma_list[3], + self.cbdma_list[3], + ) + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[%s]' " + "--vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[%s]'" + % (dmas1, dmas2) + ) + vhost_param = ( + " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" + ) + self.start_vhost_testpmd( + cores=self.vhost_core_list, + eal_param=vhost_eal_param, + param=vhost_param, + ports=self.cbdma_list, + iova_mode="va", + ) + self.start_pdump_to_capture_pkt() - self.send_502_64byte_and_64_4640byte_pkts() - check_dict = {64: 502, 4640: 0} - self.check_virtio_user1_stats(check_dict) - self.check_packet_payload_valid(check_dict) + self.send_502_64byte_and_64_4640byte_pkts() + check_dict = {64: 502, 4640: 0} + self.check_virtio_user1_stats(check_dict) + self.check_packet_payload_valid(check_dict) def test_split_ring_verctorized_path_multi_queues_payload_check_with_cbdma_enabled( self, @@ -482,47 +514,29 @@ class TestVM2VMVirtioUserCbdma(TestCase): Test Case 3: VM2VM split ring vectorized path multi-queues payload check with cbdma enable """ self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8) - lcore_dma = ( - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s" - % ( - self.vhost_core_list[1], - self.cbdma_list[0], - self.vhost_core_list[1], - self.cbdma_list[1], - self.vhost_core_list[1], - self.cbdma_list[2], - self.vhost_core_list[1], - self.cbdma_list[3], - self.vhost_core_list[1], - self.cbdma_list[4], - self.vhost_core_list[1], - self.cbdma_list[5], - self.vhost_core_list[1], - self.cbdma_list[6], - self.vhost_core_list[1], - self.cbdma_list[7], - ) + dmas1 = "txq0@%s;txq1@%s;rxq0@%s" % ( + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + ) + dmas2 = "txq1@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], ) vhost_eal_param = ( - "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0]'" - + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;rxq0;rxq1]'" + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[%s]' " + "--vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[%s]'" + % (dmas1, dmas2) ) vhost_param = ( " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" - + " --lcore-dma=[%s]" % lcore_dma ) self.start_vhost_testpmd( cores=self.vhost_core_list, eal_param=vhost_eal_param, param=vhost_param, - ports=self.cbdma_list, + ports=self.cbdma_list[0:1], iova_mode="va", ) @@ -548,22 +562,41 @@ class TestVM2VMVirtioUserCbdma(TestCase): self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) - if not self.check_2M_env: - self.vhost_user_pmd.execute_cmd("quit", "#", 60) - self.clear_virtio_user1_stats() - self.start_vhost_testpmd( - cores=self.vhost_core_list, - eal_param=vhost_eal_param, - param=vhost_param, - ports=self.cbdma_list, - iova_mode="pa", - ) - self.start_pdump_to_capture_pkt() + self.vhost_user_pmd.execute_cmd("quit", "#", 60) + self.clear_virtio_user1_stats() + dmas1 = "txq0@%s;txq1@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[2], + self.cbdma_list[3], + ) + dmas2 = "txq0@%s;txq1@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[4], + self.cbdma_list[5], + self.cbdma_list[6], + self.cbdma_list[7], + ) + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[%s]' " + "--vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[%s]'" + % (dmas1, dmas2) + ) + vhost_param = ( + " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" + ) + self.start_vhost_testpmd( + cores=self.vhost_core_list, + eal_param=vhost_eal_param, + param=vhost_param, + ports=self.cbdma_list, + iova_mode="va", + ) + self.start_pdump_to_capture_pkt() - self.send_448_64byte_and_54_4640byte_pkts() - check_dict = {64: 448, 4640: 0} - self.check_virtio_user1_stats(check_dict) - self.check_packet_payload_valid(check_dict) + self.send_448_64byte_and_54_4640byte_pkts() + check_dict = {64: 448, 4640: 0} + self.check_virtio_user1_stats(check_dict) + self.check_packet_payload_valid(check_dict) def test_split_ring_inorder_mergeable_path_test_non_indirect_descriptor_with_cbdma_enabled( self, @@ -571,36 +604,28 @@ class TestVM2VMVirtioUserCbdma(TestCase): """ Test Case 4: VM2VM split ring inorder mergeable path test non-indirect descriptor with cbdma enable """ - self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=4) - lcore_dma = ( - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s" - % ( - self.vhost_core_list[1], - self.cbdma_list[0], - self.vhost_core_list[1], - self.cbdma_list[1], - self.vhost_core_list[1], - self.cbdma_list[2], - self.vhost_core_list[1], - self.cbdma_list[3], - ) + self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8) + dmas1 = "txq0@%s;txq1@%s;rxq0@%s" % ( + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], ) - vhost_eal_param = ( - "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0]'" - + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;rxq0;rxq1]'" + dmas2 = "txq0@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], ) - vhost_param = ( - " --nb-cores=1 --txq=2 --rxq=2 --txd=256 --rxd=256 --no-flush-rx" - + " --lcore-dma=[%s]" % lcore_dma + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[%s]' " + "--vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[%s]'" + % (dmas1, dmas2) ) + vhost_param = " --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx" self.start_vhost_testpmd( cores=self.vhost_core_list, eal_param=vhost_eal_param, param=vhost_param, - ports=self.cbdma_list, + ports=self.cbdma_list[0:2], iova_mode="va", ) @@ -626,69 +651,78 @@ class TestVM2VMVirtioUserCbdma(TestCase): self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) - if not self.check_2M_env: - self.vhost_user_pmd.execute_cmd("quit", "#", 60) - self.virtio_user1_pmd.execute_cmd("quit", "#", 60) - self.virtio_user0_pmd.execute_cmd("quit", "#", 60) - self.start_vhost_testpmd( - cores=self.vhost_core_list, - eal_param=vhost_eal_param, - param=vhost_param, - ports=self.cbdma_list, - iova_mode="pa", - ) - self.start_virtio_testpmd_with_vhost_net1( - cores=self.virtio1_core_list, - eal_param=virtio1_eal_param, - param=virtio1_param, - ) - self.start_pdump_to_capture_pkt() + self.vhost_user_pmd.execute_cmd("quit", "#", 60) + self.virtio_user1_pmd.execute_cmd("quit", "#", 60) + self.virtio_user0_pmd.execute_cmd("quit", "#", 60) + dmas1 = "txq0@%s;txq1@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[2], + self.cbdma_list[3], + ) + dmas2 = "txq0@%s;txq1@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[4], + self.cbdma_list[5], + self.cbdma_list[6], + self.cbdma_list[7], + ) + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[%s]' " + "--vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[%s]'" + % (dmas1, dmas2) + ) + vhost_param = " --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx" + self.start_vhost_testpmd( + cores=self.vhost_core_list, + eal_param=vhost_eal_param, + param=vhost_param, + ports=self.cbdma_list, + iova_mode="va", + ) + self.start_virtio_testpmd_with_vhost_net1( + cores=self.virtio1_core_list, + eal_param=virtio1_eal_param, + param=virtio1_param, + ) + self.start_pdump_to_capture_pkt() - self.start_virtio_testpmd_with_vhost_net0( - cores=self.virtio0_core_list, - eal_param=virtio0_eal_param, - param=virtio0_param, - ) + self.start_virtio_testpmd_with_vhost_net0( + cores=self.virtio0_core_list, + eal_param=virtio0_eal_param, + param=virtio0_param, + ) - self.send_502_64byte_and_64_8000byte_pkts() - check_dict = {64: 502, 8000: 2} - self.check_virtio_user1_stats(check_dict) - self.check_packet_payload_valid(check_dict) + self.send_502_64byte_and_64_8000byte_pkts() + check_dict = {64: 502, 8000: 2} + self.check_virtio_user1_stats(check_dict) + self.check_packet_payload_valid(check_dict) def test_split_ring_mergeable_path_test_indirect_descriptor_with_cbdma_enable(self): """ Test Case 5: VM2VM split ring mergeable path test indirect descriptor with cbdma enable """ - self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=4) - lcore_dma = ( - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s" - % ( - self.vhost_core_list[1], - self.cbdma_list[0], - self.vhost_core_list[1], - self.cbdma_list[1], - self.vhost_core_list[1], - self.cbdma_list[2], - self.vhost_core_list[1], - self.cbdma_list[3], - ) + self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8) + dmas1 = "txq0@%s;txq0@%s;rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], ) - vhost_eal_param = ( - "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;rxq0;rxq1]'" - + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0]'" + dmas2 = "txq0@%s;rxq1@%s;rxq0@%s" % ( + self.cbdma_list[1], + self.cbdma_list[1], + self.cbdma_list[1], ) - vhost_param = ( - " --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx" - + " --lcore-dma=[%s]" % lcore_dma + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[%s]' " + "--vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[%s]'" + % (dmas1, dmas2) ) + vhost_param = " --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx" self.start_vhost_testpmd( cores=self.vhost_core_list, eal_param=vhost_eal_param, param=vhost_param, - ports=self.cbdma_list, + ports=self.cbdma_list[0:2], iova_mode="va", ) @@ -714,37 +748,50 @@ class TestVM2VMVirtioUserCbdma(TestCase): self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) - if not self.check_2M_env: - self.vhost_user_pmd.execute_cmd("quit", "#", 60) - self.virtio_user1_pmd.execute_cmd("quit", "#", 60) - self.virtio_user0_pmd.execute_cmd("quit", "#", 60) - vhost_eal_param = ( - "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]'" - + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]'" - ) - self.start_vhost_testpmd( - cores=self.vhost_core_list, - eal_param=vhost_eal_param, - param=vhost_param, - ports=self.cbdma_list, - iova_mode="pa", - ) - self.start_virtio_testpmd_with_vhost_net1( - cores=self.virtio1_core_list, - eal_param=virtio1_eal_param, - param=virtio1_param, - ) - self.start_pdump_to_capture_pkt() - self.start_virtio_testpmd_with_vhost_net0( - cores=self.virtio0_core_list, - eal_param=virtio0_eal_param, - param=virtio0_param, - ) + self.vhost_user_pmd.execute_cmd("quit", "#", 60) + self.virtio_user1_pmd.execute_cmd("quit", "#", 60) + self.virtio_user0_pmd.execute_cmd("quit", "#", 60) + dmas1 = "txq0@%s;txq0@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[2], + self.cbdma_list[3], + ) + dmas2 = "txq0@%s;txq0@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[4], + self.cbdma_list[5], + self.cbdma_list[6], + self.cbdma_list[7], + ) + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[%s]' " + "--vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[%s]'" + % (dmas1, dmas2) + ) + vhost_param = " --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx" + self.start_vhost_testpmd( + cores=self.vhost_core_list, + eal_param=vhost_eal_param, + param=vhost_param, + ports=self.cbdma_list, + iova_mode="va", + ) + self.start_virtio_testpmd_with_vhost_net1( + cores=self.virtio1_core_list, + eal_param=virtio1_eal_param, + param=virtio1_param, + ) + self.start_pdump_to_capture_pkt() + self.start_virtio_testpmd_with_vhost_net0( + cores=self.virtio0_core_list, + eal_param=virtio0_eal_param, + param=virtio0_param, + ) - self.send_502_64byte_and_64_8000byte_pkts() - check_dict = {64: 502, 8000: 10} - self.check_virtio_user1_stats(check_dict) - self.check_packet_payload_valid(check_dict) + self.send_502_64byte_and_64_8000byte_pkts() + check_dict = {64: 502, 8000: 10} + self.check_virtio_user1_stats(check_dict) + self.check_packet_payload_valid(check_dict) def test_packed_ring_non_mergeable_path_multi_queues_payload_check_with_cbdma_enable( self, @@ -753,19 +800,25 @@ class TestVM2VMVirtioUserCbdma(TestCase): Test Case 6: VM2VM packed ring non-mergeable path multi-queues payload check with cbdma enable """ self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=2) - lcore_dma = "lcore%s@%s," "lcore%s@%s" % ( - self.vhost_core_list[1], + dmas1 = "txq0@%s;txq1@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[0], + self.cbdma_list[1], + ) + dmas2 = "txq0@%s;txq1@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[1], self.cbdma_list[0], - self.vhost_core_list[1], self.cbdma_list[1], ) vhost_eal_param = ( - "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]'" - + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]'" + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[%s]' " + "--vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[%s]'" + % (dmas1, dmas2) ) vhost_param = ( " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" - + " --lcore-dma=[%s]" % lcore_dma ) self.start_vhost_testpmd( cores=self.vhost_core_list, @@ -801,26 +854,39 @@ class TestVM2VMVirtioUserCbdma(TestCase): self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) - if not self.check_2M_env: - self.vhost_user_pmd.execute_cmd("quit", "#", 60) - self.clear_virtio_user1_stats() - vhost_eal_param = ( - "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;rxq0;rxq1]'" - + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0]'" - ) - self.start_vhost_testpmd( - cores=self.vhost_core_list, - eal_param=vhost_eal_param, - param=vhost_param, - ports=self.cbdma_list, - iova_mode="pa", - ) - self.start_pdump_to_capture_pkt() + self.vhost_user_pmd.execute_cmd("quit", "#", 60) + self.clear_virtio_user1_stats() + dmas1 = "txq0@%s;txq0@%s;rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[1], + ) + dmas2 = "txq0@%s;rxq1@%s;rxq0@%s" % ( + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[0], + ) + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[%s]' " + "--vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[%s]'" + % (dmas1, dmas2) + ) + vhost_param = ( + " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" + ) + self.start_vhost_testpmd( + cores=self.vhost_core_list, + eal_param=vhost_eal_param, + param=vhost_param, + ports=self.cbdma_list, + iova_mode="va", + ) + self.start_pdump_to_capture_pkt() - self.send_448_64byte_and_54_4640byte_pkts() - check_dict = {64: 448, 4640: 0} - self.check_virtio_user1_stats(check_dict) - self.check_packet_payload_valid(check_dict) + self.send_448_64byte_and_54_4640byte_pkts() + check_dict = {64: 448, 4640: 0} + self.check_virtio_user1_stats(check_dict) + self.check_packet_payload_valid(check_dict) def test_packed_ring_mergeable_path_multi_queues_payload_check_with_cbdma_enabled( self, @@ -828,21 +894,30 @@ class TestVM2VMVirtioUserCbdma(TestCase): """ Test Case 7: VM2VM packed ring mergeable path multi-queues payload check with cbdma enable """ - self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=1) - lcore_dma = "lcore%s@%s," % (self.vhost_core_list[1], self.cbdma_list[0]) + self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8) + dmas1 = "txq0@%s;txq0@%s;rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + ) + dmas2 = "txq0@%s;rxq1@%s;rxq0@%s" % ( + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + ) vhost_eal_param = ( - "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;rxq0;rxq1]'" - + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0]'" + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[%s]' " + "--vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[%s]'" + % (dmas1, dmas2) ) vhost_param = ( " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" - + " --lcore-dma=[%s]" % lcore_dma ) self.start_vhost_testpmd( cores=self.vhost_core_list, eal_param=vhost_eal_param, param=vhost_param, - ports=self.cbdma_list, + ports=self.cbdma_list[0:1], iova_mode="va", ) @@ -868,26 +943,41 @@ class TestVM2VMVirtioUserCbdma(TestCase): self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) - if not self.check_2M_env: - self.vhost_user_pmd.execute_cmd("quit", "#", 60) - self.clear_virtio_user1_stats() - vhost_eal_param = ( - "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]'" - + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]'" - ) - self.start_vhost_testpmd( - cores=self.vhost_core_list, - eal_param=vhost_eal_param, - param=vhost_param, - ports=self.cbdma_list, - iova_mode="pa", - ) - self.start_pdump_to_capture_pkt() + self.vhost_user_pmd.execute_cmd("quit", "#", 60) + self.clear_virtio_user1_stats() + dmas1 = "txq0@%s;txq0@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[2], + self.cbdma_list[3], + ) + dmas2 = "txq0@%s;txq0@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[4], + self.cbdma_list[5], + self.cbdma_list[6], + self.cbdma_list[7], + ) + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[%s]' " + "--vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[%s]'" + % (dmas1, dmas2) + ) + vhost_param = ( + " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" + ) + self.start_vhost_testpmd( + cores=self.vhost_core_list, + eal_param=vhost_eal_param, + param=vhost_param, + ports=self.cbdma_list, + iova_mode="va", + ) + self.start_pdump_to_capture_pkt() - self.send_54_4640byte_and_448_64byte_pkts() - check_dict = {4640: 54, 64: 448} - self.check_virtio_user1_stats(check_dict) - self.check_packet_payload_valid(check_dict) + self.send_54_4640byte_and_448_64byte_pkts() + check_dict = {4640: 54, 64: 448} + self.check_virtio_user1_stats(check_dict) + self.check_packet_payload_valid(check_dict) def test_packed_ring_inorder_mergeable_path_multi_queues_payload_check_with_cbdma_enabled( self, @@ -895,39 +985,30 @@ class TestVM2VMVirtioUserCbdma(TestCase): """ Test Case 8: VM2VM packed ring inorder mergeable path multi-queues payload check with cbdma enable """ - self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=5) - lcore_dma = ( - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s" - % ( - self.vhost_core_list[1], - self.cbdma_list[0], - self.vhost_core_list[1], - self.cbdma_list[1], - self.vhost_core_list[1], - self.cbdma_list[2], - self.vhost_core_list[1], - self.cbdma_list[3], - self.vhost_core_list[1], - self.cbdma_list[4], - ) + self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=4) + dmas1 = "txq0@%s;txq0@%s;rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + ) + dmas2 = "txq0@%s;rxq1@%s;rxq0@%s" % ( + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], ) vhost_eal_param = ( - "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;rxq0;rxq1]'" - + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0]'" + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[%s]' " + "--vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[%s]'" + % (dmas1, dmas2) ) vhost_param = ( - " --nb-cores=1 --txd=4096 --rxd=4096 --txq=2 --rxq=2 --no-flush-rx" - + " --lcore-dma=[%s]" % lcore_dma + " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" ) self.start_vhost_testpmd( cores=self.vhost_core_list, eal_param=vhost_eal_param, param=vhost_param, - ports=self.cbdma_list, + ports=self.cbdma_list[0:1], iova_mode="va", ) @@ -953,22 +1034,41 @@ class TestVM2VMVirtioUserCbdma(TestCase): self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) - if not self.check_2M_env: - self.vhost_user_pmd.execute_cmd("quit", "#", 60) - self.clear_virtio_user1_stats() - self.start_vhost_testpmd( - cores=self.vhost_core_list, - eal_param=vhost_eal_param, - param=vhost_param, - ports=self.cbdma_list, - iova_mode="pa", - ) - self.start_pdump_to_capture_pkt() + self.vhost_user_pmd.execute_cmd("quit", "#", 60) + self.clear_virtio_user1_stats() + dmas1 = "txq0@%s;txq0@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[2], + self.cbdma_list[3], + ) + dmas2 = "txq0@%s;txq0@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[2], + self.cbdma_list[3], + ) + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[%s]' " + "--vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[%s]'" + % (dmas1, dmas2) + ) + vhost_param = ( + " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" + ) + self.start_vhost_testpmd( + cores=self.vhost_core_list, + eal_param=vhost_eal_param, + param=vhost_param, + ports=self.cbdma_list, + iova_mode="va", + ) + self.start_pdump_to_capture_pkt() - self.send_54_4640byte_and_448_64byte_pkts() - check_dict = {4640: 54, 64: 448} - self.check_virtio_user1_stats(check_dict) - self.check_packet_payload_valid(check_dict) + self.send_54_4640byte_and_448_64byte_pkts() + check_dict = {4640: 54, 64: 448} + self.check_virtio_user1_stats(check_dict) + self.check_packet_payload_valid(check_dict) def test_packed_ring_inorder_non_mergeable_path_multi_queues_payload_check_with_cbdma_enabled( self, @@ -976,48 +1076,22 @@ class TestVM2VMVirtioUserCbdma(TestCase): """ Test Case 9: VM2VM packed ring inorder non-mergeable path multi-queues payload check with cbdma enable """ - self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8) - lcore_dma = ( - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s" - % ( - self.vhost_core_list[1], - self.cbdma_list[0], - self.vhost_core_list[1], - self.cbdma_list[1], - self.vhost_core_list[1], - self.cbdma_list[2], - self.vhost_core_list[1], - self.cbdma_list[3], - self.vhost_core_list[1], - self.cbdma_list[4], - self.vhost_core_list[1], - self.cbdma_list[5], - self.vhost_core_list[1], - self.cbdma_list[6], - self.vhost_core_list[1], - self.cbdma_list[7], - ) - ) + self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=4) + dmas1 = "txq0@%s;txq0@%s" % (self.cbdma_list[0], self.cbdma_list[1]) + dmas2 = "txq1@%s;rxq1@%s" % (self.cbdma_list[0], self.cbdma_list[1]) vhost_eal_param = ( - "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;rxq0]'" - + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq1;rxq1]'" + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[%s]' " + "--vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[%s]'" + % (dmas1, dmas2) ) vhost_param = ( " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" - + " --lcore-dma=[%s]" % lcore_dma ) self.start_vhost_testpmd( cores=self.vhost_core_list, eal_param=vhost_eal_param, param=vhost_param, - ports=self.cbdma_list, + ports=self.cbdma_list[0:2], iova_mode="va", ) @@ -1043,22 +1117,41 @@ class TestVM2VMVirtioUserCbdma(TestCase): self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) - if not self.check_2M_env: - self.vhost_user_pmd.execute_cmd("quit", "#", 60) - self.clear_virtio_user1_stats() - self.start_vhost_testpmd( - cores=self.vhost_core_list, - eal_param=vhost_eal_param, - param=vhost_param, - ports=self.cbdma_list, - iova_mode="pa", - ) - self.start_pdump_to_capture_pkt() + self.vhost_user_pmd.execute_cmd("quit", "#", 60) + self.clear_virtio_user1_stats() + dmas1 = "txq0@%s;txq0@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[2], + self.cbdma_list[3], + ) + dmas2 = "txq0@%s;txq0@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[2], + self.cbdma_list[3], + ) + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[%s]' " + "--vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[%s]'" + % (dmas1, dmas2) + ) + vhost_param = ( + " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" + ) + self.start_vhost_testpmd( + cores=self.vhost_core_list, + eal_param=vhost_eal_param, + param=vhost_param, + ports=self.cbdma_list, + iova_mode="va", + ) + self.start_pdump_to_capture_pkt() - self.send_448_64byte_and_54_4640byte_pkts() - check_dict = {64: 448, 4640: 0} - self.check_virtio_user1_stats(check_dict) - self.check_packet_payload_valid(check_dict) + self.send_448_64byte_and_54_4640byte_pkts() + check_dict = {64: 448, 4640: 0} + self.check_virtio_user1_stats(check_dict) + self.check_packet_payload_valid(check_dict) def test_packed_ring_vectorized_rx_path_multi_queues_payload_check_with_cbdma_enabled( self, @@ -1066,48 +1159,22 @@ class TestVM2VMVirtioUserCbdma(TestCase): """ Test Case 10: VM2VM packed ring vectorized-rx path multi-queues payload check with cbdma enable """ - self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8) - lcore_dma = ( - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s" - % ( - self.vhost_core_list[1], - self.cbdma_list[0], - self.vhost_core_list[1], - self.cbdma_list[1], - self.vhost_core_list[1], - self.cbdma_list[2], - self.vhost_core_list[1], - self.cbdma_list[3], - self.vhost_core_list[2], - self.cbdma_list[4], - self.vhost_core_list[2], - self.cbdma_list[5], - self.vhost_core_list[2], - self.cbdma_list[6], - self.vhost_core_list[2], - self.cbdma_list[7], - ) - ) + self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=4) + dmas1 = "txq0@%s;txq0@%s" % (self.cbdma_list[0], self.cbdma_list[0]) + dmas2 = "txq1@%s;rxq1@%s" % (self.cbdma_list[0], self.cbdma_list[0]) vhost_eal_param = ( - "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;rxq0]'" - + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq1;rxq1]'" + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[%s]' " + "--vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[%s]'" + % (dmas1, dmas2) ) vhost_param = ( " --nb-cores=2 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" - + " --lcore-dma=[%s]" % lcore_dma ) self.start_vhost_testpmd( cores=self.vhost_core_list, eal_param=vhost_eal_param, param=vhost_param, - ports=self.cbdma_list, + ports=self.cbdma_list[0:1], iova_mode="va", ) @@ -1133,22 +1200,41 @@ class TestVM2VMVirtioUserCbdma(TestCase): self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) - if not self.check_2M_env: - self.vhost_user_pmd.execute_cmd("quit", "#", 60) - self.clear_virtio_user1_stats() - self.start_vhost_testpmd( - cores=self.vhost_core_list, - eal_param=vhost_eal_param, - param=vhost_param, - ports=self.cbdma_list, - iova_mode="pa", - ) - self.start_pdump_to_capture_pkt() + self.vhost_user_pmd.execute_cmd("quit", "#", 60) + self.clear_virtio_user1_stats() + dmas1 = "txq0@%s;txq0@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[2], + self.cbdma_list[3], + ) + dmas2 = "txq0@%s;txq0@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[2], + self.cbdma_list[3], + ) + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[%s]' " + "--vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[%s]'" + % (dmas1, dmas2) + ) + vhost_param = ( + " --nb-cores=2 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" + ) + self.start_vhost_testpmd( + cores=self.vhost_core_list, + eal_param=vhost_eal_param, + param=vhost_param, + ports=self.cbdma_list, + iova_mode="va", + ) + self.start_pdump_to_capture_pkt() - self.send_448_64byte_and_54_4640byte_pkts() - check_dict = {64: 448, 4640: 0} - self.check_virtio_user1_stats(check_dict) - self.check_packet_payload_valid(check_dict) + self.send_448_64byte_and_54_4640byte_pkts() + check_dict = {64: 448, 4640: 0} + self.check_virtio_user1_stats(check_dict) + self.check_packet_payload_valid(check_dict) def test_packed_ring_vectorized_path_multi_queues_payload_check_with_cbdma_enabled( self, @@ -1157,47 +1243,31 @@ class TestVM2VMVirtioUserCbdma(TestCase): Test Case 11: VM2VM packed ring vectorized path multi-queues payload check test with ring size is not power of 2 with cbdma enable """ self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8) - lcore_dma = ( - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s" - % ( - self.vhost_core_list[1], - self.cbdma_list[0], - self.vhost_core_list[1], - self.cbdma_list[1], - self.vhost_core_list[1], - self.cbdma_list[2], - self.vhost_core_list[1], - self.cbdma_list[3], - self.vhost_core_list[1], - self.cbdma_list[4], - self.vhost_core_list[1], - self.cbdma_list[5], - self.vhost_core_list[1], - self.cbdma_list[6], - self.vhost_core_list[1], - self.cbdma_list[7], - ) + dmas1 = "txq0@%s;txq1@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + ) + dmas2 = "txq0@%s;txq1@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], ) vhost_eal_param = ( - "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]'" - + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]'" + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[%s]' " + "--vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[%s]'" + % (dmas1, dmas2) ) vhost_param = ( " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" - + " --lcore-dma=[%s]" % lcore_dma ) self.start_vhost_testpmd( cores=self.vhost_core_list, eal_param=vhost_eal_param, param=vhost_param, - ports=self.cbdma_list, + ports=self.cbdma_list[0:1], iova_mode="va", ) @@ -1223,26 +1293,41 @@ class TestVM2VMVirtioUserCbdma(TestCase): self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) - if not self.check_2M_env: - self.vhost_user_pmd.execute_cmd("quit", "#", 60) - self.clear_virtio_user1_stats() - vhost_eal_param = ( - "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[rxq0]'" - + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq1]'" - ) - self.start_vhost_testpmd( - cores=self.vhost_core_list, - eal_param=vhost_eal_param, - param=vhost_param, - ports=self.cbdma_list, - iova_mode="pa", - ) - self.start_pdump_to_capture_pkt() + self.vhost_user_pmd.execute_cmd("quit", "#", 60) + self.clear_virtio_user1_stats() + dmas1 = "txq0@%s;txq1@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[0], + self.cbdma_list[1], + ) + dmas2 = "txq0@%s;txq1@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[2], + self.cbdma_list[3], + self.cbdma_list[2], + self.cbdma_list[3], + ) + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[%s]' " + "--vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[%s]'" + % (dmas1, dmas2) + ) + vhost_param = ( + " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" + ) + self.start_vhost_testpmd( + cores=self.vhost_core_list, + eal_param=vhost_eal_param, + param=vhost_param, + ports=self.cbdma_list[0:4], + iova_mode="va", + ) + self.start_pdump_to_capture_pkt() - self.send_448_64byte_and_54_4640byte_pkts() - check_dict = {64: 448, 4640: 0} - self.check_virtio_user1_stats(check_dict) - self.check_packet_payload_valid(check_dict) + self.send_448_64byte_and_54_4640byte_pkts() + check_dict = {64: 448, 4640: 0} + self.check_virtio_user1_stats(check_dict) + self.check_packet_payload_valid(check_dict) def test_pakced_packed_ring_vectorized_tx_path_multi_queues_test_indirect_descriptor_with_cbdma_enabled( self, @@ -1250,48 +1335,20 @@ class TestVM2VMVirtioUserCbdma(TestCase): """ Test Case 12: VM2VM packed ring vectorized-tx path multi-queues test indirect descriptor and payload check with cbdma enable """ - self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8) - lcore_dma = ( - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s" - % ( - self.vhost_core_list[1], - self.cbdma_list[0], - self.vhost_core_list[1], - self.cbdma_list[1], - self.vhost_core_list[1], - self.cbdma_list[2], - self.vhost_core_list[1], - self.cbdma_list[3], - self.vhost_core_list[1], - self.cbdma_list[4], - self.vhost_core_list[1], - self.cbdma_list[5], - self.vhost_core_list[1], - self.cbdma_list[6], - self.vhost_core_list[1], - self.cbdma_list[7], - ) - ) + self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=4) + dmas1 = "rxq0@%s" % (self.cbdma_list[0]) + dmas2 = "txq1@%s" % (self.cbdma_list[0]) vhost_eal_param = ( - "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[rxq0]'" - + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq1]'" - ) - vhost_param = ( - " --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx" - + " --lcore-dma=[%s]" % lcore_dma + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[%s]' " + "--vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[%s]'" + % (dmas1, dmas2) ) + vhost_param = " --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx" self.start_vhost_testpmd( cores=self.vhost_core_list, eal_param=vhost_eal_param, param=vhost_param, - ports=self.cbdma_list, + ports=self.cbdma_list[0:1], iova_mode="va", ) @@ -1317,37 +1374,50 @@ class TestVM2VMVirtioUserCbdma(TestCase): self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) - if not self.check_2M_env: - self.vhost_user_pmd.execute_cmd("quit", "#", 60) - self.virtio_user1_pmd.execute_cmd("quit", "#", 60) - self.virtio_user0_pmd.execute_cmd("quit", "#", 60) - vhost_eal_param = ( - "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[rxq0;rxq1]'" - + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]'" - ) - self.start_vhost_testpmd( - cores=self.vhost_core_list, - eal_param=vhost_eal_param, - param=vhost_param, - ports=self.cbdma_list, - iova_mode="pa", - ) - self.start_virtio_testpmd_with_vhost_net1( - cores=self.virtio1_core_list, - eal_param=virtio1_eal_param, - param=virtio1_param, - ) - self.start_pdump_to_capture_pkt() - self.start_virtio_testpmd_with_vhost_net0( - cores=self.virtio0_core_list, - eal_param=virtio0_eal_param, - param=virtio0_param, - ) + self.vhost_user_pmd.execute_cmd("quit", "#", 60) + self.virtio_user1_pmd.execute_cmd("quit", "#", 60) + self.virtio_user0_pmd.execute_cmd("quit", "#", 60) + dmas1 = "txq0@%s;txq0@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[2], + self.cbdma_list[3], + ) + dmas2 = "txq0@%s;txq0@%s;rxq0@%s;rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[2], + self.cbdma_list[3], + ) + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[%s]' " + "--vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[%s]'" + % (dmas1, dmas2) + ) + vhost_param = " --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx" + self.start_vhost_testpmd( + cores=self.vhost_core_list, + eal_param=vhost_eal_param, + param=vhost_param, + ports=self.cbdma_list, + iova_mode="va", + ) + self.start_virtio_testpmd_with_vhost_net1( + cores=self.virtio1_core_list, + eal_param=virtio1_eal_param, + param=virtio1_param, + ) + self.start_pdump_to_capture_pkt() + self.start_virtio_testpmd_with_vhost_net0( + cores=self.virtio0_core_list, + eal_param=virtio0_eal_param, + param=virtio0_param, + ) - self.send_502_64byte_and_64_8000byte_pkts() - check_dict = {64: 502, 8000: 10} - self.check_virtio_user1_stats(check_dict) - self.check_packet_payload_valid(check_dict) + self.send_502_64byte_and_64_8000byte_pkts() + check_dict = {64: 502, 8000: 10} + self.check_virtio_user1_stats(check_dict) + self.check_packet_payload_valid(check_dict) def test_packed_ring_vectorized_tx_path_test_batch_processing_with_cbdma_enabled( self, @@ -1355,43 +1425,15 @@ class TestVM2VMVirtioUserCbdma(TestCase): """ Test Case 13: VM2VM packed ring vectorized-tx path test batch processing with cbdma enable """ - self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8) - lcore_dma = ( - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s" - % ( - self.vhost_core_list[1], - self.cbdma_list[0], - self.vhost_core_list[1], - self.cbdma_list[1], - self.vhost_core_list[1], - self.cbdma_list[2], - self.vhost_core_list[1], - self.cbdma_list[3], - self.vhost_core_list[1], - self.cbdma_list[4], - self.vhost_core_list[1], - self.cbdma_list[5], - self.vhost_core_list[1], - self.cbdma_list[6], - self.vhost_core_list[1], - self.cbdma_list[7], - ) - ) + self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=1) + dmas1 = "txq0@%s;rxq0@%s" % (self.cbdma_list[0], self.cbdma_list[0]) + dmas2 = "txq0@%s;rxq0@%s" % (self.cbdma_list[0], self.cbdma_list[0]) vhost_eal_param = ( - "--vdev 'net_vhost0,iface=vhost-net0,queues=1,client=1,dmas=[txq0;rxq0]'" - + " --vdev 'net_vhost1,iface=vhost-net1,queues=1,client=1,dmas=[txq0;rxq0]'" - ) - vhost_param = ( - " --nb-cores=1 --txd=256 --rxd=256 --txq=1 --rxq=1 --no-flush-rx" - + " --lcore-dma=[%s]" % lcore_dma + "--vdev 'net_vhost0,iface=vhost-net0,queues=1,client=1,dmas=[%s]' " + "--vdev 'net_vhost1,iface=vhost-net1,queues=1,client=1,dmas=[%s]'" + % (dmas1, dmas2) ) + vhost_param = " --nb-cores=1 --txd=256 --rxd=256 --no-flush-rx" self.start_vhost_testpmd( cores=self.vhost_core_list, eal_param=vhost_eal_param, @@ -1401,7 +1443,7 @@ class TestVM2VMVirtioUserCbdma(TestCase): ) virtio1_eal_param = "--force-max-simd-bitwidth=512 --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=1,server=1,packed_vq=1,mrg_rxbuf=1,in_order=1,vectorized=1,queue_size=256" - virtio1_param = " --nb-cores=1 --rxq=1 --txq=1 --txd=256 --rxd=256" + virtio1_param = " --nb-cores=1 --txd=256 --rxd=256" self.start_virtio_testpmd_with_vhost_net1( cores=self.virtio1_core_list, eal_param=virtio1_eal_param, @@ -1410,7 +1452,7 @@ class TestVM2VMVirtioUserCbdma(TestCase): self.start_pdump_to_capture_pkt() virtio0_eal_param = "--force-max-simd-bitwidth=512 --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=1,server=1,packed_vq=1,mrg_rxbuf=1,in_order=1,vectorized=1,queue_size=256" - virtio0_param = " --nb-cores=1 --rxq=1 --txq=1 --txd=256 --rxd=256" + virtio0_param = " --nb-cores=1 --txd=256 --rxd=256" self.start_virtio_testpmd_with_vhost_net0( cores=self.virtio0_core_list, eal_param=virtio0_eal_param,