From patchwork Thu Jul 14 03:23:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 113954 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 2938EA00C5; Thu, 14 Jul 2022 05:26:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1C39C42847; Thu, 14 Jul 2022 05:26:39 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 4931341101 for ; Thu, 14 Jul 2022 05:26:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657769197; x=1689305197; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=FxtEQUrmWwarc4m0lkCh5KZKeZXOgs5iqrcuv1JHOy4=; b=F0bZSa4cxH9dLCASS1/c5ISfcbX3aQzrw645j2v7IpRaWPSFRMsyPR7L JIcfQT4V+Sslc/n0Ao6KlPz9N6mz9OaUPsxn4RqYSUGT+/dwlmjtHw4jy 07zaxuNfi2vR7EMRaf/DefttTkVgrjvz8ocXJExRu2u0iC+0eiUB/pyXZ cddBYL0ziHQuuKUfa5ZbH5EAi7ZREQgf8V9Y0PpC3rr+/DAHOump7av13 JRjPmLNMyDBKtd9ySOlINtSLhW/xWsS5YVp9geFHyDuVhVzUM3hfeDVfm i/7uQpteg0pwRSNcLCe+UmdpAwxGROMLmlzhScLjH2SnrtBVJoAjPpqe4 w==; X-IronPort-AV: E=McAfee;i="6400,9594,10407"; a="268435156" X-IronPort-AV: E=Sophos;i="5.92,269,1650956400"; d="scan'208";a="268435156" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2022 20:26:36 -0700 X-IronPort-AV: E=Sophos;i="5.92,269,1650956400"; d="scan'208";a="570890119" Received: from unknown (HELO localhost.localdomain) ([10.239.252.222]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2022 20:26:34 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V1 1/2] test_plans/vhost_pmd_xstats_test_plan: modify testplan by DPDK have changed Date: Wed, 13 Jul 2022 23:23:44 -0400 Message-Id: <20220714032344.1822445-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, like `tx_size_1024_to_1518_packets` change to `tx_q0_size_1024_to_1518_packets`, so modify the testplan 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 | 317 +++++++++++++--------- 1 file changed, 185 insertions(+), 132 deletions(-) diff --git a/test_plans/vhost_pmd_xstats_test_plan.rst b/test_plans/vhost_pmd_xstats_test_plan.rst index ed21783b..a0f927f2 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,21 +11,67 @@ 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= + # 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 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 +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 + --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 testpmd>set fwd mac testpmd>start @@ -33,29 +79,28 @@ Test Case 1: xstats test with packed ring mergeable path ./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 mac + testpmd>start -3. Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523). +3. Let Traffic Generator generate 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 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 + --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 testpmd>set fwd mac testpmd>start @@ -63,27 +108,28 @@ Test Case 2: xstats test with packed ring non-mergeable path ./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 mac + testpmd>start -3. Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523). +3. Let Traffic Generator generate 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 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 + --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 testpmd>set fwd mac testpmd>start @@ -91,29 +137,28 @@ Test Case 3: xstats stability test with split ring inorder mergeable path ./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 mac + testpmd>start -4. On host run "show port xstats 1", and check the statistic type and number is correct. +3. Let Traffic Generator generate 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 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 + --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 testpmd>set fwd mac testpmd>start @@ -121,27 +166,28 @@ Test Case 4: xstats test with split ring inorder non-mergeable path ./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 mac + testpmd>start -3. Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523). +3. Let Traffic Generator generate 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 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 + --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 testpmd>set fwd mac testpmd>start @@ -149,27 +195,28 @@ Test Case 5: xstats test with split ring mergeable path ./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 mac + testpmd>start -3. Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523). +3. Let Traffic Generator generate 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 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 + --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 testpmd>set fwd mac testpmd>start @@ -177,27 +224,28 @@ Test Case 6: xstats test with split ring non-mergeable path ./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 mac + testpmd>start -3. Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523). +3. Let Traffic Generator generate 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 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 + --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 testpmd>set fwd mac testpmd>start @@ -205,27 +253,28 @@ Test Case 7: xstats test with split ring vector_rx path ./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 mac + testpmd>start -3. Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523). +3. Let Traffic Generator generate 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 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 + --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 testpmd>set fwd mac testpmd>start @@ -233,29 +282,30 @@ Test Case 8: xstats test with packed ring inorder mergeable path ./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 mac + 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 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 + --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 testpmd>set fwd mac testpmd>start @@ -263,27 +313,29 @@ Test Case 9: xstats test with packed ring inorder non-mergeable path ./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 mac + testpmd>start -3. Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523). +3. Let Traffic Generator generate 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 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 + --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 testpmd>set fwd mac testpmd>start @@ -293,25 +345,26 @@ 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 mac + testpmd>start -3. Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523). +3. Let Traffic Generator generate 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 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 + --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 testpmd>set fwd mac testpmd>start @@ -321,13 +374,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 mac + testpmd>start -3. Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523). +3. Let Traffic Generator generate 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 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.