From patchwork Thu Aug 11 05:59:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 114820 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 20ECEA0548; Thu, 11 Aug 2022 08:02:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 18B89427F2; Thu, 11 Aug 2022 08:02:33 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 480CD40DDA for ; Thu, 11 Aug 2022 08:02: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=1660197751; x=1691733751; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=9fyhLt9D2Bq5bbk+NjjP0VqCx9mGLPtChnGigQ5bjQE=; b=MuwgFUFIXEofDZfz/LLO+/6x0Wpy5Mjt6rHA6osL0sm+mueIz1wgHr26 EbaO5kyW2qHU1SIamKv0fnYZatsD1Glpd+1NAe4SLja9z8hnXBRBBlkWx aCRZykiaFJ207caMeXYFt4QlfBp5VbRHZxjszKLcsBD+igaSrGXisNfVn ktaq4K6vBXhvfSuogwMSfxnhjJxjePP0dUxlOTap8n8i87szg6V9APpJG ZY3LsVBKf4VH5z0I5twlhNMAKDzZiZmhEvqO5Yb61swcFeGDaeCQihYBl we+pNETjCsENiR1Atfl8fxU2PpGOhLdkCKCoV0bGx2z2yy7XpeF5yIqXQ Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10435"; a="377558033" X-IronPort-AV: E=Sophos;i="5.93,228,1654585200"; d="scan'208";a="377558033" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Aug 2022 23:02:30 -0700 X-IronPort-AV: E=Sophos;i="5.93,228,1654585200"; d="scan'208";a="665226234" Received: from unknown (HELO localhost.localdomain) ([10.239.252.222]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Aug 2022 23:02:28 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V4 1/2] test_plans/vhost_pmd_xstats_test_plan: modify testplan by DPDK change Date: Thu, 11 Aug 2022 01:59:03 -0400 Message-Id: <20220811055903.385928-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 According to DPDK commit be75dc99ea(vhost: support per-virtqueue statistics), the return output of `show port xstats 1` command have changed, so modify the testsuite to send different IP packets to verify the different queues can receive the packets. Signed-off-by: Wei Ling --- test_plans/vhost_pmd_xstats_test_plan.rst | 342 +++++++++++++--------- 1 file changed, 199 insertions(+), 143 deletions(-) diff --git a/test_plans/vhost_pmd_xstats_test_plan.rst b/test_plans/vhost_pmd_xstats_test_plan.rst index ed21783b..1c5ec1f3 100644 --- a/test_plans/vhost_pmd_xstats_test_plan.rst +++ b/test_plans/vhost_pmd_xstats_test_plan.rst @@ -1,9 +1,9 @@ .. SPDX-License-Identifier: BSD-3-Clause Copyright(c) 2019 Intel Corporation -======================================== -vhost PMD Xstats Tests restart test plan -======================================== +============================ +vhost PMD Xstats test plan +============================ Description =========== @@ -11,280 +11,335 @@ Description This test plan will cover the basic vhost pmd xstats test with with 10 tx/rx paths. Includes mergeable, non-mergeable, vectorized_rx, inorder mergeable, inorder non-mergeable, virtio 1.1 mergeable, virtio 1.1 non-mergeable,virtio 1.1 inorder mergeable, virtio 1.1 inorder non-mergeable, virtio1.1 vectorized path, also cover stability cases. +From DPDK 22.07, vhost support per-virtqueue statistics, Per-virtqueue statistics collection will be enabled when the flag "RTE_VHOST_USER_NET_STATS_ENABLE" is set. It is disabled by default. Note IXIA or Scapy packes includes 4 CRC bytes and vhost side will remove the CRC when receive packests. -Test flow +Prerequisites +============= + +Topology +--------- + + Test flow:Traffic Generator --> NIC --> Vhost --> Virtio--> Vhost --> NIC --> Traffic Generator + +Hardware +-------- + Supportted NICs: ALL + +Software +-------- + + Scapy: http://www.secdev.org/projects/scapy/ + +General set up +-------------- +1. Compile DPDK:: + + # CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib -Dexamples=all --default-library=static + # ninja -C -j 110 + For example: + CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib -Dexamples=all --default-library=static x86_64-native-linuxapp-gcc + ninja -C x86_64-native-linuxapp-gcc -j 110 + +2. Get the PCI device ID of DUT, for example, 0000:18:00.0 is PCI device ID:: + + # ./usertools/dpdk-devbind.py -s + + Network devices using kernel driver + =================================== + 0000:18:00.0 'Device 159b' if=ens785f0 drv=ice unused=vfio-pci + +Test case ========= -TG --> NIC --> Vhost --> Virtio--> Vhost --> NIC --> TG +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:18.0 -Test Case 1: xstats test with packed ring mergeable path -======================================================== +2. Check the statistic type and number in each queue is correct. + For example: send 1000 packets with 1028B size(includes 4 CRC bytes) with different destination IP to two queues, the total statistic number of tx_q0_size_1024_to_1518_packets and tx_q1_size_1024_to_1518_packets should be 1000, the statistics about the rx direction is the same. + Send 1000 packets with ucast type with different destination IP to two queues, the total number of tx_q0_unicast_packets and tx_q1_unicast_packets should both be 1000, the statistics about the rx direction is the same. -1. Bind one port to vfio-pci, then launch vhost by below command:: + +Test Case 1: Vhost pmd xstats stability test with split ring inorder mergeable path +----------------------------------------------------------------------------------- +This case use Scapy or other traffic generator to send packets of different types and packet sizes with different destination IP addresses to test vhost pmd xstats stability when using split ring inorder mergeable path. + +1. Bind one port to vfio-pci like common step 1, then launch vhost by below command:: rm -rf vhost-net* ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-4 \ - --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2,client=0' -- -i --nb-cores=2 --rxq=2 --txq=2 - testpmd>set fwd mac + --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 + testpmd>set fwd io testpmd>start 2. Launch virtio-user by below command:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-7 \ --no-pci --file-prefix=virtio \ - --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=2,packed_vq=1,mrg_rxbuf=1,in_order=0 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=2,in_order=1,mrg_rxbuf=1 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 - >set fwd mac - >start + testpmd>set fwd io + testpmd>start -3. Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523). +3. Let Traffic Generator generate and send 10000 packets for each packet sizes(64, 128, 255, 512, 1024, 1523) with different destination IP. -4. On host run "show port xstats 1", and check the statistic type and number is correct. -For example: send 1000 packets with 1028B size(includes 4 CRC bytes), the statistic number of tx_size_1024_to_1522_packets and rx_size_1024_to_1522_packets should both 1000. +4. On host run "show port xstats 1", and check the statistic type and number is correct like common step 2. -5. Let TG generate send 10000 packets for each different types (broadcast, multicast, ucast). +5. Let Traffic Generator generate and send 10000 packets for each different types (broadcast, multicast, ucast). -6. On host run "show port xstats 1", and check the statistic type and number is correct. -For example: send 1000 packets with ucast type, the number of tx_unicast_packets and rx_unicast_packets should both 1000. +6. On host run "show port xstats 1", and check the statistic type and number is correct like common step 2. -Test Case 2: xstats test with packed ring non-mergeable path -============================================================ +Test Case 2: Vhost pmd xstats test with split ring inorder non-mergeable path +----------------------------------------------------------------------------- +This case use Scapy or other traffic generator to send packets of different types and packet sizes with different destination IP addresses to test vhost pmd xstats when using split ring inorder non-mergeable path. -1. Bind one port to vfio-pci, then launch vhost by below command:: +1. Bind one port to vfio-pci like common step 1, then launch vhost by below command:: rm -rf vhost-net* ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-4 \ - --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2,client=0' -- -i --nb-cores=2 --rxq=2 --txq=2 - testpmd>set fwd mac + --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 + testpmd>set fwd io testpmd>start 2. Launch virtio-user by below command:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-7 \ --no-pci --file-prefix=virtio \ - --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=2,packed_vq=1,mrg_rxbuf=0,in_order=0 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=2,in_order=1,mrg_rxbuf=0 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 - >set fwd mac - >start + testpmd>set fwd io + testpmd>start -3. Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523). +3. Let Traffic Generator generate and send 10000 packets for each packet sizes(64, 128, 255, 512, 1024, 1523) with different destination IP. -4. On host run "show port xstats 1", and check the statistic type and number is correct. +4. On host run "show port xstats 1", and check the statistic type and number is correct like common step 2. -5. Let TG generate send 10000 packets for each different types (broadcast, multicast, ucast). +5. Let Traffic Generator generate and send 10000 packets for each different types (broadcast, multicast, ucast). -6. On host run "show port xstats 1", and check the statistic type and number is correct. +6. On host run "show port xstats 1", and check the statistic type and number is correct like common step 2. -Test Case 3: xstats stability test with split ring inorder mergeable path -========================================================================= +Test Case 3: Vhost pmd xstats test with split ring mergeable path +----------------------------------------------------------------- +This case use Scapy or other traffic generator to send packets of different types and packet sizes with different destination IP addresses to test vhost pmd xstats when using split ring mergeable path. -1. Bind one port to vfio-pci, then launch vhost by below command:: +1. Bind one port to vfio-pci like common step 1, then launch vhost by below command:: rm -rf vhost-net* ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-4 \ - --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2,client=0' -- -i --nb-cores=2 --rxq=2 --txq=2 - testpmd>set fwd mac + --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 + testpmd>set fwd io testpmd>start 2. Launch virtio-user by below command:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-7 \ --no-pci --file-prefix=virtio \ - --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=2,in_order=1,mrg_rxbuf=1 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=2,in_order=0,mrg_rxbuf=1 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 - >set fwd mac - >start - -3. Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523). + testpmd>set fwd io + testpmd>start -4. On host run "show port xstats 1", and check the statistic type and number is correct. +3. Let Traffic Generator generate and send 10000 packets for each packet sizes(64, 128, 255, 512, 1024, 1523) with different destination IP. -5. Let TG generate send 10000 packets for each different types (broadcast, multicast, ucast). +4. On host run "show port xstats 1", and check the statistic type and number is correct like common step 2. -6. On host run "show port xstats 1", and check the statistic type and number is correct. +5. Let Traffic Generator generate and send 10000 packets for each different types (broadcast, multicast, ucast). -7.Send packets for 10 minutes with low speed, check the statistic type and number is correct. +6. On host run "show port xstats 1", and check the statistic type and number is correct like common step 2. -Test Case 4: xstats test with split ring inorder non-mergeable path -=================================================================== +Test Case 4: Vhost pmd xstats test with split ring non-mergeable path +--------------------------------------------------------------------- +This case use Scapy or other traffic generator to send packets of different types and packet sizes with different destination IP addresses to test vhost pmd xstats when using split ring non-mergeable path. -1. Bind one port to vfio-pci, then launch vhost by below command:: +1. Bind one port to vfio-pci like common step 1, then launch vhost by below command:: rm -rf vhost-net* ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-4 \ - --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2,client=0' -- -i --nb-cores=2 --rxq=2 --txq=2 - testpmd>set fwd mac + --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 + testpmd>set fwd io testpmd>start 2. Launch virtio-user by below command:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-7 \ --no-pci --file-prefix=virtio \ - --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=2,in_order=1,mrg_rxbuf=0 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=2,in_order=0,mrg_rxbuf=0,vectorized=1 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 - >set fwd mac - >start + testpmd>set fwd io + testpmd>start -3. Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523). +3. Let Traffic Generator generate and send 10000 packets for each packet sizes(64, 128, 255, 512, 1024, 1523) with different destination IP. -4. On host run "show port xstats 1", and check the statistic type and number is correct. +4. On host run "show port xstats 1", and check the statistic type and number is correct like common step 2. -5. Let TG generate send 10000 packets for each different types (broadcast, multicast, ucast). +5. Let Traffic Generator generate and send 10000 packets for each different types (broadcast, multicast, ucast). -6. On host run "show port xstats 1", and check the statistic type and number is correct. +6. On host run "show port xstats 1", and check the statistic type and number is correct like common step 2. -Test Case 5: xstats test with split ring mergeable path -======================================================= +Test Case 5: Vhost pmd xstats test with split ring vector_rx path +----------------------------------------------------------------- +This case use Scapy or other traffic generator to send packets of different types and packet sizes with different destination IP addresses to test vhost pmd xstats when using split ring vector_rx path. -1. Bind one port to vfio-pci, then launch vhost by below command:: +1. Bind one port to vfio-pci like common step 1, then launch vhost by below command:: rm -rf vhost-net* ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-4 \ - --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2,client=0' -- -i --nb-cores=2 --rxq=2 --txq=2 - testpmd>set fwd mac + --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 + testpmd>set fwd io testpmd>start 2. Launch virtio-user by below command:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-7 \ --no-pci --file-prefix=virtio \ - --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=2,in_order=0,mrg_rxbuf=1 \ - -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 - >set fwd mac - >start + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=2,in_order=0,mrg_rxbuf=0,vectorized=1 \ + -- -i --tx-offloads=0x0 --rss-ip --nb-cores=2 --rxq=2 --txq=2 + testpmd>set fwd io + testpmd>start -3. Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523). +3. Let Traffic Generator generate and send 10000 packets for each packet sizes(64, 128, 255, 512, 1024, 1523) with different destination IP. -4. On host run "show port xstats 1", and check the statistic type and number is correct. +4. On host run "show port xstats 1", and check the statistic type and number is correct like common step 2. -5. Let TG generate send 10000 packets for each different types (broadcast, multicast, ucast). +5. Let Traffic Generator generate and send 10000 packets for each different types (broadcast, multicast, ucast). -6. On host run "show port xstats 1", and check the statistic type and number is correct. +6. On host run "show port xstats 1", and check the statistic type and number is correct like common step 2. -Test Case 6: xstats test with split ring non-mergeable path -=========================================================== +Test Case 6: Vhost pmd xstats test with packed ring inorder mergeable path +-------------------------------------------------------------------------- +This case use Scapy or other traffic generator to send packets of different types and packet sizes with different destination IP addresses to test vhost pmd xstats when using packed ring inorder mergeable path. -1. Bind one port to vfio-pci, then launch vhost by below command:: +1. Bind one port to vfio-pci like common step 1, then launch vhost by below command:: rm -rf vhost-net* ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-4 \ - --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2,client=0' -- -i --nb-cores=2 --rxq=2 --txq=2 - testpmd>set fwd mac + --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 + testpmd>set fwd io testpmd>start 2. Launch virtio-user by below command:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-7 \ --no-pci --file-prefix=virtio \ - --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=2,in_order=0,mrg_rxbuf=0,vectorized=1 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=2,packed_vq=1,mrg_rxbuf=1,in_order=1 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 - >set fwd mac - >start + testpmd>set fwd io + testpmd>start -3. Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523). +3. Let Traffic Generator generate and send 10000 packets for each packet sizes(64, 128, 255, 512, 1024, 1523) with different destination IP. -4. On host run "show port xstats 1", and check the statistic type and number is correct. +4. On host run "show port xstats 1", and check the statistic type and number is correct like common step 2. -5. Let TG generate send 10000 packets for each different types (broadcast, multicast, ucast). +5. Let Traffic Generator generate and send 10000 packets for each different types (broadcast, multicast, ucast). -6. On host run "show port xstats 1", and check the statistic type and number is correct. +6. On host run "show port xstats 1", and check the statistic type and number is correct like common step 2. -Test Case 7: xstats test with split ring vector_rx path -======================================================= +Test Case 7: Vhost pmd xstats test with packed ring inorder non-mergeable path +------------------------------------------------------------------------------ +This case use Scapy or other traffic generator to send packets of different types and packet sizes with different destination IP addresses to test vhost pmd xstats when using packed ring inorder non-mergeable path. -1. Bind one port to vfio-pci, then launch vhost by below command:: +1. Bind one port to vfio-pci like common step 1, then launch vhost by below command:: rm -rf vhost-net* ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-4 \ - --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2,client=0' -- -i --nb-cores=2 --rxq=2 --txq=2 - testpmd>set fwd mac + --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 + testpmd>set fwd io testpmd>start 2. Launch virtio-user by below command:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-7 \ --no-pci --file-prefix=virtio \ - --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=2,in_order=0,mrg_rxbuf=0,vectorized=1 \ - -- -i --tx-offloads=0x0 --rss-ip --nb-cores=2 --rxq=2 --txq=2 - >set fwd mac - >start + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=2,packed_vq=1,mrg_rxbuf=0,in_order=1,vectorized=1 \ + -- -i --rx-offloads=0x10 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 + testpmd>set fwd io + testpmd>start -3. Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523). +3. Let Traffic Generator generate and send 10000 packets for each packet sizes(64, 128, 255, 512, 1024, 1523) with different destination IP. -4. On host run "show port xstats 1", and check the statistic type and number is correct. +4. On host run "show port xstats 1", and check the statistic type and number is correct like common step 2. -5. Let TG generate send 10000 packets for each different types (broadcast, multicast, ucast). +5. Let Traffic Generator generate and send 10000 packets for each different types (broadcast, multicast, ucast). -6. On host run "show port xstats 1", and check the statistic type and number is correct. +6. On host run "show port xstats 1", and check the statistic type and number is correct like common step 2. -Test Case 8: xstats test with packed ring inorder mergeable path -================================================================ +Test Case 8: Vhost pmd xstats test with packed ring mergeable path +------------------------------------------------------------------ +This case use Scapy or other traffic generator to send packets of different types and packet sizes with different destination IP addresses to test vhost pmd xstats when using packed ring mergeable path. -1. Bind one port to vfio-pci, then launch vhost by below command:: +1. Bind one port to vfio-pci like common step 1, then launch vhost by below command:: rm -rf vhost-net* ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-4 \ - --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2,client=0' -- -i --nb-cores=2 --rxq=2 --txq=2 - testpmd>set fwd mac + --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 + testpmd>set fwd io testpmd>start 2. Launch virtio-user by below command:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-7 \ --no-pci --file-prefix=virtio \ - --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=2,packed_vq=1,mrg_rxbuf=1,in_order=1 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=2,packed_vq=1,mrg_rxbuf=1,in_order=0 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 - >set fwd mac - >start + testpmd>set fwd io + testpmd>start -3. Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523). +3. Let Traffic Generator send 10000 packets for each packet sizes(64, 128, 255, 512, 1024, 1523) with different destination IP. -4. On host run "show port xstats 1", and check the statistic type and number is correct. +4. On host run "show port xstats 1", and check the statistic type and number is correct like common step 2. -5. Let TG generate send 10000 packets for each different types (broadcast, multicast, ucast). +5. Let Traffic Generator generate and send 10000 packets for each different types (broadcast, multicast, ucast). -6. On host run "show port xstats 1", and check the statistic type and number is correct. +6. On host run "show port xstats 1", and check the statistic type and number is correct like common step 2. -7.Send packets for 10 minutes with low speed, check the statistic type and number is correct. +7.Send packets for 10 minutes with low speed, check the statistic type and number is correct like common step 2. -Test Case 9: xstats test with packed ring inorder non-mergeable path -==================================================================== +Test Case 9: Vhost pmd xstats test with packed ring non-mergeable path +---------------------------------------------------------------------- +This case use Scapy or other traffic generator to send packets of different types and packet sizes with different destination IP addresses to test vhost pmd xstats when using packed ring non-mergeable path. -1. Bind one port to vfio-pci, then launch vhost by below command:: +1. Bind one port to vfio-pci like common step 1, then launch vhost by below command:: rm -rf vhost-net* ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-4 \ - --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2,client=0' -- -i --nb-cores=2 --rxq=2 --txq=2 - testpmd>set fwd mac + --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 + testpmd>set fwd io testpmd>start 2. Launch virtio-user by below command:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-7 \ --no-pci --file-prefix=virtio \ - --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=2,packed_vq=1,mrg_rxbuf=0,in_order=1,vectorized=1 \ - -- -i --rx-offloads=0x10 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 - >set fwd mac - >start + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=2,packed_vq=1,mrg_rxbuf=0,in_order=0 \ + -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 + testpmd>set fwd io + testpmd>start -3. Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523). +3. Let Traffic Generator generate and send 10000 packets for each packet sizes(64, 128, 255, 512, 1024, 1523) with different destination IP. -4. On host run "show port xstats 1", and check the statistic type and number is correct. +4. On host run "show port xstats 1", and check the statistic type and number is correct like common step 2. -5. Let TG generate send 10000 packets for each different types (broadcast, multicast, ucast). +5. Let Traffic Generator generate and send 10000 packets for each different types (broadcast, multicast, ucast). -6. On host run "show port xstats 1", and check the statistic type and number is correct. +6. On host run "show port xstats 1", and check the statistic type and number is correct like common step 2. -Test Case 10: xstats test with packed ring vectorized path -========================================================== -1. Bind one port to vfio-pci, then launch vhost by below command:: +Test Case 10: Vhost pmd xstats test with packed ring vectorized path +-------------------------------------------------------------------- +This case use Scapy or other traffic generator to send packets of different types and packet sizes with different destination IP addresses to test vhost pmd xstats when using packed ring vectorized path. + +1. Bind one port to vfio-pci like common step 1, then launch vhost by below command:: rm -rf vhost-net* ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-4 \ - --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2,client=0' -- -i --nb-cores=2 --rxq=2 --txq=2 - testpmd>set fwd mac + --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 + testpmd>set fwd io testpmd>start 2. Launch virtio-user by below command:: @@ -293,26 +348,27 @@ Test Case 10: xstats test with packed ring vectorized path --no-pci --file-prefix=virtio \ --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=2,packed_vq=1,mrg_rxbuf=0,in_order=1,vectorized=1 \ -- -i --rss-ip --nb-cores=2 --rxq=2 --txq=2 - >set fwd mac - >start + testpmd>set fwd io + testpmd>start -3. Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523). +3. Let Traffic Generator generate and send 10000 packets for each packet sizes(64, 128, 255, 512, 1024, 1523) with different destination IP. -4. On host run "show port xstats 1", and check the statistic type and number is correct. +4. On host run "show port xstats 1", and check the statistic type and number is correct like common step 2. -5. Let TG generate send 10000 packets for each different types (broadcast, multicast, ucast). +5. Let Traffic Generator generate and send 10000 packets for each different types (broadcast, multicast, ucast). -6. On host run "show port xstats 1", and check the statistic type and number is correct. +6. On host run "show port xstats 1", and check the statistic type and number is correct like common step 2. -Test Case 11: xstats test with packed ring vectorized path with ring size is not power of 2 -=========================================================================================== +Test Case 11: Vhost pmd xstats test with packed ring vectorized path with ring size is not power of 2 +----------------------------------------------------------------------------------------------------- +This case use Scapy or other traffic generator to send packets of different types and packet sizes with different destination IP addresses to test vhost pmd xstats when using packed ring vectorized path with ring size is not power of 2. -1. Bind one port to vfio-pci, then launch vhost by below command:: +1. Bind one port to vfio-pci like common step 1, then launch vhost by below command:: rm -rf vhost-net* ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-4 \ - --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2,client=0' -- -i --nb-cores=2 --rxq=2 --txq=2 - testpmd>set fwd mac + --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 + testpmd>set fwd io testpmd>start 2. Launch virtio-user by below command:: @@ -321,13 +377,13 @@ Test Case 11: xstats test with packed ring vectorized path with ring size is not --no-pci --file-prefix=virtio \ --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=2,packed_vq=1,mrg_rxbuf=0,in_order=1,vectorized=1,queue_size=255 \ -- -i --rss-ip --nb-cores=2 --rxq=2 --txq=2 --txd=255 --rxd=255 - >set fwd mac - >start + testpmd>set fwd io + testpmd>start -3. Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523). +3. Let Traffic Generator generate and send 10000 packets for each packet sizes(64, 128, 255, 512, 1024, 1523) with different destination IP. -4. On host run "show port xstats 1", and check the statistic type and number is correct. +4. On host run "show port xstats 1", and check the statistic type and number is correct like common step 2. -5. Let TG generate send 10000 packets for each different types (broadcast, multicast, ucast). +5. Let Traffic Generator generate and send 10000 packets for each different types (broadcast, multicast, ucast). -6. On host run "show port xstats 1", and check the statistic type and number is correct. \ No newline at end of file +6. On host run "show port xstats 1", and check the statistic type and number is correct like common step 2.