From patchwork Sat May 7 09:58:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 110831 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 99DE1A050A; Sat, 7 May 2022 11:59:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9297340DDB; Sat, 7 May 2022 11:59:09 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 5E6C040395 for ; Sat, 7 May 2022 11:59:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651917548; x=1683453548; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=UTtgENdhRIYkg4HIn4yHwlYsAt/6b6WCGYoZLT8DahU=; b=cH//DhXu1GmI8HLHYYENrz9/39044Oh1ZpJN51joAyvhS2p+ijvqB7Ne o/7XqCpXKIg/u4dY7+wRKC/Sjd3Lie6km5l5yHnr7anCzRbkKV+Y/ldCB fVg9sNiau6KqqP/9ewAtV/cu8l48Q/QxGC6WaLD2hah0vpOfKPQXV3Lkt f6sxYS152Lj2p7Yl3/CxJAJr1R6HKaqeJ+iLmET3yNGtsV4LY1OOUgvqk ZJOrgPboBW4iNLjbTWS+lxeENDah8byGrhWYIWHsWU5yxfKin3jsZoR7k 6vChHo4ZP3FB9/CFh/hCSdb/YlypS/sfNFMp1Ed2sMQ9QNIYaYVdpbeqq g==; X-IronPort-AV: E=McAfee;i="6400,9594,10339"; a="256179407" X-IronPort-AV: E=Sophos;i="5.91,206,1647327600"; d="scan'208";a="256179407" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2022 02:59:07 -0700 X-IronPort-AV: E=Sophos;i="5.91,206,1647327600"; d="scan'208";a="736138516" Received: from unknown (HELO localhost.localdomain) ([10.239.251.222]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2022 02:59:06 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V1 1/7] test_plans/index: add 6 das related testplan Date: Sat, 7 May 2022 05:58:41 -0400 Message-Id: <20220507095841.310879-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 Add 6 das related testplan into test_plans/index. Signed-off-by: Wei Ling --- test_plans/index.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test_plans/index.rst b/test_plans/index.rst index d0f73d23..936b1dfd 100644 --- a/test_plans/index.rst +++ b/test_plans/index.rst @@ -41,6 +41,7 @@ The following are the test plans for the DPDK DTS automated test system. asan_smoke_test_plan blocklist_test_plan basic_4k_pages_cbdma_test_plan + basic_4k_pages_dsa_test_plan checksum_offload_test_plan coremask_test_plan cvl_advanced_rss_test_plan @@ -124,6 +125,7 @@ The following are the test plans for the DPDK DTS automated test system. loopback_multi_paths_port_restart_test_plan loopback_virtio_user_server_mode_test_plan loopback_virtio_user_server_mode_cbdma_test_plan + loopback_virtio_user_server_mode_dsa_test_plan mac_filter_test_plan macsec_for_ixgbe_test_plan metering_and_policing_test_plan @@ -233,12 +235,14 @@ The following are the test plans for the DPDK DTS automated test system. virtio_smoke_test_plan vm2vm_virtio_net_perf_test_plan vm2vm_virtio_net_perf_cbdma_test_plan + vm2vm_virtio_net_dsa_test_plan vm2vm_virtio_pmd_test_plan vm2vm_virtio_pmd_cbdma_test_plan dpdk_gro_lib_test_plan dpdk_gso_lib_test_plan vswitch_sample_cbdma_test_plan vswitch_pvp_multi_paths_performance_with_cbdma_test_plan + vswitch_sample_dsa_test_plan vxlan_gpe_support_in_i40e_test_plan pvp_diff_qemu_version_test_plan pvp_share_lib_test_plan @@ -249,6 +253,7 @@ The following are the test plans for the DPDK DTS automated test system. eventdev_pipeline_perf_test_plan pvp_qemu_multi_paths_port_restart_test_plan pvp_vhost_user_reconnect_test_plan + pvp_vhost_dsa_test_plan pvp_virtio_bonding_test_plan pvp_virtio_user_4k_pages_test_plan vdev_primary_secondary_test_plan @@ -304,6 +309,7 @@ The following are the test plans for the DPDK DTS automated test system. port_representor_test_plan vm2vm_virtio_user_test_plan vm2vm_virtio_user_cbdma_test_plan + vm2vm_virtio_user_dsa_test_plan vmdq_dcb_test_plan acl_test_plan power_negative_test_plan From patchwork Sat May 7 09:58:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 110832 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 BDBC9A050A; Sat, 7 May 2022 11:59:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B76A340696; Sat, 7 May 2022 11:59:25 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 627F240395 for ; Sat, 7 May 2022 11:59:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651917563; x=1683453563; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Z2Mbl6PWgb6T+ZKxqQLJ/4wmV4opWOteKDYDdY3BIcA=; b=VrbdI2hvvQS/hjjdVZTnF1EoSWWLfNP1uN/bovF/eptPe39WXpo2Y7XJ rCDSr17RIGr+nplcRnBSY6FM8nywW7HeFfi69yvzTpY2XhVDgQ5eakrgH kbCQVcoZYzcgFqzYGXajyQgERTBGWTqgm0Cn8YISPKtT8lcb1I6nXw193 kxnxmYnuSuEgOCg+8WDBToj7fBCYince2CP6pa31ki8+db9sMfCFRsbmr +MyBsiaPeTg+VlkfDo5KguPnRKXhCug2JtsyLDEPseq/E/f3+bBLiRO/q rueGR4twqwilDVxC/W/9mVwgSBJqE6B3onAbIpVBvkkDRvC2RByE2KEUb A==; X-IronPort-AV: E=McAfee;i="6400,9594,10339"; a="267527707" X-IronPort-AV: E=Sophos;i="5.91,206,1647327600"; d="scan'208";a="267527707" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2022 02:59:22 -0700 X-IronPort-AV: E=Sophos;i="5.91,206,1647327600"; d="scan'208";a="736138571" Received: from unknown (HELO localhost.localdomain) ([10.239.251.222]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2022 02:59:20 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V1 2/7] test_plans/basic_4k_pages_dsa_test_plan: add basic_4k_pages_dsa testplan Date: Sat, 7 May 2022 05:58:55 -0400 Message-Id: <20220507095855.310940-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 Add basic_4k_pages_dsa_test_plan.rst into test_plans. Signed-off-by: Wei Ling --- test_plans/basic_4k_pages_dsa_test_plan.rst | 1146 +++++++++++++++++++ 1 file changed, 1146 insertions(+) create mode 100644 test_plans/basic_4k_pages_dsa_test_plan.rst diff --git a/test_plans/basic_4k_pages_dsa_test_plan.rst b/test_plans/basic_4k_pages_dsa_test_plan.rst new file mode 100644 index 00000000..235fa5f4 --- /dev/null +++ b/test_plans/basic_4k_pages_dsa_test_plan.rst @@ -0,0 +1,1146 @@ +.. Copyright (c) <2022>, Intel Corporation + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + - Neither the name of Intel Corporation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================== +vhost async operation with DSA driver using 4K-pages 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. Vhost enqueue operation with CBDMA channels is supported +in both split and packed ring. + +This document provides the test plan for testing some basic functions when Vhost-user using asynchronous data path with +DSA driver (kernel IDXD driver and DPDK vfio-pci driver) and using 4K-pages memory environment. +1. test Vhost asynchronous data path with DSA driver in the PVP topology environment with testpmd. +2. check Vhost tx offload function by verifing the TSO/cksum in the TCP/IP stack with vm2vm split ring and packed ring +vhost-user/virtio-net mergeable path. +3.Check the payload of large packet (larger than 1MB) is valid after forwarding packets with vm2vm split ring +and packed ring vhost-user/virtio-net mergeable and non-mergeable path. +4. Multi-queues number dynamic change in vm2vm vhost-user/virtio-net with split ring and packed ring. +5. Vhost-user using 1G hugepges and virtio-user using 4k-pages. + +DPDK 19.02 add support for using virtio-user without hugepages. The --no-huge mode was augmented to use memfd-backed +memory (on systems that support memfd), to allow using virtio-user-based NICs without hugepages. + +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, and the suite has not yet been automated. + +Prerequisites +============= + +General set up +-------------- +1. Turn off transparent hugepage in grub by adding GRUB_CMDLINE_LINUX="transparent_hugepage=never". + +2. Compile DPDK:: + + # CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib -Dexamples=all --default-library= + # ninja -C -j 110 + For example, + CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib -Dexamples=all --default-library=x86_64-native-linuxapp-gcc + ninja -C x86_64-native-linuxapp-gcc -j 110 + +3. Get the PCI device ID and DSA device ID of DUT, for example, 0000:4f:00.1 is PCI device ID, 0000:6a:01.0 - 0000:f6:01.0 are DSA device IDs:: + + # ./usertools/dpdk-devbind.py -s + + Network devices using kernel driver + =================================== + 0000:4f:00.1 'Ethernet Controller E810-C for QSFP 1592' drv=ice unused=vfio-pci + + 4DMA devices using kernel driver + 4=============================== + 40000:6a:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 40000:6f:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 40000:74:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 40000:79:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 40000:e7:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 40000:ec:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 40000:f1:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 40000:f6:01.0 'Device 0b25' drv=idxd unused=vfio-pci + +4. Prepare tmpfs with 4K-pages:: + + mkdir /mnt/tmpfs_4k + mkdir /mnt/tmpfs_4k_2 + mount tmpfs /mnt/tmpfs_4k -t tmpfs -o size=4G + mount tmpfs /mnt/tmpfs_4k_2 -t tmpfs -o size=4G + +Test case +========= + +Common steps +------------ +1. Bind 1 NIC port to vfio-pci:: + + # ./usertools/dpdk-devbind.py -b vfio-pci + For example: + # ./usertools/dpdk-devbind.py -b vfio-pci 0000:00:4f.1 + +2.Bind DSA devices to DPDK vfio-pci driver:: + + # ./usertools/dpdk-devbind.py -b vfio-pci + For example, bind 2 DMA devices to vfio-pci driver: + # ./usertools/dpdk-devbind.py -b vfio-pci 0000:e7:01.0 0000:ec:01.0 + +.. note:: + + One DPDK DSA device can create 8 WQ at most. Below is an example, where DPDK DSA device will create one and + eight WQ for DSA deivce 0000:e7:01.0 and 0000:ec:01.0. The value of “max_queues” is 1~8: + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 4 -n 4 -a 0000:e7:01.0,max_queues=1 -- -i + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 4 -n 4 -a 0000:ec:01.0,max_queues=8 -- -i + +3. Bind DSA devices to kernel idxd driver, and configure Work Queue (WQ):: + + # ./usertools/dpdk-devbind.py -b idxd + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q + +.. note:: + + Better to reset WQ when need operate DSA devices that bound to idxd drvier: + # ./drivers/dma/idxd/dpdk_idxd_cfg.py --reset + You can check it by 'ls /dev/dsa' + numDevices: number of devices, where 0<=numDevices<=7, corresponding to 0000:6a:01.0 - 0000:f6:01.0 + numWq: Number of workqueues per DSA endpoint, where 1<=numWq<=8 + + For example, bind 2 DMA devices to idxd driver and configure WQ: + + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 1 0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 4 2 + Check WQ by 'ls /dev/dsa' and can find "wq0.0 wq2.0 wq2.1 wq2.2 wq2.3" + +Test Case 1: Basic test vhost/virtio-user split ring with 4K-pages and dsa dpdk driver +---------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test split ring when vhost uses the asynchronous +enqueue operations with dsa dpdk driver and the mapping between vrings and dsa virtual channels is 1:1 in 4k-pages environment. + +1. Bind one dsa device(6a:01.0) and one nic port(4f:00.1) to vfio-pci like common step 1-2. + +2. Launch vhost:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 3-4 -n 4 -m 1024 --no-huge --file-prefix=vhost -a 0000:4f:00.1 -a 0000:6a:01.0,max_queues=1 \ + --vdev 'net_vhost0,iface=/tmp/vhost-net,queues=1,dmas=[txq0]' -- -i --no-numa --socket-num=0 --lcore-dma=[lcore4@0000:6a:01.0-q0] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with 4K-pages:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --no-huge -m 1024 --file-prefix=virtio-user \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/vhost-net,queues=1 -- -i + testpmd>set fwd mac + testpmd>start + +4. Send packet with packet generator with different packet size,includes [64, 128, 256, 512, 1024, 1518], check the throughput with below command:: + + testpmd>show port stats all + +Test Case 2: Basic test vhost/virtio-user packed ring with 4K-pages and dsa dpdk driver +---------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test packed ring when vhost uses the asynchronous +enqueue operations with dsa dpdk driver and the mapping between vrings and dsa virtual channels is 1:1 in 4k-pages environment. + +1. Bind one dsa device(6a:01.0) and one nic port(4f:00.1) to vfio-pci like common step 1-2. + +2. Launch vhost:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 3-4 -n 4 -m 1024 --no-huge --file-prefix=vhost -a 0000:4f:00.1 -a 0000:6a:01.0,max_queues=4 \ + --vdev 'net_vhost0,iface=/tmp/vhost-net,queues=1,dmas=[txq0]' -- -i --no-numa --socket-num=0 --lcore-dma=[lcore4@0000:6a:01.0-q0] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with 4K-pages:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --no-huge -m 1024 --file-prefix=virtio-user \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/vhost-net,packed_vq=1,queues=1 -- -i + testpmd>set fwd mac + testpmd>start + +4. Send packet with packet generator with different packet size,includes [64, 128, 256, 512, 1024, 1518], check the throughput with below command:: + + testpmd>show port stats all + +Test Case 3: PVP split ring multi-queues with 4K-pages and dsa dpdk driver +----------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test split ring multi-queues when vhost uses the asynchronous +enqueue operations with dsa dpdk driver and the mapping between vrings and dsa virtual channels is M:N in 4k-pages environment. + +1. Bind 8 dsa device and one nic port to vfio-pci like common step 1-2:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + # ./usertools/dpdk-devbind.py -b vfio-pci 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --no-huge -m 1024 -a 0000:4f:00.1 -a 0000:6a:01.0 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq6;txq7]' \ + --iova=va -- -i --nb-cores=5 --txd=1024 --rxd=1024 --txq=8 --rxq=8 --no-numa --socket-num=0 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore11@0000:6a:01.0-q7,lcore12@0000:6a:01.0-q1,lcore12@0000:6a:01.0-q2,lcore12@0000:6a:01.0-q3,lcore13@0000:6a:01.0-q2,lcore13@0000:6a:01.0-q3,lcore13@0000:6a:01.0-q4,lcore14@0000:6a:01.0-q2,lcore14@0000:6a:01.0-q3,lcore14@0000:6a:01.0-q4,lcore14@0000:6a:01.0-q5,lcore15@0000:6a:01.0-q0,lcore15@0000:6a:01.0-q1,lcore15@0000:6a:01.0-q2,lcore15@0000:6a:01.0-q3,lcore15@0000:6a:01.0-q4,lcore15@0000:6a:01.0-q5,lcore15@0000:6a:01.0-q6,lcore15@0000:6a:01.0-q7] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with inorder mergeable path:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-huge -m 1024 --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=1,in_order=1,queues=8,server=1 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets [64,1518] from packet generator, check the throughput can get expected data:: + + testpmd>show port stats all + +5. Stop vhost port, check vhost RX and TX direction both exist packtes in 8 queues from vhost log:: + + testpmd>stop + +6. restart vhost port and send imix pkts again, check get same throuhput as above:: + + testpmd>start + testpmd>show port stats all + +7. Quit and relaunch vhost with diff M:N(M:1;M>N) mapping between vrings and dsa virtual channels with 1G hugepage:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -a 0000:4f:00.1 -a 0000:6a:01.0 -a 0000:6f:01.0 -a 0000:74:01.0 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=5 --txd=1024 --rxd=1024 --txq=8 --rxq=8 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore12@0000:6a:01.0-q0,lcore13@0000:6f:01.0-q1,lcore13@0000:74:01.0-q2,lcore14@0000:6f:01.0-q1,lcore14@0000:74:01.0-q2,lcore15@0000:6f:01.0-q1,lcore15@0000:74:01.0-q2] + testpmd>set fwd mac + testpmd>start + +8. Rerun step 3-5. + +Test Case 4: PVP packed ring multi-queues with 4K-pages and dsa dpdk driver +------------------------------------------------------------------------------ +This case uses testpmd and Traffic Generator(For example, Trex) to test packed ring multi-queues when vhost uses the asynchronous +enqueue operations with dsa dpdk driver and the mapping between vrings and dsa virtual channels is M:N in 4k-pages environment. + +1. Bind 8 dsa device and one nic port to vfio-pci like common step 1-2:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + # ./usertools/dpdk-devbind.py -b vfio-pci 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --no-huge -m 1024 -a 0000:4f:00.1 -a 0000:6a:01.0 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq6;txq7]' \ + --iova=va -- -i --nb-cores=5 --txd=1024 --rxd=1024 --txq=8 --rxq=8 --no-numa --socket-num=0 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore11@0000:6a:01.0-q7,lcore12@0000:6a:01.0-q1,lcore12@0000:6a:01.0-q2,lcore12@0000:6a:01.0-q3,lcore13@0000:6a:01.0-q2,lcore13@0000:6a:01.0-q3,lcore13@0000:6a:01.0-q4,lcore14@0000:6a:01.0-q2,lcore14@0000:6a:01.0-q3,lcore14@0000:6a:01.0-q4,lcore14@0000:6a:01.0-q5,lcore15@0000:6a:01.0-q0,lcore15@0000:6a:01.0-q1,lcore15@0000:6a:01.0-q2,lcore15@0000:6a:01.0-q3,lcore15@0000:6a:01.0-q4,lcore15@0000:6a:01.0-q5,lcore15@0000:6a:01.0-q6,lcore15@0000:6a:01.0-q7] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with inorder mergeable path:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-huge -m 1024 --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=1,in_order=1,packed_vq=1,queues=8,server=1 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets [64,1518] from packet generator, check the throughput can get expected data:: + + testpmd>show port stats all + +5. Stop vhost port, check vhost RX and TX direction both exist packtes in 8 queues from vhost log:: + + testpmd>stop + +6. restart vhost port and send imix pkts again, check get same throuhput as above:: + + testpmd>start + testpmd>show port stats all + +7. Quit and relaunch vhost with diff M:N(M:1;M>N) mapping between vrings and dsa virtual channels with 1G hugepage:::: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -a 0000:4f:00.1 -a 0000:6a:01.0 -a 0000:6f:01.0 -a 0000:74:01.0 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=5 --txd=1024 --rxd=1024 --txq=8 --rxq=8 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore12@0000:6a:01.0-q0,lcore13@0000:6f:01.0-q1,lcore13@0000:74:01.0-q2,lcore14@0000:6f:01.0-q1,lcore14@0000:74:01.0-q2,lcore15@0000:6f:01.0-q1,lcore15@0000:74:01.0-q2] + testpmd>set fwd mac + testpmd>start + +8. Rerun step 3-5. + +Test Case 5: VM2VM split ring vhost-user/virtio-net 4K-pages and dsa dpdk driver test with tcp traffic +-------------------------------------------------------------------------------------------------------- +This case test the function of Vhost tx offload in the topology of vhost-user/virtio-net split ring mergeable path +by verifing the TSO/cksum in the TCP/IP stack when vhost uses the asynchronous enqueue operations with dsa dpdk driver +in 4k-pages environment. + +1. Bind 1 dsa device to vfio-pci like common step 2:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 6a:01.0 + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 2-4 -n 4 --no-huge -m 1024 --file-prefix=vhost -a 0000:6a:01.0,max_queues=2 \ + --vdev 'net_vhost0,iface=vhost-net0,queues=1,dmas=[txq0],dma_ring_size=2048' \ + --vdev 'net_vhost1,iface=vhost-net1,queues=1,dmas=[txq0],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=2 --txd=1024 --rxd=1024 --no-numa --socket-num=0 --lcore-dma=[lcore3@0000:6a:01.0-q0,lcore4@0000:6a:01.0-q1] + testpmd>start + +3. Launch VM1 and VM2:: + + taskset -c 32 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 1 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/tmpfs_4k,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm1_qga0.sock,server,nowait,id=vm1_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm1_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm1_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=./vhost-net0 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=false,mrg_rxbuf=on,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on -vnc :10 + + taskset -c 33 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 1 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/tmpfs_4k_2,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=./vhost-net1 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=on,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on -vnc :12 + +3. On VM1, set virtio device IP and run arp protocal:: + + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +4. On VM2, set virtio device IP and run arp protocal:: + + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +5. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +6. Check that 2VMs can receive and send big packets to each other through vhost log. Port 0 should have tx packets above 1522, Port 1 should have rx packets above 1522:: + + testpmd>show port xstats all + +Test Case 6: VM2VM packed ring vhost-user/virtio-net 4K-pages and dsa dpdk driver test with tcp traffic +--------------------------------------------------------------------------------------------------------- +This case test the function of Vhost tx offload in the topology of vhost-user/virtio-net packed ring mergeable path +by verifing the TSO/cksum in the TCP/IP stack when vhost uses the asynchronous enqueue operations with dsa dpdk driver +in 4k-pages environment. + +1. Bind 1 dsa device to vfio-pci like common step 2:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 6a:01.0 + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 2-4 -n 4 --no-huge -m 1024 --file-prefix=vhost -a 0000:6a:01.0 \ + --vdev 'net_vhost0,iface=vhost-net0,queues=1,dmas=[txq0],dma_ring_size=2048' \ + --vdev 'net_vhost1,iface=vhost-net1,queues=1,dmas=[txq0],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=2 --txd=1024 --rxd=1024 --no-numa --socket-num=0 --lcore-dma=[lcore3@0000:6a:01.0-q0,lcore4@0000:6a:01.0-q1] + testpmd>start + +3. Launch VM1 and VM2:: + + taskset -c 32 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 1 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/tmpfs_4k,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm1_qga0.sock,server,nowait,id=vm1_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm1_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm1_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=./vhost-net0 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=false,mrg_rxbuf=on,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,packed=on -vnc :10 + + taskset -c 33 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 1 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/tmpfs_4k_2,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=./vhost-net1 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=on,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,packed=on -vnc :12 + +3. On VM1, set virtio device IP and run arp protocal:: + + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +4. On VM2, set virtio device IP and run arp protocal:: + + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +5. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +6. Check that 2VMs can receive and send big packets to each other through vhost log. Port 0 should have tx packets above 1522, Port 1 should have rx packets above 1522:: + + testpmd>show port xstats all + +Test Case 7: vm2vm vhost/virtio-net split packed ring multi queues with 1G/4k-pages and dsa dpdk driver +--------------------------------------------------------------------------------------------------------- +This case uses iperf and scp to test the payload of large packet (larger than 1MB) is valid after packets forwarding in +vm2vm vhost-user/virtio-net multi-queues mergeable path when vhost uses the asynchronous enqueue operations with dsa dpdk driver. +And one virtio-net is split ring, the other is packed ring. The vhost run in 1G hugepages and the virtio-user run in 4k-pages environment. + +1. Bind 2 dsa channel to vfio-pci like common step 2:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + +2. Launch vhost:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost -a 0000:6a:01.0 -a 0000:6f:01.0 -a 0000:74:01.0 -a 0000:79:01.0 -a 0000:e7:01.0 -a 0000:ec:01.0 -a 0000:f1:01.0 -a 0000:f6:01.0 \ + --vdev 'net_vhost0,iface=vhost-net0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --vdev 'net_vhost1,iface=vhost-net1,queues=8,dmas=[txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8 \ + --lcore-dma=[lcore2@0000:6a:01.0-q0,lcore2@0000:6f:01.0-q1,lcore2@0000:74:01.0-q2,lcore2@0000:79:01.0-q3,lcore3@0000:6a:01.0-q0,lcore3@0000:74:01.0-q2,lcore3@0000:e7:01.0-q4,lcore3@0000:ec:01.0-q5,lcore3@0000:f1:01.0-q6,lcore3@0000:f6:01.0-q7,lcore4@0000:6f:01.0-q1,lcore4@0000:79:01.0-q3,lcore4@0000:6a:01.0-q1,lcore4@0000:6f:01.0-q2,lcore4@0000:74:01.0-q3,lcore4@0000:79:01.0-q4,lcore4@0000:e7:01.0-q5,lcore4@0000:ec:01.0-q6,lcore4@0000:f1:01.0-q7,lcore5@0000:f6:01.0-q0] + testpmd>start + +3. Launch VM qemu:: + + taskset -c 32 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 1 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/tmpfs_4k,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm1_qga0.sock,server,nowait,id=vm1_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm1_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm1_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=./vhost-net0 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=8 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=false,mrg_rxbuf=on,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on -vnc :10 + + taskset -c 33 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 1 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/tmpfs_4k_2,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=./vhost-net1 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=8 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=on,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,packed=on -vnc :12 + +4. On VM1, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 8 + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +5. On VM2, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 8 + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +6. Scp 1MB file form VM1 to VM2:: + + # scp root@1.1.1.8:/ + +7. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +Test Case 8: Basic test vhost/virtio-user split ring with 4K-pages and dsa kernel driver +---------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test split ring when vhost uses the asynchronous +enqueue operations with dsa kernel driver and the mapping between vrings and dsa virtual channels is 1:1 in 4k-pages environment. + +1. Bind one nic port to vfio-pci and one dsa device to idxd like common step 1 and 3:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + + #ls /dev/dsa,check wq configure, reset if exist + # .//drivers/dma/idxd/dpdk_idxd_cfg.py --reset 0 + + # ./usertools/dpdk-devbind.py -u 6a:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 2 0 + ls /dev/dsa #check wq configure success + +2. Launch vhost:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 3-4 -n 4 -m 1024 --no-huge --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/vhost-net,queues=1,dmas=[txq0]' -- -i --no-numa --socket-num=0 --lcore-dma=[lcore4@wq0.0] + testpmd>start + +3. Launch virtio-user with 4K-pages:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --no-huge -m 1024 --file-prefix=virtio-user \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/vhost-net,queues=1 -- -i + testpmd>start + +4. Send packet with packet generator with different packet size,includes [64, 128, 256, 512, 1024, 1518], check the throughput with below command:: + + testpmd>show port stats all + +Test Case 9: Basic test vhost/virtio-user packed ring with 4K-pages and dsa dpdk driver +---------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test packed ring when vhost uses the asynchronous +enqueue operations with dsa kernel driver and the mapping between vrings and dsa virtual channels is 1:1 in 4k-pages environment. + +1. Bind one nic port to vfio-pci and one dsa device to idxd like common step 1 and 3:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + + #ls /dev/dsa,check wq configure, reset if exist + # .//drivers/dma/idxd/dpdk_idxd_cfg.py --reset 0 + + # ./usertools/dpdk-devbind.py -u 6a:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 2 0 + ls /dev/dsa #check wq configure success + +2. Launch vhost:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 3-4 -n 4 -m 1024 --no-huge --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/vhost-net,queues=1,dmas=[txq0]' -- -i --no-numa --socket-num=0 --lcore-dma=[lcore4@wq0.1] + testpmd>start + +3. Launch virtio-user with 4K-pages:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --no-huge -m 1024 --file-prefix=virtio-user \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/vhost-net,packed_vq=1,queues=1 -- -i + testpmd>start + +4. Send packet with packet generator with different packet size,includes [64, 128, 256, 512, 1024, 1518], check the throughput with below command:: + + testpmd>show port stats all + +Test Case 10: PVP split ring multi-queues with 4K-pages and dsa kernel driver +-------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test split ring multi-queues when vhost uses the asynchronous +enqueue operations with dsa kernel driver and the mapping between vrings and dsa virtual channels is M:N in 4k-pages environment. + +1. Bind one nic port to vfio-pci and 8 dsa device to idxd like common step 1 and 3:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + + .ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 2 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 4 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 6 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 8 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 10 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 12 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 14 + ls /dev/dsa #check wq configure success + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -m 1024 --no-huge -a 0000:4f:00.1 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq6;txq7]' \ + --iova=va -- -i --nb-cores=5 --txd=1024 --rxd=1024 --txq=8 --rxq=8 --no-numa --socket-num=0 \ + --lcore-dma=[lcore11@wq0.0,lcore11@wq0.7,lcore12@wq0.1,lcore12@wq0.2,lcore12@wq0.3,lcore13@wq0.2,lcore13@wq0.3,lcore13@wq0.4,lcore14@wq0.2,lcore14@wq0.3,lcore14@wq0.4,lcore14@wq0.5,lcore15@wq0.0,lcore15@wq0.1,lcore15@wq0.2,lcore15@wq0.3,lcore15@wq0.4,lcore15@wq0.5,lcore15@wq0.6,lcore15@wq0.7] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with inorder mergeable path:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-huge -m 1024 --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=1,in_order=1,queues=8,server=1 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets [64,1518] from packet generator, check the throughput can get expected data:: + + testpmd>show port stats all + +5. Stop vhost port, check vhost RX and TX direction both exist packtes in 8 queues from vhost log:: + + testpmd>stop + +6. restart vhost port and send imix pkts again, check get same throuhput as above:: + + testpmd>start + testpmd>show port stats all + +7. Quit and relaunch vhost with diff M:N(M:1;M>N) mapping between vrings and dsa virtual channels:::: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -a 0000:4f:00.1 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=5 --txd=1024 --rxd=1024 --txq=8 --rxq=8 \ + --lcore-dma=[lcore11@wq0.0,lcore12@wq0.0,lcore13@wq0.1,lcore13@wq0.2,lcore14@wq0.1,lcore14@wq0.2,lcore15@wq0.1,lcore15@wq0.2] + testpmd>set fwd mac + testpmd>start + +8. Rerun step 4-6. + +Test Case 11: PVP packed ring multi-queues with 4K-pages and dsa kernel driver +--------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test packed ring multi-queues when vhost uses the asynchronous +enqueue operations with dsa kernel driver and the mapping between vrings and dsa virtual channels is M:N in 4k-pages environment. + +1. Bind one nic port to vfio-pci and 8 dsa device to idxd like common step 1 and 3:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + + .ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 2 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 4 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 6 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 8 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 10 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 12 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 14 + ls /dev/dsa #check wq configure success + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -m 1024 --no-huge -a 0000:4f:00.1 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3]' \ + --iova=va -- -i --nb-cores=8 --txd=1024 --rxd=1024 --txq=8 --rxq=8 --no-numa --socket-num=0 \ + --lcore-dma=[lcore11@wq0.0,lcore12@wq2.1,lcore13@wq4.2,lcore14@wq6.3] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with inorder mergeable path:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-huge -m 1024 --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=1,in_order=1,packed_vq=1,queues=8,server=1 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets [64,1518] from packet generator, check the throughput can get expected data:: + + testpmd>show port stats all + +5. Stop vhost port, check vhost RX and TX direction both exist packtes in 8 queues from vhost log:: + + testpmd>stop + +6. restart vhost port and send imix pkts again, check get same throuhput as above:: + + testpmd>start + testpmd>show port stats all + +7. Quit and relaunch vhost with diff M:N(M:1;M>N) mapping between vrings and dsa virtual channels:::: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -a 0000:4f:00.1 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq6;txq7]' \ + --iova=va -- -i --nb-cores=5 --txd=1024 --rxd=1024 --txq=8 --rxq=8 \ + --lcore-dma=[lcore11@wq0.0,lcore11@wq0.7,lcore12@wq0.1,lcore12@wq0.2,lcore12@wq0.3,lcore13@wq0.2,lcore13@wq0.3,lcore13@wq0.4,lcore14@wq0.2,lcore14@wq0.3,lcore14@wq0.4,lcore14@wq0.5,lcore15@wq0.0,lcore15@wq0.1,lcore15@wq0.2,lcore15@wq0.3,lcore15@wq0.4,lcore15@wq0.5,lcore15@wq0.6,lcore15@wq0.7] + testpmd>set fwd mac + testpmd>start + +8. Rerun step 4-6. + +Test Case 12: VM2VM split ring vhost-user/virtio-net 4K-pages and dsa kernel driver test with tcp traffic +--------------------------------------------------------------------------------------------------------- +This case test the function of Vhost tx offload in the topology of vhost-user/virtio-net split ring mergeable path +by verifing the TSO/cksum in the TCP/IP stack when vhost uses the asynchronous enqueue operations with dsa dpdk driver +in 4k-pages environment. + +1. Bind 1 dsa device to idxd like common step 2:: + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 4 0 + ls /dev/dsa #check wq configure success + +2. Launch the Vhost sample by below commands:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --no-huge -m 1024 --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net0,queues=1,dmas=[txq0]' \ + --vdev 'net_vhost1,iface=vhost-net1,queues=1,dmas=[txq0]' \ + --iova=va -- -i --nb-cores=2 --txd=1024 --rxd=1024 --rxq=1 --txq=1 --no-numa --socket-num=0 --lcore-dma=[lcore2@wq0.0,lcore2@wq0.1,lcore3@wq0.2,lcore3@wq0.3] + testpmd>start + +3. Launch VM1 and VM2 on socket 1:: + + taskset -c 7 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/tmpfs_4k,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm1_qga0.sock,server,nowait,id=vm1_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm1_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm1_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=./vhost-net0 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=false,mrg_rxbuf=on,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on -vnc :10 + + taskset -c 8 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/tmpfs_4k_2,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=./vhost-net1 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=on,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on -vnc :12 + +4. On VM1, set virtio device IP and run arp protocal:: + + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +5. On VM2, set virtio device IP and run arp protocal:: + + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +6. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +7. Check that 2VMs can receive and send big packets to each other through vhost log. Port 0 should have tx packets above 1522, Port 1 should have rx packets above 1522:: + + testpmd>show port xstats all + +Test Case 13: VM2VM packed ring vhost-user/virtio-net 4K-pages and dsa kernel driver test with tcp traffic +----------------------------------------------------------------------------------------------------------- +This case test the function of Vhost tx offload in the topology of vhost-user/virtio-net packed ring mergeable path +by verifing the TSO/cksum in the TCP/IP stack when vhost uses the asynchronous enqueue operations with dsa dpdk driver +in 4k-pages environment. + +1. Bind 2 dsa device to idxd like common step 2:: + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 2 + ls /dev/dsa #check wq configure success + +2. Launch the Vhost sample by below commands:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 2-4 -n 4 --no-huge -m 1024 --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net0,queues=1,dmas=[txq0]' \ + --vdev 'net_vhost1,iface=vhost-net1,queues=1,dmas=[txq0]' \ + --iova=va -- -i --nb-cores=2 --txd=1024 --rxd=1024 --no-numa --socket-num=0 --lcore-dma=[lcore3@wq0.0,lcore4@wq2.0] + testpmd>start + +3. Launch VM1 and VM2 with qemu:: + + taskset -c 7 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 1 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/tmpfs_4k,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm1_qga0.sock,server,nowait,id=vm1_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm1_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm1_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=./vhost-net0 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=false,mrg_rxbuf=on,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,packed=on -vnc :10 + + taskset -c 8 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 1 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/tmpfs_4k_2,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=./vhost-net1 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=on,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,packed=on -vnc :12 + +4. On VM1, set virtio device IP and run arp protocal:: + + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +5. On VM2, set virtio device IP and run arp protocal:: + + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +6. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +7. Check that 2VMs can receive and send big packets to each other through vhost log. Port 0 should have tx packets above 1522, Port 1 should have rx packets above 1522:: + + testpmd>show port xstats all + +Test Case 14: vm2vm vhost/virtio-net split packed ring multi queues with 1G/4k-pages and dsa kernel driver +----------------------------------------------------------------------------------------------------------- +This case uses iperf and scp to test the payload of large packet (larger than 1MB) is valid after packets forwarding in +vm2vm vhost-user/virtio-net split and packed ring mergeable path when vhost uses the asynchronous enqueue operations with +dsa kernel driver. The vhost run in 1G hugepages and the virtio-user run in 4k-pages environment. + +1. Bind 8 dsa device to idxd like common step 3:: + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 2 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 4 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 6 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 8 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 10 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 12 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 14 + ls /dev/dsa #check wq configure success + +2. Launch vhost:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --vdev 'net_vhost1,iface=vhost-net1,queues=8,dmas=[txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8 \ + --lcore-dma=[lcore2@wq0.0,lcore2@wq2.1,lcore2@wq4.2,lcore2@wq6.3,lcore3@wq0.0,lcore3@wq4.2,lcore3@wq8.4,lcore3@wq10.5,lcore3@wq12.6,lcore3@wq14.7,lcore4@wq2.1,lcore4@wq6.3,lcore4@wq0.1,lcore4@wq2.2,lcore4@wq4.3,lcore4@wq6.4,lcore4@wq8.5,lcore4@wq10.6,lcore4@wq12.7,lcore5@wq14.0] + testpmd>start + +3. Launch VM qemu:: + + taskset -c 32 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 1 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/tmpfs_4k,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm1_qga0.sock,server,nowait,id=vm1_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm1_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm1_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=./vhost-net0 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=8 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=false,mrg_rxbuf=on,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on -vnc :10 + + taskset -c 33 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 1 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/tmpfs_4k_2,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=./vhost-net1 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=8 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=on,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,packed=on -vnc :12 + +4. On VM1, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 8 + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +5. On VM2, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 8 + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +6. Scp 1MB file form VM1 to VM2:: + + # scp root@1.1.1.8:/ + +7. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +Test Case 15: PVP split and packed ring dynamic queue number test with dsa dpdk and kernel driver +--------------------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test split and packed ring when vhost uses the asynchronous enqueue operations +with dsa dpdk and kernel driver and if the vhost-user can work well when the queue number dynamic change. + +1. bind 2 dsa device to idxd, 2 dsa device to vfio-pci and one nic port to vfio-pci like common step 1-3:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 + # ./usertools/dpdk-devbind.py -b vfio-pci e7:01.0 ec:01.0 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 2 0 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 4 2 + ls /dev/dsa #check wq configure success + +2. Launch vhost:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --no-huge -m 1024 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 --txq=2 --rxq=2 --no-numa --socket-num=0 --lcore-dma=[lcore3@wq0.0,lcore3@wq2.0] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with split ring mergeable in-order path by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-huge -m 1024 --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=1,in_order=1,queues=8,server=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 --txq=8 --rxq=8 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets from packet generator with random ip, check perforamnce can get target. + +5. Stop vhost port, check vhost RX and TX direction both exist packtes in 2 queues from vhost log. + +6. Quit and relaunch vhost as below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --no-huge -m 1024 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:e7:01.0 -a 0000:ec:01.0 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=4,client=1,dmas=[txq0;txq1;txq2;txq3]' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 --txq=4 --rxq=4 --no-numa --socket-num=0 --lcore-dma=[lcore3@0000:e7:01.0-q0,lcore3@0000:e7:01.0-q1,lcore3@0000:ec:01.0-q2,lcore3@0000:ec:01.0-q3] + testpmd>set fwd mac + testpmd>start + +7. Send imix packets from packet generator with random ip, check perforamnce can get target. + +8. Stop vhost port, check vhost RX and TX direction both exist packtes in 4 queues from vhost log. + +9. Quit and relaunch vhost as below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --no-huge -m 1024 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:e7:01.0 -a 0000:ec:01.0 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5]' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 --txq=8 --rxq=8 --no-numa --socket-num=0 --lcore-dma=[lcore3@wq0.0,lcore3@wq2.0,lcore3@wq2.2,lcore3@0000:e7:01.0-q0,lcore3@0000:e7:01.0-q1,lcore3@0000:ec:01.0-q3] + testpmd>set fwd mac + testpmd>start + +10. Send imix packets from packet generator with random ip, check perforamnce can get target. + +11. Stop vhost port, check vhost RX and TX direction both exist packtes in 8 queues from vhost log. + +12. Quit and relaunch vhost with diff cahnnels as below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --no-huge -m 1024 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:e7:01.0 -a 0000:ec:01.0 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 --txq=8 --rxq=8 --no-numa --socket-num=0 --lcore-dma=[lcore3@wq0.0,lcore3@wq0.1,lcore3@wq2.1,lcore3@wq2.0,lcore3@0000:e7:01.0-q1,lcore3@0000:ec:01.0-q3] + testpmd>set fwd mac + testpmd>start + +13. Send imix packets from packet generator with random ip, check perforamnce can get target. + +14. Stop vhost port, check vhost RX and TX direction both exist packtes in 8 queues from vhost log. + +15. Quit and relaunch virtio-user with packed ring mergeable in-order path by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-huge -m 1024 --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=1,in_order=1,packed_vq=1,queues=8,server=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 --txq=8 --rxq=8 + testpmd>set fwd mac + testpmd>start + +16. Rerun steps 4-5. + +Test Case 16: VM2VM split ring vhost-user/virtio-net non-mergeable 4k-pages 16 queues dsa dpdk and kernel driver test with large packet payload valid check +------------------------------------------------------------------------------------------------------------------------------------------------------------- +This case uses iperf and scp to test the payload of large packet (larger than 1MB) is valid after packets forwarding in +vm2vm vhost-user/virtio-net split ring non-mergeable path when vhost uses the asynchronous enqueue operations with dsa dpdk +and kernel driver. The dynamic change of multi-queues number also test. + +1. Bind 4 dsa device to vfio-pci and 4 dsa device to idxd like common step 2-3:: + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 79:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 74:01.0 79:01.0 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 2 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 4 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 6 + ls /dev/dsa #check wq configure success + # ./usertools/dpdk-devbind.py -u 0000:e7:01.0 0000:ec:01.0 0000:f1:01.0 0000:f6:01.0 + # ./usertools/dpdk-devbind.py -b vfio-pci 0000:e7:01.0 0000:ec:01.0 0000:f1:01.0 0000:f6:01.0 + +2. Launch the Vhost sample by below commands:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 -m 1024 --no-huge --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net0,client=1,queues=16,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7;txq8;txq9;txq10;txq11;txq12;txq13;txq14;txq15]' \ + --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=16,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7;txq8;txq9;txq10;txq11;txq12;txq13;txq14;txq15]' \ + --iova=va -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=16 --txq=16 --no-numa --socket-num=0 \ + --lcore-dma=[lcore2@0000:e7:01.0-q0,lcore2@0000:e7:01.0-q1,lcore2@0000:ec:01.0-q0,lcore2@0000:ec:01.0-q1,lcore3@wq0.0,lcore3@wq2.0,lcore4@0000:e7:01.0-q4,lcore4@0000:e7:01.0-q5,lcore4@0000:ec:01.0-q4,lcore4@0000:ec:01.0-q5,lcore5@wq4.1,lcore5@wq2.1] + testpmd>start + +3. Launch VM1 and VM2:: + + taskset -c 7 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/tmpfs_4k,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm1_qga0.sock,server,nowait,id=vm1_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm1_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm1_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=./vhost-net0,server \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=16 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=false,mrg_rxbuf=off,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on -vnc :10 + + taskset -c 8 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/tmpfs_4k_2,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=./vhost-net1,server \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=16 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=off,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on -vnc :12 + +4. On VM1, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 16 + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +5. On VM2, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 16 + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +6. Scp 1MB file form VM1 to VM2:: + + # scp > root@1.1.1.8:/ + +7. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +8. Quit vhost ports and relaunch vhost ports w/ diff dsa channels:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 -m 1024 --no-huge --file-prefix=vhost -a 0000:6f:01.0 -a 0000:74:01.0 -a 0000:79:01.0 -a 0000:e7:01.0 -a 0000:f1:01.0 -a 0000:f6:01.0 \ + --vdev 'net_vhost0,iface=vhost-net0,client=1,queues=16,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7;txq8;txq9;txq10;txq11;txq12;txq13]' \ + --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=16,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7;txq8;txq9;txq10;txq11;txq12;txq13]' \ + --iova=va -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=16 --txq=16 --no-numa --socket-num=0 --lcore-dma=[lcore2@0000:e7:01.0-q2,lcore2@0000:f1:01.0-q3,lcore2@0000:f1:01.0-q1,lcore2@wq4.2,lcore3@wq6.1,lcore3@wq6.3,lcore4@0000:e7:01.0-q2,lcore4@0000:f6:01.0-q5,lcore4@wq4.2,lcore4@wq6.0,lcore5@wq4.2,lcore5@wq6.0] + testpmd>start + +9. rerun step 6-7. + +10. Quit vhost ports and relaunch vhost ports w/o dsa channels:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 -m 1024 --no-huge --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net0,client=1,queues=16' \ + --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=16' -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=16 --txq=16 --no-numa --socket-num=0 + testpmd>start + +11. Rerun step 6-7. + +12. Quit vhost ports and relaunch vhost ports with 1 queues:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 -m 1024 --no-huge --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net0,client=1,queues=8' \ + --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=8' -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=1 --txq=1 --no-numa --socket-num=0 + testpmd>start + +13. On VM1, set virtio device:: + + # ethtool -L ens5 combined 1 + +14. On VM2, set virtio device:: + + # ethtool -L ens5 combined 1 + +15. Rerun step 5-6. + +Test Case 17: vm2vm packed ring vhost-user/virtio-net mergeable 16 queues dsa dpdk and kernel driver test with large packet payload valid check +-------------------------------------------------------------------------------------------------------------------------------------------------- +This case uses iperf and scp to test the payload of large packet (larger than 1MB) is valid after packets forwarding in +vm2vm vhost-user/virtio-net packed ring mergeable path when vhost uses the asynchronous enqueue operations with dsa dpdk +and kernel driver. The dynamic change of multi-queues number also test. + +1. Bind 4 dsa device to vfio-pci and 4 dsa device to idxd like common step 2-3:: + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -b vfio-pci e7:01.0 ec:01.0 f1:01.0 f6:01.0 + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 79:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 74:01.0 79:01.0 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 2 0 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 2 2 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 4 4 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 4 6 + ls /dev/dsa #check wq configure success + +2. Launch the Vhost sample by below commands:: + + rm -rf vhost-net* + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 -m 1024 --no-huge --file-prefix=vhost -a 0000:e7:01.0 -a 0000:ec:01.0 -a 0000:f1:01.0 -a 0000:f6:01.0 \ + --vdev 'net_vhost0,iface=vhost-net0,queues=16,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7;txq8;txq9;txq10;txq11;txq12;txq13;txq14;txq15]' \ + --vdev 'net_vhost1,iface=vhost-net1,queues=16,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7;txq8;txq9;txq10;txq11;txq12;txq13;txq14;txq15]' \ + --iova=va -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=16 --txq=16 --no-numa --socket-num=0 \ + --lcore-dma=[lcore2@wq0.0,lcore2@wq0.1,lcore2@wq2.0,lcore2@wq2.1,lcore3@wq0.1,lcore3@wq2.0,lcore3@0000:e7:01.0-q4,lcore3@0000:ec:01.0-q5,lcore3@0000:f1:01.0-q6,lcore3@0000:f6:01.0-q7,lcore4@0000:e7:01.0-q4,lcore4@0000:ec:01.0-q5,lcore4@0000:f1:01.0-q1,lcore4@wq2.0,lcore5@wq4.1,lcore5@wq2.0,lcore5@wq4.1,lcore5@wq6.2] + testpmd>start + +3. Launch VM1 and VM2 with qemu:: + + taskset -c 7 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/tmpfs_4k,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm1_qga0.sock,server,nowait,id=vm1_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm1_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm1_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=./vhost-net0 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=16 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=false,mrg_rxbuf=on,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on,packed=on -vnc :10 + + taskset -c 8 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/tmpfs_4k_2,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=./vhost-net1 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=16 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=on,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on,packed=on -vnc :12 + +4. On VM1, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 16 + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +5. On VM2, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 16 + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +6. Scp 1MB file form VM1 to VM2:: + + # scp > root@1.1.1.8:/ + +7. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +8. Rerun step 6-7 five times. From patchwork Sat May 7 09:59:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 110833 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 E5DF5A050A; Sat, 7 May 2022 11:59:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DFA3540DF6; Sat, 7 May 2022 11:59:36 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 7F98140395 for ; Sat, 7 May 2022 11:59:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651917574; x=1683453574; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=SYm/CGl6/xV26OcMvGdJx1RZP6Hn5otvrTzPX0o9BB0=; b=iw6dzd3qxKstagVFcm0oPyBwuhkHLR8SHyr9j+Q81hs5Y2LUXImKbu3P NB0p+hPE+a5skiTn7NPotS1ot0xCdqR9WMoDeucGSVeB2rFgJ5kIq/L5p oXPQe/Y72gW4kvL7ZJ7Duv8g1h6it6QLRWsofgDE8Y9gorMOvPZDMKmQj t3XVEpMdd46mTiiiBBue6C8vx0UIXZV0Yhk+ojpVOGBZv4GkuYaqpaNcZ P6QaUgaMgkTUc163Slx+z40BTSHnMCBtLnoYBdsTNyETbcg2CZeNDrKZy gykxrNKWdOWq/ht8W9EF+cSUFxJrHxHOEGMDq4geK0tg4k2cX0WnHhZLq Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10339"; a="355120958" X-IronPort-AV: E=Sophos;i="5.91,206,1647327600"; d="scan'208";a="355120958" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2022 02:59:33 -0700 X-IronPort-AV: E=Sophos;i="5.91,206,1647327600"; d="scan'208";a="736138599" Received: from unknown (HELO localhost.localdomain) ([10.239.251.222]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2022 02:59:31 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V1 3/7] test_plans/loopback_virtio_user_server_mode_dsa_test_plan: add loopback_virtio_user_server_mode_dsa testplan Date: Sat, 7 May 2022 05:59:07 -0400 Message-Id: <20220507095907.311000-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 Add loopback_virtio_user_server_mode_dsa_test_plan.rst into test_plans. Signed-off-by: Wei Ling --- ..._virtio_user_server_mode_dsa_test_plan.rst | 820 ++++++++++++++++++ 1 file changed, 820 insertions(+) create mode 100644 test_plans/loopback_virtio_user_server_mode_dsa_test_plan.rst diff --git a/test_plans/loopback_virtio_user_server_mode_dsa_test_plan.rst b/test_plans/loopback_virtio_user_server_mode_dsa_test_plan.rst new file mode 100644 index 00000000..ad06a2a7 --- /dev/null +++ b/test_plans/loopback_virtio_user_server_mode_dsa_test_plan.rst @@ -0,0 +1,820 @@ +.. Copyright (c) <2022>, Intel Corporation + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + - Neither the name of Intel Corporation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + +======================================================================= +Loopback vhost-user/virtio-user server mode with DSA driver 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. Vhost enqueue operation with CBDMA channels is supported +in both split and packed ring. + +This document provides the test plan for testing the following features when Vhost-user using asynchronous data path with +DSA driver (kernel IDXD driver and DPDK vfio-pci driver) in loopback virtio-user topology. +1. Virtio-user server mode is a feature to enable virtio-user as the server, vhost as the client, thus after vhost-user is killed then relaunched, +virtio-user can reconnect back to vhost-user again; at another hand, virtio-user also can reconnect back to vhost-user after virtio-user is killed. +This feature test need cover different rx/tx paths with virtio 1.0 and virtio 1.1, includes split ring mergeable, non-mergeable, inorder mergeable, +inorder non-mergeable, vector_rx path and packed ring mergeable, non-mergeable, inorder non-mergeable, inorder mergeable, vectorized path. +2. Check payload valid after packets forwarding many times. +3. Stress test with large chain packets. + +IOMMU impact: +If iommu off, idxd can work with iova=pa +If iommu on, kernel dsa driver only can work with iova=va by program IOMMU, can't use iova=pa(fwd not work due to pkts payload wrong). + +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, and the suite has not yet been automated. + +Topology +-------- + Test flow: Vhost-user <-> Virtio-user + +General set up +-------------- +1. Compile DPDK:: + + # CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib -Dexamples=all --default-library= + # ninja -C -j 110 + +2. Get the PCI device ID and DSA device ID of DUT, for example, 0000:4f:00.1 is PCI device ID, 0000:6a:01.0 - 0000:f6:01.0 are DSA device IDs:: + + # ./usertools/dpdk-devbind.py -s + + Network devices using kernel driver + =================================== + 0000:4f:00.1 'Ethernet Controller E810-C for QSFP 1592' drv=ice unused=vfio-pci + + DMA devices using kernel driver + =============================== + 0000:6a:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:6f:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:74:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:79:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:e7:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:ec:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:f1:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:f6:01.0 'Device 0b25' drv=idxd unused=vfio-pci + +Test case +========= + +Common steps +------------ +1. Bind DSA devices to DPDK vfio-pci driver:: + + # ./usertools/dpdk-devbind.py -b vfio-pci + + For example, bind 2 DMA devices to vfio-pci driver: + # ./usertools/dpdk-devbind.py -b vfio-pci 0000:e7:01.0 0000:ec:01.0 + +.. note:: + + One DPDK DSA device can create 8 WQ at most. Below is an example, where DPDK DSA device will create one and + eight WQ for DSA deivce 0000:e7:01.0 and 0000:ec:01.0. The value of “max_queues” is 1~8: + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 4 -n 4 -a 0000:e7:01.0,max_queues=1 -- -i + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 4 -n 4 -a 0000:ec:01.0,max_queues=8 -- -i + +2. Bind DSA devices to kernel idxd driver, and configure Work Queue (WQ):: + + # ./usertools/dpdk-devbind.py -b idxd + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q + +.. note:: + + Better to reset WQ when need operate DSA devices that bound to idxd drvier: + # ./drivers/dma/idxd/dpdk_idxd_cfg.py --reset + You can check it by 'ls /dev/dsa' + numDevices: number of devices, where 0<=numDevices<=7, corresponding to 0000:6a:01.0 - 0000:f6:01.0 + numWq: Number of workqueues per DSA endpoint, where 1<=numWq<=8 + + For example, bind 2 DMA devices to idxd driver and configure WQ: + + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 1 0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 4 2 + Check WQ by 'ls /dev/dsa' and can find "wq0.0 wq2.0 wq2.1 wq2.2 wq2.3" + +Test Case 1: loopback split ring server mode large chain packets stress test with dsa dpdk driver +--------------------------------------------------------------------------------------------------- +This is a stress test case about forwading large chain packets in loopback vhost-user/virtio-user split ring with server mode +when vhost uses the asynchronous enqueue operations with dsa dpdk driver. Both iova as VA and PA mode test. + +1. Bind 1 dsa device to vfio-pci like common step 1:: + + # ./usertools/dpdk-devbind.py -b vfio-pci f6:01.0 + +2. Launch vhost:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --file-prefix=vhost -a 0000:f6:01.0,max_queues=1 \ + --vdev 'net_vhost0,iface=vhost-net0,queues=1,dmas=[txq0],client=1' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 --mbuf-size=45535 --lcore-dma=[lcore3@0000:f6:01.0-q0] + +3. launch virtio and start testpmd:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --file-prefix=testpmd0 --no-pci \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=1,mrg_rxbuf=1,in_order=0,vectorized=1,queue_size=2048,server=1 \ + -- -i --rxq=1 --txq=1 --txd=2048 --rxd=2048 --nb-cores=1 + testpmd>start + +4. Send large pkts from vhost and check the stats:: + + testpmd>set txpkts 45535,45535,45535,45535,45535 + testpmd>start tx_first 32 + testpmd>show port stats all + +5. Stop and quit vhost testpmd and relaunch vhost with pa mode by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --file-prefix=vhost -a 0000:f6:01.0,max_queues=4 \ + --vdev 'net_vhost0,iface=vhost-net0,queues=1,dmas=[txq0],client=1' \ + --iova=pa -- -i --nb-cores=1 --txd=1024 --rxd=1024 --mbuf-size=45535 --lcore-dma=[lcore3@0000:f6:01.0-q0] + +6. rerun step 4. + +Test Case 2: loopback packed ring server mode large chain packets stress test with dsa dpdk driver +---------------------------------------------------------------------------------------------------- +This is a stress test case about forwading large chain packets in loopback vhost-user/virtio-user packed ring with server mode +when vhost uses the asynchronous enqueue operations with dsa dpdk driver. Both iova as VA and PA mode test. + +1. Bind 1 dsa port to vfio-pci as common step 1:: + + # ./usertools/dpdk-devbind.py -b vfio-pci f6:01.0 + +2. Launch vhost:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 2-3 -n 4 -a 0000:6f:01.0,max_queues=1 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=1,dmas=[txq0],client=1' \ + --iova=va -- -i --nb-cores=1 --mbuf-size=45535 --lcore-dma=[lcore3@0000:6f:01.0-q0] + +3. launch virtio and start testpmd:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --file-prefix=testpmd0 --no-pci \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=1,mrg_rxbuf=1,in_order=0,vectorized=1,packed_vq=1,queue_size=2048,server=1 \ + -- -i --rxq=1 --txq=1 --txd=2048 --rxd=2048 --nb-cores=1 + testpmd>start + +4. Send large pkts from vhost and check the stats:: + + testpmd>set txpkts 45535,45535,45535,45535,45535 + testpmd>start tx_first 32 + testpmd>show port stats all + +5. Stop and quit vhost testpmd and relaunch vhost with pa mode by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 2-3 -n 4 -a 0000:6f:01.0,max_queues=1 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=1,dmas=[txq0],client=1' \ + --iova=va -- -i --nb-cores=1 --mbuf-size=45535 --lcore-dma=[lcore3@0000:6f:01.0-q0] + +6. rerun step 3. + +Test Case 3: loopback split ring all path server mode and multi-queues payload check with dsa dpdk driver +----------------------------------------------------------------------------------------------------------- +This case tests the payload is valid after forwading large chain packets in loopback vhost-user/virtio-user split ring +all path multi-queues with server mode when vhost uses the asynchronous enqueue operations with dsa dpdk driver. Both iova as VA and PA mode test. + +1. bind 3 dsa port to vfio-pci like common step 1:: + + ls /dev/dsa #check wq configure, reset if exist + ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 + ./usertools/dpdk-devbind.py -b vfio-pci 6a:01.0 6f:01.0 74:01.0 + +2. Launch vhost:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:6a:01.0,max_queues=4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=5 --rxq=8 --txq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore12@0000:6a:01.0-q0,lcore13@0000:6a:01.0-q1,lcore13@0000:6a:01.0-q2,lcore14@0000:6a:01.0-q1,lcore14@0000:6a:01.0-q2,lcore15@0000:6a:01.0-q1,lcore15@0000:6a:01.0-q2] + +3. Launch virtio-user with split ring mergeable inorder path:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 30,31 -n 4 --file-prefix=virtio-user0 --no-pci \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=1,in_order=1,server=1 \ + -- -i --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024 + testpmd>set fwd csum + testpmd>start + +4. Attach pdump secondary process to primary process by same file-prefix:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=virtio-user0 -- \ + --pdump 'device_id=net_virtio_user0,queue=0,rx-dev=./pdump-virtio-rx-0.pcap,mbuf-size=8000' \ + --pdump 'device_id=net_virtio_user0,queue=3,rx-dev=./pdump-virtio-rx-3.pcap,mbuf-size=8000' + +5. Send large pkts from vhost, check loopback performance can get expected and each queue can receive packets:: + + testpmd> set fwd csum + testpmd> set txpkts 64,64,64,2000,2000,2000 + testpmd> set burst 1 + testpmd> start tx_first 1 + testpmd> show port stats all + testpmd> stop + +6. Quit pdump, check all the packets length are 6192 Byte in the pcap file and the payload in receive packets are same. + +7. Quit and relaunch vhost and rerun step 4-6. + +8. Quit and relaunch virtio with split ring mergeable path as below:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 30,31 -n 4 --file-prefix=virtio-user0 --no-pci \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=1,in_order=0,server=1 \ + -- -i --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024 + testpmd>set fwd csum + testpmd>start + +9. Rerun steps 4-7. + +10. Quit and relaunch virtio with split ring non-mergeable path as below:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 30,31 -n 4 --file-prefix=virtio-user0 --no-pci \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=0,server=1 \ + -- -i --enable-hw-vlan-strip --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024 + testpmd>set fwd csum + testpmd>start + +11. Rerun step 4. + +12. Send pkts from vhost, check loopback performance can get expected and each queue can receive packets:: + + testpmd> set fwd csum + testpmd> set txpkts 64,128,256,512 + testpmd> set burst 1 + testpmd> start tx_first 1 + testpmd> show port stats all + testpmd> stop + +13. Quit pdump, check all the packets length are 960 Byte in the pcap file and the payload in receive packets are same. + +14. Quit and relaunch vhost and rerun step 11-13. + +15. Quit and relaunch virtio with split ring inorder non-mergeable path as below:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 30,31 -n 4 --file-prefix=virtio-user0 --no-pci \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=1,server=1 \ + -- -i --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024 + testpmd>set fwd csum + testpmd>start + +16. Rerun step 11-14. + +17. Quit and relaunch virtio with split ring vectorized path as below:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 30,31 -n 4 --file-prefix=virtio-user0 --no-pci \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=0,vectorized=1,server=1 \ + -- -i --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024 + testpmd>set fwd csum + testpmd>start + +18. Rerun step 11-14. + +19. Quit and relaunch vhost with diff channel:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:6a:01.0 -a 0000:6f:01.0 -a 0000:74:01.0 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=5 --rxq=8 --txq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore12@0000:6a:01.0-q0,lcore13@0000:6f:01.0-q1,lcore13@0000:74:01.0-q2,lcore14@0000:6f:01.0-q1,lcore14@0000:74:01.0-q2,lcore15@0000:6f:01.0-q1,lcore15@0000:74:01.0-q2] + +20. Rerun steps 11-14. + +21. Quit and relaunch vhost w/ iova=pa:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:6a:01.0 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=pa -- -i --nb-cores=5 --rxq=8 --txq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore12@0000:6a:01.0-q0,lcore13@0000:6a:01.0-q1,lcore13@0000:6a:01.0-q2,lcore14@0000:6a:01.0-q1,lcore14@0000:6a:01.0-q2,lcore15@0000:6a:01.0-q1,lcore15@0000:6a:01.0-q2] + +22. Rerun steps 11-14. + +Test Case 4: loopback packed ring all path server mode and multi-queues payload check with dsa dpdk driver +------------------------------------------------------------------------------------------------------------ +This case tests the payload is valid after forwading large chain packets in loopback vhost-user/virtio-user packed ring +all path multi-queues with server mode when vhost uses the asynchronous enqueue operations with dsa dpdk driver. Both iova as VA and PA mode test. + +1. bind 8 dsa port to vfio-pci like common step 1:: + + ls /dev/dsa #check wq configure, reset if exist + ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + ./usertools/dpdk-devbind.py -b vfio-pci 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + +2. Launch vhost:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:6a:01.0 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq6;txq7]' \ + --iova=va -- -i --nb-cores=5 --rxq=8 --txq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore11@0000:6a:01.0-q7,lcore12@0000:6a:01.0-q1,lcore12@0000:6a:01.0-q2,lcore12@0000:6a:01.0-q3,lcore13@0000:6a:01.0-q2,lcore13@0000:6a:01.0-q3,lcore13@0000:6a:01.0-q4,lcore14@0000:6a:01.0-q2,lcore14@0000:6a:01.0-q3,lcore14@0000:6a:01.0-q4,lcore14@0000:6a:01.0-q5,lcore15@0000:6a:01.0-q0,lcore15@0000:6a:01.0-q1,lcore15@0000:6a:01.0-q2,lcore15@0000:6a:01.0-q3,lcore15@0000:6a:01.0-q4,lcore15@0000:6a:01.0-q5,lcore15@0000:6a:01.0-q6,lcore15@0000:6a:01.0-q7] + +3. Launch virtio-user with packed ring mergeable inorder path:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --file-prefix=virtio-user0 --no-pci \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=1,in_order=1,packed_vq=1,server=1 \ + -- -i --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024 + testpmd>set fwd csum + testpmd>start + +4. Attach pdump secondary process to primary process by same file-prefix:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=virtio-user0 -- \ + --pdump 'device_id=net_virtio_user0,queue=0,rx-dev=./pdump-virtio-rx-0.pcap,mbuf-size=8000' \ + --pdump 'device_id=net_virtio_user0,queue=3,rx-dev=./pdump-virtio-rx-3.pcap,mbuf-size=8000' + +5. Send large pkts from vhost, check loopback performance can get expected and each queue can receive packets:: + + testpmd> set fwd csum + testpmd> set txpkts 64,64,64,2000,2000,2000 + testpmd> set burst 1 + testpmd> start tx_first 1 + testpmd> show port stats all + testpmd> stop + +6. Quit pdump, check all the packets length are 6192 Byte in the pcap file and the payload in receive packets are same. + +7. Quit and relaunch vhost and rerun step 4-6. + +8. Quit and relaunch virtio with packed ring mergeable path as below:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --file-prefix=virtio-user0 --no-pci \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=1,in_order=0,packed_vq=1,server=1 \ + -- -i --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024 + testpmd>set fwd csum + testpmd>start + +9. Rerun steps 4-7. + +10. Quit and relaunch virtio with packed ring non-mergeable path as below:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --file-prefix=virtio-user0 --no-pci \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=0,packed_vq=1,server=1 \ + -- -i --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024 + testpmd>set fwd csum + testpmd>start + +11. Rerun step 4. + +12. Send pkts from vhost, check loopback performance can get expected and each queue can receive packets:: + + testpmd> set fwd csum + testpmd> set txpkts 64,128,256,512 + testpmd> set burst 1 + testpmd> start tx_first 1 + testpmd> show port stats all + testpmd> stop + +13. Quit pdump, check all the packets length are 960 Byte in the pcap file and the payload in receive packets are same. + +14. Quit and relaunch vhost and rerun step 11-13. + +15. Quit and relaunch virtio with packed ring inorder non-mergeable path as below:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --file-prefix=virtio-user0 --no-pci \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=1,packed_vq=1,server=1 \ + -- -i --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024 + testpmd>set fwd csum + testpmd>start + +16. Rerun step 11-14. + +17. Quit and relaunch virtio with packed ring vectorized path as below:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --file-prefix=virtio-user0 --no-pci --force-max-simd-bitwidth=512 \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=1,packed_vq=1,vectorized=1,server=1 \ + -- -i --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024 + testpmd>set fwd csum + testpmd>start + +18. Rerun step 11-14. + +19. Quit and relaunch virtio with packed ring vectorized path and ring size is not power of 2 as below:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --file-prefix=virtio-user0 --no-pci --force-max-simd-bitwidth=512 \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=1,packed_vq=1,vectorized=1,queue_size=1025,server=1 \ + -- -i --nb-cores=1 --rxq=8 --txq=8 --txd=1025 --rxd=1025 + testpmd>set fwd csum + testpmd>start + +20. Rerun step 11-14. + +21. Quit and relaunch vhost with diff channel:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:6a:01.0 -a 0000:6f:01.0 -a 0000:74:01.0 -a 0000:79:01.0 -a 0000:e7:01.0 -a 0000:ec:01.0 -a 0000:f1:01.0 -a 0000:f6:01.0 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq6;txq7]' \ + --iova=va -- -i --nb-cores=5 --rxq=8 --txq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore11@0000:f6:01.0-q7,lcore12@0000:6f:01.0-q1,lcore12@0000:74:01.0-q2,lcore12@0000:79:01.0-q3,lcore13@0000:74:01.0-q2,lcore13@0000:79:01.0-q3,lcore13@0000:e7:01.0-q4,lcore14@0000:74:01.0-q2,lcore14@0000:79:01.0-q3,lcore14@0000:e7:01.0-q4,lcore14@0000:ec:01.0-q5,lcore15@0000:6a:01.0-q0,lcore15@0000:6f:01.0-q1,lcore15@0000:74:01.0-q2,lcore15@0000:79:01.0-q3,lcore15@0000:e7:01.0-q4,lcore15@0000:ec:01.0-q5,lcore15@0000:f1:01.0-q6,lcore15@0000:f6:01.0-q7] + +22. Rerun steps 11-14. + +23. Quit and relaunch vhost w/ iova=pa:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:6a:01.0 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq6;txq7]' \ + --iova=pa -- -i --nb-cores=5 --rxq=8 --txq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore11@0000:6a:01.0-q7,lcore12@0000:6a:01.0-q1,lcore12@0000:6a:01.0-q2,lcore12@0000:6a:01.0-q3,lcore13@0000:6a:01.0-q2,lcore13@0000:6a:01.0-q3,lcore13@0000:6a:01.0-q4,lcore14@0000:6a:01.0-q2,lcore14@0000:6a:01.0-q3,lcore14@0000:6a:01.0-q4,lcore14@0000:6a:01.0-q5,lcore15@0000:6a:01.0-q0,lcore15@0000:6a:01.0-q1,lcore15@0000:6a:01.0-q2,lcore15@0000:6a:01.0-q3,lcore15@0000:6a:01.0-q4,lcore15@0000:6a:01.0-q5,lcore15@0000:6a:01.0-q6,lcore15@0000:6a:01.0-q7] + +24. Rerun steps 3-6. + +Test Case 5: loopback split ring server mode large chain packets stress test with dsa kernel driver +--------------------------------------------------------------------------------------------------- +This is a stress test case about forwading large chain packets in loopback vhost-user/virtio-user split ring with server mode +when vhost uses the asynchronous enqueue operations with dsa kernel driver. + +1. Bind 1 dsa device to idxd like common step 2:: + + ls /dev/dsa #check wq configure, reset if exist + ./usertools/dpdk-devbind.py -u 6a:01.0 + ./usertools/dpdk-devbind.py -b idxd 6a:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 4 0 + ls /dev/dsa #check wq configure success + +2. Launch vhost:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net0,queues=1,dmas=[txq0],client=1' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 --mbuf-size=45535 --lcore-dma=[lcore3@wq0.2] + +3. launch virtio and start testpmd:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --file-prefix=testpmd0 --no-pci \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=1,mrg_rxbuf=1,in_order=0,vectorized=1,queue_size=2048,server=1 \ + -- -i --rxq=1 --txq=1 --txd=2048 --rxd=2048 --nb-cores=1 + testpmd>start + +4. Send large pkts from vhost:: + + testpmd>set txpkts 45535,45535,45535,45535,45535 + testpmd>start tx_first 32 + testpmd>show port stats all + +Test Case 6: loopback packed ring server mode large chain packets stress test with dsa kernel driver +----------------------------------------------------------------------------------------------------- +This is a stress test case about forwading large chain packets in loopback vhost-user/virtio-user packed ring with server mode +when vhost uses the asynchronous enqueue operations with dsa kernel driver. + +1. Bind 1 dsa port to idxd like common step 2:: + + ls /dev/dsa #check wq configure, reset if exist + ./usertools/dpdk-devbind.py -u 6a:01.0 + ./usertools/dpdk-devbind.py -b idxd 6a:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 1 0 + ls /dev/dsa #check wq configure success + +2. Launch vhost:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 2-3 -n 4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=1,dmas=[txq0],client=1' \ + --iova=va -- -i --nb-cores=1 --mbuf-size=45535 --lcore-dma=[lcore3@wq0.0] + +3. launch virtio and start testpmd:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --file-prefix=testpmd0 --no-pci \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=1,mrg_rxbuf=1,in_order=0,vectorized=1,packed_vq=1,queue_size=2048,server=1 \ + -- -i --rxq=1 --txq=1 --txd=2048 --rxd=2048 --nb-cores=1 + testpmd>start + +4. Send large pkts from vhost and check the stats:: + + testpmd>set txpkts 45535,45535,45535,45535,45535 + testpmd>start tx_first 32 + testpmd>show port stats all + +Test Case 7: loopback split ring all path server mode and multi-queues payload check with dsa kernel driver +------------------------------------------------------------------------------------------------------------- +This case tests the payload is valid after forwading large chain packets in loopback vhost-user/virtio-user split ring +all path multi-queues with server mode when vhost uses the asynchronous enqueue operations with dsa kernel driver. + +1. bind 3 dsa port to idxd like common step 2:: + + ls /dev/dsa #check wq configure, reset if exist + ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 + ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 74:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 2 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 4 + ls /dev/dsa #check wq configure success + +2. Launch vhost:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=5 --rxq=8 --txq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@wq0.0,lcore12@wq0.0,lcore13@wq0.1,lcore13@wq0.2,lcore14@wq0.1,lcore14@wq0.2,lcore15@wq0.1,lcore15@wq0.2] + +3. Launch virtio-user with split ring mergeable inorder path:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --file-prefix=virtio-user0 --no-pci \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=1,in_order=1,server=1 \ + -- -i --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024 + testpmd>set fwd csum + testpmd>start + +4. Attach pdump secondary process to primary process by same file-prefix:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=virtio-user0 -- \ + --pdump 'device_id=net_virtio_user0,queue=0,rx-dev=./pdump-virtio-rx-0.pcap,mbuf-size=8000' \ + --pdump 'device_id=net_virtio_user0,queue=3,rx-dev=./pdump-virtio-rx-3.pcap,mbuf-size=8000' + +5. Send large pkts from vhost, check loopback performance can get expected and each queue can receive packets:: + + testpmd> set fwd csum + testpmd> set txpkts 64,64,64,2000,2000,2000 + testpmd> set burst 1 + testpmd> start tx_first 1 + testpmd> stop + +6. Quit pdump, check all the packets length are 6192 Byte in the pcap file and the payload in receive packets are same. + +7. Quit and relaunch vhost and rerun step 4-6. + +8. Quit and relaunch virtio with split ring mergeable path as below:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --file-prefix=virtio-user0 --no-pci \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=1,in_order=0,server=1 \ + -- -i --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024 + testpmd>set fwd csum + testpmd>start + +9. Rerun steps 4-7. + +10. Quit and relaunch virtio with split ring non-mergeable path as below:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --file-prefix=virtio-user0 --no-pci \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=0,server=1 \ + -- -i --enable-hw-vlan-strip --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024 + testpmd>set fwd csum + testpmd>start + +11. Rerun step 4. + +12. Send pkts from vhost, check loopback performance can get expected and each queue can receive packets:: + + testpmd> set fwd csum + testpmd> set txpkts 64,128,256,512 + testpmd> set burst 1 + testpmd> start tx_first 1 + testpmd> stop + +13. Quit pdump, check all the packets length are 960 Byte in the pcap file and the payload in receive packets are same. + +14. Quit and relaunch vhost and rerun step 11-13. + +15. Quit and relaunch virtio with split ring inorder non-mergeable path as below:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --file-prefix=virtio-user0 --no-pci \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=1,server=1 \ + -- -i --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024 + testpmd>set fwd csum + testpmd>start + +16. Rerun step 11-14. + +17. Quit and relaunch virtio with split ring vectorized path as below:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --file-prefix=virtio-user0 --no-pci \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=0,vectorized=1,server=1 \ + -- -i --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024 + testpmd>set fwd csum + testpmd>start + +18. Rerun step 11-14. + +19. Quit and relaunch vhost with diff channel:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 -a 0000:6a:01.0 -a 0000:6f:01.0 -a 0000:74:01.0 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=5 --rxq=8 --txq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@wq0.0,lcore12@wq0.0,lcore13@wq2.1,lcore13@wq4.2,lcore14@wq2.1,lcore14@wq4.2,lcore15@wq2.1,lcore15@wq4.2] + +20. Rerun steps 11-14. + +Test Case 8: loopback packed ring all path server mode and multi-queues payload check with dsa kernel driver +------------------------------------------------------------------------------------------------------------- +This case tests the payload is valid after forwading large chain packets in loopback vhost-user/virtio-user packed ring +all path multi-queues with server mode when vhost uses the asynchronous enqueue operations with dsa kernel driver. + +1. bind 8 dsa port to idxd like common step 2:: + + ls /dev/dsa #check wq configure, reset if exist + ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 2 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 4 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 6 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 8 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 10 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 12 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 14 + ls /dev/dsa #check wq configure success + +2. Launch vhost:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq6;txq7]' \ + --iova=va -- -i --nb-cores=5 --rxq=8 --txq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@wq0.0,lcore11@wq0.7,lcore12@wq0.1,lcore12@wq0.2,lcore12@wq0.3,lcore13@wq0.2,lcore13@wq0.3,lcore13@wq0.4,lcore14@wq0.2,lcore14@wq0.3,lcore14@wq0.4,lcore14@wq0.5,lcore15@wq0.0,lcore15@wq0.1,lcore15@wq0.2,lcore15@wq0.3,lcore15@wq0.4,lcore15@wq0.5,lcore15@wq0.6,lcore15@wq0.7] + +3. Launch virtio-user with packed ring mergeable inorder path:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --file-prefix=virtio-user0 --no-pci \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=1,in_order=1,packed_vq=1,server=1 \ + -- -i --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024 + testpmd>set fwd csum + testpmd>start + +4. Attach pdump secondary process to primary process by same file-prefix:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=virtio-user0 -- \ + --pdump 'device_id=net_virtio_user0,queue=0,rx-dev=./pdump-virtio-rx-0.pcap,mbuf-size=8000' \ + --pdump 'device_id=net_virtio_user0,queue=3,rx-dev=./pdump-virtio-rx-3.pcap,mbuf-size=8000' + +5. Send large pkts from vhost, check loopback performance can get expected and each queue can receive packets:: + + testpmd> set fwd csum + testpmd> set txpkts 64,64,64,2000,2000,2000 + testpmd> set burst 1 + testpmd> start tx_first 1 + testpmd> stop + +6. Quit pdump, check all the packets length are 6192 Byte in the pcap file and the payload in receive packets are same. + +7. Quit and relaunch vhost and rerun step 4-6. + +8. Quit and relaunch virtio with packed ring mergeable path as below:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --file-prefix=virtio-user0 --no-pci \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=1,in_order=0,packed_vq=1,server=1 \ + -- -i --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024 + testpmd>set fwd csum + testpmd>start + +9. Rerun steps 4-7. + +10. Quit and relaunch virtio with packed ring non-mergeable path as below:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --file-prefix=virtio-user0 --no-pci \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=0,packed_vq=1,server=1 \ + -- -i --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024 + testpmd>set fwd csum + testpmd>start + +11. Rerun step 4. + +12. Send pkts from vhost, check loopback performance can get expected and each queue can receive packets:: + + testpmd> set fwd csum + testpmd> set txpkts 64,128,256,512 + testpmd> set burst 1 + testpmd> start tx_first 1 + testpmd> stop + +13. Quit pdump, check all the packets length are 960 Byte in the pcap file and the payload in receive packets are same. + +14. Quit and relaunch vhost and rerun step 11-13. + +15. Quit and relaunch virtio with packed ring inorder non-mergeable path as below:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --file-prefix=virtio-user0 --no-pci \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=1,packed_vq=1,server=1 \ + -- -i --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024 + testpmd>set fwd csum + testpmd>start + +16. Rerun step 11-14. + +17. Quit and relaunch virtio with packed ring vectorized path as below:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --file-prefix=virtio-user0 --no-pci --force-max-simd-bitwidth=512 \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=1,packed_vq=1,vectorized=1,server=1 \ + -- -i --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024 + testpmd>set fwd csum + testpmd>start + +18. Rerun step 11-14. + +19. Quit and relaunch virtio with packed ring vectorized path and ring size is not power of 2 as below:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --file-prefix=virtio-user0 --no-pci --force-max-simd-bitwidth=512 \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=1,packed_vq=1,vectorized=1,queue_size=1025,server=1 \ + -- -i --nb-cores=1 --rxq=8 --txq=8 --txd=1025 --rxd=1025 + testpmd>set fwd csum + testpmd>start + +20. Rerun step 11-14. + +21. Quit and relaunch vhost with diff channel:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq6;txq7]' \ + --iova=va -- -i --nb-cores=5 --rxq=8 --txq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@wq0.0,lcore11@wq14.7,lcore12@wq2.1,lcore12@wq4.2,lcore12@wq6.3,lcore13@wq4.2,lcore13@wq6.3,lcore13@wq8.4,lcore14@wq4.2,lcore14@wq6.3,lcore14@wq8.4,lcore14@wq10.5,lcore15@wq0.0,lcore15@wq2.1,lcore15@wq4.2,lcore15@wq6.3,lcore15@wq8.4,lcore15@wq10.5,lcore15@wq12.6,lcore15@wq14.7] + +22. Rerun steps 3-6. + +Test Case 9: loopback split and packed ring server mode multi-queues and mergeable path payload check with dsa dpdk and kernel driver +-------------------------------------------------------------------------------------------------------------------------------------- +This case tests the payload is valid after forwading large chain packets in loopback vhost-user/virtio-user split and packed ring +multi-queues with server mode when vhost uses the asynchronous enqueue operations with dsa kernel driver. + +1. bind 4 dsa device to idxd and 2 dsa device to vfio-pci like common step 1-2:: + + ls /dev/dsa #check wq configure, reset if exist + ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 79:01.0 + ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 74:01.0 79:01.0 + ./usertools/dpdk-devbind.py -b vfio-pci e7:01.0 ec:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 1 0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 1 2 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 1 4 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 1 6 + ls /dev/dsa #check wq configure success + +2. Launch vhost:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 2-3 -n 4 --file-prefix=vhost -a 0000:e7:01.0,max_queues=4 -a 0000:ec:01.0,max_queues=4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore3@wq0.0,lcore3@wq2.0,lcore3@wq4.0,lcore3@wq6.0,lcore3@0000:e7:01.0-q0,lcore3@0000:e7:01.0-q2,lcore3@0000:ec:01.0-q3] + +3. Launch virtio-user with split ring mergeable inorder path:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 4-5 -n 4 --file-prefix=virtio-user --no-pci \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=1,in_order=1,server=1 \ + -- -i --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024 + testpmd>set fwd csum + testpmd>start + +4. Attach pdump secondary process to primary process by same file-prefix:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=virtio-user -- \ + --pdump 'device_id=net_virtio_user0,queue=0,rx-dev=/tmp/pdump-virtio-rx-0.pcap,mbuf-size=8000' + --pdump 'device_id=net_virtio_user0,queue=3,rx-dev=./pdump-virtio-rx-3.pcap,mbuf-size=8000' + +5. Send large pkts from vhost, check loopback performance can get expected and each queue can receive packets:: + + testpmd>set fwd csum + testpmd>set txpkts 64,64,64,2000,2000,2000 + testpmd>set burst 1 + testpmd>start tx_first 1 + +6. Quit pdump and chcek all the packets length is 6192 and the payload of all packets are same in the pcap file. + +7. Quit and relaunch vhost and rerun step 4-6. + +8. Quit and relaunch virtio with split ring mergeable path as below:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 4-5 -n 4 --file-prefix=virtio-user --no-pci \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=1,in_order=0,server=1 \ + -- -i --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024 + testpmd>set fwd csum + testpmd>start + +9. Stop vhost and rerun step 4-7. + +10. Quit and relaunch virtio with packed ring mergeable inorder path as below:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 4-5 -n 4 --file-prefix=virtio-user --no-pci \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=1,in_order=1,packed_vq=1,server=1 \ + -- -i --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024 + testpmd>set fwd csum + testpmd>start + +11. Stop vhost and rerun step 4-7. + +12. Quit and relaunch virtio with packed ring mergeable path as below:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 4-5 -n 4 --file-prefix=virtio-user --no-pci \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=1,in_order=0,packed_vq=1,server=1 \ + -- -i --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024 + testpmd>set fwd csum + testpmd>start + +13. Stop vhost and rerun step 4-7. \ No newline at end of file From patchwork Sat May 7 09:59:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 110834 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 1A0DCA050A; Sat, 7 May 2022 11:59:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 140184068A; Sat, 7 May 2022 11:59:51 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 93CE940395 for ; Sat, 7 May 2022 11:59:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651917588; x=1683453588; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=E2tgs0ciiaDk4idu8avk3ylqGMU1SOScpRDsNR3XnOQ=; b=lol0XRrQ2sV5QF1PkF7FrVd20vidS5hekv8psCCc6yZYyYzr1+evyBvw HdS53gk+3g8M4kzC1OAummdY59jHaLWrSZHTlUpHHI6zzCtAiX0q4LkBL meQcnBkaVl2yDGfq99npXTR7qitSSEdvSnEnk+aB2OYyKP3kFE5kLRZcK Yi5VCxWo1XlJ7K1PuStql/co9m3M1SB9vGUMohh+MdeJcNLZn0d/tKBr9 7v/7I+cTECqE4Ud14j0lANWvKPlOIDGeHQhUlEEZpGNUkNRxq9e/xejp+ 6vMu4P26XvxFoCq5G2177GQ05L8905RUWUJgWaI+294FyT/jOu7LPmiDx Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10339"; a="248594816" X-IronPort-AV: E=Sophos;i="5.91,206,1647327600"; d="scan'208";a="248594816" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2022 02:59:47 -0700 X-IronPort-AV: E=Sophos;i="5.91,206,1647327600"; d="scan'208";a="736138625" Received: from unknown (HELO localhost.localdomain) ([10.239.251.222]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2022 02:59:44 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V1 4/7] test_plans/pvp_vhost_dsa_test_plan: add pvp_vhost_dsa testplan Date: Sat, 7 May 2022 05:59:19 -0400 Message-Id: <20220507095919.311060-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 Add pvp_vhost_dsa_test_plan.rst test_plans. Signed-off-by: Wei Ling --- test_plans/pvp_vhost_dsa_test_plan.rst | 2600 ++++++++++++++++++++++++ 1 file changed, 2600 insertions(+) create mode 100644 test_plans/pvp_vhost_dsa_test_plan.rst diff --git a/test_plans/pvp_vhost_dsa_test_plan.rst b/test_plans/pvp_vhost_dsa_test_plan.rst new file mode 100644 index 00000000..4d8625bc --- /dev/null +++ b/test_plans/pvp_vhost_dsa_test_plan.rst @@ -0,0 +1,2600 @@ +.. Copyright (c) <2022>, Intel Corporation + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + - Neither the name of Intel Corporation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + +==================================================== +PVP vhost async operation with DSA driver test plan +==================================================== + +Description +=========== + +This document provides the test plan for testing Vhost asynchronous +data path with DSA driver (kernel IDXD driver and DPDK vfio-pci driver) +in the PVP topology environment with testpmd. + +DSA 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. +Linux kernel and DPDK provide DSA driver (kernel IDXD driver and DPDK vfio-pci driver), +no matter which driver is used, DPDK DMA library is used in data-path to offload copies +to DSA, and the only difference is which driver configures DSA. It enables applications, +like OVS, to save CPU cycles and hide memory copy overhead, thus achieving higher throughput. +Vhost doesn't manage DMA devices and applications, like OVS, need to manage and configure DSA +devices. Applications need to tell vhost what DSA devices to use in every data path function call. +This design enables the flexibility for applications to dynamically use DMA channels in different +function modules, not limited in vhost. 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. + +IOMMU impact: +If iommu off, idxd can work with iova=pa +If iommu on, kernel dsa driver only can work with iova=va by program IOMMU, can't use iova=pa(fwd not work due to pkts payload wrong). + +Note: DPDK local patch that about vhost pmd is needed when testing Vhost asynchronous data path with testpmd, and the suite has not yet been automated. + +Prerequisites +============= + +Topology +-------- + Test flow: TG-->NIC-->Vhost-user-->Virtio-user-->Vhost-user-->NIC-->TG + +Hardware +-------- + Supportted NICs: ALL + +Software +-------- + Trex:http://trex-tgn.cisco.com/trex/release/v2.26.tar.gz + +General set up +-------------- +1. Compile DPDK:: + + # CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib -Dexamples=all --default-library= + # ninja -C -j 110 + For example, + CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib -Dexamples=all --default-library=x86_64-native-linuxapp-gcc + ninja -C x86_64-native-linuxapp-gcc -j 110 + +2. Get the PCI device ID and DSA device ID of DUT, for example, 0000:4f:00.1 is PCI device ID, 0000:6a:01.0 - 0000:f6:01.0 are DSA device IDs:: + + # ./usertools/dpdk-devbind.py -s + + Network devices using kernel driver + =================================== + 0000:4f:00.1 'Ethernet Controller E810-C for QSFP 1592' drv=ice unused=vfio-pci + + DMA devices using kernel driver + =============================== + 0000:6a:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:6f:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:74:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:79:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:e7:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:ec:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:f1:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:f6:01.0 'Device 0b25' drv=idxd unused=vfio-pci + +Test case +========= + +Common steps +------------ +1. Bind 1 NIC port to vfio-pci:: + + # ./usertools/dpdk-devbind.py -b vfio-pci + + For example: + # ./usertools/dpdk-devbind.py -b vfio-pci 0000:00:4f.1 + +2. Bind DSA devices to DPDK vfio-pci driver:: + + # ./usertools/dpdk-devbind.py -b vfio-pci + + For example, bind 2 DMA devices to vfio-pci driver: + # ./usertools/dpdk-devbind.py -b vfio-pci 0000:e7:01.0 0000:ec:01.0 + +.. note:: + + One DPDK DSA device can create 8 WQ at most. Below is an example, where DPDK DSA device will create one and + eight WQ for DSA deivce 0000:e7:01.0 and 0000:ec:01.0. The value of “max_queues” is 1~8: + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 4 -n 4 -a 0000:e7:01.0,max_queues=1 -- -i + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 4 -n 4 -a 0000:ec:01.0,max_queues=8 -- -i + +3. Bind DSA devices to kernel idxd driver, and configure Work Queue (WQ):: + + # ./usertools/dpdk-devbind.py -b idxd + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q + +.. note:: + + Better to reset WQ when need operate DSA devices that bound to idxd drvier: + # ./drivers/dma/idxd/dpdk_idxd_cfg.py --reset + You can check it by 'ls /dev/dsa' + numDevices: number of devices, where 0<=numDevices<=7, corresponding to 0000:6a:01.0 - 0000:f6:01.0 + numWq: Number of workqueues per DSA endpoint, where 1<=numWq<=8 + + For example, bind 2 DMA devices to idxd driver and configure WQ: + + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 1 0 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 4 2 + Check WQ by 'ls /dev/dsa' and can find "wq0.0 wq2.0 wq2.1 wq2.2 wq2.3" + +4. Send imix packets [64,1518] to NIC by traffic generator:: + + The imix packets include packet size [64, 128, 256, 512, 1024, 1518], and the format of packet is as follows. + +-------------+-------------+-------------+-------------+ + | MAC | MAC | IPV4 | IPV4 | + | Src address | Dst address | Src address | Dst address | + |-------------|-------------|-------------|-------------| + | Random MAC | Virtio mac | Random IP | Random IP | + +-------------+-------------+-------------+-------------+ + All the packets in this test plan use the Virtio mac: 00:11:22:33:44:10. + +Test Case 1: PVP split ring all path vhost enqueue operations with 1:1 mapping between vrings and dsa dpdk driver channels +--------------------------------------------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test performance of split ring in each virtio path with 1 core and 1 queue +when vhost uses the asynchronous enqueue operations with dsa dpdk driver and the mapping between vrings and dsa virtual channels is 1:1. +Both iova as VA and PA mode, 'mac fwd' and 'csum fwd' have been tested. + +1. Bind one dsa device(f6:01.0) and one nic port(4f:00.1) to vfio-pci like common step 1-2. + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:f6:01.0,max_queues=1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=1,dmas=[txq0],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore3@0000:f6:01.0-q0] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with inorder mergeable path:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=1,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets [64,1518] from packet generator, check the throughput can get expected data:: + + testpmd>show port stats all + +5. Stop vhost port, check that there are packets in both directions of RX and TX in each queue from vhost log:: + + testpmd>stop + +6. Restart vhost port and send imix packets again, then check the throuhput can get expected data:: + + testpmd>start + testpmd>show port stats all + +7. Relaunch virtio-user with mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=0,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +8. Relaunch virtio-user with inorder non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=1,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +9. Relaunch virtio-user with non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,queues=1 \ + -- -i --enable-hw-vlan-strip --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +10. Relaunch virtio-user with vector_rx path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,queues=1,vectorized=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +11. Quit all testpmd and relaunch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:6a:01.0,max_queues=8 \ + --vdev 'net_vhost0,iface=/tmp/vhost-net0,queues=1,dmas=[txq0]' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:6a:01.0-q1] + testpmd>set fwd mac + testpmd>start + +12. Rerun step 3-6. + +13. Quit all testpmd and relaunch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:f6:01.0,max_queues=8 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=1,dmas=[txq0],dma_ring_size=2048' \ + --iova=pa -- -i --nb-cores=1 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore3@0000:f6:01.0-q3] + testpmd>set fwd csum + testpmd>start + +14. Rerun step 3-10 with csum fwd. + +Test Case 2: PVP split ring all path multi-queues vhost async enqueue with 1:1 mapping between vrings and dsa dpdk driver channels +----------------------------------------------------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test performance of split ring in each virtio path with multi-queues +when vhost uses the asynchronous enqueue operations with dsa dpdk driver and the mapping between vrings and dsa virtual channels is 1:1. +Both iova as VA and PA mode, 'mac fwd' and 'csum fwd' have been tested. + +1. Bind 8 dsa device(6a:01.0-f6:01.0) and one nic port(4f:00.1) to vfio-pci like common step 1-2:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + # ./usertools/dpdk-devbind.py -b vfio-pci 0000:4f:00.1 + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:f6:01.0,max_queues=8 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=8 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:f6:01.0-q0,lcore12@0000:f6:01.0-q1,lcore13@0000:f6:01.0-q2,lcore14@0000:f6:01.0-q3,lcore15@0000:f6:01.0-q4,lcore16@0000:f6:01.0-q5,lcore17@0000:f6:01.0-q6,lcore18@0000:f6:01.0-q7] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with inorder mergeable path:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets [64,1518] from packet generator, check the throughput can get expected data:: + + testpmd>show port stats all + +5. Stop vhost port, check that there are packets in both directions of RX and TX in each queue from vhost log:: + + testpmd>stop + +6. Restart vhost port and send imix packets again, then check the throuhput can get expected data:: + + testpmd>start + testpmd>show port stats all + +7. Relaunch virtio-user with mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=0,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +8. Relaunch virtio-user with inorder non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +9. Relaunch virtio-user with non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,queues=8 \ + -- -i --enable-hw-vlan-strip --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +10. Relaunch virtio-user with vector_rx path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,queues=8,vectorized=1 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +11. Quit all testpmd and relaunch vhost with diff channel by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:6a:01.0,max_queues=1 -a 0000:6f:01.0,max_queues=1 \ + -a 0000:74:01.0,max_queues=1 -a 0000:79:01.0,max_queues=1 -a 0000:e7:01.0,max_queues=1 -a 0000:ec:01.0,max_queues=1 -a 0000:f1:01.0,max_queues=1 -a 0000:f6:01.0,max_queues=1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=8 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore12@0000:6f:01.0-q0,lcore13@0000:74:01.0-q0,lcore14@0000:79:01.0-q0,lcore15@0000:e7:01.0-q0,lcore16@0000:ec:01.0-q0,lcore17@0000:f1:01.0-q0,lcore18@0000:f6:01.0-q0] + testpmd>set fwd csum + testpmd>start + +12. Rerun step 3-6 with csum fwd. + +13. Quit all testpmd and relaunch vhost with pa mode by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:6a:01.0 -a 0000:6f:01.0 -a 0000:74:01.0 -a 0000:79:01.0 -a 0000:e7:01.0 -a 0000:ec:01.0 -a 0000:f1:01.0 -a 0000:f6:01.0 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=pa -- -i --nb-cores=8 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore12@0000:6f:01.0-q1,lcore13@0000:74:01.0-q2,lcore14@0000:79:01.0-q3,lcore15@0000:e7:01.0-q4,lcore16@0000:ec:01.0-q5,lcore17@0000:f1:01.0-q6,lcore18@0000:f6:01.0-q7] + testpmd>set fwd csum + testpmd>start + +14. Rerun step 3-6 with csum fwd. + +Test Case 3: PVP split ring all path multi-queues vhost enqueue operations with M to 1 mapping between vrings and CBDMA virtual channels +----------------------------------------------------------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test performance of split ring in each virtio path with multi-queues +when vhost uses the asynchronous enqueue operations with dsa dpdk driver and the mapping between vrings and dsa virtual channels is M:1. +Both iova as VA and PA mode, 'mac fwd' and 'csum fwd' have been tested. + +1. Bind 1 dsa device and one nic port to vfio-pci like comon step 1-2:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 f6:01.0 + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:f6:01.0,max_queues=1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:f1:01.0-q0] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with inorder mergeable path:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets [64,1518] from packet generator, check the throughput can get expected data:: + + testpmd>show port stats all + +5. Stop vhost port, check that there are packets in both directions of RX and TX in each queue from vhost log:: + + testpmd>stop + +6. Restart vhost port and send imix packets again, then check the throuhput can get expected data:: + + testpmd>start + testpmd>show port stats all + +7. Relaunch virtio-user with mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=0,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +8. Relaunch virtio-user with inorder non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +9. Relaunch virtio-user with non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,queues=8 \ + -- -i --enable-hw-vlan-strip --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +10. Relaunch virtio-user with vector_rx path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,queues=8,vectorized=1 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +11. Quit all testpmd and relaunch vhost with pa mode by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:f6:01.0,max_queues=1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=pa -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:f1:01.0-q3] + testpmd>set fwd csum + testpmd>start + +12. Rerun step 6 with csum fwd. + +Test Case 4: PVP split ring all path multi-queues vhost enqueue operations with 1 to N mapping between vrings and CBDMA virtual channels +----------------------------------------------------------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test performance of split ring in each virtio path with multi-queues +when vhost uses the asynchronous enqueue operations with dsa dpdk driver and the mapping between vrings and dsa virtual channels is 1:N. +Both iova as VA and PA mode, 'mac fwd' and 'csum fwd' have been tested. + +1. Bind 8 dsa device and one nic port to vfio-pci like cmmon step 1-2:: + + # ./usertools/dpdk-devbind.py -b 4f:00.1 + # ./usertools/dpdk-devbind.py -b vfio-pci 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:f6:01.0,max_queues=8 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=1,dmas=[txq0],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:f6:01.0-q0,lcore11@0000:f6:01.0-q1,lcore11@0000:f6:01.0-q2,lcore11@0000:f6:01.0-q3,lcore11@0000:f6:01.0-q4,lcore11@0000:f6:01.0-q5,lcore11@0000:f6:01.0-q6,lcore11@0000:f6:01.0-q7] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with inorder mergeable path:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=1,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets [64,1518] from packet generator, check the throughput can get expected data:: + + testpmd>show port stats all + +5. Stop vhost port, check that there are packets in both directions of RX and TX in each queue from vhost log:: + + testpmd>stop + +6. Restart vhost port and send imix packets again, then check the throuhput can get expected data:: + + testpmd>start + testpmd>show port stats all + +7. Relaunch virtio-user with mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=0,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +8. Relaunch virtio-user with inorder non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=1,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +9. Relaunch virtio-user with non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,queues=1 \ + -- -i --enable-hw-vlan-strip --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +10. Relaunch virtio-user with vector_rx path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,queues=1,vectorized=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +11. Quit all testpmd and relaunch vhost with diff channel by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:6a:01.0,max_queues=1 -a 0000:6f:01.0 -a 0000:74:01.0 -a 0000:79:01.0 -a 0000:e7:01.0 -a 0000:ec:01.0 -a 0000:f1:01.0 -a 0000:f6:01.0 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore11@0000:6f:01.0-q1,lcore11@0000:74:01.0-q2,lcore11@0000:79:01.0-q3,lcore11@0000:e7:01.0-q4,lcore11@0000:ec:01.0-q5,lcore11@0000:f1:01.0-q6,lcore11@0000:f6:01.0-q7] + testpmd>set fwd csum + testpmd>start + +12. Rerun step 3-10 with csum fwd. + +13. Quit all testpmd and relaunch vhost with pa mode by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:6a:01.0 -a 0000:6f:01.0 -a 0000:74:01.0 -a 0000:79:01.0 -a 0000:e7:01.0 -a 0000:ec:01.0 -a 0000:f1:01.0 -a 0000:f6:01.0 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0],dma_ring_size=2048' \ + --iova=pa -- -i --nb-cores=1 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore11@0000:6f:01.0-q1,lcore11@0000:74:01.0-q2,lcore11@0000:79:01.0-q3,lcore11@0000:e7:01.0-q4,lcore11@0000:ec:01.0-q5,lcore11@0000:f1:01.0-q6,lcore11@0000:f6:01.0-q7] + testpmd>set fwd csum + testpmd>start + +14. Rerun step 8 with csum fwd. + +Test Case 5: PVP split ring all path multi-queues vhost enqueue operations with M to N mapping between vrings and CBDMA virtual channels +----------------------------------------------------------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test performance of split ring in each virtio path with multi-queues +when vhost uses the asynchronous enqueue operations with dsa dpdk driver and the mapping between vrings and dsa virtual channels is M:N. +Both iova as VA and PA mode, 'mac fwd' and 'csum fwd' have been tested. + +1. Bind 8 dsa device and one nic port to vfio-pci like common step 1-2:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + # ./usertools/dpdk-devbind.py -b vfio-pci 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:f6:01.0,max_queues=8 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:f6:01.0-q0,lcore11@0000:f6:01.0-q1,lcore11@0000:f6:01.0-q2,lcore11@0000:f6:01.0-q3,lcore11@0000:f6:01.0-q4,lcore11@0000:f6:01.0-q5,lcore11@0000:f6:01.0-q6,lcore11@0000:f6:01.0-q7] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with inorder mergeable path:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets [64,1518] from packet generator, check the throughput can get expected data:: + + testpmd>show port stats all + +5. Stop vhost port, check that there are packets in both directions of RX and TX in each queue from vhost log:: + + testpmd>stop + +6. Restart vhost port and send imix packets again, then check the throuhput can get expected data:: + + testpmd>start + testpmd>show port stats all + +7. Relaunch virtio-user with mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=0,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +8. Relaunch virtio-user with inorder non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +9. Relaunch virtio-user with non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,queues=8 \ + -- -i --enable-hw-vlan-strip --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +10. Relaunch virtio-user with vector_rx path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,queues=8,vectorized=1 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +11. Quit all testpmd and relaunch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:f6:01.0,max_queues=8 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:f6:01.0-q0,lcore11@0000:f6:01.0-q1,lcore11@0000:f6:01.0-q2,lcore11@0000:f6:01.0-q3,lcore11@0000:f6:01.0-q4,lcore11@0000:f6:01.0-q5,lcore11@0000:f6:01.0-q6,lcore11@0000:f6:01.0-q7] + testpmd>set fwd mac + testpmd>start + +12. Rerun step 3-6. + +13. Quit all testpmd and relaunch vhost with diff channel by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:6a:01.0 -a 0000:6f:01.0 -a 0000:74:01.0 -a 0000:79:01.0 -a 0000:e7:01.0 -a 0000:ec:01.0 -a 0000:f1:01.0 -a 0000:f6:01.0 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore11@0000:6f:01.0-q1,lcore11@0000:74:01.0-q2,lcore11@0000:79:01.0-q3,lcore11@0000:e7:01.0-q4,lcore11@0000:ec:01.0-q5,lcore11@0000:f1:01.0-q6,lcore11@0000:f6:01.0-q7] + testpmd>set fwd csum + testpmd>start + +14. Rerun step 7 with csum. + +15. Quit all testpmd and relaunch vhost with pa mode by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:f6:01.0,max_queues=8 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=pa -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:f6:01.0-q0,lcore11@0000:f6:01.0-q1,lcore11@0000:f6:01.0-q2,lcore11@0000:f6:01.0-q3,lcore11@0000:f6:01.0-q4,lcore11@0000:f6:01.0-q5,lcore11@0000:f6:01.0-q6,lcore11@0000:f6:01.0-q7] + testpmd>set fwd csum + testpmd>start + +16. Rerun step 9 with csum fwd. + +Test Case 6: PVP split ring dynamic queues vhost async operation with dsa dpdk driver channels +------------------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test performance of split ring when vhost uses the asynchronous enqueue operations +with dsa dpdk driver and if the vhost-user can work well when the queue number dynamic change. Both iova as VA and PA mode have beed tested. + +1. Bind 8 dsa devices and 1 NIC port to vfio-pci like common step 1-2:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 0000:4f:00.1 + # ./usertools/dpdk-devbind.py -b vfio-pci 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 --txq=2 --rxq=2 + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=1,in_order=1,queues=8,server=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 --txq=8 --rxq=8 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets[64,1518] from packet generator with random ip, check perforamnce can get target. + +5. Stop vhost port, check vhost RX and TX direction both exist packtes in 2 queues from vhost log. + +6. Quit and relaunch vhost with 1:1 mapping between vrings and dsa virtual channels:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -a 0000:4f:00.1 -a 0000:6a:01.0,max_queues=4 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3]' \ + --iova=va -- -i --nb-cores=8 --txd=1024 --rxd=1024 --txq=4 --rxq=4 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore12@0000:6a:01.0-q1,lcore13@0000:6a:01.0-q2,lcore14@0000:6a:01.0-q3] + testpmd>set fwd mac + testpmd>start + +7. Rerun step 4. + +8. Stop vhost port, check vhost RX and TX direction both exist packtes in 4 queues from vhost log. + +9. Quit and relaunch vhost with M:N(1:N;M# ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -a 0000:4f:00.1 -a 0000:6a:01.0,max_queues=8 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq6;txq7]' \ + --iova=va -- -i --nb-cores=5 --txd=1024 --rxd=1024 --txq=8 --rxq=8 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore11@0000:6a:01.0-q7,lcore12@0000:6a:01.0-q1,lcore12@0000:6a:01.0-q2,lcore12@0000:6a:01.0-q3,lcore13@0000:6a:01.0-q2,lcore13@0000:6a:01.0-q3,lcore13@0000:6a:01.0-q4,lcore14@0000:6a:01.0-q2,lcore14@0000:6a:01.0-q3,lcore14@0000:6a:01.0-q4,lcore14@0000:6a:01.0-q5,lcore15@0000:6a:01.0-q0,lcore15@0000:6a:01.0-q1,lcore15@0000:6a:01.0-q2,lcore15@0000:6a:01.0-q3,lcore15@0000:6a:01.0-q4,lcore15@0000:6a:01.0-q5,lcore15@0000:6a:01.0-q6,lcore15@0000:6a:01.0-q7] + testpmd>set fwd mac + testpmd>start + +10. Rerun step 4. + +11. Stop vhost port, check vhost RX and TX direction both exist packtes in 8 queues from vhost log. + +12. Quit and relaunch vhost with diff M:N(1:N;M# ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -a 0000:4f:00.1 -a 0000:6a:01.0 -a 0000:6f:01.0 -a 0000:74:01.0 -a 0000:79:01.0 -a 0000:e7:01.0 -a 0000:ec:01.0 -a 0000:f1:01.0 -a 0000:f6:01.0 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq6;txq7]' \ + --iova=va -- -i --nb-cores=5 --txd=1024 --rxd=1024 --txq=8 --rxq=8 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore11@0000:f6:01.0-q7,lcore12@0000:6f:01.0-q1,lcore12@0000:74:01.0-q2,lcore12@0000:79:01.0-q3,lcore13@0000:74:01.0-q2,lcore13@0000:79:01.0-q3,lcore13@0000:e7:01.0-q4,lcore14@0000:74:01.0-q2,lcore14@0000:79:01.0-q3,lcore14@0000:e7:01.0-q4,lcore14@0000:ec:01.0-q5,lcore15@0000:6a:01.0-q0,lcore15@0000:6f:01.0-q1,lcore15@0000:74:01.0-q2,lcore15@0000:79:01.0-q3,lcore15@0000:e7:01.0-q4,lcore15@0000:ec:01.0-q5,lcore15@0000:f1:01.0-q6,lcore15@0000:f6:01.0-q7] + testpmd>set fwd mac + testpmd>start + +13. Rerun step 10-11. + +14. Quit and relaunch vhost with diff M:N(M:1;M>N) mapping between vrings and dsa virtual channels:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -a 0000:4f:00.1 -a 0000:6a:01.0,max_queues=4 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=5 --txd=1024 --rxd=1024 --txq=8 --rxq=8 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore12@0000:6a:01.0-q0,lcore13@0000:6a:01.0-q1,lcore13@0000:6a:01.0-q2,lcore14@0000:6a:01.0-q1,lcore14@0000:6a:01.0-q2,lcore15@0000:6a:01.0-q1,lcore15@0000:6a:01.0-q2] + testpmd>set fwd mac + testpmd>start + +15. Rerun step 10-11. + +16. Quit and relaunch vhost with diff M:N(M:1;M>N) mapping between vrings and dsa virtual channels:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -a 0000:4f:00.1 -a 0000:6a:01.0,max_queus=3 -a 0000:6f:01.0,max_queus=3 -a 0000:74:01.0,max_queus=3 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=5 --txd=1024 --rxd=1024 --txq=8 --rxq=8 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore12@0000:6a:01.0-q0,lcore13@0000:6f:01.0-q1,lcore13@0000:74:01.0-q2,lcore14@0000:6f:01.0-q1,lcore14@0000:74:01.0-q2,lcore15@0000:6f:01.0-q1,lcore15@0000:74:01.0-q2] + testpmd>set fwd mac + testpmd>start + +17. Rerun step 10-11. + +18. Quit and relaunch vhost with iova=pa by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -a 0000:4f:00.1 -a 0000:6a:01.0,max_queus=4 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=pa -- -i --nb-cores=5 --txd=1024 --rxd=1024 --txq=8 --rxq=8 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore12@0000:6a:01.0-q0,lcore13@0000:6a:01.0-q1,lcore13@0000:6a:01.0-q2,lcore14@0000:6a:01.0-q1,lcore14@0000:6a:01.0-q2,lcore15@0000:6a:01.0-q1,lcore15@0000:6a:01.0-q2] + testpmd>set fwd mac + testpmd>start + +19. Rerun step 10-11. + +Test Case 7: PVP packed ring all path vhost enqueue operations with 1:1 mapping between vrings and dsa dpdk driver channels +---------------------------------------------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test performance of packed ring in each virtio path with 1 core and +1 queue when vhost uses the asynchronous enqueue operations with dsa dpdk driver and the mapping between vrings and dsa virtual channels +is 1:1. Both iova as VA and PA mode, 'mac fwd' and 'csum fwd' have been tested. + +1. Bind one dsa device and one nic port to vfio-pci like common step 1-2:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 f6:01.0 + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:f6:01.0,max_queues=1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=1,dmas=[txq0],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore3@0000:f6:01.0-q0] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with inorder mergeable path:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=1,packed_vq=1,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets [64,1518] from packet generator, check the throughput can get expected data:: + + testpmd>show port stats all + +5. Stop vhost port, check that there are packets in both directions of RX and TX in each queue from vhost log:: + + testpmd>stop + +6. Restart vhost port and send imix packets again, then check the throuhput can get expected data:: + + testpmd>start + testpmd>show port stats all + +7. Relaunch virtio-user with mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=0,packed_vq=1,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +8. Relaunch virtio-user with inorder non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=1,packed_vq=1,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +9. Relaunch virtio-user with non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,packed_vq=1,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +10. Relaunch virtio-user with vector_rx path, then repeat step 4-6:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio --force-max-simd-bitwidth=512 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=0,in_order=1,queues=1,packed_vq=1,vectorized=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +11. Relaunch virtio-user with vector_rx path and ring size is not power of 2, then repeat step 4-6:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio --force-max-simd-bitwidth=512 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=0,in_order=1,queues=1,packed_vq=1,vectorized=1,,queue_size=1025 \ + -- -i --nb-cores=1 --txd=1025 --rxd=1025 + testpmd>set fwd mac + testpmd>start + +12. Quit all testpmd and relaunch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:f6:01.0,max_queues=1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=1,dmas=[txq0],dma_ring_size=2048' \ + --iova=pa -- -i --nb-cores=1 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore3@0000:f6:01.0-q3] + testpmd>set fwd csum + testpmd>start + +13. Rerun step 11 with csum fwd. + +Test Case 8: PVP packed ring all path mulit-queues vhost async enqueue operation with 1:1 mapping between vrings and dsa dpdk driver channels +----------------------------------------------------------------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test performance of packed ring in each virtio path with multi-queues +when vhost uses the asynchronous enqueue operations with dsa dpdk driver and the mapping between vrings and dsa virtual channels is 1:1. +Both iova as VA and PA mode, 'mac fwd' and 'csum fwd' have been tested. + +1. Bind 8 dsa devices and one nic port to vfio-pci like common step 1-2:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + # ./usertools/dpdk-devbind.py -b vfio-pci 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:f6:01.0,max_queues=8 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=8 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:f6:01.0-q0,lcore12@0000:f6:01.0-q1,lcore13@0000:f6:01.0-q2,lcore14@0000:f6:01.0-q3,lcore15@0000:f6:01.0-q4,lcore16@0000:f6:01.0-q5,lcore17@0000:f6:01.0-q6,lcore18@0000:f6:01.0-q7] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with inorder mergeable path:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=1,packed_vq=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets [64,1518] from packet generator, check the throughput can get expected data:: + + testpmd>show port stats all + +5. Stop vhost port, check that there are packets in both directions of RX and TX in each queue from vhost log:: + + testpmd>stop + +6. Restart vhost port and send imix packets again, then check the throuhput can get expected data:: + + testpmd>start + testpmd>show port stats all + +7. Relaunch virtio-user with mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=0,packed_vq=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +8. Relaunch virtio-user with inorder non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=1,packed_vq=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +9. Relaunch virtio-user with non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,packed_vq=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +10. Relaunch virtio-user with vector_rx path, then repeat step 4-6:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio --force-max-simd-bitwidth=512 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=0,in_order=1,packed_vq=1,queues=8,vectorized=1 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +11. Relaunch virtio-user with vector_rx path and ring size is not power of 2, then repeat step 4-6:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio --force-max-simd-bitwidth=512 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=0,in_order=1,packed_vq=1,queues=8,vectorized=1,queue_size=1025 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1025 --rxd=1025 + testpmd>set fwd mac + testpmd>start + +12. Quit all testpmd and relaunch vhost with diff channel by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:6a:01.0 -a 0000:6f:01.0 -a 0000:74:01.0 -a 0000:79:01.0 -a 0000:e7:01.0 -a 0000:ec:01.0 -a 0000:f1:01.0 -a 0000:f6:01.0 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=8 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore12@0000:6f:01.0-q1,lcore13@0000:74:01.0-q2,lcore14@0000:79:01.0-q3,lcore15@0000:e7:01.0-q4,lcore16@0000:ec:01.0-q5,lcore17@0000:f1:01.0-q6,lcore18@0000:f6:01.0-q7] + testpmd>set fwd csum + testpmd>start + +13. Rerun step 11 with csum fwd. + +14. Quit all testpmd and relaunch vhost with pa mode by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:6a:01.0 -a 0000:6f:01.0 -a 0000:74:01.0 -a 0000:79:01.0 -a 0000:e7:01.0 -a 0000:ec:01.0 -a 0000:f1:01.0 -a 0000:f6:01.0 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=pa -- -i --nb-cores=8 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore12@0000:6f:01.0-q1,lcore13@0000:74:01.0-q2,lcore14@0000:79:01.0-q3,lcore15@0000:e7:01.0-q4,lcore16@0000:ec:01.0-q5,lcore17@0000:f1:01.0-q6,lcore18@0000:f6:01.0-q7] + testpmd>set fwd csum + testpmd>start + +15. Rerun step 3-6 with csum fwd. + +Test Case 9: PVP packed ring all path mulit-queues vhost async enqueue operation with M:1 mapping between vrings and dsa dpdk driver channels +---------------------------------------------------------------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test performance of packed ring in each virtio path with multi-queues +when vhost uses the asynchronous enqueue operations with dsa dpdk driver and the mapping between vrings and dsa virtual channels is M:1. +Both iova as VA and PA mode, 'mac fwd' and 'csum fwd' have been tested. + +1. Bind 1 dsa device and one nic port to vfio-pci like common step 1-2:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 f1:01.0 + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:f1:01.0,max_queues=1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:f1:01.0-q0] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with inorder mergeable path:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=1,packed_vq=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets [64,1518] from packet generator, check the throughput can get expected data:: + + testpmd>show port stats all + +5. Stop vhost port, check that there are packets in both directions of RX and TX in each queue from vhost log:: + + testpmd>stop + +6. Restart vhost port and send imix packets again, then check the throuhput can get expected data:: + + testpmd>start + testpmd>show port stats all + +7. Relaunch virtio-user with mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=0,packed_vq=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +8. Relaunch virtio-user with inorder non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=1,packed_vq=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +9. Relaunch virtio-user with non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,packed_vq=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +10. Relaunch virtio-user with vector_rx path, then repeat step 4-6:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio --force-max-simd-bitwidth=512 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=0,in_order=1,packed_vq=1,queues=8,vectorized=1 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +11. Relaunch virtio-user with vector_rx path and ring size is not power of 2, then repeat step 4-6:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio --force-max-simd-bitwidth=512 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=0,in_order=1,packed_vq=1,queues=8,vectorized=1,queue_size=1025 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1025 --rxd=1025 + testpmd>set fwd mac + testpmd>start + +12. Quit all testpmd and relaunch vhost with pa mode by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:f1:01.0,max_queues=8 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=pa -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:f1:01.0-q3] + testpmd>set fwd csum + testpmd>start + +13. Rerun step 7 with csum fwd. + +Test Case 10: PVP packed ring all path mulit-queues vhost async enqueue operation with 1:N mapping between vrings and dsa dpdk driver channels +----------------------------------------------------------------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test performance of packed ring in each virtio path with multi-queues +when vhost uses the asynchronous enqueue operations with dsa dpdk driver and the mapping between vrings and dsa virtual channels is 1:N. +Both iova as VA and PA mode, 'mac fwd' and 'csum fwd' have been tested. + +1. Bind 8 dsa devices and one nic port to vfio-pci like common step 1-2:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + # ./usertools/dpdk-devbind.py -b vfio-pci 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:f6:01.0,max_queues=8 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=1,dmas=[txq0],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:f6:01.0-q0,lcore11@0000:f6:01.0-q1,lcore11@0000:f6:01.0-q2,lcore11@0000:f6:01.0-q3,lcore11@0000:f6:01.0-q4,lcore11@0000:f6:01.0-q5,lcore11@0000:f6:01.0-q6,lcore11@0000:f6:01.0-q7] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with inorder mergeable path:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=1,packed_vq=1,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets [64,1518] from packet generator, check the throughput can get expected data:: + + testpmd>show port stats all + +5. Stop vhost port, check vhost RX and TX direction both exist packtes from vhost log:: + + testpmd>stop + +6. restart vhost port and send imix pkts again, check get same throuhput as above:: + + testpmd>start + testpmd>show port stats all + +7. Relaunch virtio-user with mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=0,packed_vq=1,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +8. Relaunch virtio-user with inorder non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=1,packed_vq=1,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +9. Relaunch virtio-user with non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +10. Relaunch virtio-user with vector_rx path, then repeat step 4-6:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio --force-max-simd-bitwidth=512 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=0,in_order=1,queues=1,packed_vq=1,vectorized=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +11. Relaunch virtio-user with vector_rx path and ring size is not power of 2, then repeat step 4-6:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio --force-max-simd-bitwidth=512 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=0,in_order=1,queues=1,packed_vq=1,vectorized=1,queue_size=1025 \ + -- -i --nb-cores=1 --txd=1025 --rxd=1025 + testpmd>set fwd mac + testpmd>start + +12. Quit all testpmd and relaunch vhost with diff channel by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:6a:01.0 -a 0000:6f:01.0 -a 0000:74:01.0 -a 0000:79:01.0 -a 0000:e7:01.0 -a 0000:ec:01.0 -a 0000:f1:01.0 -a 0000:f6:01.0 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore12@0000:6f:01.0-q1,lcore13@0000:74:01.0-q2,lcore14@0000:79:01.0-q3,lcore15@0000:e7:01.0-q4,lcore16@0000:ec:01.0-q5,lcore17@0000:f1:01.0-q6,lcore18@0000:f6:01.0-q7] + testpmd>set fwd csum + testpmd>start + +13. Rerun step 11 with csum fwd. + +14. Quit all testpmd and relaunch vhost with pa mode by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:6a:01.0 -a 0000:6f:01.0 -a 0000:74:01.0 -a 0000:79:01.0 -a 0000:e7:01.0 -a 0000:ec:01.0 -a 0000:f1:01.0 -a 0000:f6:01.0 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0],dma_ring_size=2048' \ + --iova=pa -- -i --nb-cores=1 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore12@0000:6f:01.0-q1,lcore13@0000:74:01.0-q2,lcore14@0000:79:01.0-q3,lcore15@0000:e7:01.0-q4,lcore16@0000:ec:01.0-q5,lcore17@0000:f1:01.0-q6,lcore18@0000:f6:01.0-q7] + testpmd>set fwd csum + testpmd>start + +15. Rerun step 8 with csum fwd. + +Test Case 11: PVP packed ring all path mulit-queues vhost async enqueue operation with 1:N mapping between vrings and dsa dpdk driver channels +----------------------------------------------------------------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test performance of packed ring in each virtio path with multi-queues +when vhost uses the asynchronous enqueue operations with dsa dpdk driver and the mapping between vrings and dsa virtual channels is M:N. +Both iova as VA and PA mode, 'mac fwd' and 'csum fwd' have been tested. + +1. Bind 8 dsa devices and one nic port to vfio-pci like common step 1-2:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + # ./usertools/dpdk-devbind.py -b vfio-pci 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:f6:01.0,max_queues=8 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:f6:01.0-q0,lcore11@0000:f6:01.0-q1,lcore11@0000:f6:01.0-q2,lcore11@0000:f6:01.0-q3,lcore11@0000:f6:01.0-q4,lcore11@0000:f6:01.0-q5,lcore11@0000:f6:01.0-q6,lcore11@0000:f6:01.0-q7] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with inorder mergeable path:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=1,packed_vq=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets [64,1518] from packet generator, check the throughput can get expected data:: + + testpmd>show port stats all + +5. Stop vhost port, check that there are packets in both directions of RX and TX in each queue from vhost log:: + + testpmd>stop + +6. Restart vhost port and send imix packets again, then check the throuhput can get expected data:: + + testpmd>start + testpmd>show port stats all + +7. Relaunch virtio-user with mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=0,packed_vq=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +8. Relaunch virtio-user with inorder non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=1,packed_vq=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +9. Relaunch virtio-user with non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,packed_vq=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +10. Relaunch virtio-user with vector_rx path, then repeat step 4-6:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio --force-max-simd-bitwidth=512 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=0,queues=8,in_order=1,packed_vq=1,vectorized=1 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +11. Relaunch virtio-user with vector_rx path and ring size is not power of 2, then repeat step 4-6:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio --force-max-simd-bitwidth=512 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=0,queues=8,in_order=1,packed_vq=1,vectorized=1,queue_size=1025 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1025 --rxd=1025 + testpmd>set fwd mac + testpmd>start + +12. Quit all testpmd and relaunch vhost with diff channel by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:f6:01.0,max_queues=8 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:f6:01.0-q0,lcore11@0000:f6:01.0-q1,lcore11@0000:f6:01.0-q2,lcore11@0000:f6:01.0-q3,lcore11@0000:f6:01.0-q4,lcore11@0000:f6:01.0-q5,lcore11@0000:f6:01.0-q6,lcore11@0000:f6:01.0-q7] + testpmd>set fwd mac + testpmd>start + +13. Rerun step 11. + +14. Quit all testpmd and relaunch vhost with diff channel by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:6a:01.0 -a 0000:6f:01.0 -a 0000:74:01.0 -a 0000:79:01.0 -a 0000:e7:01.0 -a 0000:ec:01.0 -a 0000:f1:01.0 -a 0000:f6:01.0 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore12@0000:6f:01.0-q1,lcore13@0000:74:01.0-q2,lcore14@0000:79:01.0-q3,lcore15@0000:e7:01.0-q4,lcore16@0000:ec:01.0-q5,lcore17@0000:f1:01.0-q6,lcore18@0000:f6:01.0-q7] + testpmd>set fwd csum + testpmd>start + +15. Rerun step 11 with csum fwd. + +16. Quit all testpmd and relaunch vhost with pa mode by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:f6:01.0,max_queues=8 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=pa -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@0000:f6:01.0-q0,lcore11@0000:f6:01.0-q1,lcore11@0000:f6:01.0-q2,lcore11@0000:f6:01.0-q3,lcore11@0000:f6:01.0-q4,lcore11@0000:f6:01.0-q5,lcore11@0000:f6:01.0-q6,lcore11@0000:f6:01.0-q7] + testpmd>set fwd csum + testpmd>start + +17. Rerun step 9 with csum fwd. + +Test Case 12: PVP packed ring dynamic queues vhost async operation with dsa dpdk driver channels +--------------------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test performance of packed ring when vhost uses the asynchronous enqueue operations +with dsa dpdk driver and if the vhost-user can work well when the queue number dynamic change. Both iova as VA and PA mode have beed tested. + +1. Bind 8 dsa devices and 1 NIC port to vfio-pci like common step 1-2:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 0000:4f:00.1 + # ./usertools/dpdk-devbind.py -b vfio-pci 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 --txq=2 --rxq=2 + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=1,in_order=1,packed_vq=1,queues=8,server=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 --txq=8 --rxq=8 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets[64,1518] from packet generator with random ip, check perforamnce can get target. + +5. Stop vhost port, check vhost RX and TX direction both exist packtes in 2 queues from vhost log. + +6. Quit and relaunch vhost with 1:1 mapping between vrings and dsa virtual channels:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -a 0000:4f:00.1 -a 0000:6a:01.0 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3]' \ + --iova=va -- -i --nb-cores=8 --txd=1024 --rxd=1024 --txq=4 --rxq=4 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore12@0000:6a:01.0-q1,lcore13@0000:6a:01.0-q2,lcore14@0000:6a:01.0-q3] + testpmd>set fwd mac + testpmd>start + +7. Send imix packets[64,1518] from packet generator with random ip, check perforamnce can get target. + +8. Stop vhost port, check vhost RX and TX direction both exist packtes in 4 queues from vhost log. + +9. Quit and relaunch vhost with M:N(1:N;M# ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -a 0000:4f:00.1 -a 0000:6a:01.0 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq6;txq7]' \ + --iova=va -- -i --nb-cores=5 --txd=1024 --rxd=1024 --txq=8 --rxq=8 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore11@0000:6a:01.0-q7,lcore12@0000:6a:01.0-q1,lcore12@0000:6a:01.0-q2,lcore12@0000:6a:01.0-q3,lcore13@0000:6a:01.0-q2,lcore13@0000:6a:01.0-q3,lcore13@0000:6a:01.0-q4,lcore14@0000:6a:01.0-q2,lcore14@0000:6a:01.0-q3,lcore14@0000:6a:01.0-q4,lcore14@0000:6a:01.0-q5,lcore15@0000:6a:01.0-q0,lcore15@0000:6a:01.0-q1,lcore15@0000:6a:01.0-q2,lcore15@0000:6a:01.0-q3,lcore15@0000:6a:01.0-q4,lcore15@0000:6a:01.0-q5,lcore15@0000:6a:01.0-q6,lcore15@0000:6a:01.0-q7] + testpmd>set fwd mac + testpmd>start + +10. Send imix packets[64,1518] from packet generator with random ip, check perforamnce can get target. + +11. Stop vhost port, check vhost RX and TX direction both exist packtes in 8 queues from vhost log. + +12. Quit and relaunch vhost with diff M:N(1:N;M# ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -a 0000:4f:00.1 -a 0000:6a:01.0 -a 0000:6f:01.0 -a 0000:74:01.0 -a 0000:79:01.0 -a 0000:e7:01.0 -a 0000:ec:01.0 -a 0000:f1:01.0 -a 0000:f6:01.0 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq6;txq7]' \ + --iova=va -- -i --nb-cores=5 --txd=1024 --rxd=1024 --txq=8 --rxq=8 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore11@0000:f6:01.0-q7,lcore12@0000:6f:01.0-q1,lcore12@0000:74:01.0-q2,lcore12@0000:79:01.0-q3,lcore13@0000:74:01.0-q2,lcore13@0000:79:01.0-q3,lcore13@0000:e7:01.0-q4,lcore14@0000:74:01.0-q2,lcore14@0000:79:01.0-q3,lcore14@0000:e7:01.0-q4,lcore14@0000:ec:01.0-q5,lcore15@0000:6a:01.0-q0,lcore15@0000:6f:01.0-q1,lcore15@0000:74:01.0-q2,lcore15@0000:79:01.0-q3,lcore15@0000:e7:01.0-q4,lcore15@0000:ec:01.0-q5,lcore15@0000:f1:01.0-q6,lcore15@0000:f6:01.0-q7] + testpmd>set fwd mac + testpmd>start + +13. Rerun step 10-11. + +14. Quit and relaunch vhost with diff M:N(M:1;M>N) mapping between vrings and dsa virtual channels:::: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -a 0000:4f:00.1 -a 0000:6a:01.0 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=5 --txd=1024 --rxd=1024 --txq=8 --rxq=8 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore12@0000:6a:01.0-q0,lcore13@0000:6a:01.0-q1,lcore13@0000:6a:01.0-q2,lcore14@0000:6a:01.0-q1,lcore14@0000:6a:01.0-q2,lcore15@0000:6a:01.0-q1,lcore15@0000:6a:01.0-q2] + testpmd>set fwd mac + testpmd>start + +15. Rerun step 10-11. + +16. Quit and relaunch vhost with diff M:N(M:1;M>N) mapping between vrings and dsa virtual channels:::: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -a 0000:4f:00.1 -a 0000:6a:01.0 -a 0000:6f:01.0 -a 0000:74:01.0 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=5 --txd=1024 --rxd=1024 --txq=8 --rxq=8 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore12@0000:6a:01.0-q0,lcore13@0000:6f:01.0-q1,lcore13@0000:74:01.0-q2,lcore14@0000:6f:01.0-q1,lcore14@0000:74:01.0-q2,lcore15@0000:6f:01.0-q1,lcore15@0000:74:01.0-q2] + testpmd>set fwd mac + testpmd>start + +17. Rerun step 10-11. + +18. Quit and relaunch vhost with iova=pa by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -a 0000:4f:00.1 -a 0000:6a:01.0 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=pa -- -i --nb-cores=5 --txd=1024 --rxd=1024 --txq=8 --rxq=8 \ + --lcore-dma=[lcore11@0000:6a:01.0-q0,lcore12@0000:6a:01.0-q0,lcore13@0000:6a:01.0-q1,lcore13@0000:6a:01.0-q2,lcore14@0000:6a:01.0-q1,lcore14@0000:6a:01.0-q2,lcore15@0000:6a:01.0-q1,lcore15@0000:6a:01.0-q2] + testpmd>set fwd mac + testpmd>start + +19. Rerun step 10-11. + +Test Case 13: PVP split ring all path vhost enqueue operations with 1:1 mapping between vrings and dsa kernel driver channels +------------------------------------------------------------------------------------------------------------------------------ +This case uses testpmd and Traffic Generator(For example, Trex) to test performance of split ring in each virtio path with 1 core and 1 queue +when vhost uses the asynchronous enqueue operations with dsa kernel driver and the mapping between vrings and dsa virtual channels is 1:1. +Both iova as VA mode, 'mac fwd' and 'csum fwd' have been tested. + +1. Bind one dsa device to idxd driver and one nic port to vfio-pci like common step 1 and 3:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + + #ls /dev/dsa,check wq configure, reset if exist + # .//drivers/dma/idxd/dpdk_idxd_cfg.py --reset 0 + + # ./usertools/dpdk-devbind.py -u 6a:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 2 0 + ls /dev/dsa #check wq configure success + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=1,dmas=[txq0],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore3@wq0.0] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with inorder mergeable path:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=1,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets [64,1518] from packet generator, check the throughput can get expected data:: + + testpmd>show port stats all + +5. Stop vhost port, check that there are packets in both directions of RX and TX in each queue from vhost log:: + + testpmd>stop + +6. Restart vhost port and send imix packets again, then check the throuhput can get expected data:: + + testpmd>start + testpmd>show port stats all + +7. Relaunch virtio-user with mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=0,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +8. Relaunch virtio-user with inorder non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=1,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +9. Relaunch virtio-user with non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,queues=1 \ + -- -i --enable-hw-vlan-strip --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +10. Relaunch virtio-user with vector_rx path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,queues=1,vectorized=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +11. Quit all testpmd and relaunch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=1,dmas=[txq0],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore3@wq0.1] + testpmd>set fwd csum + testpmd>start + +12. Rerun step 3-6 with csum fwd. + +Test Case 14: PVP split ring all path multi-queues vhost async enqueue with 1:1 mapping between vrings and dsa kernel driver channels +-------------------------------------------------------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test performance of split ring in each virtio path with multi-queues +when vhost uses the asynchronous enqueue operations with dsa kernel driver and the mapping between vrings and dsa virtual channels is 1:1. +Both iova as VA mode, 'mac fwd' and 'csum fwd' have been tested. + +1. Bind 3 dsa device to idxd driver and one nic port to vfio-pci like common step 1 and 3:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + + #ls /dev/dsa,check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 4 2 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 4 4 + ls /dev/dsa #check wq configure success + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=8 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@wq0.0,lcore12@wq0.1,lcore13@wq0.2,lcore14@wq0.3,lcore15@wq0.4,lcore16@wq0.5,lcore17@wq0.6,lcore18@wq0.7] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with inorder mergeable path:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets [64,1518] from packet generator, check the throughput can get expected data:: + + testpmd>show port stats all + +5. Stop vhost port, check that there are packets in both directions of RX and TX in each queue from vhost log:: + + testpmd>stop + +6. Restart vhost port and send imix packets again, then check the throuhput can get expected data:: + + testpmd>start + testpmd>show port stats all + +7. Relaunch virtio-user with mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=0,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +8. Relaunch virtio-user with inorder non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +9. Relaunch virtio-user with non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,queues=8 \ + -- -i --enable-hw-vlan-strip --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +10. Relaunch virtio-user with vector_rx path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,queues=8,vectorized=1 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +11. Quit all testpmd and relaunch vhost with diff channel by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=8 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@wq2.0,lcore12@wq2.1,lcore13@wq2.2,lcore14@wq2.3,lcore15@wq4.0,lcore16@wq4.1,lcore17@wq4.2,lcore18@wq4.3] + testpmd>set fwd csum + testpmd>start + +12. Rerun step 10 with csum fwd. + +Test Case 15: PVP split ring all path multi-queues vhost async enqueue with M:1 mapping between vrings and dsa kernel driver channels +-------------------------------------------------------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test performance of split ring in each virtio path with multi-queues +when vhost uses the asynchronous enqueue operations with dsa kernel driver and the mapping between vrings and dsa virtual channels is M:1. +Both iova as VA mode, 'mac fwd' and 'csum fwd' have been tested. + +1. Bind 1 dsa device to idxd driver and one nic port to vfio-pci like common step 1 and 3:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 2 0 + ls /dev/dsa #check wq configure success + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@wq0.0] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with inorder mergeable path:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets [64,1518] from packet generator, check the throughput can get expected data:: + + testpmd>show port stats all + +5. Stop vhost port, check that there are packets in both directions of RX and TX in each queue from vhost log:: + + testpmd>stop + +6. Restart vhost port and send imix packets again, then check the throuhput can get expected data:: + + testpmd>start + testpmd>show port stats all + +7. Relaunch virtio-user with mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=0,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +8. Relaunch virtio-user with inorder non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +9. Relaunch virtio-user with non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,queues=8 \ + -- -i --enable-hw-vlan-strip --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +10. Relaunch virtio-user with vector_rx path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,queues=8,vectorized=1 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +11. Quit all testpmd and relaunch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@wq0.1] + testpmd>set fwd csum + testpmd>start + +12. Rerun step 10 with csum fwd. + +Test Case 16: PVP split ring all path multi-queues vhost async enqueue with 1:N mapping between vrings and dsa kernel driver channels +-------------------------------------------------------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test performance of split ring in each virtio path with multi-queues +when vhost uses the asynchronous enqueue operations with dsa kernel driver and the mapping between vrings and dsa virtual channels is 1:N. +Both iova as VA mode, 'mac fwd' and 'csum fwd' have been tested. + +1. Bind 3 dsa device to idxd driver and one nic port to vfio-pci like cmmon step 1 and 3:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 74:01.0 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 2 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 4 + ls /dev/dsa #check wq configure success + +2.Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=1,dmas=[txq0],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@wq0.0,lcore11@wq0.1,lcore11@wq0.2,lcore11@wq0.3,lcore11@wq0.4,lcore11@wq0.5,lcore11@wq0.6,lcore11@wq0.7] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with inorder mergeable path:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=1,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets [64,1518] from packet generator, check the throughput can get expected data:: + + testpmd>show port stats all + +5. Stop vhost port, check that there are packets in both directions of RX and TX in each queue from vhost log:: + + testpmd>stop + +6. Restart vhost port and send imix packets again, then check the throuhput can get expected data:: + + testpmd>start + testpmd>show port stats all + +7. Relaunch virtio-user with mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=0,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +8. Relaunch virtio-user with inorder non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=1,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +9. Relaunch virtio-user with non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,queues=1 \ + -- -i --enable-hw-vlan-strip --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +10. Relaunch virtio-user with vector_rx path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,queues=1,vectorized=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +11. Quit all testpmd and relaunch vhost with diff channel by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@wq2.0,lcore11@wq2.1,lcore11@wq2.2,lcore11@wq2.3,lcore11@wq4.4,lcore11@wq4.5,lcore11@wq4.6,lcore11@wq4.7] + testpmd>set fwd csum + testpmd>start + +12. Rerun step 3-6 with csum fwd. + +Test Case 17: PVP split ring all path multi-queues vhost async enqueue with M:N mapping between vrings and dsa kernel driver channels +-------------------------------------------------------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test performance of split ring in each virtio path with multi-queues +when vhost uses the asynchronous enqueue operations with dsa kernel driver and the mapping between vrings and dsa virtual channels is M:N. +Both iova as VA mode, 'mac fwd' and 'csum fwd' have been tested. + +1. Bind 8 dsa device to idxd driver and one nic port to vfio-pci like common step 1 and 3:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 2 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 4 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 6 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 8 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 10 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 10 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 14 + ls /dev/dsa #check wq configure success + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@wq0.0,lcore11@wq0.1,lcore11@wq0.2,lcore11@wq0.3,lcore11@wq0.4,lcore11@wq0.5,lcore11@wq0.6,lcore11@wq0.7] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with inorder mergeable path:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets [64,1518] from packet generator, check the throughput can get expected data:: + + testpmd>show port stats all + +5. Stop vhost port, check that there are packets in both directions of RX and TX in each queue from vhost log:: + + testpmd>stop + +6. Restart vhost port and send imix packets again, then check the throuhput can get expected data:: + + testpmd>start + testpmd>show port stats all + +7. Relaunch virtio-user with mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=0,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +8. Relaunch virtio-user with inorder non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +9. Relaunch virtio-user with non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,queues=8 \ + -- -i --enable-hw-vlan-strip --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +10. Relaunch virtio-user with vector_rx path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,queues=8,vectorized=1 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +11. Quit all testpmd and relaunch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@wq0.0,lcore11@wq0.1,lcore11@wq0.2,lcore11@wq0.3,lcore11@wq0.4,lcore11@wq0.5,lcore11@wq0.6,lcore11@wq0.7] + testpmd>set fwd mac + testpmd>start + +12. Rerun step 3-6. + +13. Quit all testpmd and relaunch vhost with diff channel by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@wq0.0,lcore11@wq2.1,lcore11@wq4.2,lcore11@wq6.3,lcore11@wq8.4,lcore11@wq10.5,lcore11@wq12.6,lcore11@wq14.7] + testpmd>set fwd csum + testpmd>start + +14. Rerun step 11 with csum fwd. + +Test Case 18: PVP split ring dynamic queues vhost async operation with dsa kernel driver channels +-------------------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test performance of split ring when vhost uses the asynchronous enqueue operations +with dsa kernel driver and if the vhost-user can work well when the queue number dynamic change. + +1. Bind 8 dsa device to idxd driver and 1 NIC port to vfio-pci like common step 1 and 3:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 2 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 4 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 6 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 8 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 10 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 12 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 14 + ls /dev/dsa #check wq configure success + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 --txq=2 --rxq=2 + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=1,in_order=1,queues=8,server=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 --txq=8 --rxq=8 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets[64,1518] from packet generator with random ip, check perforamnce can get target. + +5. Stop vhost port, check vhost RX and TX direction both exist packtes in 2 queues from vhost log. + +6. Quit and relaunch vhost with 1:1 mapping between vrings and dsa virtual channels:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -a 0000:4f:00.1 -a 0000:6a:01.0 -a 0000:6f:01.0 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3]' \ + --iova=va -- -i --nb-cores=8 --txd=1024 --rxd=1024 --txq=4 --rxq=4 \ + --lcore-dma=[lcore11@wq0.0,lcore12@wq2.1,lcore13@wq4.2,lcore14@wq6.3] + testpmd>set fwd mac + testpmd>start + +7. Rerun step 3. + +8. Stop vhost port, check vhost RX and TX direction both exist packtes in 4 queues from vhost log. + +9. Quit and relaunch vhost with M:N(1:N;M# ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -a 0000:4f:00.1 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq6;txq7]' \ + --iova=va -- -i --nb-cores=5 --txd=1024 --rxd=1024 --txq=8 --rxq=8 \ + --lcore-dma=[lcore11@wq0.0,lcore11@wq0.7,lcore12@wq0.1,lcore12@wq0.2,lcore12@wq0.3,lcore13@wq0.2,lcore13@wq0.3,lcore13@wq0.4,lcore14@wq0.2,lcore14@wq0.3,lcore14@wq0.4,lcore14@wq0.5,lcore15@wq0.0,lcore15@wq0.1,lcore15@wq0.2,lcore15@wq0.3,lcore15@wq0.4,lcore15@wq0.5,lcore15@wq0.6,lcore15@wq0.7] + testpmd>set fwd mac + testpmd>start + +10. Rerun step 3. + +11. Stop vhost port, check vhost RX and TX direction both exist packtes in 8 queues from vhost log. + +12. Quit and relaunch vhost with diff M:N(1:N;M# ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -a 0000:4f:00.1 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq6;txq7]' \ + --iova=va -- -i --nb-cores=5 --txd=1024 --rxd=1024 --txq=8 --rxq=8 \ + --lcore-dma=[lcore11@wq0.0,lcore11@wq14.7,lcore12@wq2.1,lcore12@wq4.2,lcore12@wq6.3,lcore13@wq4.2,lcore13@wq6.3,lcore13@wq8.4,lcore14@wq4.2,lcore14@wq6.3,lcore14@wq8.4,lcore14@wq10.5,lcore15@wq0.0,lcore15@wq2.1,lcore15@wq4.2,lcore15@wq6.3,lcore15@wq8.4,lcore15@wq10.5,lcore15@wq12.6,lcore15@wq14.7] + testpmd>set fwd mac + testpmd>start + +13. Rerun step 10-11. + +14. Quit and relaunch vhost with diff M:N(M:1;M>N) mapping between vrings and dsa virtual channels:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -a 0000:4f:00.1 -a 0000:6a:01.0 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=5 --txd=1024 --rxd=1024 --txq=8 --rxq=8 \ + --lcore-dma=[lcore11@wq0.0,lcore12@wq0.0,lcore13@wq0.1,lcore13@wq0.2,lcore14@wq0.1,lcore14@wq0.2,lcore15@wq0.1,lcore15@wq0.2] + testpmd>set fwd mac + testpmd>start + +15. Rerun step 10-11. + +16. Quit and relaunch vhost with diff M:N(M:1;M>N) mapping between vrings and dsa virtual channels:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -a 0000:4f:00.1 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=5 --txd=1024 --rxd=1024 --txq=8 --rxq=8 \ + --lcore-dma=[lcore11@wq0.0,lcore12@wq0.0,lcore13@wq2.1,lcore13@wq4.2,lcore14@wq2.1,lcore14@wq4.2,lcore15@wq2.1,lcore15@wq4.2] + testpmd>set fwd mac + testpmd>start + +17. Rerun step 10-11. + +Test Case 19: PVP packed ring all path vhost enqueue operations with 1:1 mapping between vrings and dsa kernel driver channels +------------------------------------------------------------------------------------------------------------------------------ +This case uses testpmd and Traffic Generator(For example, Trex) to test performance of packed ring in each virtio path with 1 core and 1 queue +when vhost uses the asynchronous enqueue operations with dsa kernel driver and the mapping between vrings and dsa virtual channels is 1:1. +Both iova as VA mode, 'mac fwd' and 'csum fwd' have been tested. + +1. Bind one dsa device to idxd driver and one nic port to vfio-pci like common step 1 and 3:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + + #ls /dev/dsa,check wq configure, reset if exist + # .//drivers/dma/idxd/dpdk_idxd_cfg.py --reset 0 + + # ./usertools/dpdk-devbind.py -u 6a:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 2 0 + ls /dev/dsa #check wq configure success + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=1,dmas=[txq0],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore3@wq0.0] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with inorder mergeable path:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=1,packed_vq=1,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets [64,1518] from packet generator, check the throughput can get expected data:: + + testpmd>show port stats all + +5. Stop vhost port, check that there are packets in both directions of RX and TX in each queue from vhost log:: + + testpmd>stop + +6. Restart vhost port and send imix packets again, then check the throuhput can get expected data:: + + testpmd>start + testpmd>show port stats all + +7. Relaunch virtio-user with mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=0,packed_vq=1,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +8. Relaunch virtio-user with inorder non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=1,packed_vq=1,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +9. Relaunch virtio-user with non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,packed_vq=1,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +10. Relaunch virtio-user with vector_rx path, then repeat step 4-6:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio --force-max-simd-bitwidth=512 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=0,in_order=1,queues=1,packed_vq=1,vectorized=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +11. Relaunch virtio-user with vector_rx path and ring size is not power of 2, then repeat step 4-6:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio --force-max-simd-bitwidth=512 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=0,in_order=1,queues=1,packed_vq=1,vectorized=1,,queue_size=1025 \ + -- -i --nb-cores=1 --txd=1025 --rxd=1025 + testpmd>set fwd mac + testpmd>start + +12. Quit all testpmd and relaunch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=1,dmas=[txq0],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore3@wq0.1] + testpmd>set fwd csum + testpmd>start + +13. Rerun step 3-6 with csum fwd. + +Test Case 20: PVP packed ring all path multi-queues vhost async enqueue with 1:1 mapping between vrings and dsa kernel driver channels +--------------------------------------------------------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test performance of packed ring in each virtio path with multi-queues +when vhost uses the asynchronous enqueue operations with dsa kernel driver and the mapping between vrings and dsa virtual channels is 1:1. +Both iova as VA mode, 'mac fwd' and 'csum fwd' have been tested. + +1. Bind 3 dsa device to idxd driver and one nic port to vfio-pci like common step 1 and 3:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + + #ls /dev/dsa,check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 4 2 + # .//drivers/dma/idxd/dpdk_idxd_cfg.py -q 4 4 + ls /dev/dsa #check wq configure success + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=8 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@wq0.0,lcore12@wq0.1,lcore13@wq0.2,lcore14@wq0.3,lcore15@wq0.4,lcore16@wq0.5,lcore17@wq0.6,lcore18@wq0.7] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with inorder mergeable path:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=1,packed_vq=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets [64,1518] from packet generator, check the throughput can get expected data:: + + testpmd>show port stats all + +5. Stop vhost port, check that there are packets in both directions of RX and TX in each queue from vhost log:: + + testpmd>stop + +6. Restart vhost port and send imix packets again, then check the throuhput can get expected data:: + + testpmd>start + testpmd>show port stats all + +7. Relaunch virtio-user with mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=0,packed_vq=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +8. Relaunch virtio-user with inorder non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=1,packed_vq=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +9. Relaunch virtio-user with non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,packed_vq=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +10. Relaunch virtio-user with vector_rx path, then repeat step 4-6:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio --force-max-simd-bitwidth=512 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=0,in_order=1,queues=8,packed_vq=1,vectorized=1 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +11. Relaunch virtio-user with vector_rx path and ring size is not power of 2, then repeat step 4-6:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio --force-max-simd-bitwidth=512 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=0,in_order=1,queues=8,packed_vq=1,vectorized=1,queue_size=1025 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1025 --rxd=1025 + testpmd>set fwd mac + testpmd>start + +12. Quit all testpmd and relaunch vhost with diff channel by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=8 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@wq2.0,lcore12@wq2.1,lcore13@wq2.2,lcore14@wq2.3,lcore15@wq4.0,lcore16@wq4.1,lcore17@wq4.2,lcore18@wq4.3] + testpmd>set fwd csum + testpmd>start + +13. Rerun step 11 with csum fwd. + +Test Case 21: PVP packed ring all path multi-queues vhost async enqueue with M:1 mapping between vrings and dsa kernel driver channels +--------------------------------------------------------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test performance of packed ring in each virtio path with multi-queues +when vhost uses the asynchronous enqueue operations with dsa kernel driver and the mapping between vrings and dsa virtual channels is M:1. +Both iova as VA mode, 'mac fwd' and 'csum fwd' have been tested. + +1. Bind 1 dsa device to idxd driver and one nic port to vfio-pci like common step 1 and 3:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 2 0 + ls /dev/dsa #check wq configure success + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@wq0.0] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with inorder mergeable path:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=1,packed_vq=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets [64,1518] from packet generator, check the throughput can get expected data:: + + testpmd>show port stats all + +5. Stop vhost port, check that there are packets in both directions of RX and TX in each queue from vhost log:: + + testpmd>stop + +6. Restart vhost port and send imix packets again, then check the throuhput can get expected data:: + + testpmd>start + testpmd>show port stats all + +7. Relaunch virtio-user with mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=0,packed_vq=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +8. Relaunch virtio-user with inorder non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=1,packed_vq=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +9. Relaunch virtio-user with non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,packed_vq=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +10. Relaunch virtio-user with vector_rx path, then repeat step 4-6:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio --force-max-simd-bitwidth=512 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=0,in_order=1,queues=8,packed_vq=1,vectorized=1 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +11. Relaunch virtio-user with vector_rx path and ring size is not power of 2, then repeat step 4-6:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio --force-max-simd-bitwidth=512 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=0,in_order=1,queues=8,packed_vq=1,vectorized=1,queue_size=1025 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1025 --rxd=1025 + testpmd>set fwd mac + testpmd>start + +12. Quit all testpmd and relaunch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@wq0.1] + testpmd>set fwd csum + testpmd>start + +13. Rerun step 7 with csum fwd. + +Test Case 22: PVP packed ring all path multi-queues vhost async enqueue with 1:N mapping between vrings and dsa kernel driver channels +--------------------------------------------------------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test performance of packed ring in each virtio path with multi-queues +when vhost uses the asynchronous enqueue operations with dsa kernel driver and the mapping between vrings and dsa virtual channels is 1:N. +Both iova as VA mode, 'mac fwd' and 'csum fwd' have been tested. + +1. Bind 3 dsa device to idxd driver and one nic port to vfio-pci like common step 1 and 3:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 74:01.0 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 2 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 4 + ls /dev/dsa #check wq configure success + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=1,dmas=[txq0],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@wq0.0,lcore11@wq0.1,lcore11@wq0.2,lcore11@wq0.3,lcore11@wq0.4,lcore11@wq0.5,lcore11@wq0.6,lcore11@wq0.7] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with inorder mergeable path:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=1,packed_vq=1,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets [64,1518] from packet generator, check the throughput can get expected data:: + + testpmd>show port stats all + +5. Stop vhost port, check that there are packets in both directions of RX and TX in each queue from vhost log:: + + testpmd>stop + +6. Restart vhost port and send imix packets again, then check the throuhput can get expected data:: + + testpmd>start + testpmd>show port stats all + +7. Relaunch virtio-user with mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=0,packed_vq=1,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +8. Relaunch virtio-user with inorder non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=1,packed_vq=1,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +9. Relaunch virtio-user with non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,packed_vq=1,queues=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +10. Relaunch virtio-user with vector_rx path, then repeat step 4-6:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio --force-max-simd-bitwidth=512 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=0,in_order=0,queues=1,packed_vq=1,vectorized=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +11. Relaunch virtio-user with vector_rx path and ring size is not power of 2, then repeat step 4-6:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio --force-max-simd-bitwidth=512 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=0,in_order=0,queues=1,packed_vq=1,vectorized=1,queue_size=1025 \ + -- -i --nb-cores=1 --txd=1025 --rxd=1025 + testpmd>set fwd mac + testpmd>start + +12. Quit all testpmd and relaunch vhost with diff channel by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@wq2.0,lcore11@wq2.1,lcore11@wq2.2,lcore11@wq2.3,lcore11@wq4.4,lcore11@wq4.5,lcore11@wq4.6,lcore11@wq4.7] + testpmd>set fwd csum + testpmd>start + +13. Rerun step 8 with csum fwd. + +Test Case 23: PVP packed ring all path multi-queues vhost async enqueue with M:N mapping between vrings and dsa kernel driver channels +--------------------------------------------------------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test performance of packed ring in each virtio path with multi-queues +when vhost uses the asynchronous enqueue operations with dsa kernel driver and the mapping between vrings and dsa virtual channels is M:N. +Both iova as VA mode, 'mac fwd' and 'csum fwd' have been tested. + +1. Bind 8 dsa device to idxd driver and one nic port to vfio-pci like common step 1 and 3:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 2 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 4 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 6 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 8 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 10 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 12 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 14 + ls /dev/dsa #check wq configure success + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@wq0.0,lcore11@wq0.1,lcore11@wq0.2,lcore11@wq0.3,lcore11@wq0.4,lcore11@wq0.5,lcore11@wq0.6,lcore11@wq0.7] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with inorder mergeable path:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=1,packed_vq=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets [64,1518] from packet generator, check the throughput can get expected data:: + + testpmd>show port stats all + +5. Stop vhost port, check that there are packets in both directions of RX and TX in each queue from vhost log:: + + testpmd>stop + +6. Restart vhost port and send imix packets again, then check the throuhput can get expected data:: + + testpmd>start + testpmd>show port stats all + +7. Relaunch virtio-user with mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=0,packed_vq=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +8. Relaunch virtio-user with inorder non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=1,packed_vq=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +9. Relaunch virtio-user with non-mergeable path, then repeat step 4-6:: + + # ./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=/tmp/s0,mrg_rxbuf=0,in_order=0,packed_vq=1,queues=8 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +10. Relaunch virtio-user with vector_rx path, then repeat step 4-6:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio --force-max-simd-bitwidth=512 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=0,in_order=0,queues=8,packed_vq=1,vectorized=1 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +11. Relaunch virtio-user with vector_rx path and ring size is not power of 2, then repeat step 4-6:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci --file-prefix=virtio --force-max-simd-bitwidth=512 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=0,in_order=0,queues=8,packed_vq=1,vectorized=1,queue_size=1025 \ + -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1025 --rxd=1025 + testpmd>set fwd mac + testpmd>start + +12. Quit all testpmd and relaunch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@wq0.0,lcore11@wq0.1,lcore11@wq0.2,lcore11@wq0.3,lcore11@wq0.4,lcore11@wq0.5,lcore11@wq0.6,lcore11@wq0.7] + testpmd>set fwd mac + testpmd>start + +13. Rerun step 3-6. + +14. Quit all testpmd and relaunch vhost with diff channel by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 \ + --lcore-dma=[lcore11@wq0.0,lcore11@wq2.1,lcore11@wq4.2,lcore11@wq6.3,lcore11@wq8.4,lcore11@wq10.5,lcore11@wq12.6,lcore11@wq14.7] + testpmd>set fwd csum + testpmd>start + +15. Rerun step 3-6 with csum fwd. + +Test Case 24: PVP packed ring dynamic queues vhost async operation with dsa kernel driver channels +--------------------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test performance of packed ring when vhost uses the asynchronous enqueue +operations with dsa kernel driver and if the vhost-user can work well when the queue number dynamic change. + +1. Bind 8 dsa device to idxd driver and 1 NIC port to vfio-pci like common step 1 and 3:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 2 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 4 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 6 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 8 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 10 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 12 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 14 + ls /dev/dsa #check wq configure success + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 --txq=2 --rxq=2 + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=1,in_order=1,packed_vq=1,queues=8,server=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 --txq=8 --rxq=8 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets[64,1518] from packet generator with random ip, check perforamnce can get target. + +5. Stop vhost port, check vhost RX and TX direction both exist packtes in 2 queues from vhost log. + +6. Quit and relaunch vhost with 1:1 mapping between vrings and dsa virtual channels:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -a 0000:4f:00.1 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3]' \ + --iova=va -- -i --nb-cores=8 --txd=1024 --rxd=1024 --txq=4 --rxq=4 \ + --lcore-dma=[lcore11@wq0.0,lcore12@wq2.1,lcore13@wq4.2,lcore14@wq6.3] + testpmd>set fwd mac + testpmd>start + +7. Rerun step 3. + +8. Stop vhost port, check vhost RX and TX direction both exist packtes in 4 queues from vhost log. + +9. Quit and relaunch vhost with M:N(1:N;M# ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -a 0000:4f:00.1 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq6;txq7]' \ + --iova=va -- -i --nb-cores=5 --txd=1024 --rxd=1024 --txq=8 --rxq=8 \ + --lcore-dma=[lcore11@wq0.0,lcore11@wq0.7,lcore12@wq0.1,lcore12@wq0.2,lcore12@wq0.3,lcore13@wq0.2,lcore13@wq0.3,lcore13@wq0.4,lcore14@wq0.2,lcore14@wq0.3,lcore14@wq0.4,lcore14@wq0.5,lcore15@wq0.0,lcore15@wq0.1,lcore15@wq0.2,lcore15@wq0.3,lcore15@wq0.4,lcore15@wq0.5,lcore15@wq0.6,lcore15@wq0.7] + testpmd>set fwd mac + testpmd>start + +10. Rerun step 3. + +11. Stop vhost port, check vhost RX and TX direction both exist packtes in 8 queues from vhost log. + +12. Quit and relaunch vhost with diff M:N(1:N;M# ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -a 0000:4f:00.1 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq6;txq7]' \ + --iova=va -- -i --nb-cores=5 --txd=1024 --rxd=1024 --txq=8 --rxq=8 \ + --lcore-dma=[lcore11@wq0.0,lcore11@wq14.7,lcore12@wq2.1,lcore12@wq4.2,lcore12@wq6.3,lcore13@wq4.2,lcore13@wq6.3,lcore13@wq8.4,lcore14@wq4.2,lcore14@wq6.3,lcore14@wq8.4,lcore14@wq10.5,lcore15@wq0.0,lcore15@wq2.1,lcore15@wq4.2,lcore15@wq6.3,lcore15@wq8.4,lcore15@wq10.5,lcore15@wq12.6,lcore15@wq14.7] + testpmd>set fwd mac + testpmd>start + +13. rerun step 10-11. + +14. Quit and relaunch vhost with diff M:N(M:1;M>N) mapping between vrings and dsa virtual channels:::: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -a 0000:4f:00.1 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=5 --txd=1024 --rxd=1024 --txq=8 --rxq=8 \ + --lcore-dma=[lcore11@wq0.0,lcore12@wq0.0,lcore13@wq0.1,lcore13@wq0.2,lcore14@wq0.1,lcore14@wq0.2,lcore15@wq0.1,lcore15@wq0.2] + testpmd>set fwd mac + testpmd>start + +15. Rerun step 10-11. + +16. Quit and relaunch vhost with diff M:N(M:1;M>N) mapping between vrings and dsa virtual channels:::: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 10-18 -a 0000:4f:00.1 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=5 --txd=1024 --rxd=1024 --txq=8 --rxq=8 \ + --lcore-dma=[lcore11@wq0.0,lcore12@wq0.0,lcore13@wq2.1,lcore13@wq4.2,lcore14@wq2.1,lcore14@wq4.2,lcore15@wq2.1,lcore15@wq4.2] + testpmd>set fwd mac + testpmd>start + +17. Rerun step 10-11. + +Test Case 25: PVP split and packed ring dynamic queues vhost async operation with dsa dpdk and kernel driver channels +----------------------------------------------------------------------------------------------------------------------- +This case uses testpmd and Traffic Generator(For example, Trex) to test split ring and packed ring when vhost uses the asynchronous enqueue +operations with both dsa dpdk driver and dsa kernel driver and if the vhost-user can work well when the queue number dynamic change. +Both iova as VA mode have beed tested. + +1. Bind 2 dsa device to idxd driver, 2 dsa device and 1 NIC port to vfio-pci like common step 1-3:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 e7:01.0 ec:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 + # ./usertools/dpdk-devbind.py -b vfio-pci e7:01.0 ec:01.0 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 2 0 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 4 2 + ls /dev/dsa #check wq configure success + +2. Launch vhost:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --file-prefix=vhost -a 0000:4f:00.1 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 --txq=2 --rxq=2 --lcore-dma=[lcore3@wq0.0,lcore3@wq2.0] + testpmd>set fwd mac + testpmd>start + +3. Launch virtio-user with split ring mergeable in-order path by below command:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=1,queues=8,server=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 --txq=8 --rxq=8 + testpmd>set fwd mac + testpmd>start + +4. Send imix packets from packet generator with random ip, check perforamnce can get target. + +5. Stop vhost port, check vhost RX and TX direction both exist packtes in 2 queues from vhost log. + +6. Quit and relaunch vhost as below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:e7:01.0,max_queues=2 -a 0000:ec:01.0,max_queues=4 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=4,client=1,dmas=[txq0;txq1;txq2;txq3]' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 --txq=4 --rxq=4 --lcore-dma=[lcore3@0000:e7:01.0-q0,lcore3@0000:e7:01.0-q1,lcore3@0000:ec:01.0-q2,lcore3@0000:ec:01.0-q3] + testpmd>set fwd mac + testpmd>start + +7. Send imix packets from packet generator with random ip, check perforamnce can get target. + +8. Stop vhost port, check vhost RX and TX direction both exist packtes in 4 queues from vhost log. + +9. Quit and relaunch vhost as below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:e7:01.0,max_queues=2 -a 0000:ec:01.0,max_queues=4 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5]' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 --txq=8 --rxq=8 --lcore-dma=[lcore3@wq0.0,lcore3@wq2.0,lcore3@wq2.2,lcore3@0000:e7:01.0-q0,lcore3@0000:e7:01.0-q1,lcore3@0000:ec:01.0-q3] + testpmd>set fwd mac + testpmd>start + +10. Send imix packets from packet generator with random ip, check perforamnce can get target. + +11. Stop vhost port, check vhost RX and TX direction both exist packtes in 8 queues from vhost log. + +12. Quit and relaunch vhost with diff cahnnels as below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --file-prefix=vhost -a 0000:4f:00.1 -a 0000:e7:01.0,max_queues=2 -a 0000:ec:01.0,max_queues=4 \ + --vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=1 --txd=1024 --rxd=1024 --txq=8 --rxq=8 --lcore-dma=[lcore3@wq0.0,lcore3@wq0.1,lcore3@wq2.1,lcore3@wq2.0,lcore3@0000:e7:01.0-q1,lcore3@0000:ec:01.0-q3] + testpmd>set fwd mac + testpmd>start + +13. Send imix packets from packet generator with random ip, check perforamnce can get target. + +14. Stop vhost port, check vhost RX and TX direction both exist packtes in 8 queues from vhost log. + +15. Quit and relaunch virtio-user with packed ring mergeable in-order path by below command:: + + # ./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=/tmp/s0,mrg_rxbuf=1,in_order=1,packed_vq=1,queues=8,server=1 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 --txq=8 --rxq=8 + testpmd>set fwd mac + testpmd>start + +16. Rerun steps 10-11. \ No newline at end of file From patchwork Sat May 7 09:59:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 110835 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 F0F50A050A; Sat, 7 May 2022 12:00:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E922440696; Sat, 7 May 2022 12:00:09 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 623EA40395 for ; Sat, 7 May 2022 12:00:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651917607; x=1683453607; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Gr5SrHnEEUEceGWrxQvTrda6FJuUZErDTK1lVUn+9tk=; b=PHNdzXKR+6gdOZnhlZFPkdkf9Fs7r1ETyfzRZ/cE3M4iUpItHzF7WvNs 1iGs7NdUCTHTjpQwqhFvchS2HHA2tnDQgzrt0lIkhKx9zqPkdkJOwRbfY gkinO3yUSgZULunqMMUU/nNyO8S6NIYmCvDptAOk1mQLKwY0gheTrkWXO Wt63w0N2QRyObVPsboCa5ForxTMXdTT6+ac/hiO464GASSBkBz4uaFrjT OM8RYpXulF8793GCTYVZ6PbqmjiIWQXKSIaJlPgvpYs9/vF5XrCuj1QIY fRcH43+iGJZ0bwVQUEq2mfexyGa6VfqMFeJ14F/zeaU9vpPX46Ml0NPMF Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10339"; a="268828757" X-IronPort-AV: E=Sophos;i="5.91,206,1647327600"; d="scan'208";a="268828757" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2022 03:00:06 -0700 X-IronPort-AV: E=Sophos;i="5.91,206,1647327600"; d="scan'208";a="736138753" Received: from unknown (HELO localhost.localdomain) ([10.239.251.222]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2022 03:00:03 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V1 5/7] test_plans/vm2vm_virtio_net_dsa_test_plan: add vm2vm_virtio_net_dsa testplan Date: Sat, 7 May 2022 05:59:39 -0400 Message-Id: <20220507095939.311120-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 Add vm2vm_virtio_net_dsa_test_plan.rst into test_plans. Signed-off-by: Wei Ling --- test_plans/vm2vm_virtio_net_dsa_test_plan.rst | 1388 +++++++++++++++++ 1 file changed, 1388 insertions(+) create mode 100644 test_plans/vm2vm_virtio_net_dsa_test_plan.rst diff --git a/test_plans/vm2vm_virtio_net_dsa_test_plan.rst b/test_plans/vm2vm_virtio_net_dsa_test_plan.rst new file mode 100644 index 00000000..9906714b --- /dev/null +++ b/test_plans/vm2vm_virtio_net_dsa_test_plan.rst @@ -0,0 +1,1388 @@ +.. Copyright (c) <2022>, Intel Corporation + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + - Neither the name of Intel Corporation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + +====================================================== +VM2VM vhost-user/virtio-net with DSA driver 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.Vhost enqueue operation with CBDMA channels is supported +in both split and packed ring. + +This document provides the test plan for testing the following features when Vhost-user using asynchronous data path with +DSA driver (kernel IDXD driver and DPDK vfio-pci driver) in VM2VM virtio-net topology. +1. check Vhost tx offload function by verifing the TSO/cksum in the TCP/IP stack with vm2vm split ring and packed ring +vhost-user/virtio-net mergeable path. +2.Check the payload of large packet (larger than 1MB) is valid after forwarding packets with vm2vm split ring +and packed ring vhost-user/virtio-net mergeable and non-mergeable path. +3. Multi-queues number dynamic change in vm2vm vhost-user/virtio-net with split ring and packed ring. + +IOMMU impact: +If iommu off, idxd can work with iova=pa +If iommu on, kernel dsa driver only can work with iova=va by program IOMMU, can't use iova=pa(fwd not work due to pkts payload wrong). + +Note: +1.For packed virtqueue virtio-net test, need qemu version > 4.2.0 and VM kernel version > v5.1, and packed ring multi-queues not support reconnect in qemu yet. +2.For split virtqueue virtio-net with multi-queues server mode test, need qemu version >= 5.2.0, dut to old qemu exist reconnect issue when multi-queues test. +3.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. +4.DPDK local patch that about vhost pmd is needed when testing Vhost asynchronous data path with testpmd, and the suite has not yet been automated. + +Prerequisites +============= + +Topology +-------- + Test flow: Virtio-net <-> Vhost-user <-> Testpmd <-> Vhost-user <-> Virtio-net + +Software +-------- + iperf + qemu: https://download.qemu.org/qemu-6.2.0.tar.xz + +General set up +-------------- +1. Compile DPDK:: + + # CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib -Dexamples=all --default-library= + # ninja -C -j 110 + For example, + CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib -Dexamples=all --default-library=x86_64-native-linuxapp-gcc + ninja -C x86_64-native-linuxapp-gcc -j 110 + +2. Get the PCI device ID and DSA device ID of DUT, for example, 0000:4f:00.1 is PCI device ID, 0000:6a:01.0 - 0000:f6:01.0 are DSA device IDs:: + + # ./usertools/dpdk-devbind.py -s + + Network devices using kernel driver + =================================== + 0000:4f:00.1 'Ethernet Controller E810-C for QSFP 1592' drv=ice unused=vfio-pci + + DMA devices using kernel driver + =============================== + 0000:6a:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:6f:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:74:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:79:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:e7:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:ec:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:f1:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:f6:01.0 'Device 0b25' drv=idxd unused=vfio-pci + +Test case +========= + +Common steps +------------ +1. Bind DSA devices to DPDK vfio-pci driver:: + + # ./usertools/dpdk-devbind.py -b vfio-pci + + For example, bind 2 DMA devices to vfio-pci driver: + # ./usertools/dpdk-devbind.py -b vfio-pci 0000:e7:01.0 0000:ec:01.0 + +.. note:: + + One DPDK DSA device can create 8 WQ at most. Below is an example, where DPDK DSA device will create one and + eight WQ for DSA deivce 0000:e7:01.0 and 0000:ec:01.0. The value of “max_queues” is 1~8: + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 4 -n 4 -a 0000:e7:01.0,max_queues=1 -- -i + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 4 -n 4 -a 0000:ec:01.0,max_queues=8 -- -i + +2. Bind DSA devices to kernel idxd driver, and configure Work Queue (WQ):: + + # ./usertools/dpdk-devbind.py -b idxd + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q + +.. note:: + + Better to reset WQ when need operate DSA devices that bound to idxd drvier: + # ./drivers/dma/idxd/dpdk_idxd_cfg.py --reset + You can check it by 'ls /dev/dsa' + numDevices: number of devices, where 0<=numDevices<=7, corresponding to 0000:6a:01.0 - 0000:f6:01.0 + numWq: Number of workqueues per DSA endpoint, where 1<=numWq<=8 + + For example, bind 2 DMA devices to idxd driver and configure WQ: + + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 1 0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 4 2 + Check WQ by 'ls /dev/dsa' and can find "wq0.0 wq2.0 wq2.1 wq2.2 wq2.3" + +Test Case 1: VM2VM vhost-user/virtio-net split ring test TSO with dsa dpdk driver +----------------------------------------------------------------------------------- +This case test the function of Vhost tx offload in the topology of vhost-user/virtio-net split ring mergeable path +by verifing the TSO/cksum in the TCP/IP stack when vhost uses the asynchronous enqueue operations with dsa dpdk driver. + +1. Bind 1 dsa device to vfio-pci like common step 1:: + + # ./usertools/dpdk-devbind.py -b vfio-pci e7:01.0 + +2. Launch the Vhost testpmd by below commands:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost -a 0000:e7:01.0,max_queues=2 \ + --vdev 'net_vhost0,iface=vhost-net0,queues=1,dmas=[txq0]' \ + --vdev 'net_vhost1,iface=vhost-net1,queues=1,dmas=[txq0]' \ + --iova=va -- -i --nb-cores=2 --txd=1024 --rxd=1024 --rxq=1 --txq=1 --lcore-dma=[lcore2@0000:e7:01.0-q0,lcore3@0000:e7:01.0-q1] + testpmd>start + +3. Launch VM1 and VM2 with split ring mergeable path and tso on:: + + # taskset -c 7 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G0,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm1_qga0.sock,server,nowait,id=vm1_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm1_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm1_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=./vhost-net0 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=false,mrg_rxbuf=off,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on -vnc :10 + + # taskset -c 8 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G1,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=./vhost-net1 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=off,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on -vnc :12 + +4. On VM1, set virtio device IP and run arp protocal:: + + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +5. On VM2, set virtio device IP and run arp protocal:: + + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +6. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +7. Check that 2VMs can receive and send big packets to each other through vhost log. Port 0 should have tx packets above 1522, Port 1 should have rx packets above 1522:: + + testpmd>show port xstats all + +Test Case 2: VM2VM vhost-user/virtio-net split ring mergeable path 8 queues test with large packet payload with dsa dpdk driver +--------------------------------------------------------------------------------------------------------------------------------- +This case uses iperf and scp to test the payload of large packet (larger than 1MB) is valid after packets forwarding in +vm2vm vhost-user/virtio-net split ring mergeable path when vhost uses the asynchronous enqueue operations with dsa dpdk driver. +The dynamic change of multi-queues number, iova as VA and PA mode also test. + +1. Bind 4 dsa device to vfio-pci like common step 1:: + + # ./usertools/dpdk-devbind.py -b vfio-pci e7:01.0 ec:01.0 f1:01.0 f6:01.1 + +2. Launch the Vhost testpmd by below commands:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost -a 0000:e7:01.0,max_queues=8 -a 0000:ec:01.0,max_queues=8 \ + --vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7]' \ + --vdev 'net_vhost1,iface=vhost-net1,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8 --lcore-dma=[lcore2@0000:e7:01.0-q0,lcore2@0000:e7:01.0-q1,lcore2@0000:e7:01.0-q2,lcore2@0000:e7:01.0-q3,lcore2@0000:e7:01.0-q4,lcore2@0000:e7:01.0-q5,lcore3@0000:e7:01.0-q6,lcore3@0000:e7:01.0-q7,lcore4@0000:ec:01.0-q0,lcore4@0000:ec:01.0-q1,lcore4@0000:ec:01.0-q2,lcore4@0000:ec:01.0-q3,lcore4@0000:ec:01.0-q4,lcore4@0000:ec:01.0-q5,lcore4@0000:ec:01.0-q6,lcore5@0000:ec:01.0-q7] + testpmd>start + +3. Launch VM1 and VM2 using qemu 6.2.0:: + + # taskset -c 7 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G0,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=./vhost-net0,server \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=8 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=false,mrg_rxbuf=on,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on -vnc :10 + + # taskset -c 8 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G1,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=./vhost-net1,server \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=8 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=on,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on -vnc :12 + +4. On VM1, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 8 + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +5. On VM2, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 8 + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +6. Scp 1MB file form VM1 to VM2:: + + # scp root@1.1.1.8:/ + +7. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +8. Quit and relaunch vhost w/ diff dsa channels:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost -a 0000:f1:01.0,max_queues=8 -a 0000:f6:01.0,max_queues=8 \ + --vdev 'net_vhost0,iface=vhost-net0,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=8,dmas=[txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8 --lcore-dma=[lcore2@0000:f1:01.0-q0,lcore2@0000:f1:01.0-q1,lcore2@0000:f1:01.0-q2,lcore2@0000:f1:01.0-q3,lcore3@0000:f1:01.0-q0,lcore3@0000:f1:01.0-q2,lcore3@0000:f1:01.0-q4,lcore3@0000:f1:01.0-q5,lcore3@0000:f1:01.0-q6,lcore3@0000:f1:01.0-q7,lcore4@0000:f1:01.0-q1,lcore4@0000:f1:01.0-q3,lcore4@0000:f6:01.0-q0,lcore4@0000:f6:01.0-q1,lcore4@0000:f6:01.0-q2,lcore4@0000:f6:01.0-q3,lcore4@0000:f6:01.0-q4,lcore4@0000:f6:01.0-q5,lcore4@0000:f6:01.0-q6,lcore5@0000:f6:01.0-q7] + testpmd>start + +9. Rerun step 6-7. + +10. Quit and relaunch vhost w/ iova=pa:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost -a 0000:e7:01.0,max_queues=8 -a 0000:ec:01.0,max_queues=8 \ + --vdev 'net_vhost0,iface=vhost-net0,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=8,dmas=[txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=pa -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8 --lcore-dma=[lcore2@0000:e7:01.0-q0,lcore2@0000:e7:01.0-q1,lcore2@0000:e7:01.0-q2,lcore2@0000:e7:01.0-q3,lcore3@0000:e7:01.0-q0,lcore3@0000:e7:01.0-q2,lcore3@0000:e7:01.0-q4,lcore3@0000:e7:01.0-q5,lcore3@0000:e7:01.0-q6,lcore3@0000:e7:01.0-q7,lcore4@0000:e7:01.0-q1,lcore4@0000:e7:01.0-q3,lcore4@0000:ec:01.0-q0,lcore4@0000:ec:01.0-q1,lcore4@0000:ec:01.0-q2,lcore4@0000:ec:01.0-q3,lcore4@0000:ec:01.0-q4,lcore4@0000:ec:01.0-q5,lcore4@0000:ec:01.0-q6,lcore5@0000:ec:01.0-q7] + testpmd>start + +11. Rerun step 6-7. + +12. Quit vhost ports and relaunch vhost ports w/o dsa channels:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net0,client=1,queues=8' \ + --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=8' -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=4 --txq=4 + testpmd>start + +13. On VM1, set virtio device:: + + # ethtool -L ens5 combined 4 + +14. On VM2, set virtio device:: + + # ethtool -L ens5 combined 4 + +15. Rerun step 6-7. + +16. Quit vhost ports and relaunch vhost ports with 1 queues:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net0,client=1,queues=4' \ + --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=4' -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=1 --txq=1 + testpmd>start + +17. On VM1, set virtio device:: + + # ethtool -L ens5 combined 1 + +18. On VM2, set virtio device:: + + # ethtool -L ens5 combined 1 + +19. Rerun step 6-7. + +Test Case 3: VM2VM vhost-user/virtio-net split ring non-mergeable path 8 queues test with large packet payload with dsa dpdk driver +------------------------------------------------------------------------------------------------------------------------------------ +This case uses iperf and scp to test the payload of large packet (larger than 1MB) is valid after packets forwarding in +vm2vm vhost-user/virtio-net split ring non-mergeable path when vhost uses the asynchronous enqueue operations with dsa dpdk driver. +The dynamic change of multi-queues number also test. + +1. Bind 2 dsa device to vfio-pci like common step 1:: + + # ./usertools/dpdk-devbind.py -b vfio-pci e7:01.0 ec:01.0 + +2. Launch the Vhost sample by below commands:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost -a 0000:e7:01.0,max_queues=8 -a 0000:ec:01.0,max_queues=8 \ + --vdev 'net_vhost0,iface=vhost-net0,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7]' \ + --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8 --lcore-dma=[lcore2@0000:e7:01.0-q0,lcore2@0000:e7:01.0-q1,lcore2@0000:e7:01.0-q2,lcore2@0000:e7:01.0-q3,lcore2@0000:e7:01.0-q4,lcore2@0000:e7:01.0-q5,lcore3@0000:e7:01.0-q6,lcore3@0000:e7:01.0-q7,lcore4@0000:ec:01.0-q0,lcore4@0000:ec:01.0-q1,lcore4@0000:ec:01.0-q2,lcore4@0000:ec:01.0-q3,lcore4@0000:ec:01.0-q4,lcore4@0000:ec:01.0-q5,lcore4@0000:ec:01.0-q6,lcore5@0000:ec:01.0-q7] + testpmd>start + +3. Launch VM1 and VM2:: + + # taskset -c 7 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G0,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm1_qga0.sock,server,nowait,id=vm1_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm1_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm1_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=./vhost-net0,server \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=8 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=false,mrg_rxbuf=off,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on -vnc :10 + + # taskset -c 8 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G1,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=./vhost-net1,server \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=8 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=off,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on -vnc :12 + +4. On VM1, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 8 + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +5. On VM2, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 8 + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +6. Scp 1MB file form VM1 to VM2:: + + # scp root@1.1.1.8:/ + +7. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +8. Quit vhost ports and relaunch vhost ports w/o dsa channels:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net0,client=1,queues=8' \ + --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=8' -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8 + testpmd>start + +9. Rerun step 6-7. + +10. Quit vhost ports and relaunch vhost ports with 1 queues:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net0,client=1,queues=8' \ + --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=8' -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=1 --txq=1 + testpmd>start + +11. On VM1, set virtio device:: + + # ethtool -L ens5 combined 1 + +12. On VM2, set virtio device:: + + # ethtool -L ens5 combined 1 + +13. Rerun step 6-7. + +Test Case 4: VM2VM vhost-user/virtio-net packed ring test TSO with dsa dpdk driver +----------------------------------------------------------------------------------- +This case test the function of Vhost tx offload in the topology of vhost-user/virtio-net packed ring mergeable path +by verifing the TSO/cksum in the TCP/IP stack when vhost uses the asynchronous enqueue operations with dsa dpdk driver. + +1. Bind 2 dsa device to vfio-pci like common step 1:: + + # ./usertools/dpdk-devbind.py -b vfio-pci e7:01.0 ec:01.0 + +2. Launch the Vhost sample by below commands:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 2-4 -n 4 --file-prefix=vhost -a 0000:e7:01.0,max_queues=1 -a 0000:ec:01.0,max_queues=1 \ + --vdev 'net_vhost0,iface=vhost-net0,queues=1,dmas=[txq0]' \ + --vdev 'net_vhost1,iface=vhost-net1,queues=1,dmas=[txq0]' \ + --iova=va -- -i --nb-cores=2 --txd=1024 --rxd=1024 --lcore-dma=[lcore3@0000:e7:01.0-q0,lcore4@0000:ec:01.0-q0] + testpmd>start + +3. Launch VM1 and VM2 with qemu:: + + # taskset -c 7 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 1 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G0,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm1_qga0.sock,server,nowait,id=vm1_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm1_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm1_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=./vhost-net0 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=false,mrg_rxbuf=on,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,packed=on -vnc :10 + + # taskset -c 8 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 1 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G1,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=./vhost-net1 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=on,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,packed=on -vnc :12 + +4. On VM1, set virtio device IP and run arp protocal:: + + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +5. On VM2, set virtio device IP and run arp protocal:: + + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +6. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +7. Check that 2VMs can receive and send big packets to each other through vhost log. Port 0 should have tx packets above 1522, Port 1 should have rx packets above 1522:: + + testpmd>show port xstats all + +Test Case 5: VM2VM vhost-user/virtio-net packed ring mergeable path 8 queues test with large packet payload with dsa dpdk driver +--------------------------------------------------------------------------------------------------------------------------------- +This case uses iperf and scp to test the payload of large packet (larger than 1MB) is valid after packets forwarding in +vm2vm vhost-user/virtio-net packed ring mergeable path when vhost uses the asynchronous enqueue operations with dsa dpdk driver. +The dynamic change of multi-queues number also test. + +1. Bind 8 dsa device to vfio-pci like common step 1:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + +2. Launch the Vhost sample by below commands:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost -a 0000:6a:01.0 -a 0000:6f:01.0 -a 0000:74:01.0 -a 0000:79:01.0 -a 0000:e7:01.0 -a 0000:ec:01.0 -a 0000:f1:01.0 -a 0000:f6:01.0 \ + --vdev 'net_vhost0,iface=vhost-net0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --vdev 'net_vhost1,iface=vhost-net1,queues=8,dmas=[txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8 \ + --lcore-dma=[lcore2@0000:6a:01.0-q0,lcore2@0000:6f:01.0-q1,lcore2@0000:74:01.0-q2,lcore2@0000:79:01.0-q3,lcore3@0000:6a:01.0-q0,lcore3@0000:74:01.0-q2,lcore3@0000:e7:01.0-q4,lcore3@0000:ec:01.0-q5,lcore3@0000:f1:01.0-q6,lcore3@0000:f6:01.0-q7,lcore4@0000:6f:01.0-q1,lcore4@0000:79:01.0-q3,lcore4@0000:6a:01.0-q1,lcore4@0000:6f:01.0-q2,lcore4@0000:74:01.0-q3,lcore4@0000:79:01.0-q4,lcore4@0000:e7:01.0-q5,lcore4@0000:ec:01.0-q6,lcore4@0000:f1:01.0-q7,lcore5@0000:f6:01.0-q0] + testpmd>start + +3. Launch VM1 and VM2 with qemu:: + + # taskset -c 7 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G0,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm1_qga0.sock,server,nowait,id=vm1_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm1_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm1_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=./vhost-net0 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=8 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=false,mrg_rxbuf=on,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on,packed=on -vnc :10 + + # taskset -c 8 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G1,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=./vhost-net1 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=8 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=on,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on,packed=on -vnc :12 + +4. On VM1, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 8 + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +5. On VM2, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 8 + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +6. Scp 1MB file form VM1 to VM2:: + + : scp root@1.1.1.8:/ + +7. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +8. Rerun step 6-7 five times. + +Test Case 6: VM2VM vhost-user/virtio-net packed ring non-mergeable path 8 queues test with large packet payload with dsa dpdk driver +------------------------------------------------------------------------------------------------------------------------------------- +This case uses iperf and scp to test the payload of large packet (larger than 1MB) is valid after packets forwarding in +vm2vm vhost-user/virtio-net packed ring non-mergeable path when vhost uses the asynchronous enqueue operations with dsa dpdk driver. +The dynamic change of multi-queues number also test. + +1. Bind 8 dsa device to vfio-pci like common step 1:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + +2. Launch the Vhost sample by below commands:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost -a 0000:6a:01.0 -a 0000:6f:01.0 -a 0000:74:01.0 -a 0000:79:01.0 -a 0000:e7:01.0 -a 0000:ec:01.0 -a 0000:f1:01.0 -a 0000:f6:01.0 \ + --vdev 'net_vhost0,iface=vhost-net0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7]' \ + --vdev 'net_vhost1,iface=vhost-net1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8 --lcore-dma=[lcore2@0000:6a:01.0-q0,lcore2@0000:6f:01.0-q1,lcore2@0000:74:01.0-q2,lcore2@0000:79:01.0-q3,lcore2@0000:e7:01.0-q4,lcore2@0000:ec:01.0-q5,lcore3@0000:f1:01.0-q6,lcore3@0000:f6:01.0-q7,lcore4@0000:6a:01.0-q1,lcore4@0000:6f:01.0-q2,lcore4@0000:74:01.0-q3,lcore4@0000:79:01.0-q4,lcore4@0000:e7:01.0-q5,lcore4@0000:ec:01.0-q6,lcore4@0000:f1:01.0-q7,lcore5@0000:f6:01.0-q0] + testpmd>start + +3. Launch VM1 and VM2 with qemu:: + + # taskset -c 7 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G0,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm1_qga0.sock,server,nowait,id=vm1_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm1_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm1_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=./vhost-net0 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=8 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=false,mrg_rxbuf=off,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on,packed=on -vnc :10 + + # taskset -c 8 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G1,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=./vhost-net1 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=8 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=off,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on,packed=on -vnc :12 + +4. On VM1, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 8 + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +5. On VM2, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 8 + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +6. Scp 1MB file form VM1 to VM2:: + + # scp root@1.1.1.8:/ + +7. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +8. Rerun step 6-7 five times. + +Test Case 7: VM2VM vhost-user/virtio-net packed ring test TSO with dsa dpdk driver and pa mode +----------------------------------------------------------------------------------------------- +This case test the function of Vhost tx offload in the topology of vhost-user/virtio-net packed ring mergeable path +by verifing the TSO/cksum in the TCP/IP stack when vhost uses the asynchronous enqueue operations with dsa dpdk driver and iova as PA mode. + +1. Bind 2 dsa device to vfio-pci like common step 1:: + + # ./usertools/dpdk-devbind.py -b vfio-pci e7:01.0 ec:01.0 + +2. Launch the Vhost sample with PA mode by below commands:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 2-4 -n 4 --file-prefix=vhost -a 0000:e7:01.0 -a 0000:ec:01.0 \ + --vdev 'net_vhost0,iface=vhost-net0,queues=1,dmas=[txq0]' \ + --vdev 'net_vhost1,iface=vhost-net1,queues=1,dmas=[txq0]' \ + --iova=pa -- -i --nb-cores=2 --txd=1024 --rxd=1024 --lcore-dma=[lcore3@0000:e7:01.0-q0,lcore4@0000:ec:01.0-q0] + testpmd>start + +3. Launch VM1 and VM2 with qemu:: + + # taskset -c 7 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 1 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G0,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm1_qga0.sock,server,nowait,id=vm1_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm1_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm1_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=./vhost-net0 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=false,mrg_rxbuf=on,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,packed=on -vnc :10 + + # taskset -c 8 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 1 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G1,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=./vhost-net1 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=on,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,packed=on -vnc :12 + +4. On VM1, set virtio device IP and run arp protocal:: + + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +5. On VM2, set virtio device IP and run arp protocal:: + + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +6. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +7. Check that 2VMs can receive and send big packets to each other through vhost log. Port 0 should have tx packets above 1522, Port 1 should have rx packets above 1522:: + + testpmd>show port xstats all + +Test Case 8: VM2VM vhost-user/virtio-net packed ring mergeable path 8 queues test with large packet payload with dsa dpdk driver and pa mode +--------------------------------------------------------------------------------------------------------------------------------------------- +This case uses iperf and scp to test the payload of large packet (larger than 1MB) is valid after packets forwarding in +vm2vm vhost-user/virtio-net packed ring mergeable path when vhost uses the asynchronous enqueue operations with dsa dpdk driver +and iova as PA mode. The dynamic change of multi-queues number also test. + +1. Bind 8 dsa device to vfio-pci like common step 1:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + +2. Launch the Vhost sample by below commands:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost -a 0000:6a:01.0 -a 0000:6f:01.0 -a 0000:74:01.0 -a 0000:79:01.0 -a 0000:e7:01.0 -a 0000:ec:01.0 -a 0000:f1:01.0 -a 0000:f6:01.0 \ + --vdev 'net_vhost0,iface=vhost-net0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --vdev 'net_vhost1,iface=vhost-net1,queues=8,dmas=[txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=pa -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8 --lcore-dma=[lcore2@0000:6a:01.0-q0,lcore2@0000:6f:01.0-q1,lcore2@0000:74:01.0-q2,lcore2@0000:79:01.0-q3,lcore3@0000:6a:01.0-q0,lcore3@0000:74:01.0-q2,lcore3@0000:e7:01.0-q4,lcore3@0000:ec:01.0-q5,lcore3@0000:f1:01.0-q6,lcore3@0000:f6:01.0-q7,lcore4@0000:6f:01.0-q1,lcore4@0000:79:01.0-q3,lcore4@0000:6a:01.0-q1,lcore4@0000:6f:01.0-q2,lcore4@0000:74:01.0-q3,lcore4@0000:79:01.0-q4,lcore4@0000:e7:01.0-q5,lcore4@0000:ec:01.0-q6,lcore4@0000:f1:01.0-q7,lcore5@0000:f6:01.0-q0] + testpmd>start + +3. Launch VM1 and VM2 with qemu:: + + # taskset -c 7 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G0,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm1_qga0.sock,server,nowait,id=vm1_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm1_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm1_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=./vhost-net0 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=8 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=false,mrg_rxbuf=on,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on,packed=on -vnc :10 + + # taskset -c 8 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G1,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=./vhost-net1 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=8 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=on,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on,packed=on -vnc :12 + +4. On VM1, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 8 + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +5. On VM2, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 8 + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +6. Scp 1MB file form VM1 to VM2:: + + # scp root@1.1.1.8:/ + +7. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +8. Rerun step 6-7 five times. + +Test Case 9: VM2VM vhost-user/virtio-net split ring test TSO with dsa kernel driver +------------------------------------------------------------------------------------ +This case test the function of Vhost tx offload in the topology of vhost-user/virtio-net split ring mergeable path +by verifing the TSO/cksum in the TCP/IP stack when vhost uses the asynchronous enqueue operations with dsa kernel driver. + +1. Bind 1 dsa device to idxd like common step 2:: + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 4 0 + ls /dev/dsa #check wq configure success + +2. Launch the Vhost sample by below commands:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net0,queues=1,dmas=[txq0]' \ + --vdev 'net_vhost1,iface=vhost-net1,queues=1,dmas=[txq0]' \ + --iova=va -- -i --nb-cores=2 --txd=1024 --rxd=1024 --rxq=1 --txq=1 --lcore-dma=[lcore2@wq0.0,lcore2@wq0.1,lcore3@wq0.2,lcore3@wq0.3] + testpmd>start + +3. Launch VM1 and VM2 on socket 1:: + + # taskset -c 7 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G0,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm1_qga0.sock,server,nowait,id=vm1_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm1_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm1_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=./vhost-net0 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=false,mrg_rxbuf=off,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on -vnc :10 + + # taskset -c 8 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G1,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=./vhost-net1 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=off,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on -vnc :12 + +4. On VM1, set virtio device IP and run arp protocal:: + + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +5. On VM2, set virtio device IP and run arp protocal:: + + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +6. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +7. Check that 2VMs can receive and send big packets to each other through vhost log. Port 0 should have tx packets above 1522, Port 1 should have rx packets above 1522:: + + testpmd>show port xstats all + +Test Case 10: VM2VM vhost-user/virtio-net split ring mergeable path 8 queues test with large packet payload with dsa kernel driver +----------------------------------------------------------------------------------------------------------------------------------- +This case uses iperf and scp to test the payload of large packet (larger than 1MB) is valid after packets forwarding in +vm2vm vhost-user/virtio-net split ring mergeable path when vhost uses the asynchronous enqueue operations with dsa kernel driver. +The dynamic change of multi-queues number also test. + +1. Bind 2 dsa device to idxd like common step 2:: + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 2 + ls /dev/dsa #check wq configure success + +2. Launch the Vhost sample by below commands:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net0,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7]' \ + --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8 \ + --lcore-dma=[lcore2@wq0.0,lcore2@wq0.1,lcore2@wq0.2,lcore2@wq0.3,lcore2@wq0.4,lcore2@wq0.5,lcore3@wq0.6,lcore3@wq0.7,lcore4@wq2.0,lcore4@wq2.1,lcore4@wq2.2,lcore4@wq2.3,lcore4@wq2.4,lcore4@wq2.5,lcore4@wq2.6,lcore5@wq2.7] + testpmd>start + +3. Launch VM1 and VM2 using qemu:: + + # taskset -c 7 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G0,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm1_qga0.sock,server,nowait,id=vm1_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm1_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm1_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=./vhost-net0,server \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=8 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=false,mrg_rxbuf=on,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on -vnc :10 + + # taskset -c 8 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G1,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=./vhost-net1,server \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=8 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=on,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on -vnc :12 + +4. On VM1, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 8 + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +5. On VM2, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 8 + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +6. Scp 1MB file form VM1 to VM2:: + + # scp root@1.1.1.8:/ + +7. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +8. Quit and relaunch vhost w/ diff dsa channels:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net0,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=8,dmas=[txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8 --lcore-dma=[lcore2@wq0.0,lcore2@wq0.1,lcore2@wq0.2,lcore2@wq0.3,lcore3@wq0.0,lcore3@wq0.2,lcore3@wq0.4,lcore3@wq0.5,lcore3@wq0.6,lcore3@wq0.7,lcore4@wq0.1,lcore4@wq0.3,lcore4@wq2.0,lcore4@wq2.1,lcore4@wq2.2,lcore4@wq2.3,lcore4@wq2.4,lcore4@wq2.5,lcore4@wq2.6,lcore5@wq2.7] + testpmd>start + +9. Rerun step 6-7. + +10. Quit vhost ports and relaunch vhost ports w/o dsa channels:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net0,client=1,queues=8' \ + --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=8' -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=4 --txq=4 + testpmd>start + +11. On VM1, set virtio device:: + + ethtool -L ens5 combined 4 + +12. On VM2, set virtio device:: + + ethtool -L ens5 combined 4 + +13. Rerun step 6-7. + +14. Quit vhost ports and relaunch vhost ports with 1 queues:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net0,client=1,queues=4' \ + --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=4' -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=1 --txq=1 + testpmd>start + +15. On VM1, set virtio device:: + + ethtool -L ens5 combined 1 + +16. On VM2, set virtio device:: + + ethtool -L ens5 combined 1 + +17. Rerun step 6-7. + +Test Case 11: VM2VM vhost-user/virtio-net split ring non-mergeable path 8 queues test with large packet payload with dsa kernel driver +--------------------------------------------------------------------------------------------------------------------------------------- +This case uses iperf and scp to test the payload of large packet (larger than 1MB) is valid after packets forwarding in +vm2vm vhost-user/virtio-net split ring non-mergeable path when vhost uses the asynchronous enqueue operations with dsa kernel driver. +The dynamic change of multi-queues number also test. + +1. Bind 2 dsa device to idxd like common step 2:: + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 2 + ls /dev/dsa #check wq configure success + +2. Launch the Vhost sample by below commands:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net0,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7]' \ + --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8 --lcore-dma=[lcore2@wq0.0,lcore2@wq0.1,lcore2@wq0.2,lcore2@wq0.3,lcore2@wq0.4,lcore2@wq0.5,lcore3@wq0.6,lcore3@wq0.7,lcore4@wq2.0,lcore4@wq2.1,lcore4@wq2.2,lcore4@wq2.3,lcore4@wq2.4,lcore4@wq2.5,lcore4@wq2.6,lcore5@wq2.7] + testpmd>start + +3. Launch VM1 and VM2:: + + # taskset -c 7 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G0,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm1_qga0.sock,server,nowait,id=vm1_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm1_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm1_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=./vhost-net0,server \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=8 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=false,mrg_rxbuf=off,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on -vnc :10 + + # taskset -c 8 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G1,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=./vhost-net1,server \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=8 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=off,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on -vnc :12 + +4. On VM1, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 8 + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +5. On VM2, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 8 + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +6. Scp 1MB file form VM1 to VM2:: + + # scp root@1.1.1.8:/ + +7. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +8. Quit vhost ports and relaunch vhost ports w/o dsa channels:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net0,client=1,queues=8' \ + --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=8' -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8 + testpmd>start + +9. Rerun step 6-7. + +10. Quit vhost ports and relaunch vhost ports with 1 queues:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net0,client=1,queues=8' \ + --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=8' -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=1 --txq=1 + testpmd>start + +11. On VM1, set virtio device:: + + # ethtool -L ens5 combined 1 + +12. On VM2, set virtio device:: + + # ethtool -L ens5 combined 1 + +13. Rerun step 6-7. + +Test Case 12: VM2VM vhost-user/virtio-net packed ring test TSO with dsa kernel driver +------------------------------------------------------------------------------------- +This case test the function of Vhost tx offload in the topology of vhost-user/virtio-net packed ring mergeable path +by verifing the TSO/cksum in the TCP/IP stack when vhost uses the asynchronous enqueue operations with dsa kernel driver. + +1. Bind 2 dsa device to idxd:: + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 1 0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 1 2 + ls /dev/dsa #check wq configure success + +2. Launch the Vhost sample by below commands:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 2-4 -n 4 --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net0,queues=1,dmas=[txq0]' \ + --vdev 'net_vhost1,iface=vhost-net1,queues=1,dmas=[txq0]' \ + --iova=va -- -i --nb-cores=2 --txd=1024 --rxd=1024 --lcore-dma=[lcore3@wq0.0,lcore4@wq2.0] + testpmd>start + +3. Launch VM1 and VM2 with qemu:: + + # taskset -c 7 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 1 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G0,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm1_qga0.sock,server,nowait,id=vm1_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm1_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm1_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=./vhost-net0 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=false,mrg_rxbuf=on,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,packed=on -vnc :10 + + # taskset -c 8 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 1 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G1,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=./vhost-net1 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=on,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,packed=on -vnc :12 + +4. On VM1, set virtio device IP and run arp protocal:: + + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +5. On VM2, set virtio device IP and run arp protocal:: + + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +6. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +7. Check that 2VMs can receive and send big packets to each other through vhost log. Port 0 should have tx packets above 1522, Port 1 should have rx packets above 1522:: + + testpmd>show port xstats all + +Test Case 13: VM2VM vhost-user/virtio-net packed ring mergeable path 8 queues test with large packet payload with dsa kernel driver +------------------------------------------------------------------------------------------------------------------------------------- +This case uses iperf and scp to test the payload of large packet (larger than 1MB) is valid after packets forwarding in +vm2vm vhost-user/virtio-net packed ring mergeable path when vhost uses the asynchronous enqueue operations with dsa kernel driver. +The dynamic change of multi-queues number also test. + +1. Bind 8 dsa device to idxd like common step 2:: + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 2 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 4 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 6 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 8 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 10 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 12 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 14 + ls /dev/dsa #check wq configure success + +2. Launch the Vhost sample by below commands:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --vdev 'net_vhost1,iface=vhost-net1,queues=8,dmas=[txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8 --lcore-dma=[lcore2@wq0.0,lcore2@wq2.1,lcore2@wq4.2,lcore2@wq6.3,lcore3@wq0.0,lcore3@wq4.2,lcore3@wq8.4,lcore3@wq10.5,lcore3@wq12.6,lcore3@wq14.7,lcore4@wq2.1,lcore4@wq6.3,lcore4@wq0.1,lcore4@wq2.2,lcore4@wq4.3,lcore4@wq6.4,lcore4@wq8.5,lcore4@wq10.6,lcore4@wq12.7,lcore5@wq14.0] + testpmd>start + +3. Launch VM1 and VM2 with qemu:: + + # taskset -c 7 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G0,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm1_qga0.sock,server,nowait,id=vm1_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm1_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm1_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=./vhost-net0 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=8 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=false,mrg_rxbuf=on,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on,packed=on -vnc :10 + + # taskset -c 8 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G1,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=./vhost-net1 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=8 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=on,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on,packed=on -vnc :12 + +4. On VM1, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 8 + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +5. On VM2, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 8 + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +6. Scp 1MB file form VM1 to VM2:: + + # scp root@1.1.1.8:/ + +7. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +8. Rerun step 6-7 five times. + +Test Case 14: VM2VM vhost-user/virtio-net packed ring non-mergeable path 8 queues test with large packet payload with dsa kernel driver +---------------------------------------------------------------------------------------------------------------------------------------- +This case uses iperf and scp to test the payload of large packet (larger than 1MB) is valid after packets forwarding in +vm2vm vhost-user/virtio-net packed ring mergeable path when vhost uses the asynchronous enqueue operations with dsa kernel driver. +The dynamic change of multi-queues number also test. + +1. Bind 8 dsa device to vfio-pci like common step 2:: + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 2 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 4 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 6 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 8 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 10 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 12 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 14 + ls /dev/dsa #check wq configure success + +2. Launch the Vhost sample by below commands:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7]' \ + --vdev 'net_vhost1,iface=vhost-net1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6]' \ + --iova=va -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8 --lcore-dma=[lcore2@wq0.0,lcore2@wq2.1,lcore2@wq4.2,lcore2@wq6.3,lcore3@wq0.0,lcore3@wq4.2,lcore3@wq8.4,lcore3@wq10.5,lcore3@wq12.6,lcore3@wq14.7,lcore4@wq2.1,lcore4@wq6.3,lcore4@wq0.1,lcore4@wq2.2,lcore4@wq4.3,lcore4@wq6.4,lcore4@wq8.5,lcore4@wq10.6,lcore4@wq12.7,lcore5@wq14.0] + testpmd>start + +3. Launch VM1 and VM2 with qemu:: + + # taskset -c 7 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G0,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm1_qga0.sock,server,nowait,id=vm1_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm1_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm1_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=./vhost-net0 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=8 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=false,mrg_rxbuf=off,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on,packed=on -vnc :10 + + # taskset -c 8 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G1,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=./vhost-net1 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=8 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=off,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on,packed=on -vnc :12 + +4. On VM1, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 8 + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +5. On VM2, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 8 + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +6. Scp 1MB file form VM1 to VM2:: + + # scp root@1.1.1.8:/ + +7. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +8. Rerun step 6-7 five times. + +Test Case 15: VM2VM vhost-user/virtio-net split ring non-mergeable 16 queues test with large packet payload with dsa dpdk and kernel driver +-------------------------------------------------------------------------------------------------------------------------------------------- +This case uses iperf and scp to test the payload of large packet (larger than 1MB) is valid after packets forwarding in +vm2vm vhost-user/virtio-net split ring non-mergeable path when vhost uses the asynchronous enqueue operations with dsa dpdk +and kernel driver. The dynamic change of multi-queues number also test. + +1. Bind 4 dsa device to vfio-pci and 4 dsa device to idxd like common step 1-2:: + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 79:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 74:01.0 79:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 2 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 4 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 6 + ls /dev/dsa #check wq configure success + + # ./usertools/dpdk-devbind.py -u 0000:e7:01.0 0000:ec:01.0 0000:f1:01.0 0000:f6:01.0 + # ./usertools/dpdk-devbind.py -b vfio-pci 0000:e7:01.0 0000:ec:01.0 0000:f1:01.0 0000:f6:01.0 + +2. Launch the Vhost sample by below commands:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost -a 0000:e7:01.0 -a 0000:ec:01.0 \ + --vdev 'net_vhost0,iface=vhost-net0,client=1,queues=16,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7;txq8;txq9;txq10;txq11;txq12;txq13;txq14;txq15]' \ + --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=16,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7;txq8;txq9;txq10;txq11;txq12;txq13;txq14;txq15]' \ + --iova=va -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=16 --txq=16 --lcore-dma=[lcore2@0000:e7:01.0-q0,lcore2@0000:e7:01.0-q1,lcore2@0000:ec:01.0-q0,lcore2@0000:ec:01.0-q1,lcore3@wq0.0,lcore3@wq2.0,lcore4@0000:e7:01.0-q4,lcore4@0000:e7:01.0-q5,lcore4@0000:ec:01.0-q4,lcore4@0000:ec:01.0-q5,lcore5@wq4.1,lcore5@wq2.1] + testpmd>start + +3. Launch VM1 and VM2:: + + # taskset -c 7 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G0,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm1_qga0.sock,server,nowait,id=vm1_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm1_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm1_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=./vhost-net0,server \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=16 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=false,mrg_rxbuf=off,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on -vnc :10 + + # taskset -c 8 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G1,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=./vhost-net1,server \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=16 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=off,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on -vnc :12 + +4. On VM1, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 16 + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +5. On VM2, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 16 + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +6. Scp 1MB file form VM1 to VM2:: + + # scp root@1.1.1.8:/ + +7. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +8. Quit vhost ports and relaunch vhost ports w/ diff dsa channels:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost -a 0000:e7:01.0,max_queues=2 -a 0000:f1:01.0,max_queues=2 -a 0000:f6:01.0,max_queues=2 \ + --vdev 'net_vhost0,iface=vhost-net0,client=1,queues=16,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7;txq8;txq9;txq10;txq11;txq12;txq13]' \ + --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=16,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7;txq8;txq9;txq10;txq11;txq12;txq13]' \ + --iova=va -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=16 --txq=16 --lcore-dma=[lcore2@0000:e7:01.0-q0,lcore2@0000:f1:01.0-q0,lcore2@0000:f1:01.0-q1,lcore2@wq4.2,lcore3@wq6.1,lcore3@wq6.3,lcore4@0000:e7:01.0-q1,lcore4@0000:f6:01.0-q0,lcore4@wq4.2,lcore4@wq6.0,lcore5@wq4.2,lcore5@wq6.0] + testpmd>start + +9. rerun step 6-7. + +10. Quit vhost ports and relaunch vhost ports w/o dsa channels:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net0,client=1,queues=16' \ + --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=16' -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=16 --txq=16 + testpmd>start + +11. Rerun step 6-7. + +12. Quit vhost ports and relaunch vhost ports with 1 queues:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net0,client=1,queues=8' \ + --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=8' -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=1 --txq=1 + testpmd>start + +13. On VM1, set virtio device:: + + # ethtool -L ens5 combined 1 + +14. On VM2, set virtio device:: + + # ethtool -L ens5 combined 1 + +15. Rerun step 6-7. + +Test Case 16: VM2VM vhost-user/virtio-net packed ring mergeable 16 queues test with large packet payload with dsa dpdk and kernel driver +------------------------------------------------------------------------------------------------------------------------------------------ +This case uses iperf and scp to test the payload of large packet (larger than 1MB) is valid after packets forwarding in +vm2vm vhost-user/virtio-net packed ring mergeable path when vhost uses the asynchronous enqueue operations with dsa dpdk +and kernel driver. The dynamic change of multi-queues number also test. + +1. Bind 4 dsa device to vfio-pci and 4 dsa device to idxd like common step 1-2:: + + ls /dev/dsa #check wq configure, reset if exist + + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 74:01.0 79:01.0 + # ./usertools/dpdk-devbind.py -b vfio-pci e7:01.0 ec:01.0 f1:01.0 f6:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 2 0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 2 2 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 4 4 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 4 6 + ls /dev/dsa #check wq configure success + +2. Launch the Vhost sample by below commands:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 --file-prefix=vhost -a 0000:e7:01.0 -a 0000:ec:01.0 -a 0000:f1:01.0 -a 0000:f6:01.0 \ + --vdev 'net_vhost0,iface=vhost-net0,queues=16,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7;txq8;txq9;txq10;txq11;txq12;txq13;txq14;txq15]' \ + --vdev 'net_vhost1,iface=vhost-net1,queues=16,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7;txq8;txq9;txq10;txq11;txq12;txq13;txq14;txq15]' \ + --iova=va -- -i --nb-cores=4 --txd=1024 --rxd=1024 --rxq=16 --txq=16 --lcore-dma=[lcore2@wq0.0,lcore2@wq0.1,lcore2@wq2.0,lcore2@wq2.1,lcore3@wq0.1,lcore3@wq2.0,lcore3@0000:e7:01.0-q4,lcore3@0000:ec:01.0-q5,lcore3@0000:f1:01.0-q6,lcore3@0000:f6:01.0-q7,lcore4@0000:e7:01.0-q4,lcore4@0000:ec:01.0-q5,lcore4@0000:f1:01.0-q1,lcore4@wq2.0,lcore5@wq4.1,lcore5@wq2.0,lcore5@wq4.1,lcore5@wq6.2] + testpmd>start + +3. Launch VM1 and VM2 with qemu:: + + # taskset -c 7 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G0,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm1_qga0.sock,server,nowait,id=vm1_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm1_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm1_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=./vhost-net0 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=16 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=false,mrg_rxbuf=on,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on,packed=on -vnc :10 + + # taskset -c 8 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 8 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G1,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=./vhost-net1 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce,queues=16 \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=on,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on,packed=on -vnc :12 + +4. On VM1, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 16 + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +5. On VM2, set virtio device IP and run arp protocal:: + + # ethtool -L ens5 combined 16 + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +6. Scp 1MB file form VM1 to VM2:: + + # scp root@1.1.1.8:/ + +7. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +8. Rerun step 6-7 five times. + + + From patchwork Sat May 7 09:59:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 110836 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 2206DA050A; Sat, 7 May 2022 12:00:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1B7B540DDB; Sat, 7 May 2022 12:00:23 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 0F8FD40395 for ; Sat, 7 May 2022 12:00:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651917620; x=1683453620; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=5nEefbdesz7iDQ+jrucszaEbD5qAvK9KcZsliwbc6vM=; b=L1Y9Rf+/OSCams2vqsSiuMvTdLMDLK6pZvG7dk0o0snw+YJYtgsmnkXf yNdrgKaZ2USY1nnFnupqCkKXmwHRnNu4jsGhXSTm8TGgP96ViP5Wntyg0 LsE9vA3oEBm8VudvUTm6tw96MT8t+jixdr4iFzXlms0wRMQ/L7L12vdZF t8PFLYrcsUfzbUUIb9QddSU2KMSAdGjWTy5C1LNtrXD+8c6sgfSAIsp7Y SGlIqBN8y3l4ocluTlIWd1hJiusBDFahA9yNleoqMe0zZYjEWTbT5xKkw AIhw6ZfFTTPmEsjcSS2AFI1tFr7GZ91CAINIkFvgC7gYS90nSpKCHQ7Gd w==; X-IronPort-AV: E=McAfee;i="6400,9594,10339"; a="355120998" X-IronPort-AV: E=Sophos;i="5.91,206,1647327600"; d="scan'208";a="355120998" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2022 03:00:18 -0700 X-IronPort-AV: E=Sophos;i="5.91,206,1647327600"; d="scan'208";a="736138888" Received: from unknown (HELO localhost.localdomain) ([10.239.251.222]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2022 03:00:16 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V1 6/7] test_plans/vm2vm_virtio_user_dsa_test_plan: add vm2vm_virtio_user_dsa testplan Date: Sat, 7 May 2022 05:59:52 -0400 Message-Id: <20220507095952.311180-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 Add vm2vm_virtio_user_dsa_test_plan.rst into test_plans. Signed-off-by: Wei Ling --- .../vm2vm_virtio_user_dsa_test_plan.rst | 1536 +++++++++++++++++ 1 file changed, 1536 insertions(+) create mode 100644 test_plans/vm2vm_virtio_user_dsa_test_plan.rst diff --git a/test_plans/vm2vm_virtio_user_dsa_test_plan.rst b/test_plans/vm2vm_virtio_user_dsa_test_plan.rst new file mode 100644 index 00000000..99ae37a2 --- /dev/null +++ b/test_plans/vm2vm_virtio_user_dsa_test_plan.rst @@ -0,0 +1,1536 @@ +.. Copyright (c) <2022>, Intel Corporation + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + - Neither the name of Intel Corporation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + +====================================================== +VM2VM vhost-user/virtio-user with DSA driver 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.Vhost enqueue operation with CBDMA channels is supported +in both split and packed ring. + +This document provides the test plan for testing the following features when Vhost-user using asynchronous data path with +DSA driver (kernel IDXD driver and DPDK vfio-pci driver) in VM2VM virtio-user topology. +1. Split virtqueue vm2vm in-order mergeable, in-order non-mergeable, mergeable, non-mergeable, vector_rx path test and payload check. +2. Packed virtqueue vm2vm in-order mergeable, in-order non-mergeable, mergeable, non-mergeable, vectorized path (ringsize not powerof 2) test and payload check. +3. Test indirect descriptor feature. For example, the split ring mergeable inorder path use non-indirect descriptor, the 2000,2000,2000,2000 chain packets will need 4 consequent ring, still need one ring put header. +the split ring mergeable path use indirect descriptor, the 2000,2000,2000,2000 chain packets will only occupy one ring. + +IOMMU impact: +If iommu off, idxd can work with iova=pa +If iommu on, kernel dsa driver only can work with iova=va by program IOMMU, can't use iova=pa(fwd not work due to pkts payload wrong). + +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, and the suite has not yet been automated. + +Prerequisites +============= + +Topology +-------- + Test flow: Virtio-user -> Vhost-user -> Testpmd -> Vhost-user -> Virtio-user + +General set up +-------------- +1. Compile DPDK:: + + # CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib -Dexamples=all --default-library= + # ninja -C -j 110 + For example, + CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib -Dexamples=all --default-library=x86_64-native-linuxapp-gcc + ninja -C x86_64-native-linuxapp-gcc -j 110 + +2. Get the PCI device ID and DSA device ID of DUT, for example, 0000:4f:00.1 is PCI device ID, 0000:6a:01.0 - 0000:f6:01.0 are DSA device IDs:: + + # ./usertools/dpdk-devbind.py -s + + Network devices using kernel driver + =================================== + 0000:4f:00.1 'Ethernet Controller E810-C for QSFP 1592' drv=ice unused=vfio-pci + + DMA devices using kernel driver + =============================== + 0000:6a:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:6f:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:74:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:79:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:e7:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:ec:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:f1:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:f6:01.0 'Device 0b25' drv=idxd unused=vfio-pci + +Test case +========= + +Common steps +------------ +1. Bind DSA devices to DPDK vfio-pci driver:: + + # ./usertools/dpdk-devbind.py -b vfio-pci + + For example, bind 2 DMA devices to vfio-pci driver: + # ./usertools/dpdk-devbind.py -b vfio-pci 0000:e7:01.0 0000:ec:01.0 + +.. note:: + + One DPDK DSA device can create 8 WQ at most. Below is an example, where DPDK DSA device will create one and + eight WQ for DSA deivce 0000:e7:01.0 and 0000:ec:01.0. The value of “max_queues” is 1~8: + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 4 -n 4 -a 0000:e7:01.0,max_queues=1 -- -i + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 4 -n 4 -a 0000:ec:01.0,max_queues=8 -- -i + +2. Bind DSA devices to kernel idxd driver, and configure Work Queue (WQ):: + + # ./usertools/dpdk-devbind.py -b idxd + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q + +.. note:: + + Better to reset WQ when need operate DSA devices that bound to idxd drvier: + # ./drivers/dma/idxd/dpdk_idxd_cfg.py --reset + You can check it by 'ls /dev/dsa' + numDevices: number of devices, where 0<=numDevices<=7, corresponding to 0000:6a:01.0 - 0000:f6:01.0 + numWq: Number of workqueues per DSA endpoint, where 1<=numWq<=8 + + For example, bind 2 DMA devices to idxd driver and configure WQ: + + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 1 0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 4 2 + Check WQ by 'ls /dev/dsa' and can find "wq0.0 wq2.0 wq2.1 wq2.2 wq2.3" + +Test Case 1: VM2VM vhost-user/virtio-user split ring non-mergeable path and multi-queues payload check with dsa dpdk driver +---------------------------------------------------------------------------------------------------------------------------- +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 enqueue operations with dsa dpdk driver. Both iova as VA and PA mode test. + +1. bind 2 dsa device to vfio-pci like common step 1:: + + # ./usertools/dpdk-devbind.py -b vfio-pci e7:01.0 ec:01.0 + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 -a 0000:e7:01.0,max_queues=2 -a 0000:ec:01.0,max_queues=2 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx --lcore-dma=[lcore2@0000:e7:01.0-q0,lcore2@0000:e7:01.0-q1] + +3. 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=./vhost-net1,queues=2,server=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 + +4. Attach pdump secondary process to primary process of virtio-user1 by same file-prefix:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=virtio1 -- --pdump 'device_id=net_virtio_user1,queue=0,rx-dev=/tmp/pdump-virtio-rx.pcap,mbuf-size=8000' + +5. 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=./vhost-net0,queues=2,server=1,packed_vq=0,mrg_rxbuf=0,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,128,256,512 + testpmd>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>start tx_first 7 + testpmd>stop + testpmd>set txpkts 64 + testpmd>start tx_first 1 + testpmd>stop + +6. Start vhost testpmd, quit pdump and check virtio-user1 RX-packets is 566 and RX-bytes is 486016 and 502 packets with 960 length and 64 packets with 64 length in pdump-virtio-rx.pcap. + +7. Clear virtio-user1 port stats:: + + testpmd>stop + testpmd>clear port stats all + testpmd>start + +8. Relaunch vhost with pa mode by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 -a 0000:e7:01.0,max_queues=4 -a 0000:ec:01.0,max_queues=4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=pa -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx --lcore-dma=[lcore2@0000:e7:01.0-q3,lcore2@0000:ec:01.0-q3] + +9. Rerun step 4. + +10. Virtio-user0 and send packets again:: + + testpmd>set burst 1 + testpmd>set txpkts 64,128,256,512 + testpmd>start tx_first 27 + testpmd>set burst 32 + testpmd>start tx_first 7 + testpmd>stop + testpmd>set txpkts 64 + testpmd>start tx_first 1 + testpmd>stop + +11. Rerun step 6. + +Test Case 2: VM2VM vhost-user/virtio-user split ring inorder non-mergeable path and multi-queues payload check with dsa dpdk driver +------------------------------------------------------------------------------------------------------------------------------------- +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 enqueue operations with dsa dpdk driver. Both iova as VA and PA mode test. + +1. bind 3 dsa device to vfio-pci like common step 1:: + + # ./usertools/dpdk-devbind.py -b vfio-pci e7:01.0 ec:01.0 f1:01.0 + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 -a 0000:e7:01.0,max_queues=2 -a 0000:ec:01.0,max_queues=2 -a 0000:f1:01.0,max_queues=2 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx --lcore-dma=[lcore2@0000:e7:01.0-q0,lcore2@0000:ec:01.0-q0,lcore2@0000:f1:01.0-q0] + +3. 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=./vhost-net1,queues=2,server=1,packed_vq=0,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 + +4. Attach pdump secondary process to primary process of virtio-user1 by same file-prefix:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=virtio1 -- --pdump 'device_id=net_virtio_user1,queue=0,rx-dev=/tmp/pdump-virtio-rx.pcap,mbuf-size=8000' + +5. 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=./vhost-net0,queues=2,server=1,packed_vq=0,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,128,256,512 + testpmd>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>start tx_first 7 + testpmd>stop + testpmd>set txpkts 64 + testpmd>start tx_first 1 + testpmd>stop + +6. Start vhost testpmd, quit pdump and check virtio-user1 RX-packets is 566 and RX-bytes is 486016 and 502 packets with 960 length and 64 packets with 64 length in pdump-virtio-rx.pcap. + +7. Clear virtio-user1 port stats:: + + testpmd>stop + testpmd>clear port stats all + testpmd>start + +8. Relaunch vhost with pa mode by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 -a 0000:e7:01.0 -a 0000:ec:01.0,max_queues=4 -a 0000:f1:01.0,max_queues=4 -a 0000:f6:01.0,max_queues=4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=pa -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx --lcore-dma=[lcore2@0000:e7:01.0-q2,lcore2@0000:ec:01.0-q2,lcore2@0000:f1:01.0-q2] + +9. Rerun step 4. + +10. Virtio-user0 send packets:: + + testpmd>set burst 1 + testpmd>set txpkts 64,128,256,512 + testpmd>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>start tx_first 7 + testpmd>stop + testpmd>set txpkts 64 + testpmd>start tx_first 1 + testpmd>stop + +11. Rerun step 6. + +Test Case 3: VM2VM vhost-user/virtio-user split ring inorder mergeable path and multi-queues non-indirect descriptor with dsa dpdk driver +------------------------------------------------------------------------------------------------------------------------------------------ +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 enqueue operations with dsa dpdk driver. Both iova as VA and PA mode test. + +1. bind 4 dsa device to vfio-pci like common step 1:: + + # ./usertools/dpdk-devbind.py -b vfio-pci e7:01.0 ec:01.0 f1:01.0 f6:01.0 + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 -a 0000:e7:01.0,max_queues=1 -a 0000:ec:01.0,max_queues=2 -a 0000:f1:01.0,max_queues=3 -a 0000:f6:01.0,max_queues=4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx --lcore-dma=[lcore2@0000:e7:01.0-q0,lcore2@0000:ec:01.0-q1,lcore2@0000:f1:01.0-q2,lcore2@0000:f6:01.0-q3] + +3. 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=./vhost-net1,queues=2,server=1,packed_vq=0,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 + +4. Attach pdump secondary process to primary process of virtio-user1 by same file-prefix:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=virtio1 -- --pdump 'device_id=net_virtio_user1,queue=0,rx-dev=/tmp/pdump-virtio-rx.pcap,mbuf-size=8000' + +5. 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=./vhost-net0,queues=2,server=1,packed_vq=0,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>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>start tx_first 7 + testpmd>stop + testpmd>set txpkts 2000,2000,2000,2000 + testpmd>start tx_first 1 + testpmd>stop + +6. Start vhost, then quit pdump and three testpmd, about split virtqueue inorder mergeable path, it use the non-indirect 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. + +7. Relaunch vhost with pa mode by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 -a 0000:e7:01.0,max_queues=1 -a 0000:ec:01.0,max_queues=2 -a 0000:f1:01.0,max_queues=3 -a 0000:f6:01.0,max_queues=4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=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=[lcore2@0000:e7:01.0-q0,lcore2@0000:ec:01.0-q1,lcore2@0000:f1:01.0-q2,lcore2@0000:f6:01.0-q3] + +8. Rerun step 3-6. + +Test Case 4: VM2VM vhost-user/virtio-user split ring mergeable path and multi-queues indirect descriptor with dsa dpdk driver +------------------------------------------------------------------------------------------------------------------------------- +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 enqueue operations with dsa dpdk driver. Both iova as VA and PA mode test. + +1. bind 4 dsa device to vfio-pci like common step 1:: + + # ./usertools/dpdk-devbind.py -b vfio-pci e7:01.0 ec:01.0 f1:01.0 f6:01.0 + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 -a 0000:e7:01.0,max_queues=1 -a 0000:ec:01.0,max_queues=2 -a 0000:f1:01.0,max_queues=3 -a 0000:f6:01.0,max_queues=4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx --lcore-dma=[lcore2@0000:e7:01.0-q0,lcore2@0000:ec:01.0-q1,lcore2@0000:f1:01.0-q2,lcore2@0000:f6:01.0-q3] + +3. 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=./vhost-net1,queues=2,server=1,packed_vq=0,mrg_rxbuf=1,in_order=0,queue_size=4096 \ + -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 + testpmd>set fwd rxonly + testpmd>start + +4. Attach pdump secondary process to primary process of virtio-user1 by same file-prefix:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=virtio1 -- --pdump 'device_id=net_virtio_user1,queue=0,rx-dev=/tmp/pdump-virtio-rx.pcap,mbuf-size=8000' + +5. 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=./vhost-net0,queues=2,server=1,packed_vq=0,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>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>start tx_first 7 + testpmd>stop + testpmd>set txpkts 2000,2000,2000,2000 + testpmd>start tx_first 1 + testpmd>stop + +6. Start vhost, then quit pdump and three testpmd, about split virtqueue inorder 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. + +7. Relaunch vhost with pa mode by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 -a 0000:e7:01.0,max_queues=1 -a 0000:ec:01.0,max_queues=2 -a 0000:f1:01.0,max_queues=3 -a 0000:f6:01.0,max_queues=4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=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=[lcore2@0000:e7:01.0-q0,lcore2@0000:ec:01.0-q1,lcore2@0000:f1:01.0-q2,lcore2@0000:f6:01.0-q3] + +8. Rerun step 3-6. + +Test Case 5: VM2VM vhost-user/virtio-user packed ring non-mergeable path and multi-queues payload check with dsa dpdk driver +-------------------------------------------------------------------------------------------------------------------------------- +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 enqueue operations with dsa dpdk driver. Both iova as VA and PA mode test. + +1. bind 3 dsa device to vfio-pci like common step 1:: + + # ./usertools/dpdk-devbind.py -b vfio-pci e7:01.0 ec:01.0 f1:01.0 + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 -a 0000:e7:01.0 -a 0000:ec:01.0 -a 0000:f1:01.0 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx --lcore-dma=[lcore2@0000:e7:01.0-q0,lcore2@0000:ec:01.0-q1,lcore2@0000:f1:01.0-q2] + +3. 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=./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 + +4. Attach pdump secondary process to primary process of virtio-user1 by same file-prefix:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=virtio1 -- --pdump 'device_id=net_virtio_user1,queue=0,rx-dev=/tmp/pdump-virtio-rx.pcap,mbuf-size=8000' + +5. 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=./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 1 + testpmd>set txpkts 64,128,256,512 + testpmd>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>start tx_first 7 + testpmd>stop + testpmd>set txpkts 64 + testpmd>start tx_first 1 + testpmd>stop + +6. Start vhost testpmd, quit pdump and check virtio-user1 RX-packets is 566 and RX-bytes is 486016 and 502 packets with 960 length and 64 packets with 64 length in pdump-virtio-rx.pcap. + +7. Clear virtio-user1 port stats:: + + testpmd>stop + testpmd>clear port stats all + testpmd>start + +8. Relaunch vhost with iova=pa by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 -a 0000:e7:01.0 -a 0000:ec:01.0 -a 0000:f1:01.0 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=pa -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx --lcore-dma=[lcore2@0000:e7:01.0-q4,lcore2@0000:ec:01.0-q5,lcore2@0000:f1:01.0-q6] + +9. Rerun step 4. + +10. Virtio-user0 send packets:: + + testpmd>set burst 1 + testpmd>set txpkts 64,128,256,512 + testpmd>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>start tx_first 7 + testpmd>stop + testpmd>set txpkts 64 + testpmd>start tx_first 1 + testpmd>stop + +11. Rerun step 6. + +Test Case 6: VM2VM vhost-user/virtio-user packed ring inorder non-mergeable path and multi-queues payload check with dsa dpdk driver +------------------------------------------------------------------------------------------------------------------------------------- +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 enqueue operations with dsa dpdk driver. Both iova as VA and PA mode test. + +1. bind 4 dsa device to vfio-pci like common step 1:: + + # ./usertools/dpdk-devbind.py -b vfio-pci e7:01.0 f1:01.0 f6:01.0 + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 -a 0000:e7:01.0,max_queues=2 -a 0000:ec:01.0,max_queues=2 -a 0000:f1:01.0,max_queues=2 -a 0000:f6:01.0,max_queues=2 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx --lcore-dma=[lcore2@0000:e7:01.0-q0,lcore2@0000:ec:01.0-q0,lcore2@0000:f1:01.0-q1,lcore2@0000:f6:01.0-q1] + +3. 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=./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 + +4. Attach pdump secondary process to primary process of virtio-user1 by same file-prefix:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=virtio1 -- --pdump 'device_id=net_virtio_user1,queue=0,rx-dev=/tmp/pdump-virtio-rx.pcap,mbuf-size=8000' + +5. 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=./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 1 + testpmd>set txpkts 64,128,256,512 + testpmd>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>start tx_first 7 + testpmd>stop + testpmd>set txpkts 64 + testpmd>start tx_first 1 + +6. Start vhost testpmd, quit pdump and check virtio-user1 RX-packets is 566 and RX-bytes is 486016 and 502 packets with 960 length and 64 packets with 64 length in pdump-virtio-rx.pcap. + +7. Clear virtio-user1 port stats:: + + testpmd>stop + testpmd>clear port stats all + testpmd>start + +8. Relaunch vhost with iova=pa by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 -a 0000:e7:01.0 -a 0000:ec:01.0 -a 0000:f1:01.0 -a 0000:f6:01.0 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=pa -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx --lcore-dma=[lcore2@0000:e7:01.0-q5,lcore2@0000:ec:01.0-q6,lcore2@0000:f1:01.0-q5,lcore2@0000:f6:01.0-q6] + +9. Rerun step 4. + +10. virtio-user0 send packets:: + + testpmd>stop + testpmd>set burst 1 + testpmd>set txpkts 64,128,256,512 + testpmd>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>start tx_first 7 + testpmd>stop + testpmd>set txpkts 64 + testpmd>start tx_first 1 + +11. Rerun step 6. + +Test Case 7: VM2VM vhost-user/virtio-user packed ring mergeable path and multi-queues payload check with dsa dpdk driver +-------------------------------------------------------------------------------------------------------------------------- +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 enqueue operations with dsa dpdk driver. Both iova as VA and PA mode test. + +1. bind 2 dsa device to vfio-pci like common step 1:: + + # ./usertools/dpdk-devbind.py -b vfio-pci e7:01.0 ec:01.0 + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 -a 0000:e7:01.0,max_queues=4 -a 0000:ec:01.0,max_queues=4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx --lcore-dma=[lcore2@0000:e7:01.0-q0,lcore2@0000:e7:01.0-q1,lcore2@0000:e7:01.0-q2,lcore2@0000:ec:01.0-q0,lcore2@0000:ec:01.0-q1] + +3. 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=./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 + +4. Attach pdump secondary process to primary process of virtio-user1 by same file-prefix:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=virtio1 -- --pdump 'device_id=net_virtio_user1,queue=0,rx-dev=/tmp/pdump-virtio-rx.pcap,mbuf-size=8000' + +5. 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=./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 + testpmd>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>set txpkts 64 + testpmd>start tx_first 7 + testpmd>stop + +6. Start vhost testpmd, quit pdump and check virtio-user1 check 502 packets and 279232 bytes and 54 packets with 4640 length and 448 packets with 64 length in pdump-virtio-rx.pcap. + +7. Clear virtio-user1 port stats:: + + testpmd>stop + testpmd>clear port stats all + testpmd>start + +8. Relaunch vhost with iova=pa by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 -a 0000:e7:01.0 -a 0000:ec:01.0 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=pa -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx --lcore-dma=[lcore2@0000:e7:01.0-q6,lcore2@0000:e7:01.0-q7,lcore2@0000:ec:01.0-q2,lcore2@0000:ec:01.0-q3,lcore2@0000:ec:01.0-q4] + +9. Rerun step 4. + +10. Virtio-user0 send packets:: + + testpmd>set burst 1 + testpmd>set txpkts 64,256,2000,64,256,2000 + testpmd>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>set txpkts 64 + testpmd>start tx_first 7 + testpmd>stop + +11. Rerun step 6. + +Test Case 8: VM2VM vhost-user/virtio-user packed ring inorder mergeable path and multi-queues payload check with dsa dpdk driver +---------------------------------------------------------------------------------------------------------------------------------- +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 enqueue operations with dsa dpdk driver. Both iova as VA and PA mode test. + +1. bind 8 dsa device to vfio-pci like common step 1:: + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + # ./usertools/dpdk-devbind.py -b vfio-pci 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 -a 0000:6a:01.0 -a 0000:6f:01.0 -a 0000:74:01.0 -a 0000:79:01.0 -a 0000:e7:01.0 -a 0000:ec:01.0 -a 0000:f1:01.0 -a 0000:f6:01.0 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx --lcore-dma=[lcore2@0000:6a:01.0-q0,lcore2@0000:6f:01.0-q1,lcore2@0000:74:01.0-q2,lcore2@0000:79:01.0-q3,lcore2@0000:e7:01.0-q4,lcore2@0000:ec:01.0-q5,lcore2@0000:f1:01.0-q6,lcore2@0000:f6:01.0-q7] + +3. 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=./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 + +4. Attach pdump secondary process to primary process of virtio-user1 by same file-prefix:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=virtio1 -- --pdump 'device_id=net_virtio_user1,queue=0,rx-dev=/tmp/pdump-virtio-rx.pcap,mbuf-size=8000' + +5. 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=./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 + testpmd>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>set txpkts 64 + testpmd>start tx_first 7 + testpmd>stop + +6. Start vhost testpmd, quit pdump and check virtio-user1 RX-packets is 502 packets and 279232 bytes and 54 packets with 4640 length and 448 packets with 64 length in pdump-virtio-rx.pcap. + +7. Clear virtio-user1 port stats:: + + testpmd>stop + testpmd>clear port stats all + testpmd>start + +8. Relaunch vhost with iova=pa by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 -a 0000:6a:01.0 -a 0000:6f:01.0 -a 0000:74:01.0 -a 0000:79:01.0 -a 0000:e7:01.0 -a 0000:ec:01.0 -a 0000:f1:01.0 -a 0000:f6:01.0 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=pa -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx --lcore-dma=[lcore2@0000:6a:01.0-q1,lcore2@0000:6f:01.0-q2,lcore2@0000:74:01.0-q3,lcore2@0000:79:01.0-q4,lcore2@0000:e7:01.0-q5,lcore2@0000:ec:01.0-q6,lcore2@0000:f1:01.0-q7,lcore2@0000:f6:01.0-q7] + +9. Rerun step 4. + +10. virtio-user0 send packets:: + + testpmd>set burst 1 + testpmd>set txpkts 64,256,2000,64,256,2000 + testpmd>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>set txpkts 64 + testpmd>start tx_first 7 + testpmd>stop + +11. Rerun step 6. + +Test Case 9: VM2VM vhost-user/virtio-user packed ring vectorized-tx path and multi-queues indirect descriptor with dsa dpdk driver +----------------------------------------------------------------------------------------------------------------------------------- +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 enqueue operations with dsa dpdk driver. +Both iova as VA and PA mode test. + +1. bind 4 dsa device to vfio-pci like common step 1:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 6a:01.0 6f:01.0 74:01.0 + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 -a 0000:6a:01.0 -a 0000:6f:01.0 -a 0000:74:01.0 -a 0000:79:01.0 \ + --vdev 'eth_vhost0,iface=vhost-net,queues=2,client=1,dmas=[txq0;txq1],dma_ring_size=2048' --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx \ + --lcore-dma=[lcore2@0000:6a:01.0-q0,lcore2@0000:6f:01.0-q1,lcore2@0000:74:01.0-q2,lcore2@0000:79:01.0-q3] + +3. 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=./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 + set verbose 1 + testpmd>start + +4. Attach pdump secondary process to primary process by same file-prefix:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=virtio1 -- --pdump 'device_id=net_virtio_user1,queue=*,rx-dev=./pdump-virtio-rx.pcap,mbuf-size=8000' + +5. 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=./vhost-net,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>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>start tx_first 7 + testpmd>stop + testpmd>set txpkts 2000,2000,2000,2000 + testpmd>start tx_first 1 + testpmd>stop + +6. 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. + +7.Relaunch vhost with iova=pa by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 -a 0000:6a:01.0 -a 0000:6f:01.0 -a 0000:74:01.0 -a 0000:79:01.0 \ + --vdev 'eth_vhost0,iface=vhost-net,queues=2,client=1,dmas=[txq0;txq1],dma_ring_size=2048' --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1],dma_ring_size=2048' \ + --iova=pa -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx \ + --lcore-dma=[lcore2@0000:6a:01.0-q1,lcore2@0000:6f:01.0-q2,lcore2@0000:74:01.0-q3,lcore2@0000:79:01.0-q4] + +8. Rerun step 3-6. + +Test Case 10: VM2VM vhost-user/virtio-user split ring non-mergeable path and multi-queues payload check with dsa kernel driver +-------------------------------------------------------------------------------------------------------------------------------- +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 enqueue operations with dsa kernel driver. + +1. bind 1 dsa device to idxd like common step 2:: + + ls /dev/dsa #check wq configure, reset if exist + # ./drivers/dma/idxd/dpdk_idxd_cfg.py --reset xx + # ./usertools/dpdk-devbind.py -u 6a:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 4 0 + ls /dev/dsa #check wq configure success + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx --lcore-dma=[lcore2@wq0.0,lcore2@wq0.1] + +3. 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=./vhost-net1,queues=2,server=1,packed_vq=0,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 + +4. Attach pdump secondary process to primary process of virtio-user1 by same file-prefix:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=virtio1 -- --pdump 'device_id=net_virtio_user1,queue=0,rx-dev=/tmp/pdump-virtio-rx.pcap,mbuf-size=8000' + +5. 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=./vhost-net0,queues=2,server=1,packed_vq=0,mrg_rxbuf=0,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,128,256,512 + testpmd>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>start tx_first 7 + testpmd>stop + testpmd>set txpkts 64 + testpmd>start tx_first 1 + testpmd>stop + +6. Start vhost testpmd, quit pdump and check virtio-user1 RX-packets is 566 and RX-bytes is 486016 and 502 packets with 960 length and 64 packets with 64 length in pdump-virtio-rx.pcap. + +7. Clear virtio-user1 port stats:: + + testpmd>stop + testpmd>clear port stats all + testpmd>start + +8. Quit and relaunch vhost with diff channel by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx --lcore-dma=[lcore2@wq0.2,lcore2@wq0.3] + +9. Rerun step 4. + +10. Virtio-user0 send packets:: + + testpmd>set burst 1 + testpmd>set txpkts 64,128,256,512 + testpmd>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>start tx_first 7 + testpmd>stop + testpmd>set txpkts 64 + testpmd>start tx_first 1 + testpmd>stop + +11. Rerun step 6. + +Test Case 11: VM2VM vhost-user/virtio-user split ring inorder non-mergeable path and multi-queues payload check with dsa kernel driver +---------------------------------------------------------------------------------------------------------------------------------------- +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 enqueue operations with dsa kernel driver. + +1. bind 3 dsa device to idxd like common step 2:: + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 74:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 2 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 4 + ls /dev/dsa #check wq configure success + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx --lcore-dma=[lcore2@wq0.0,lcore2@wq2.1,lcore2@wq4.2] + +3. 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=./vhost-net1,queues=2,server=1,packed_vq=0,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 + +4. Attach pdump secondary process to primary process of virtio-user1 by same file-prefix:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=virtio1 -- --pdump 'device_id=net_virtio_user1,queue=0,rx-dev=/tmp/pdump-virtio-rx.pcap,mbuf-size=8000' + +5. 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=./vhost-net0,queues=2,server=1,packed_vq=0,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,128,256,512 + testpmd>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>start tx_first 7 + testpmd>stop + testpmd>set txpkts 64 + testpmd>start tx_first 1 + testpmd>stop + +6. Start vhost testpmd, quit pdump and check virtio-user1 RX-packets is 566 and RX-bytes is 486016 and 502 packets with 960 length and 64 packets with 64 length in pdump-virtio-rx.pcap. + +7. Clear virtio-user1 port stats:: + + testpmd>stop + testpmd>clear port stats all + testpmd>start + +8. Quit and relaunch vhost with diff channel by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx --lcore-dma=[lcore2@wq0.3,lcore2@wq2.4,lcore2@wq4.5] + +9. Rerun step 4. + +10. virtio-user0 send packets:: + + testpmd>set burst 1 + testpmd>set txpkts 64,128,256,512 + testpmd>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>start tx_first 7 + testpmd>stop + testpmd>set txpkts 64 + testpmd>start tx_first 1 + testpmd>stop + +11. Rerun step 6. + +Test Case 12: VM2VM vhost-user/virtio-user split ring inorder mergeable path and multi-queues non-indirect descriptor with dsa kernel driver +--------------------------------------------------------------------------------------------------------------------------------------------- +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 enqueue operations with dsa kernel driver. + +1. bind 4 dsa device to idxd like common step 2:: + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 79:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 74:01.0 79:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 2 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 4 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 6 + ls /dev/dsa #check wq configure success + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx --lcore-dma=[lcore2@wq0.0,lcore2@wq2.1,lcore2@wq4.2,lcore2@wq6.3] + +3. 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=./vhost-net1,queues=2,server=1,packed_vq=0,mrg_rxbuf=1,in_order=1,queue_size=4096 \ + -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 + testpmd>set fwd rxonly + testpmd>start + +4. Attach pdump secondary process to primary process of virtio-user1 by same file-prefix:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=virtio1 -- --pdump 'device_id=net_virtio_user1,queue=0,rx-dev=/tmp/pdump-virtio-rx.pcap,mbuf-size=8000' + +5. 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=./vhost-net0,queues=2,server=1,packed_vq=0,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>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>start tx_first 7 + testpmd>stop + testpmd>set txpkts 2000,2000,2000,2000 + testpmd>start tx_first 1 + testpmd>stop + +6. Start vhost, then quit pdump and three testpmd, about split virtqueue inorder mergeable path, it use the 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. + +7. Clear virtio-user1 port stats:: + + testpmd>stop + testpmd>clear port stats all + testpmd>start + +8. Quit and relaunch vhost with diff channel by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx --lcore-dma=[lcore2@wq0.3,lcore2@wq2.4,lcore2@wq4.3,lcore2@wq6.4] + +9. Rerun step 4. + +10. virtio-user0 send packets:: + + testpmd>set burst 1 + testpmd>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>start tx_first 7 + testpmd>stop + testpmd>set txpkts 2000,2000,2000,2000 + testpmd>start tx_first 1 + testpmd>stop + +11. Rerun step 6. + +Test Case 13: VM2VM vhost-user/virtio-user split ring mergeable path and multi-queues indirect descriptor with dsa kernel driver +---------------------------------------------------------------------------------------------------------------------------------- +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 enqueue operations with dsa kernel driver. + +1. bind 4 dsa device to idxd like common step 2:: + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 79:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 74:01.0 79:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 2 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 4 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 6 + ls /dev/dsa #check wq configure success + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx --lcore-dma=[lcore2@wq0.0,lcore2@wq2.1,lcore2@wq4.2,lcore2@wq6.3] + +3. 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=./vhost-net1,queues=2,server=1,packed_vq=0,mrg_rxbuf=1,in_order=0,queue_size=4096 \ + -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 + testpmd>set fwd rxonly + testpmd>start + +4. Attach pdump secondary process to primary process of virtio-user1 by same file-prefix:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=virtio1 -- --pdump 'device_id=net_virtio_user1,queue=0,rx-dev=/tmp/pdump-virtio-rx.pcap,mbuf-size=8000' + +5. 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=./vhost-net0,queues=2,server=1,packed_vq=0,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>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>start tx_first 7 + testpmd>stop + testpmd>set txpkts 2000,2000,2000,2000 + testpmd>start tx_first 1 + testpmd>stop + +6. Start vhost, then quit pdump and three testpmd, about split virtqueue inorder 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. + +7. Clear virtio-user1 port stats:: + + testpmd>stop + testpmd>clear port stats all + testpmd>start + +8. Quit and relaunch vhost with diff channel by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx --lcore-dma=[lcore2@wq0.3,lcore2@wq2.4,lcore2@wq4.3,lcore2@wq6.4] + +9. Rerun step 4. + +10. Virtio-user0 send packets:: + + testpmd>set burst 1 + testpmd>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>start tx_first 7 + testpmd>stop + testpmd>set txpkts 2000,2000,2000,2000 + testpmd>start tx_first 1 + testpmd>stop + +11. Rerun step 6. + +Test Case 14: VM2VM vhost-user/virtio-user packed ring non-mergeable path and multi-queues payload check with dsa kernel driver +---------------------------------------------------------------------------------------------------------------------------------- +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 enqueue operations with dsa kernel driver. + +1. bind 3 dsa device to idxd like common step 2:: + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 74:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 2 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 4 + ls /dev/dsa #check wq configure success + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx --lcore-dma=[lcore2@wq0.0,lcore2@wq2.1,lcore2@wq4.2] + +3. 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=./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 + +4. Attach pdump secondary process to primary process of virtio-user1 by same file-prefix:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=virtio1 -- --pdump 'device_id=net_virtio_user1,queue=0,rx-dev=/tmp/pdump-virtio-rx.pcap,mbuf-size=8000' + +5. 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=./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 1 + testpmd>set txpkts 64,128,256,512 + testpmd>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>start tx_first 7 + testpmd>stop + testpmd>set txpkts 64 + testpmd>start tx_first 1 + testpmd>stop + +6. Start vhost testpmd, quit pdump and check virtio-user1 RX-packets is 566 and RX-bytes is 486016 and 502 packets with 960 length and 64 packets with 64 length in pdump-virtio-rx.pcap. + +7. Clear virtio-user1 port stats:: + + testpmd>stop + testpmd>clear port stats all + testpmd>start + +8. Quit and relaunch vhost with diff channel by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx --lcore-dma=[lcore2@wq0.4,lcore2@wq2.5,lcore2@wq4.6] + +9. Rerun step 4. + +10. Virtio-user0 send packets:: + + testpmd>set burst 1 + testpmd>set txpkts 64,128,256,512 + testpmd>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>start tx_first 7 + testpmd>stop + testpmd>set txpkts 64 + testpmd>start tx_first 1 + testpmd>stop + +11. Rerun step 6. + +Test Case 15: VM2VM vhost-user/virtio-user packed ring inorder non-mergeable path and multi-queues payload check with dsa kernel driver +---------------------------------------------------------------------------------------------------------------------------------------- +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 enqueue operations with dsa kernel driver. + +1. bind 4 dsa device to idxd like common step 2:: + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 79:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 74:01.0 79:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 2 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 4 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 6 + ls /dev/dsa #check wq configure success + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx --lcore-dma=[lcore2@wq0.0,lcore2@wq2.0,lcore2@wq4.1,lcore2@wq6.1] + +3. 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=./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 + +4. Attach pdump secondary process to primary process of virtio-user1 by same file-prefix:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=virtio1 -- --pdump 'device_id=net_virtio_user1,queue=0,rx-dev=/tmp/pdump-virtio-rx.pcap,mbuf-size=8000' + +5. 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=./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 1 + testpmd>set txpkts 64,128,256,512 + testpmd>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>start tx_first 7 + testpmd>stop + testpmd>set txpkts 64 + testpmd>start tx_first 1 + +6. Start vhost testpmd, quit pdump and check virtio-user1 RX-packets is 566 and RX-bytes is 486016 and 502 packets with 960 length and 64 packets with 64 length in pdump-virtio-rx.pcap. + +7. Clear virtio-user1 port stats:: + + testpmd>stop + testpmd>clear port stats all + testpmd>start + +8. Quit and relaunch vhost with diff channel by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx --lcore-dma=[lcore2@wq0.5,lcore2@wq2.6,lcore2@wq4.5,lcore2@wq6.6] + +9. Rerun step 4. + +10. virtio-user0 send packets:: + + testpmd>stop + testpmd>set burst 1 + testpmd>set txpkts 64,128,256,512 + testpmd>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>start tx_first 7 + testpmd>stop + testpmd>set txpkts 64 + testpmd>start tx_first 1 + +11. Rerun step 6. + +Test Case 16: VM2VM vhost-user/virtio-user packed ring mergeable path and multi-queues payload check with dsa kernel driver +----------------------------------------------------------------------------------------------------------------------------- +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 enqueue operations with dsa kernel driver. + +1. bind 2 dsa device to idxd:: + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 2 + ls /dev/dsa #check wq configure success + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx --lcore-dma=[lcore2@wq0.0,lcore2@wq0.1,lcore2@wq0.2,lcore2@wq2.3,lcore2@wq2.4] + +3. 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=./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 + +4. Attach pdump secondary process to primary process of virtio-user1 by same file-prefix:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=virtio1 -- --pdump 'device_id=net_virtio_user1,queue=0,rx-dev=/tmp/pdump-virtio-rx.pcap,mbuf-size=8000' + +5. 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=./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 + testpmd>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>set txpkts 64 + testpmd>start tx_first 7 + testpmd>stop + +6. Start vhost testpmd, quit pdump and check virtio-user1 check 502 packets and 279232 bytes and 54 packets with 4640 length and 448 packets with 64 length in pdump-virtio-rx.pcap. + +7. Clear virtio-user1 port stats:: + + testpmd>stop + testpmd>clear port stats all + testpmd>start + +8. Quit and relaunch vhost with diff channel by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx --lcore-dma=[lcore2@wq0.6,lcore2@wq0.7,lcore2@wq2.3,lcore2@wq2.4,lcore2@wq2.5] + +9. Rerun step 4. + +10. Virtio-user0 send packets:: + + testpmd>set burst 1 + testpmd>set txpkts 64,256,2000,64,256,2000 + testpmd>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>set txpkts 64 + testpmd>start tx_first 7 + testpmd>stop + +11. Rerun step 6. + +Test Case 17: VM2VM vhost-user/virtio-user packed ring inorder mergeable path and multi-queues payload check with dsa kernel driver +------------------------------------------------------------------------------------------------------------------------------------ +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 enqueue operations with dsa kernel driver. + +1. bind 8 dsa device to idxd like common step 2:: + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 74:01.0 79:01.0 e7:01.0 ec:01.0 f1:01.0 f6:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 2 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 4 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 6 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 8 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 10 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 12 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 14 + ls /dev/dsa #check wq configure success + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx --lcore-dma=[lcore2@wq0.0,lcore2@wq2.1,lcore2@wq4.2,lcore2@wq6.3,lcore2@wq8.4,lcore2@wq10.5,lcore2@wq12.6,lcore2@wq14.7] + +3. 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=./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 + +4. Attach pdump secondary process to primary process of virtio-user1 by same file-prefix:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=virtio1 -- --pdump 'device_id=net_virtio_user1,queue=0,rx-dev=/tmp/pdump-virtio-rx.pcap,mbuf-size=8000' + +5. 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=./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 + testpmd>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>set txpkts 64 + testpmd>start tx_first 7 + testpmd>stop + +6. Start vhost testpmd, quit pdump and check virtio-user1 RX-packets is 502 packets and 279232 bytes and 54 packets with 4640 length and 448 packets with 64 length in pdump-virtio-rx.pcap. + +7. Clear virtio-user1 port stats:: + + testpmd>stop + testpmd>clear port stats all + testpmd>start + +8. Quit and relaunch vhost with diff channel by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx --lcore-dma=[lcore2@wq0.7,lcore2@wq2.6,lcore2@wq4.5,lcore2@wq6.4,lcore2@wq8.3,lcore2@wq10.2,lcore2@wq12.1,lcore2@wq14.0] + +9. Rerun step 4. + +10. virtio-user0 send packets:: + + testpmd>set burst 1 + testpmd>set txpkts 64,256,2000,64,256,2000 + testpmd>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>set txpkts 64 + testpmd>start tx_first 7 + testpmd>stop + +11. Rerun step 6. + +Test Case 18: VM2VM vhost-user/virtio-user packed ring vectorized-tx path and multi-queues indirect descriptor with dsa kernel driver +------------------------------------------------------------------------------------------------------------------------------------- +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 enqueue operations with dsa kernel driver. + +1. bind 4 dsa device to idxd like common step 2:: + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 74:01.0 79:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 74:01.0 79:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 2 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 4 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 6 + ls /dev/dsa #check wq configure success + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 10-18 -n 4 \ + --vdev 'eth_vhost0,iface=vhost-net,queues=2,client=1,dmas=[txq0;txq1],dma_ring_size=2048' --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1],dma_ring_size=2048' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx \ + --lcore-dma=[lcore11@wq0.0,lcore11@wq2.1,lcore11@wq4.2,lcore11@wq6.3] + +3. 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=./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 + +4. Attach pdump secondary process to primary process by same file-prefix:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=virtio1 -- --pdump 'device_id=net_virtio_user1,queue=*,rx-dev=./pdump-virtio-rx.pcap,mbuf-size=8000' + +5. 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=./vhost-net,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>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>start tx_first 7 + testpmd>stop + testpmd>set txpkts 2000,2000,2000,2000 + testpmd>start tx_first 1 + testpmd>stop + +6. 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. + +Test Case 19: VM2VM vhost-user/virtio-user packed ring inorder mergeable path and multi-queues payload check with dsa dpdk and kernel driver +--------------------------------------------------------------------------------------------------------------------------------------------- +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 enqueue operations with dsa dpdk and kernel driver. + +1. bind 2 dsa device to vfio-pci and 2 dsa port to idxd like common step 1-2:: + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 e7:01.0 ec:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 8 2 + ls /dev/dsa #check wq configure success + # ./usertools/dpdk-devbind.py -b vfio-pci e7:01.0 ec:01.0 + +2. Launch vhost by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 -a 0000:e7:01.0 -a 0000:ec:01.0 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx --lcore-dma=[lcore2@0000:e7:01.0-q0,lcore2@0000:ec:01.0-q1,lcore2@wq0.0,lcore2@wq2.0] + +3. 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=./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 + +4. Attach pdump secondary process to primary process of virtio-user1 by same file-prefix:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=virtio1 -- --pdump 'device_id=net_virtio_user1,queue=0,rx-dev=/tmp/dsa-va-rx.pcap,mbuf-size=8000' + +5. 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=./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 + testpmd>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>set txpkts 64 + testpmd>start tx_first 7 + testpmd>stop + +6. Start vhost testpmd, quit pdump and check virtio-user1 RX-packets is 502 packets and 279232 bytes and 54 packets with 4640 length and 448 packets with 64 length in pdump-virtio-rx.pcap. + +7. Clear virtio-user1 port stats:: + + testpmd>stop + testpmd>clear port stats all + testpmd>start + +8. Quit and relaunch vhost with diff dsa channel by below command:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 \ + --vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1]' \ + --vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]' \ + --iova=va -- -i --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx --lcore-dma=[lcore2@0000:e7:01.0-q2,lcore2@0000:e7:01.0-q5,lcore2@0000:ec:01.0-q4,lcore2@wq0.1,lcore2@wq0.3] + +9. Rerun step 4. + +10. Virtio-user0 send packets:: + + testpmd>set burst 1 + testpmd>set txpkts 64,256,2000,64,256,2000 + testpmd>start tx_first 27 + testpmd>stop + testpmd>set burst 32 + testpmd>set txpkts 64 + testpmd>start tx_first 7 + testpmd>stop + +11. Rerun step 6. From patchwork Sat May 7 10:00:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 110837 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 4CE78A050A; Sat, 7 May 2022 12:00:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4284F4068A; Sat, 7 May 2022 12:00:34 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 948FC40395 for ; Sat, 7 May 2022 12:00:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651917631; x=1683453631; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=cbJGkVcghQHbmvKLFyzwxZg6kJsORG0sgT5Wzzi2wP0=; b=a8HeucRAOdqF9gYooAtxWy0OuGe2Q783XxXKvu2kkXyMvoOTGw/p1LBo XcojfflThnWrPEVqWhejf+L0oUB+Hu7Tzcqj7/b/6StmKqI/YlBhuvt/v wsU+kvQcIbHgWGKHKSTn5L8CG7b0smC/TSFJ4F3RtP81hJXajmqftbI/H JFm75MZ6OVHYCLf+wMj8eLTUCZaFUl9BksEYu0isei2P/fPsyg3+AMew7 LGeaGutNg52nVW9QmnDN16sUQSXHb7TvcydeWEAIh+mJ5PPJlCAhCXAbt hNf+v3zmV7HV9Wd9eUCUk7ot4xP6KvqcZo6OrcWIqRkYGpaFrU12ukGaB w==; X-IronPort-AV: E=McAfee;i="6400,9594,10339"; a="268584984" X-IronPort-AV: E=Sophos;i="5.91,206,1647327600"; d="scan'208";a="268584984" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2022 03:00:30 -0700 X-IronPort-AV: E=Sophos;i="5.91,206,1647327600"; d="scan'208";a="736139024" Received: from unknown (HELO localhost.localdomain) ([10.239.251.222]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2022 03:00:28 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V1 7/7] test_plans/vswitch_sample_dsa_test_plan: add vswitch_sample_dsa testplan Date: Sat, 7 May 2022 06:00:04 -0400 Message-Id: <20220507100004.311240-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 Add vswitch_sample_dsa_test_plan.rst into test_plans. Signed-off-by: Wei Ling Tested-by: Chenyu Huang Acked-by: Xingguang He --- test_plans/vswitch_sample_dsa_test_plan.rst | 895 ++++++++++++++++++++ 1 file changed, 895 insertions(+) create mode 100644 test_plans/vswitch_sample_dsa_test_plan.rst diff --git a/test_plans/vswitch_sample_dsa_test_plan.rst b/test_plans/vswitch_sample_dsa_test_plan.rst new file mode 100644 index 00000000..7613629c --- /dev/null +++ b/test_plans/vswitch_sample_dsa_test_plan.rst @@ -0,0 +1,895 @@ +.. Copyright (c) <2022>, Intel Corporation + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + - Neither the name of Intel Corporation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + +==================================================================== +Vswitch sample test vhost async operation with DSA driver test plan +==================================================================== + +Vswitch sample can leverage DMA to accelerate vhost async data-path from dpdk 20.11. This plan test +vhost async operation with dsa driver (kernel IDXD driver and DPDK vfio-pci driver) in vhost sample. +For more about vswitch example, please refer to the DPDK docment:http://doc.dpdk.org/guides/sample_app_ug/vhost.html + +Note: +1.For packed virtqueue virtio-net test, need qemu version > 4.2.0 and VM kernel version > v5.1, and packed ring multi-queues not support reconnect in qemu yet. +2.For split virtqueue virtio-net with multi-queues server mode test, need qemu version >= 5.2.0, dut to old qemu exist reconnect issue when multi-queues test. +3.The suite has not yet been automated. + +Prerequisites +============= + +Software +-------- +Trex:http://trex-tgn.cisco.com/trex/release/v2.26.tar.gz +qemu: https://download.qemu.org/qemu-6.2.0.tar.xz +iperf + +General set up +-------------- +1. Compile DPDK and vhost example:: + + # CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib -Dexamples=all --default-library= + # meson configure -Dexamples=vhost + # ninja -C -j 110 + For example, + CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib -Dexamples=all --default-library=x86_64-native-linuxapp-gcc + ninja -C x86_64-native-linuxapp-gcc -j 110 + +2. Get the PCI device ID and DSA device ID of DUT, for example, 0000:4f:00.1 is PCI device ID, 0000:6a:01.0 - 0000:f6:01.0 are DSA device IDs:: + + # ./usertools/dpdk-devbind.py -s + + Network devices using kernel driver + =================================== + 0000:4f:00.1 'Ethernet Controller E810-C for QSFP 1592' drv=ice unused=vfio-pci + + DMA devices using kernel driver + =============================== + 0000:6a:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:6f:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:74:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:79:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:e7:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:ec:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:f1:01.0 'Device 0b25' drv=idxd unused=vfio-pci + 0000:f6:01.0 'Device 0b25' drv=idxd unused=vfio-pci + +Test case +========= + +Common steps +------------ +1. Bind 1 NIC port to vfio-pci:: + + # ./usertools/dpdk-devbind.py -b vfio-pci + For example: + # ./usertools/dpdk-devbind.py -b vfio-pci 0000:00:4f.1 + +2.Bind DSA devices to DPDK vfio-pci driver:: + + # ./usertools/dpdk-devbind.py -b vfio-pci + For example, bind 2 DMA devices to vfio-pci driver: + # ./usertools/dpdk-devbind.py -b vfio-pci 0000:e7:01.0 0000:ec:01.0 + +.. note:: + + One DPDK DSA device can create 8 WQ at most. Below is an example, where DPDK DSA device will create one and + eight WQ for DSA deivce 0000:e7:01.0 and 0000:ec:01.0. The value of “max_queues” is 1~8: + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 4 -n 4 -a 0000:e7:01.0,max_queues=1 -- -i + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 4 -n 4 -a 0000:ec:01.0,max_queues=8 -- -i + +3. Bind DSA devices to kernel idxd driver, and configure Work Queue (WQ):: + + # ./usertools/dpdk-devbind.py -b idxd + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q + +.. note:: + + Better to reset WQ when need operate DSA devices that bound to idxd drvier: + # ./drivers/dma/idxd/dpdk_idxd_cfg.py --reset + You can check it by 'ls /dev/dsa' + numDevices: number of devices, where 0<=numDevices<=7, corresponding to 0000:6a:01.0 - 0000:f6:01.0 + numWq: Number of workqueues per DSA endpoint, where 1<=numWq<=8 + + For example, bind 2 DMA devices to idxd driver and configure WQ: + + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 1 0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 4 2 + Check WQ by 'ls /dev/dsa' and can find "wq0.0 wq2.0 wq2.1 wq2.2 wq2.3" + +Test Case 1: PVP performance vhost async enqueue operation with dsa dpdk channel +--------------------------------------------------------------------------------- +This case uses vhost example to test performance of split and packed ring when vhost uses the asynchronous enqueue operations +with dsa dpdk driver in PVP topology environment. + +1. Bind one physical port(4f:00.1) and one dsa device(6a:01.0) to vfio-pci like common step 1-2. + +2. On host, launch dpdk-vhost by below command:: + + # .//examples/dpdk-vhost -l 2-3 -n 4 -a 0000:4f:00.0 -a 0000:6a:01.0,max_queues=1 -- \ + -p 0x1 --mergeable 1 --vm2vm 1 --stats 1 --socket-file /tmp/vhost-net --dmas [txd0@0000:6a:01.0-q0] --client + +3. Launch virtio-user with packed ring:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --no-pci --file-prefix=virtio-user \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=/tmp/vhost-net,queues=1,mrg_rxbuf=0,in_order=1,packed_vq=1,server=1 \ + -- -i --rxq=1 --txq=1 --txd=1024 --rxd=1024 --nb-cores=1 + +4. Start pkts from virtio-user side to let vswitch know the mac addr:: + + testpmd>set fwd mac + testpmd>start tx_first + testpmd>stop + testpmd>start + +5. Inject pkts (packets length=64...1518) separately with dest_mac=virtio_mac_addresss (specific in above cmd with 00:11:22:33:44:10) to NIC using packet generator, record pvp (PG>nic>vswitch>virtio-user>vswitch>nic>PG) performance number can get expected. + +6. Quit and re-launch virtio-user with packed ring size not power of 2:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --no-pci --file-prefix=testpmd0 \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=/tmp/vhost-net,queues=1,mrg_rxbuf=0,in_order=1,packed_vq=1,server=1,queue_size=1025 -- -i --rxq=1 --txq=1 --txd=1025 --rxd=1025 --nb-cores=1 + +7. Re-test step 4-5, record performance of different packet length. + +8. Quit and re-launch virtio-user with split ring:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --no-pci --file-prefix=testpmd0 \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=/tmp/vhost-net,queues=1,mrg_rxbuf=0,in_order=1,server=1 -- -i --rxq=1 --txq=1 --txd=1024 --rxd=1024 --nb-cores=1 + +9. Re-test step 4-5, record performance of different packet length. + +Test Case 2: PVP vhost async enqueue operation with two VM and 2 dsa channels +------------------------------------------------------------------------------ +This case uses vhost example to test split and packed ring when vhost uses the asynchronous enqueue operations +with dsa dpdk driver in PVP topology environment with 2 VM and 2 queues. + +1. Bind one physical port and 2 dsa devices to vfio-pci like common step 1-2. + +2. On host, launch dpdk-vhost by below command:: + + # .//examples/dpdk-vhost -l 2-3 -n 4 -a 0000:18:00.0 -a 0000:6a:01.0,max_queues=2 -a 0000:6f:01.0,max_queues=1 -- \ + -p 0x1 --mergeable 1 --vm2vm 1 --stats 1 --socket-file /tmp/vhost-net0 --socket-file /tmp/vhost-net1 --dmas [txd0@0000:6a:01.0-q1,txd1@0000:6f:01.0-q0] --client + +3. launch two virtio-user ports:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --no-pci --file-prefix=testpmd0 \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=/tmp/vhost-net0,queues=1,server=1,mrg_rxbuf=1,in_order=0,packed_vq=1 -- -i --rxq=1 --txq=1 --txd=1024 --rxd=1024 --nb-cores=1 + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 7-8 -n 4 --no-pci --file-prefix=testpmd1 \ + --vdev=net_virtio_user1,mac=00:11:22:33:44:11,path=/tmp/vhost-net1,queues=1,server=1,mrg_rxbuf=1,in_order=1,vectorized=1 -- -i --rxq=1 --txq=1 --txd=1024 --rxd=1024 --nb-cores=1 + +4. Start pkts from two virtio-user side individually to let vswitch know the mac addr:: + + testpmd0>set fwd mac + testpmd0>start tx_first + testpmd0>stop + testpmd0>start + testpmd1>set fwd mac + testpmd1>start tx_first + testpmd1>stop + testpmd1>start + +5. Inject IMIX packets (64b...1518b) with dest_mac=virtio_mac_addresss (00:11:22:33:44:10 and 00:11:22:33:44:11) to NIC using packet generator,record performance number can get expected from Packet generator rx side. + +6. Stop dpdk-vhost side and relaunch it with same cmd as step2. + +7. Start pkts from two virtio-user side individually to let vswitch know the mac addr:: + + testpmd0>stop + testpmd0>start tx_first + testpmd0>stop + testpmd0>start + testpmd1>stop + testpmd1>start tx_first + testpmd1>stop + testpmd1>start + +8. Inject IMIX packets (64b...1518b) with dest_mac=virtio_mac_addresss (00:11:22:33:44:10 and 00:11:22:33:44:11) to NIC using packet generator, ensure get same throughput as step5. + +Test Case 3: VM2VM virtio-user forwarding test with 2 dsa dpdk channels +------------------------------------------------------------------------- +This case uses vhost example to test that split and packed ring can forwarding packets normally when vhost uses the +asynchronous enqueue operations with dsa dpdk driver in VM2VM virtio-user topology environment with 2 queues. + +1.Bind one physical ports and 1 dsa devices to vfio-pci like common step 1-2. + +2. On host, launch dpdk-vhost by below command:: + + # .//examples/dpdk-vhost -l 2-3 -n 4 -a 0000:18:00.0 -a 0000:6a:01.0,max_queues=2 \ + -- -p 0x1 --mergeable 1 --vm2vm 1 --socket-file /tmp/vhost-net0 --socket-file /tmp/vhost-net1 \ + --dmas [txd0@0000:6a:01.0-q0,txd1@0000:6a:01.0-q1] --client + +3. Launch virtio-user:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --no-pci --file-prefix=testpmd0 \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=/tmp/vhost-net0,queues=1,server=1,mrg_rxbuf=1,in_order=0,packed_vq=1 -- -i --rxq=1 --txq=1 --txd=1024 --rxd=1024 --nb-cores=1 + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 7-8 -n 4 --no-pci --file-prefix=testpmd1 \ + --vdev=net_virtio_user1,mac=00:11:22:33:44:11,path=/tmp/vhost-net1,queues=1,server=1,mrg_rxbuf=1,in_order=1,vectorized=1 -- -i --rxq=1 --txq=1 --txd=1024 --rxd=1024 --nb-cores=1 + +4. Loop packets between two virtio-user sides, record performance number with 64b/2000b/8000b/IMIX pkts can get expected:: + + testpmd0>set fwd mac + testpmd0>start tx_first + testpmd0>stop + testpmd0>set eth-peer 0 00:11:22:33:44:11 + testpmd0>start + testpmd1>set fwd mac + testpmd1>set eth-peer 0 00:11:22:33:44:10 + testpmd1>set txpkts 64 + testpmd1>start tx_first + testpmd1>show port stats all + testpmd1>stop + testpmd1>set txpkts 2000 + testpmd1>start tx_first + testpmd1>show port stats all + testpmd1>stop + testpmd1>set txpkts 2000,2000,2000,2000 + testpmd1>start tx_first + testpmd1>show port stats all + testpmd1>stop + testpmd1>set txpkts 64,256,2000,64,256,2000 + testpmd1>start tx_first + testpmd1>show port stats all + +5. Stop and quit dpdk-vhost side and relaunch it with same cmd as step2. + +6. Rerun step 4. + +Test Case 4: VM2VM virtio-pmd test with 2 dsa channels register/unregister stable check +------------------------------------------------------------------------------------------------- +This case checks vhost can work stably after registering and unregistering the virtio port many times when vhost uses +the asynchronous enqueue operations with dsa dpdk driver in VM2VM topology environment with 2 queues. + +1. Bind one physical port and one dsa device to vfio-pci like common step 1-2:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + # ./usertools/dpdk-devbind.py -b vfio-pci 6a:01.0 + +2. On host, launch dpdk-vhost by below command:: + + # .//examples/dpdk-vhost -l 2-3 -n 4 -a 0000:4f:00.1 -a 0000:6a:01.0,max_queues=2 \ + -- -p 0x1 --mergeable 1 --vm2vm 1 --socket-file /tmp/vhost-net0 --socket-file /tmp/vhost-net1 \ + --dmas [txd0@0000:6a:01.0-q0,txd1@0000:6a:01.0-q1] --client + +3. Start VM1 with qemu:: + + taskset -c 5,6 /usr/local/qemu-6.1.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 4 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/home/osimg/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=/tmp/vhost-net0,server \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=true,mrg_rxbuf=on,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on -vnc :10 + +4. Start VM2 with qemu:: + + taskset -c 7,8 /usr/local/qemu-6.1.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 4 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/home/osimg/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=/tmp/vhost-net1,server \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=true,mrg_rxbuf=on,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,packed=on -vnc :12 + +5. Bind virtio port to vfio-pci in both two VMs:: + + modprobe vfio enable_unsafe_noiommu_mode=1 + modprobe vfio-pci + echo 1 > /sys/module/vfio/parameters/enable_unsafe_noiommu_mode + ./usertools/dpdk-devbind.py --bind=vfio-pci 00:05.0 + +6. Start testpmd in VMs seperately:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 -- -i --rxq=1 --txq=1 --nb-cores=1 --txd=1024 --rxd=1024 + +7. Loop packets between two virtio-user sides, record performance number with 64b/2000b/8000b/IMIX pkts can get expected:: + + testpmd0>set fwd mac + testpmd0>start tx_first + testpmd0>stop + testpmd0>set eth-peer 0 52:54:00:00:00:02 + testpmd0>start + testpmd1>set fwd mac + testpmd1>set eth-peer 0 52:54:00:00:00:01 + testpmd1>set txpkts 64 + testpmd1>start tx_first + testpmd1>show port stats all + testpmd1>stop + testpmd1>set txpkts 2000 + testpmd1>start tx_first + testpmd1>show port stats all + testpmd1>stop + testpmd1>set txpkts 2000,2000,2000,2000 + testpmd1>start tx_first + testpmd1>show port stats all + testpmd1>stop + testpmd1>set txpkts 64,256,2000,64,256,2000 + testpmd1>start tx_first + testpmd1>show port stats all + +8. Quit two testpmd in two VMs, bind virtio-pmd port to virtio-pci,then bind port back to vfio-pci, rerun below cmd 50 times:: + + ./usertools/dpdk-devbind.py -u 00:05.0 + ./usertools/dpdk-devbind.py --bind=virtio-pci 00:05.0 + ./usertools/dpdk-devbind.py --bind=vfio-pci 00:05.0 + +9. Restart vhost, then rerun step 6-7,check vhost can stable work and get expected throughput. + +Test Case 5: VM2VM split ring with 2 enqueue dsa dpdk channels test with iperf and reconnect stable check +----------------------------------------------------------------------------------------------------------- +This case checks vhost can work stably after reconnecting when vhost uses the asynchronous enqueue operations with +dsa dpdk driver in VM2VM topology environment with 2 queues. + +1. Bind one physical port and 1 dsa device to vfio-pci like common step 1-2:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + # ./usertools/dpdk-devbind.py -b vfio-pci 6a:01.0 + +2. On host, launch dpdk-vhost by below command:: + + # .//examples/dpdk-vhost -l 2-3 -n 4 -a 0000:4f:00.1 -a 0000:6a:01.0,max_queues=2 \ + -- -p 0x1 --mergeable 1 --vm2vm 1 --socket-file /tmp/vhost-net0 --socket-file /tmp/vhost-net1 \ + --dmas [txd0@0000:6a:01.0-q0,txd1@0000:6a:01.0-q1] --client + +3. Start VM1 with qemu:: + + taskset -c 5,6 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 4 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G0,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=/tmp/vhost-net0,server \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=true,mrg_rxbuf=off,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on -vnc :10 + +4. Start VM2 with qemu:: + + taskset -c 7,8 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 4 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G1,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=/tmp/vhost-net1,server \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=true,mrg_rxbuf=off,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on -vnc :12 + +5. On VM1, set virtio device IP and run arp protocal:: + + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +6. On VM2, set virtio device IP and run arp protocal:: + + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +7. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +8. Check iperf throughput can get x Gbits/sec. + +9. Scp 1MB file form VM0 to VM1, check packets can be forwarding success by scp:: + + # scp root@1.1.1.8:/ + +10. Relaunch dpdk-vhost, then rerun step 7-9 five times. + +11. Relaunch dpdk-vhost by below command:: + + # .//examples/dpdk-vhost -l 2-3 -n 4 -a 0000:4f:00.1 -a 0000:6a:01.0,max_queues=2 -a 0000:6f:01.0,max_queues=2 \ + -- -p 0x1 --mergeable 1 --vm2vm 1 --socket-file /tmp/vhost-net0 --socket-file /tmp/vhost-net1 \ + --dmas [txd0@0000:6a:01.0-q0,txd1@0000:6f:01.0-q1] --client + +12. Rerun step 7-9 five times. + +Test Case 6: VM2VM packed ring with 2 dsa dpdk channels stable test with iperf +------------------------------------------------------------------------------- +This case checks vhost can work stably when vhost uses the asynchronous enqueue operations with dsa dpdk driver in +VM2VM topology environment with 2 queues. + +1. Bind one physical port and 1 dsa device to vfio-pci like common step 1-2:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + # ./usertools/dpdk-devbind.py -b vfio-pci 6a:01.0 + +2. Launch dpdk-vhost by below command:: + + # .//examples/dpdk-vhost -l 26-28 -n 4 -a 0000:4f:00.1 -a 0000:6a:01.0,max_queues=2 \ + -- -p 0x1 --mergeable 1 --vm2vm 1 --socket-file /tmp/vhost-net0 --socket-file /tmp/vhost-net1 \ + --dmas [txd0@0000:6a:01.0-q1,txd1@0000:6a:01.0-q0] + +3. Start VM1 with qemu:: + + taskset -c 5,6 /usr/local/qemu-6.1.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 4 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/home/osimg/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=/tmp/vhost-net0 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=true,mrg_rxbuf=off,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,packed=on -vnc :10 + +4. Start VM2 with qemu:: + + taskset -c 7,8 /usr/local/qemu-6.1.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 4 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/home/osimg/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=/tmp/vhost-net1 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=true,mrg_rxbuf=off,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,packed=on -vnc :12 + +5. On VM1, set virtio device IP and run arp protocal:: + + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +6. On VM2, set virtio device IP and run arp protocal:: + + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +7. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +8. Check iperf throughput can get x Gbits/sec. + +9. Scp 1MB file form VM1 to VM2M, check packets can be forwarding success by scp:: + + # scp root@1.1.1.8:/ + +10. Rerun step 7-9 five times. + +Test Case 7: PVP performance vhost async enqueue with dsa kernel channel +------------------------------------------------------------------------- +This case uses vhost example to test performance of split and packed ring when vhost uses the asynchronous enqueue operations +with dsa kernel driver in PVP topology environment. + +1. Bind one physical port(4f:00.1) to vfio-pci and one dsa device(6a:01.0) to idxd like common step 1 and 3:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 2 0 + ls /dev/dsa #check wq configure success + +2. On host, launch dpdk-vhost by below command:: + + # .//examples/dpdk-vhost -l 2-3 -n 4 -a 0000:4f:00.0 \ + -- -p 0x1 --mergeable 1 --vm2vm 1 --stats 1 --socket-file /tmp/vhost-net --dmas [txd0@wq0.0] --client + +3. Launch virtio-user with packed ring:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --no-pci --file-prefix=virtio-user \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=/tmp/vhost-net,queues=1,mrg_rxbuf=0,in_order=1,packed_vq=1,server=1 \ + -- -i --rxq=1 --txq=1 --txd=1024 --rxd=1024 --nb-cores=1 + +4. Start pkts from virtio-user side to let vswitch know the mac addr:: + + testpmd>set fwd mac + testpmd>start tx_first + testpmd>stop + testpmd>start + +5. Inject pkts (packets length=64...1518) separately with dest_mac=virtio_mac_addresss (specific in above cmd with 00:11:22:33:44:10) to NIC using packet generator, record pvp (PG>nic>vswitch>virtio-user>vswitch>nic>PG) performance number can get expected. + +6. Quit and re-launch virtio-user with packed ring size not power of 2:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --no-pci --file-prefix=testpmd0 \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=/tmp/vhost-net,queues=1,mrg_rxbuf=0,in_order=1,packed_vq=1,server=1,queue_size=1025 -- -i --rxq=1 --txq=1 --txd=1025 --rxd=1025 --nb-cores=1 + +7. Re-test step 4-5, record performance of different packet length. + +8. Quit and re-launch virtio-user with split ring:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --no-pci --file-prefix=testpmd0 \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=/tmp/vhost-net,queues=1,mrg_rxbuf=0,in_order=1,server=1 -- -i --rxq=1 --txq=1 --txd=1024 --rxd=1024 --nb-cores=1 + +9. Re-test step 4-5, record performance of different packet length. + +Test Case 8: PVP vhost async enqueue operation with two VM and 2 dsa kernel channels +--------------------------------------------------------------------------------------- +This case uses vhost example to test split and packed ring when vhost uses the asynchronous enqueue operations +with dsa kernel driver in PVP topology environment with 2 VM and 2 queues. + +1. Bind one physical port to vfio-pci and 1 dsa device to idxd like common step 1 and 3:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 2 0 + ls /dev/dsa #check wq configure success + +2. On host, launch dpdk-vhost by below command:: + + # .//examples/dpdk-vhost -l 2-3 -n 4 -a 0000:4f:00.1 \ + -- -p 0x1 --mergeable 1 --vm2vm 1 --stats 1 --socket-file /tmp/vhost-net0 --socket-file /tmp/vhost-net1 \ + --dmas [txd0@wq0.0,txd1@wq0.1] --client + +3. launch two virtio-user ports:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --no-pci --file-prefix=testpmd0 \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=/tmp/vhost-net0,queues=1,server=1,mrg_rxbuf=1,in_order=0,packed_vq=1 -- -i --rxq=1 --txq=1 --txd=1024 --rxd=1024 --nb-cores=1 + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 7-8 -n 4 --no-pci --file-prefix=testpmd1 \ + --vdev=net_virtio_user1,mac=00:11:22:33:44:11,path=/tmp/vhost-net1,queues=1,server=1,mrg_rxbuf=1,in_order=1,vectorized=1 -- -i --rxq=1 --txq=1 --txd=1024 --rxd=1024 --nb-cores=1 + +4. Start pkts from two virtio-user side individually to let vswitch know the mac addr:: + + testpmd0>set fwd mac + testpmd0>start tx_first + testpmd0>stop + testpmd0>start + testpmd1>set fwd mac + testpmd1>start tx_first + testpmd1>stop + testpmd1>start + +5. Inject IMIX packets (64b...1518b) with dest_mac=virtio_mac_addresss (00:11:22:33:44:10 and 00:11:22:33:44:11) to NIC using packet generator,record performance number can get expected from Packet generator rx side. + +6. Stop dpdk-vhost side and relaunch it with same cmd as step2. + +7. Start pkts from two virtio-user side individually to let vswitch know the mac addr:: + + testpmd0>stop + testpmd0>start tx_first + testpmd0>stop + testpmd0>start + testpmd1>stop + testpmd1>start tx_first + testpmd1>stop + testpmd1>start + +8. Inject IMIX packets (64b...1518b) with dest_mac=virtio_mac_addresss (00:11:22:33:44:10 and 00:11:22:33:44:11) to NIC using packet generator, ensure get same throughput as step5. + +Test Case 9: VM2VM virtio-user forwarding test with 2 dsa kernel channels +--------------------------------------------------------------------------------- +This case uses vhost example to test split and packed ring when vhost uses the asynchronous enqueue operations +with dsa kernel driver in VM2VM topology environment with 2 queues. + +1.Bind one physical port to vfio-pci and 2 dsa device to idxd like common step 1 and 3:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 2 0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 2 2 + ls /dev/dsa #check wq configure success + +2. On host, launch dpdk-vhost by below command:: + + # .//examples/dpdk-vhost -l 2-3 -n 4 -a 0000:4f:01.0 \ + -- -p 0x1 --mergeable 1 --vm2vm 1 --socket-file /tmp/vhost-net0 --socket-file /tmp/vhost-net1 \ + --dmas [txd0@wq0.0,txd1@wq2.1] --client + +3. Launch virtio-user:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --no-pci --file-prefix=testpmd0 \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=/tmp/vhost-net0,queues=1,server=1,mrg_rxbuf=1,in_order=0,packed_vq=1 -- -i --rxq=1 --txq=1 --txd=1024 --rxd=1024 --nb-cores=1 + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 7-8 -n 4 --no-pci --file-prefix=testpmd1 \ + --vdev=net_virtio_user1,mac=00:11:22:33:44:11,path=/tmp/vhost-net1,queues=1,server=1,mrg_rxbuf=1,in_order=1,vectorized=1 -- -i --rxq=1 --txq=1 --txd=1024 --rxd=1024 --nb-cores=1 + +4. Loop packets between two virtio-user sides, record performance number with 64b/2000b/8000b/IMIX pkts can get expected:: + + testpmd0>set fwd mac + testpmd0>start tx_first + testpmd0>stop + testpmd0>set eth-peer 0 00:11:22:33:44:11 + testpmd0>start + testpmd1>set fwd mac + testpmd1>set eth-peer 0 00:11:22:33:44:10 + testpmd1>set txpkts 64 + testpmd1>start tx_first + testpmd1>show port stats all + testpmd1>stop + testpmd1>set txpkts 2000 + testpmd1>start tx_first + testpmd1>show port stats all + testpmd1>stop + testpmd1>set txpkts 2000,2000,2000,2000 + testpmd1>start tx_first + testpmd1>show port stats all + testpmd1>stop + testpmd1>set txpkts 64,256,2000,64,256,2000 + testpmd1>start tx_first + testpmd1>show port stats all + +5. Stop and quit dpdk-vhost side and relaunch it with same cmd as step2. + +6. Rerun step 4. + +Test Case 10: VM2VM virtio-pmd test with 2 dsa kernel channels register/unregister stable check +------------------------------------------------------------------------------------------------- +This case checks vhost can work stably after unregistering and registering the virtio port many times when vhost uses +the asynchronous enqueue operations with dsa kernel driver in VM2VM topology environment with 2 queues. + +1. Bind one physical port to vfio-pci and one dsa device to idxd like common step 1 and 3:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 2 0 + ls /dev/dsa #check wq configure success + +2. On host, launch dpdk-vhost by below command:: + + # .//examples/dpdk-vhost -l 2-3 -n 4 -a 0000:4f:00.1 \ + -- -p 0x1 --mergeable 1 --vm2vm 1 --socket-file /tmp/vhost-net0 --socket-file /tmp/vhost-net1 \ + --dmas [txd0@wq0.0,txd1@wq0.1] --client + +3. Start VM1 with qemu:: + + taskset -c 5,6 /usr/local/qemu-6.1.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 4 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/home/osimg/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=/tmp/vhost-net0,server \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=true,mrg_rxbuf=on,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on -vnc :10 + +4. Start VM2 with qemu:: + + taskset -c 7,8 /usr/local/qemu-6.1.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 4 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/home/osimg/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=/tmp/vhost-net1,server \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=true,mrg_rxbuf=on,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,packed=on -vnc :12 + +5. Bind virtio port to vfio-pci in both two VMs:: + + modprobe vfio enable_unsafe_noiommu_mode=1 + modprobe vfio-pci + echo 1 > /sys/module/vfio/parameters/enable_unsafe_noiommu_mode + ./usertools/dpdk-devbind.py --bind=vfio-pci 00:05.0 + +6. Start testpmd in VMs seperately:: + + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 -- -i --rxq=1 --txq=1 --nb-cores=1 --txd=1024 --rxd=1024 + +7. Loop packets between two virtio-user sides, record performance number with 64b/2000b/8000b/IMIX pkts can get expected:: + + testpmd0>set fwd mac + testpmd0>start tx_first + testpmd0>stop + testpmd0>set eth-peer 0 52:54:00:00:00:02 + testpmd0>start + testpmd1>set fwd mac + testpmd1>set eth-peer 0 52:54:00:00:00:01 + testpmd1>set txpkts 64 + testpmd1>start tx_first + testpmd1>show port stats all + testpmd1>stop + testpmd1>set txpkts 2000 + testpmd1>start tx_first + testpmd1>show port stats all + testpmd1>stop + testpmd1>set txpkts 2000,2000,2000,2000 + testpmd1>start tx_first + testpmd1>show port stats all + testpmd1>stop + testpmd1>set txpkts 64,256,2000,64,256,2000 + testpmd1>start tx_first + testpmd1>show port stats all + +8. Quit two testpmd in two VMs, bind virtio-pmd port to virtio-pci,then bind port back to vfio-pci, rerun below cmd 50 times:: + + ./usertools/dpdk-devbind.py -u 00:05.0 + ./usertools/dpdk-devbind.py --bind=virtio-pci 00:05.0 + ./usertools/dpdk-devbind.py --bind=vfio-pci 00:05.0 + +9. Restart vhost, then rerun step 6-7,check vhost can stable work and get expected throughput. + +Test Case 11: VM2VM split ring with 2 enqueue dsa kernel channels test with iperf and reconnect stable check +------------------------------------------------------------------------------------------------------------- +This case checks vhost can work stably after reconnecting when vhost uses the asynchronous enqueue operations with +dsa kernel driver in VM2VM topology environment with 2 queues. + +1. Bind one physical port to vfio-pci and 2 dsa device to idxd like common step 1 and 3:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 6f:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 6f:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 2 0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 2 2 + ls /dev/dsa #check wq configure success + +2. On host, launch dpdk-vhost by below command:: + + # .//examples/dpdk-vhost -l 2-3 -n 4 -a 0000:4f:00.1 \ + -- -p 0x1 --mergeable 1 --vm2vm 1 --socket-file /tmp/vhost-net0 --socket-file /tmp/vhost-net1 \ + --dmas [txd0@wq0.0,txd1@wq0.1] --client + +3. Start VM1 with qemu:: + + taskset -c 5,6 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 4 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G0,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=/tmp/vhost-net0,server \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=true,mrg_rxbuf=off,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on -vnc :10 + +4. Start VM2 with qemu:: + + taskset -c 7,8 /root/xingguang/qemu-6.2.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 4 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge1G1,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/root/xingguang/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=/tmp/vhost-net1,server \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=true,mrg_rxbuf=off,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on -vnc :12 + +5. On VM1, set virtio device IP and run arp protocal:: + + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +6. On VM2, set virtio device IP and run arp protocal:: + + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +7. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +8. Check iperf throughput can get x Gbits/sec. + +9. Scp 1MB file form VM0 to VM1, check packets can be forwarding success by scp:: + + # scp root@1.1.1.8:/ + +10. Relaunch dpdk-vhost, then rerun step 7-9 five times. + +11. Relaunch dpdk-vhost by below command:: + + # .//examples/dpdk-vhost -l 2-3 -n 4 -a 0000:4f:00.1 \ + -- -p 0x1 --mergeable 1 --vm2vm 1 --socket-file /tmp/vhost-net0 --socket-file /tmp/vhost-net1 \ + --dmas [txd0@wq0.0,txd1@wq2.1] --client + +12. Rerun step 7-9 five times. + +Test Case 12: VM2VM packed ring with 2 dsa kernel channels stable test with iperf +---------------------------------------------------------------------------------- +This case checks vhost can work stably when vhost uses the asynchronous enqueue operations with dsa kernel driver in +VM2VM topology environment with 2 queues. + +1. Bind one physical port to vfio-pci and 1 dsa device to idxd like common step 1 and 3:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 4f:00.1 + + ls /dev/dsa #check wq configure, reset if exist + # ./usertools/dpdk-devbind.py -u 6a:01.0 + # ./usertools/dpdk-devbind.py -b idxd 6a:01.0 + # ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 2 0 + ls /dev/dsa #check wq configure success + +2. Launch dpdk-vhost by below command:: + + # .//examples/dpdk-vhost -l 26-28 -n 4 -a 0000:4f:00.1 -a 0000:6a:01.0,max_queues=2 \ + -- -p 0x1 --mergeable 1 --vm2vm 1 --socket-file /tmp/vhost-net0 --socket-file /tmp/vhost-net1 \ + --dmas [txd0@wq0.0,txd1@wq0.1] + +3. Start VM1 with qemu:: + + taskset -c 5,6 /usr/local/qemu-6.1.0/bin/qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 4 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/home/osimg/ubuntu20-04.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \ + -chardev socket,id=char0,path=/tmp/vhost-net0 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,disable-modern=true,mrg_rxbuf=off,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,packed=on -vnc :10 + +4. Start VM2 with qemu:: + + taskset -c 7,8 /usr/local/qemu-6.1.0/bin/qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 4 -m 4096 \ + -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge,share=on \ + -numa node,memdev=mem -mem-prealloc -drive file=/home/osimg/ubuntu20-04-2.img \ + -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \ + -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \ + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \ + -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6003-:22 \ + -chardev socket,id=char0,path=/tmp/vhost-net1 \ + -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ + -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=true,mrg_rxbuf=off,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,packed=on -vnc :12 + +5. On VM1, set virtio device IP and run arp protocal:: + + # ifconfig ens5 1.1.1.2 + # arp -s 1.1.1.8 52:54:00:00:00:02 + +6. On VM2, set virtio device IP and run arp protocal:: + + # ifconfig ens5 1.1.1.8 + # arp -s 1.1.1.2 52:54:00:00:00:01 + +7. Check the iperf performance between two VMs by below commands:: + + # iperf -s -i 1 + # iperf -c 1.1.1.2 -i 1 -t 60 + +8. Check iperf throughput can get x Gbits/sec. + +9. Scp 1MB file form VM1 to VM2M, check packets can be forwarding success by scp:: + + # scp root@1.1.1.8:/ + +10. Rerun step 7-9 five times. \ No newline at end of file