From patchwork Fri Sep 10 09:16:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 98585 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 707FFA0547; Fri, 10 Sep 2021 11:22:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6BF5240DF4; Fri, 10 Sep 2021 11:22:41 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 22F1B406B4 for ; Fri, 10 Sep 2021 11:22:38 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10102"; a="201229218" X-IronPort-AV: E=Sophos;i="5.85,282,1624345200"; d="scan'208";a="201229218" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Sep 2021 02:22:31 -0700 X-IronPort-AV: E=Sophos;i="5.85,282,1624345200"; d="scan'208";a="540509750" Received: from unknown (HELO localhost.localdomain) ([10.240.183.222]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Sep 2021 02:22:30 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Date: Fri, 10 Sep 2021 17:16:51 +0800 Message-Id: <20210910091651.565158-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [dts] [PATCH V1 1/3] test_plans/vhost_cbdma_test_plan: modify testcase 1-4 and add new testcase 6-7 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" 1.Modify testcase 1-4 start vhost and virtio-user start parameter. 2.Add new testcase 6-7. Signed-off-by: Wei Ling --- test_plans/vhost_cbdma_test_plan.rst | 159 +++++++++++++++++++++------ 1 file changed, 127 insertions(+), 32 deletions(-) diff --git a/test_plans/vhost_cbdma_test_plan.rst b/test_plans/vhost_cbdma_test_plan.rst index 325b5d87..44f9f65b 100644 --- a/test_plans/vhost_cbdma_test_plan.rst +++ b/test_plans/vhost_cbdma_test_plan.rst @@ -64,16 +64,16 @@ Here is an example: $ ./dpdk-testpmd -c f -n 4 \ --vdev 'net_vhost0,iface=/tmp/s0,queues=1,dmas=[txq0@80:04.0],dmathr=1024' -Test Case 1: PVP Split all path with DMA-accelerated vhost enqueue +Test Case 1: PVP split all path with DMA-accelerated vhost enqueue ================================================================== -Packet pipeline: +Packet pipeline: ================ TG --> NIC --> Vhost --> Virtio--> Vhost --> NIC --> TG 1. Bind one cbdma port and one nic port to igb_uio, then launch vhost by below command:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=1,dmas=[txq0@80:04.0],dmathr=1024' \ + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=1,dmas=[txq0@80:04.0],dmathr=1024,client=1' \ -- -i --nb-cores=1 --txd=1024 --rxd=1024 >set fwd mac >start @@ -81,12 +81,12 @@ TG --> NIC --> Vhost --> Virtio--> Vhost --> NIC --> TG 2. 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 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=1,in_order=1,queues=1,server=1 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --nb-cores=1 --txd=1024 --rxd=1024 >set fwd mac >start -3. Send imix packets [64,1518] from packet generator, check the throughput can get expected data, restart vhost port, then check throughput again:: +3. Send imix packets [64,1518] from packet generator, check the throughput can get expected data, restart vhost port and send imix pkts again, check get same throuhput:: testpmd>show port stats all testpmd>stop @@ -96,7 +96,7 @@ TG --> NIC --> Vhost --> Virtio--> Vhost --> NIC --> TG 4. Relaunch virtio-user with mergeable path, then repeat step 3:: ./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 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=1,in_order=0,queues=1,server=1 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --nb-cores=1 --txd=1024 --rxd=1024 >set fwd mac >start @@ -104,7 +104,7 @@ TG --> NIC --> Vhost --> Virtio--> Vhost --> NIC --> TG 5. Relaunch virtio-user with inorder non-mergeable path, then repeat step 3:: ./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 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=0,in_order=1,queues=1,server=1 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --nb-cores=1 --txd=1024 --rxd=1024 >set fwd mac >start @@ -112,7 +112,7 @@ TG --> NIC --> Vhost --> Virtio--> Vhost --> NIC --> TG 6. Relaunch virtio-user with non-mergeable path, then repeat step 3:: ./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 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=0,in_order=0,queues=1,server=1 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --nb-cores=1 --txd=1024 --rxd=1024 >set fwd mac >start @@ -121,13 +121,17 @@ TG --> NIC --> Vhost --> Virtio--> Vhost --> NIC --> TG ./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 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=0,in_order=0,queues=1,vectorized=1,server=1 \ -- -i --nb-cores=1 --txd=1024 --rxd=1024 >set fwd mac >start -Test Case 2: Split ring dynamic queue number test for DMA-accelerated vhost Tx operations -========================================================================================= +Test Case 2: PVP split ring dynamic queue number test for DMA-accelerated vhost Tx operations +============================================================================================= + +Packet pipeline: +================ +TG --> NIC --> Vhost --> Virtio--> Vhost --> NIC --> TG 1. Bind 8 cbdma channels and one nic port to igb_uio, then launch vhost by below command:: @@ -152,8 +156,8 @@ Test Case 2: Split ring dynamic queue number test for DMA-accelerated vhost Tx o 5. Quit vhost port and relaunch vhost with 4 queues w/ cbdma:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 28-29 \ - --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=4,client=1,dmas=[txq0@00:04.0;txq1@00:04.1;txq2@00:04.2;txq3@00:04.3],dmathr=1024' \ - -- -i --nb-cores=1 --txd=1024 --rxd=1024 --txq=4 --rxq=4 + --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=4,client=1,dmas=[txq0@0000:00:04.0;txq1@0000:00:04.1;txq2@0000:00:04.2;txq3@0000:00:04.3],dmathr=1024' \ + -- -i --nb-cores=1 --txd=256 --rxd=256 --txq=4 --rxq=4 >set fwd mac >start @@ -176,13 +180,13 @@ Test Case 2: Split ring dynamic queue number test for DMA-accelerated vhost Tx o Test Case 3: PVP packed ring all path with DMA-accelerated vhost enqueue ======================================================================== -Packet pipeline: +Packet pipeline: ================ TG --> NIC --> Vhost --> Virtio--> Vhost --> NIC --> TG 1. Bind one cbdma port and one nic port to igb_uio, then launch vhost by below command:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=1,dmas=[txq0@80:04.0],dmathr=1024' \ + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=1,dmas=[txq0@80:04.0],dmathr=0,client=1' \ -- -i --nb-cores=1 --txd=1024 --rxd=1024 >set fwd mac >start @@ -190,12 +194,12 @@ TG --> NIC --> Vhost --> Virtio--> Vhost --> NIC --> TG 2. 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,packed_vq=1 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=1,in_order=1,queues=1,packed_vq=1,server=1 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --nb-cores=1 --txd=1024 --rxd=1024 >set fwd mac >start -3. Send imix packets [64,1518] from packet generator, check the throughput can get expected data, restart vhost port, then check throughput again:: +3. Send imix packets [64,1518] from packet generator, check the throughput can get expected data, restart vhost port and send imix pkts again, check get same throuhput:: testpmd>show port stats all testpmd>stop @@ -205,7 +209,7 @@ TG --> NIC --> Vhost --> Virtio--> Vhost --> NIC --> TG 4. Relaunch virtio-user with mergeable path, then repeat step 3:: ./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,packed_vq=1 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=1,in_order=0,queues=1,packed_vq=1,server=1 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --nb-cores=1 --txd=1024 --rxd=1024 >set fwd mac >start @@ -213,7 +217,7 @@ TG --> NIC --> Vhost --> Virtio--> Vhost --> NIC --> TG 5. Relaunch virtio-user with inorder non-mergeable path, then repeat step 3:: ./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,packed_vq=1 \ + --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,server=1 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --nb-cores=1 --txd=1024 --rxd=1024 >set fwd mac >start @@ -221,7 +225,7 @@ TG --> NIC --> Vhost --> Virtio--> Vhost --> NIC --> TG 6. Relaunch virtio-user with non-mergeable path, then repeat step 3:: ./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,packed_vq=1 \ + --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,server=1 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --nb-cores=1 --txd=1024 --rxd=1024 >set fwd mac >start @@ -229,23 +233,27 @@ TG --> NIC --> Vhost --> Virtio--> Vhost --> NIC --> TG 7. Relaunch virtio-user with vectorized path, then repeat step 3:: ./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,packed_vq=1 \ + --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,server=1 \ -- -i --nb-cores=1 --txd=1024 --rxd=1024 >set fwd mac >start -8. Relaunch virtio-user with vector_rx path, then repeat step 3:: +8. Relaunch virtio-user with vectorized path and ring size is not power of 2, then repeat step 3:: ./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,packed_vq=1 \ - -- -i --enable-hw-vlan-strip --nb-cores=1 --txd=1024 --rxd=1024 + --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,server=1 \ + -- -i --nb-cores=1 --txd=1025 --rxd=1025 >set fwd mac >start -Test Case 4: Packed ring dynamic queue number test for DMA-accelerated vhost Tx operations -========================================================================================== +Test Case 4: PVP packed ring dynamic queue number test for DMA-accelerated vhost Tx operations +============================================================================================== + +Packet pipeline: +================ +TG --> NIC --> Vhost --> Virtio--> Vhost --> NIC --> TG 1. Bind 8 cbdma channels and one nic port to igb_uio, then launch vhost by below command:: @@ -258,7 +266,7 @@ Test Case 4: Packed ring dynamic queue number test for DMA-accelerated vhost Tx 2. Launch virtio-user by below command:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 30-31 --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,packed_vq=1 \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,mrg_rxbuf=1,in_order=0,queues=8,server=1,packed_vq=1 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --nb-cores=1 --txd=1024 --rxd=1024 --txq=8 --rxq=8 >set fwd mac >start @@ -291,8 +299,12 @@ Test Case 4: Packed ring dynamic queue number test for DMA-accelerated vhost Tx 10. Stop vhost port, check vhost RX and TX direction both exist packtes in 8 queues from vhost log. -Test Case 5: Compare PVP split ring performance between CPU copy, CBDMA copy and Sync copy -========================================================================================== +Test Case 5: PVP split ring performance comparasion between CPU copy, CBDMA copy and Sync copy +============================================================================================== + +Packet pipeline: +================ +TG --> NIC --> Vhost --> Virtio--> Vhost --> NIC --> TG 1. Bind one cbdma port and one nic port which on same numa to igb_uio, then launch vhost by below command:: @@ -309,7 +321,7 @@ Test Case 5: Compare PVP split ring performance between CPU copy, CBDMA copy and >set fwd mac >start -3. Send packets with 64b and 1518b seperately from packet generator, record the throughput as sync copy throughput for 64b and cbdma copy for 1518b:: +3. Send packets with 64b and 1518b separately from packet generator, record the throughput as sync copy throughput for 64b and cbdma copy for 1518b:: testpmd>show port stats all @@ -347,3 +359,86 @@ Test Case 5: Compare PVP split ring performance between CPU copy, CBDMA copy and (1)CPU copy vs. sync copy delta < 10% for 64B packet size (2)CBDMA copy vs sync copy delta > 5% for 1518 packet size + +Test Case 6: PVP packed ring performance comparasion between CPU copy, CBDMA copy and Sync copy +=============================================================================================== + +Packet pipeline: +================ +TG --> NIC --> Vhost --> Virtio--> Vhost --> NIC --> TG + +1. Bind one cbdma port and one nic port which on same numa to igb_uio, then launch vhost by below command:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=1,client=1,dmas=[txq0@00:01.0],dmathr=1024' \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + >set fwd mac + >start + +2. 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=0,queues=1,packed_vq=1,server=1 \ + -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --nb-cores=1 --txd=1024 --rxd=1024 + >set fwd mac + >start + +3. Send packets with 64b and 1518b separately from packet generator, record the throughput as sync copy throughput for 64b and cbdma copy for 1518b:: + + testpmd>show port stats all + +4.Quit vhost side, relaunch with below cmd:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=1,client=1,dmas=[txq0@00:01.0],dmathr=2000' \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + >set fwd mac + >start + +5. Send packets with 1518b from packet generator, record the throughput as sync copy throughput for 1518b:: + + testpmd>show port stats all + +6. Quit two testpmd, relaunch vhost by below command:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-3 --file-prefix=vhost --vdev 'net_vhost0,iface=/tmp/s0,queues=1' \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + >set fwd mac + >start + +7. 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=0,packed_vq=1,queues=1 \ + -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --nb-cores=1 --txd=1024 --rxd=1024 + >set fwd mac + >start + +8. Send packets with 64b from packet generator, record the throughput as cpu copy for 64b:: + + testpmd>show port stats all + +9. Check performance can meet below requirement:: + + (1)CPU copy vs. sync copy delta < 10% for 64B packet size + (2)CBDMA copy vs sync copy delta > 5% for 1518 packet size + +Test Case 7: loopback with cbdma enqueue large chain packets stress test +======================================================================== + +Packet pipeline: +================ +Vhost <--> Virtio + +1. Bind 1 CBDMA to igb_uio and launch vhost: + +./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 2-3 -n 4 -a 0000:00:04.0 --vdev 'eth_vhost0,iface=vhost-net0,queues=1,dmas=[txq0@0000:00:04.0],dmathr=0' -- -i --nb-cores=1 --mbuf-size=65535 + +2. launch virtio and start testpmd: + +./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 30,31 -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 -- -i --rxq=1 --txq=1 --txd=2048 --rxd=2048 --nb-cores=1 +testpmd> start + +3. Send large pkts from vhost, check virtio can receive pakckets: +testpmd> vhost enable tx all +testpmd> set txpkts 65535,65535,65535,65535,65535 +testpmd> start tx_first 32 +testpmd> show port stats all