From patchwork Thu Feb 16 08:09:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 124043 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 D17A841CAE; Thu, 16 Feb 2023 09:22:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C5EFC410F1; Thu, 16 Feb 2023 09:22:42 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 453D240E0F for ; Thu, 16 Feb 2023 09:22:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676535761; x=1708071761; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=lyS/SpJghjjyGomk9th/yuezgEj0wwEz61SOJ9YE+W8=; b=n31mH2clQ4QudNkMF57wQJJDg5lGfYRhKqrDXRpZ13kwKtcge3h+dtG2 seIlah6Oqhgo5G7qWKZ4evh9M10e9d7yMPn2+WFxl9YshEQukkAHMB3Ic QNoj05hovYXj8r/FGHmJ9PgnuaXj45zDOo5sAe7JcqIf50078TPZQCv7W b7BYOylNFBr+y1nu35t9wWHLCxivwPmMCFk1dkbFOD0DQvcuPvI6Fr7fI PZX62dCrxPZCVIwtT9VzeRQrsKfghBDDVhqNx4oZrlNhy8S+DXnY2p9Gb l9DMnnHnqfMkxZAbH2MS0y+MPrX5DT3V4t/7t+jUVuZ7QUCgCKgg1EBao g==; X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="315335001" X-IronPort-AV: E=Sophos;i="5.97,301,1669104000"; d="scan'208";a="315335001" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2023 00:22:40 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="793941588" X-IronPort-AV: E=Sophos;i="5.97,301,1669104000"; d="scan'208";a="793941588" Received: from unknown (HELO localhost.localdomain) ([10.239.252.222]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2023 00:22:39 -0800 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V2 1/4] test_plans/index: add loopback_vhost_async_perf_dsa_test_plan Date: Thu, 16 Feb 2023 16:09:14 +0800 Message-Id: <20230216080914.1025341-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_vhost_async_perf_dsa_test_plan in test_plans/index.rst. Signed-off-by: Wei Ling --- test_plans/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/test_plans/index.rst b/test_plans/index.rst index ea13fc8e..860d6a53 100644 --- a/test_plans/index.rst +++ b/test_plans/index.rst @@ -111,6 +111,7 @@ The following are the test plans for the DPDK DTS automated test system. loopback_virtio_user_server_mode_test_plan loopback_virtio_user_server_mode_cbdma_test_plan loopback_virtio_user_server_mode_dsa_test_plan + loopback_vhost_async_perf_dsa_test_plan mac_filter_test_plan macsec_for_ixgbe_test_plan mtu_update_test_plan From patchwork Thu Feb 16 08:09:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 124044 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 0403A41CAE; Thu, 16 Feb 2023 09:22:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EBB6E41141; Thu, 16 Feb 2023 09:22:54 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 33D4B40E0F for ; Thu, 16 Feb 2023 09:22:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676535773; x=1708071773; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=fHzJH2U8gA1q8ufaqrHH6MOJ8yT214gvIf6s7S3xzzI=; b=lWhBqAn7r2JSVaO1YRyoJjM3xOcNwo+mSrD8EDSFxUCkEqLciPFXDL+N 4GPvwwaPhcdzFH0xTLm+s868qqhA9Fr00pciLQZw3hrTtRo3QRwGU6zzV To6zM9WL4wLqI9wOV3kHgEpPtSw8s0mJP4Uuj5Rty3ZnWv7dg4j7J8ymO O7gDy+0z3hNEJ/bBFhP9MJD0kQa/Q+HWVgem2OoNms9s7D9I2rpTpfxrY HwDhigGp+lblrLVmRzYKr75qBWMrQ0EDOIzKEtCUh6H0aIbTTT63OZR6A 0Wj3S1girCWsEHbFMNsz4cOZEQNmXs7cA9mJDbol46i6WNIajJpaHBsII Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="311287356" X-IronPort-AV: E=Sophos;i="5.97,301,1669104000"; d="scan'208";a="311287356" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2023 00:22:50 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="670041530" X-IronPort-AV: E=Sophos;i="5.97,301,1669104000"; d="scan'208";a="670041530" Received: from unknown (HELO localhost.localdomain) ([10.239.252.222]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2023 00:22:48 -0800 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V2 2/4] test_plans/loopback_vhost_async_perf_dsa: add new testplan Date: Thu, 16 Feb 2023 16:09:24 +0800 Message-Id: <20230216080924.1025401-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 test_plans/loopback_vhost_async_perf_dsa_test_plan.rst to test loopback vhost/virtio multi-paths async data-path use DSA device with dpdk and kernel driver. Signed-off-by: Wei Ling --- ...oopback_vhost_async_perf_dsa_test_plan.rst | 626 ++++++++++++++++++ 1 file changed, 626 insertions(+) create mode 100644 test_plans/loopback_vhost_async_perf_dsa_test_plan.rst diff --git a/test_plans/loopback_vhost_async_perf_dsa_test_plan.rst b/test_plans/loopback_vhost_async_perf_dsa_test_plan.rst new file mode 100644 index 00000000..44d8e549 --- /dev/null +++ b/test_plans/loopback_vhost_async_perf_dsa_test_plan.rst @@ -0,0 +1,626 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright(c) 2023 Intel Corporation + +=========================================================== +Loopback vhost/virtio multi-paths async data-path test plan +=========================================================== + +Benchmark vhost/virtio-user loopback test with 10 tx/rx paths when vhost uses the asynchronous operation. +Includes split ring mergeable, non-mergeable, vector_rx, inorder mergeable, +inorder non-mergeable, packed ring mergeable, packed ring non-mergeableļ¼Œ +packed ring inorder mergeable, packed ring inorder non-mergeable path and vectorized path. + +Test case +========= + +Common steps +------------ + +1. Bind 1 dsa device to idxd, then generate 1wq by below command:: + + ./usertools/dpdk-devbind.py -b idxd 0000:6a:01.0 + ./drivers/dma/idxd/dpdk_idxd_cfg.py -q 2 0 + +2. Bind 1 dsa device to vfio-pci:: + + ./usertools/dpdk-devbind.py -b idxd 0000:6f:01.0 + +Test Case 1: loopback vhost async test with split ring inorder mergeable path using IDXD kernel driver +------------------------------------------------------------------------------------------------------ + +1. Launch vhost by below command:: + + rm -rf vhost-net* + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 2-4 --no-pci --file-prefix=vhost \ + - -vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[txq0@wq0.0;rxq0@wq0.1]' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + +2. Launch virtio-user by below command:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 5-6 \ + --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,in_order=1,mrg_rxbuf=1 \ + -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +3. Send packets with vhost-testpmd:: + + testpmd>set txpkts + testpmd>start tx_first 32 + +4. Repeat below command to get throughput 10 times,then check the average throughput can get expected data with below command:: + + testpmd>show port stats all + +5. Quit virtio-user, rerun step 2-4 with different pac ket length, include [64, 128, 256, 512, 1024, 1518]. + +Test Case 2: loopback vhost async test with split ring inorder non-mergeable path using IDXD kernel driver +---------------------------------------------------------------------------------------------------------- + +1. Launch vhost by below command:: + + rm -rf vhost-net* + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 2-4 --no-pci --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[txq0@wq0.0;rxq0@wq0.1]' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + +2. Launch virtio-user by below command:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 5-6 \ + --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,in_order=1,mrg_rxbuf=0 \ + -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +3. Send packets with vhost-testpmd:: + + testpmd>set txpkts + testpmd>start tx_first 32 + +4. Repeat below command to get throughput 10 times,then check the average throughput can get expected data with below command:: + + testpmd>show port stats all + +5. Quit virtio-user, rerun step 2-4 with different packet length, include [64, 128, 256, 512, 1024, 1518]. + +Test Case 3: loopback vhost async test with split ring mergeable path using IDXD kernel driver +---------------------------------------------------------------------------------------------- + +1. Launch vhost by below command:: + + rm -rf vhost-net* + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 2-4 --no-pci --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[txq0@wq0.0;rxq0@wq0.1]' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + +2. Launch virtio-user by below command:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 5-6 \ + --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,in_order=0,mrg_rxbuf=1 \ + -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +3. Send packets with vhost-testpmd:: + + testpmd>set txpkts + testpmd>start tx_first 32 + +4. Repeat below command to get throughput 10 times,then check the average throughput can get expected data with below command:: + + testpmd>show port stats all + +5. Quit virtio-user, rerun step 2-4 with different packet length, include [64, 128, 256, 512, 1024, 1518]. + +Test Case 4: loopback vhost async test with split ring non-mergeable path using IDXD kernel driver +-------------------------------------------------------------------------------------------------- + +1. Launch vhost by below command:: + + rm -rf vhost-net* + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 2-4 --no-pci --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[txq0@wq0.0;rxq0@wq0.1]' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + +2. Launch virtio-user by below command:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 5-6 \ + --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,in_order=0,mrg_rxbuf=0 \ + -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +3. Send packets with vhost-testpmd:: + + testpmd>set txpkts + testpmd>start tx_first 32 + +4. Repeat below command to get throughput 10 times,then check the average throughput can get expected data with below command:: + + testpmd>show port stats all + +5. Quit virtio-user, rerun step 2-4 with different packet length, include [64, 128, 256, 512, 1024, 1518]. + +Test Case 5: loopback vhost async test with split ring vectorized path using IDXD kernel driver +----------------------------------------------------------------------------------------------- + +1. Launch vhost by below command:: + + rm -rf vhost-net* + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 2-4 --no-pci --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[txq0@wq0.0;rxq0@wq0.1]' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + +2. Launch virtio-user by below command:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 5-6 \ + --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,in_order=0,mrg_rxbuf=0 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +3. Send packets with vhost-testpmd:: + + testpmd>set txpkts + testpmd>start tx_first 32 + +4. Repeat below command to get throughput 10 times,then check the average throughput can get expected data with below command:: + + testpmd>show port stats all + +5. Quit virtio-user, rerun step 2-4 with different packet length, include [64, 128, 256, 512, 1024, 1518]. + +Test Case 6: loopback vhost async test with packed ring inorder mergeable path using IDXD kernel driver +------------------------------------------------------------------------------------------------------- + +1. Launch vhost by below command:: + + rm -rf vhost-net* + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 2-4 --no-pci --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[txq0@wq0.0;rxq0@wq0.1]' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + +2. Launch virtio-user by below command:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 5-6 \ + --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,packed_vq=1,in_order=1,mrg_rxbuf=1 \ + -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +3. Send packets with vhost-testpmd:: + + testpmd>set txpkts + testpmd>start tx_first 32 + +4. Repeat below command to get throughput 10 times,then check the average throughput can get expected data with below command:: + + testpmd>show port stats all + +5. Quit virtio-user, rerun step 2-4 with different packet length, include [64, 128, 256, 512, 1024, 1518]. + +Test Case 7: loopback vhost async test with packed ring inorder non-mergeable path using IDXD kernel driver +----------------------------------------------------------------------------------------------------------- + +1. Launch vhost by below command:: + + rm -rf vhost-net* + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 2-4 --no-pci --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[txq0@wq0.0;rxq0@wq0.1]' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + +2. Launch virtio-user by below command:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 5-6 \ + --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,packed_vq=1,in_order=1,mrg_rxbuf=0 \ + -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +3. Send packets with vhost-testpmd:: + + testpmd>set txpkts + testpmd>start tx_first 32 + +4. Repeat below command to get throughput 10 times,then check the average throughput can get expected data with below command:: + + testpmd>show port stats all + +5. Quit virtio-user, rerun step 2-4 with different packet length, include [64, 128, 256, 512, 1024, 1518]. + +Test Case 8: loopback vhost async test with packed ring mergeable path using IDXD kernel driver +----------------------------------------------------------------------------------------------- + +1. Launch vhost by below command:: + + rm -rf vhost-net* + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 2-4 --no-pci --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[txq0@wq0.0;rxq0@wq0.1]' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + +2. Launch virtio-user by below command:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 5-6 \ + --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,packed_vq=1,mrg_rxbuf=1,in_order=0 \ + -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +3. Send packets with vhost-testpmd:: + + testpmd>set txpkts + testpmd>start tx_first 32 + +4. Repeat below command to get throughput 10 times,then check the average throughput can get expected data with below command:: + + testpmd>show port stats all + +5. Quit virtio-user, rerun step 2-4 with different packet length, include [64, 128, 256, 512, 1024, 1518]. + +Test Case 9: loopback vhost async test with packed ring non-mergeable path using IDXD kernel driver +--------------------------------------------------------------------------------------------------- + +1. Launch vhost by below command:: + + rm -rf vhost-net* + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 2-4 --no-pci --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[txq0@wq0.0;rxq0@wq0.1]' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + +2. Launch virtio-user by below command:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 5-6 \ + --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,packed_vq=1,mrg_rxbuf=0,in_order=0 \ + -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +3. Send packets with vhost-testpmd:: + + testpmd>set txpkts + testpmd>start tx_first 32 + +4. Repeat below command to get throughput 10 times,then check the average throughput can get expected data with below command:: + + testpmd>show port stats all + +5. Quit virtio-user, rerun step 2-4 with different packet length, include [64, 128, 256, 512, 1024, 1518]. + +Test Case 10: loopback vhost async test with packed ring vectorized path using IDXD kernel driver +------------------------------------------------------------------------------------------------- + +1. Launch vhost by below command:: + + rm -rf vhost-net* + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 2-4 --no-pci --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[txq0@wq0.0;rxq0@wq0.1]' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + +2. Launch virtio-user by below command:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -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=./vhost-net,packed_vq=1,in_order=1,mrg_rxbuf=0,vectorized=1 \ + -- -i --rss-ip --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +3. Send packets with vhost-testpmd:: + + testpmd>set txpkts + testpmd>start tx_first 32 + +4. Repeat below command to get throughput 10 times,then check the average throughput can get expected data with below command:: + + testpmd>show port stats all + +5. Quit virtio-user, rerun step 2-4 with different packet length, include [64, 128, 256, 512, 1024, 1518]. + +Test Case 11: loopback vhost async test with split ring inorder mergeable path using vfio-pci driver +---------------------------------------------------------------------------------------------------- + +1. Launch vhost by below command:: + + rm -rf vhost-net* + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 2-4 -a 0000:6f:01.0,max_queues=2 --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[txq0@0000:6f:01.0-q0;rxq0@0000:6f:01.0-q1]' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + +2. Launch virtio-user by below command:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 5-6 \ + --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,in_order=1,mrg_rxbuf=1 \ + -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +3. Send packets with vhost-testpmd:: + + testpmd>set txpkts + testpmd>start tx_first 32 + +4. Repeat below command to get throughput 10 times,then check the average throughput can get expected data with below command:: + + testpmd>show port stats all + +5. Quit virtio-user, rerun step 2-4 with different packet length, include [64, 128, 256, 512, 1024, 1518]. + +Test Case 12: loopback vhost async test with split ring inorder non-mergeable path using vfio-pci driver +-------------------------------------------------------------------------------------------------------- + +1. Launch vhost by below command:: + + rm -rf vhost-net* + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 2-4 -a 0000:6f:01.0,max_queues=2 --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[txq0@0000:6f:01.0-q0;rxq0@0000:6f:01.0-q1]' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + +2. Launch virtio-user by below command:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 5-6 \ + --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,in_order=1,mrg_rxbuf=0 \ + -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +3. Send packets with vhost-testpmd:: + + testpmd>set txpkts + testpmd>start tx_first 32 + +4. Repeat below command to get throughput 10 times,then check the average throughput can get expected data with below command:: + + testpmd>show port stats all + +5. Quit virtio-user, rerun step 2-4 with different packet length, include [64, 128, 256, 512, 1024, 1518]. + +Test Case 13: loopback vhost async test with split ring mergeable path using vfio-pci driver +-------------------------------------------------------------------------------------------- + +1. Launch vhost by below command:: + + rm -rf vhost-net* + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 2-4 -a 0000:6f:01.0,max_queues=2 --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[txq0@0000:6f:01.0-q0;rxq0@0000:6f:01.0-q1]' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + +2. Launch virtio-user by below command:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 5-6 \ + --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,in_order=0,mrg_rxbuf=1 \ + -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +3. Send packets with vhost-testpmd:: + + testpmd>set txpkts + testpmd>start tx_first 32 + +4. Repeat below command to get throughput 10 times,then check the average throughput can get expected data with below command:: + + testpmd>show port stats all + +5. Quit virtio-user, rerun step 2-4 with different packet length, include [64, 128, 256, 512, 1024, 1518]. + +Test Case 14: loopback vhost async test with split ring non-mergeable path using vfio-pci driver +------------------------------------------------------------------------------------------------ + +1. Launch vhost by below command:: + + rm -rf vhost-net* + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 2-4 -a 0000:6f:01.0,max_queues=2 --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[txq0@0000:6f:01.0-q0;rxq0@0000:6f:01.0-q1]' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + +2. Launch virtio-user by below command:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 5-6 \ + --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,in_order=0,mrg_rxbuf=0 \ + -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +3. Send packets with vhost-testpmd:: + + testpmd>set txpkts + testpmd>start tx_first 32 + +4. Repeat below command to get throughput 10 times,then check the average throughput can get expected data with below command:: + + testpmd>show port stats all + +5. Quit virtio-user, rerun step 2-4 with different packet length, include [64, 128, 256, 512, 1024, 1518]. + +Test Case 15: loopback vhost async test with split ring vectorized path using vfio-pci driver +--------------------------------------------------------------------------------------------- + +1. Launch vhost by below command:: + + rm -rf vhost-net* + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 2-4 -a 0000:6f:01.0,max_queues=2 --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[txq0@0000:6f:01.0-q0;rxq0@0000:6f:01.0-q1]' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + +2. Launch virtio-user by below command:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 5-6 \ + --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,in_order=0,mrg_rxbuf=0 \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +3. Send packets with vhost-testpmd:: + + testpmd>set txpkts + testpmd>start tx_first 32 + +4. Repeat below command to get throughput 10 times,then check the average throughput can get expected data with below command:: + + testpmd>show port stats all + +5. Quit virtio-user, rerun step 2-4 with different packet length, include [64, 128, 256, 512, 1024, 1518]. + +Test Case 16: loopback vhost async test with packed ring inorder mergeable path using vfio-pci driver +----------------------------------------------------------------------------------------------------- + +1. Launch vhost by below command:: + + rm -rf vhost-net* + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 2-4 -a 0000:6f:01.0,max_queues=2 --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[txq0@0000:6f:01.0-q0;rxq0@0000:6f:01.0-q1]' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + +2. Launch virtio-user by below command:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 5-6 \ + --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,packed_vq=1,in_order=1,mrg_rxbuf=1 \ + -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +3. Send packets with vhost-testpmd:: + + testpmd>set txpkts + testpmd>start tx_first 32 + +4. Repeat below command to get throughput 10 times,then check the average throughput can get expected data with below command:: + + testpmd>show port stats all + +5. Quit virtio-user, rerun step 2-4 with different packet length, include [64, 128, 256, 512, 1024, 1518]. + +Test Case 17: loopback vhost async test with packed ring inorder non-mergeable path using vfio-pci driver +--------------------------------------------------------------------------------------------------------- + +1. Launch vhost by below command:: + + rm -rf vhost-net* + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 2-4 -a 0000:6f:01.0,max_queues=2 --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[txq0@0000:6f:01.0-q0;rxq0@0000:6f:01.0-q1]' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + +2. Launch virtio-user by below command:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 5-6 \ + --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,packed_vq=1,in_order=1,mrg_rxbuf=0 \ + -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +3. Send packets with vhost-testpmd:: + + testpmd>set txpkts + testpmd>start tx_first 32 + +4. Repeat below command to get throughput 10 times,then check the average throughput can get expected data with below command:: + + testpmd>show port stats all + +5. Quit virtio-user, rerun step 2-4 with different packet length, include [64, 128, 256, 512, 1024, 1518]. + +Test Case 18: loopback vhost async test with packed ring mergeable path using vfio-pci driver +--------------------------------------------------------------------------------------------- + +1. Launch vhost by below command:: + + rm -rf vhost-net* + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 2-4 -a 0000:6f:01.0,max_queues=2 --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[txq0@0000:6f:01.0-q0;rxq0@0000:6f:01.0-q1]' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + +2. Launch virtio-user by below command:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 5-6 \ + --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,packed_vq=1,mrg_rxbuf=1,in_order=0 \ + -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +3. Send packets with vhost-testpmd:: + + testpmd>set txpkts + testpmd>start tx_first 32 + +4. Repeat below command to get throughput 10 times,then check the average throughput can get expected data with below command:: + + testpmd>show port stats all + +5. Quit virtio-user, rerun step 2-4 with different packet length, include [64, 128, 256, 512, 1024, 1518]. + +Test Case 19: loopback vhost async test with packed ring non-mergeable path using vfio-pci driver +------------------------------------------------------------------------------------------------- + +1. Launch vhost by below command:: + + rm -rf vhost-net* + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 2-4 -a 0000:6f:01.0,max_queues=2 --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[txq0@0000:6f:01.0-q0;rxq0@0000:6f:01.0-q1]' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + +2. Launch virtio-user by below command:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 5-6 \ + --no-pci --file-prefix=virtio \ + --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,packed_vq=1,mrg_rxbuf=0,in_order=0 \ + -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +3. Send packets with vhost-testpmd:: + + testpmd>set txpkts + testpmd>start tx_first 32 + +4. Repeat below command to get throughput 10 times,then check the average throughput can get expected data with below command:: + + testpmd>show port stats all + +5. Quit virtio-user, rerun step 2-4 with different packet length, include [64, 128, 256, 512, 1024, 1518]. + +Test Case 20: loopback vhost async test with packed ring vectorized path using vfio-pci driver +---------------------------------------------------------------------------------------------- + +1. Launch vhost by below command:: + + rm -rf vhost-net* + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -l 2-4 -a 0000:6f:01.0,max_queues=2 --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[txq0@0000:6f:01.0-q0;rxq0@0000:6f:01.0-q1]' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + +2. Launch virtio-user by below command:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 8 -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=./vhost-net,packed_vq=1,in_order=1,mrg_rxbuf=0,vectorized=1 \ + -- -i --rss-ip --nb-cores=1 --txd=1024 --rxd=1024 + testpmd>set fwd mac + testpmd>start + +3. Send packets with vhost-testpmd:: + + testpmd>set txpkts + testpmd>start tx_first 32 + +4. Repeat below command to get throughput 10 times,then check the average throughput can get expected data with below command:: + + testpmd>show port stats all + +5. Quit virtio-user, rerun step 2-4 with different packet length, include [64, 128, 256, 512, 1024, 1518]. From patchwork Thu Feb 16 08:09:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 124045 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 34A8F41CAE; Thu, 16 Feb 2023 09:23:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 25F5740FDF; Thu, 16 Feb 2023 09:23:07 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 03E7840E0F for ; Thu, 16 Feb 2023 09:23:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676535785; x=1708071785; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=rga4F4/tbdrMNaHbv9p2MPZmU1oYj0SJhcY2lVMvWHg=; b=ADqDF0pLOm/x2GSzGe1S+6Ps6snIadqMvLnFMQKhVA9RQ/KildQ9aEez YfbDHEX9ZrZr8lYJXDDSKH+2K7WocExadlj83Kl+N2N39vvVdhs9cKTB9 BloDxYdUHz+vc9ae0OpAVAbGa37fawh8vdZN0fjmyd3xNsq2DfDLbVTCP b+OijqEXOFEZOEKvkVuEtjUAk6wqRdVUxt1+5meIzHdopzp66pjviI1ZX 31cOAS6knBBlUS/mooSV/hyjovlXFNysqXKqdKovTbkSh3rvOt+y98eOE O2td4k2TqLTmaag6IlU10a2cXKRjm2kp8Y4oVSr2XVHZcjYy4zARJbACu g==; X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="311287433" X-IronPort-AV: E=Sophos;i="5.97,301,1669104000"; d="scan'208";a="311287433" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2023 00:23:01 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="670041547" X-IronPort-AV: E=Sophos;i="5.97,301,1669104000"; d="scan'208";a="670041547" Received: from unknown (HELO localhost.localdomain) ([10.239.252.222]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2023 00:22:58 -0800 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V2 3/4] tests/loopback_vhost_async_perf_dsa: add new testsuite Date: Thu, 16 Feb 2023 16:09:34 +0800 Message-Id: <20230216080934.1025461-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 tests/TestSuite_loopback_vhost_async_perf_dsa.py to test loopback vhost/virtio multi-paths async data-path use DSA device with dpdk and kernel driver. Signed-off-by: Wei Ling --- ...TestSuite_loopback_vhost_async_perf_dsa.py | 976 ++++++++++++++++++ 1 file changed, 976 insertions(+) create mode 100644 tests/TestSuite_loopback_vhost_async_perf_dsa.py diff --git a/tests/TestSuite_loopback_vhost_async_perf_dsa.py b/tests/TestSuite_loopback_vhost_async_perf_dsa.py new file mode 100644 index 00000000..85883ea3 --- /dev/null +++ b/tests/TestSuite_loopback_vhost_async_perf_dsa.py @@ -0,0 +1,976 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2023 Intel Corporation +# + +import json +import os +import re +import time +from copy import deepcopy + +import framework.rst as rst +from framework.pmd_output import PmdOutput +from framework.settings import UPDATE_EXPECTED, load_global_setting +from framework.test_case import TestCase + +from .virtio_common import dsa_common as DC + + +class TestLoopbackVhostAsyncPerfDsa(TestCase): + def set_up_all(self): + """ + Run at the start of each test suite. + """ + self.nb_ports = 1 + self.vhost_user = self.dut.new_session(suite="vhost-user") + self.virtio_user = self.dut.new_session(suite="virtio-user") + self.vhost_user_pmd = PmdOutput(self.dut, self.vhost_user) + self.virtio_user_pmd = PmdOutput(self.dut, self.virtio_user) + self.dut_ports = self.dut.get_ports() + self.ports_socket = self.dut.get_numa_id(self.dut_ports[0]) + self.core_list = self.dut.get_core_list(config="all", socket=self.ports_socket) + self.vhost_user_core = self.core_list[0:3] + self.virtio_user_core = self.core_list[3:5] + self.frame_sizes = [64, 128, 256, 512, 1024, 1518] + self.testpmd_path = self.dut.apps_name["test-pmd"] + self.testpmd_name = self.testpmd_path.split("/")[-1] + self.base_dir = self.dut.base_dir.replace("~", "/root") + self.save_result_flag = True + self.json_obj = dict() + self.DC = DC(self) + + def set_up(self): + """ + Run before each test case. + """ + self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#") + self.dut.send_expect("rm -rf %s/vhost-net*" % self.base_dir, "#") + self.DC.reset_all_work_queue() + self.DC.bind_all_dsa_to_kernel() + # Prepare the result table + self.table_header = [ + "Frame Size", + "TXD/RXD", + "Throughput", + "Expected Throughput", + "Throughput Difference", + ] + self.result_table_create(self.table_header) + + # test parameters include: frames size, descriptor numbers + self.test_parameters = self.get_suite_cfg()["test_parameters"] + + self.nb_desc = self.test_parameters[64][0] + + # traffic duraion in second + self.test_duration = self.get_suite_cfg()["test_duration"] + + # initilize throughput attribution + # {'$framesize':{"$nb_desc": 'throughput'} + self.throughput = {} + + # Accepted tolerance in Mpps + self.gap = self.get_suite_cfg()["accepted_tolerance"] + + self.test_result = {} + + def start_vhost_user_testpmd( + self, eal_param, param, no_pci=True, ports="", port_options="" + ): + """ + start testpmd as vhost-user + """ + if no_pci: + self.vhost_user_pmd.start_testpmd( + cores=self.vhost_user_core, + eal_param=eal_param, + param=param, + no_pci=True, + prefix="vhost-user", + fixed_prefix=True, + ) + else: + self.vhost_user_pmd.start_testpmd( + cores=self.vhost_user_core, + eal_param=eal_param, + param=param, + ports=ports, + port_options=port_options, + prefix="vhost-user", + fixed_prefix=True, + ) + self.vhost_user_pmd.execute_cmd("set fwd mac") + + def start_virtio_user_testpmd(self, eal_param, param): + """ + start testpmd as virtio-user + """ + if "vectorized" and "packed" in self.running_case: + eal_param += " --force-max-simd-bitwidth=512" + self.virtio_user_pmd.start_testpmd( + cores=self.virtio_user_core, + eal_param=eal_param, + param=param, + no_pci=True, + prefix="virtio-user", + fixed_prefix=True, + ) + self.virtio_user_pmd.execute_cmd("set fwd mac") + self.virtio_user_pmd.execute_cmd("start") + + def send_and_verify(self, frame_size): + self.throughput[frame_size] = dict() + self.vhost_user_pmd.execute_cmd("set txpkts %s" % frame_size) + self.vhost_user_pmd.execute_cmd("start tx_first 32") + self.vhost_user_pmd.execute_cmd("show port stats 0") + time.sleep(5) + show_times = 10 + count = 0.0 + for _ in range(show_times): + out = self.vhost_user_pmd.execute_cmd("show port stats 0") + lines = re.search("Rx-pps:\s*(\d*)", out) + rx_pps = lines.group(1) + count += float(rx_pps) + Mpps = count / (1000000 * show_times) + self.throughput[frame_size][self.nb_desc] = Mpps + results_row = [frame_size] + results_row.append(self.nb_desc) + results_row.append(Mpps) + self.result_table_add(results_row) + + def handle_expected(self): + """ + Update expected numbers to configurate file: $DTS_CFG_FOLDER/$suite_name.cfg + """ + if load_global_setting(UPDATE_EXPECTED) == "yes": + for frame_size in self.test_parameters.keys(): + for nb_desc in self.test_parameters[frame_size]: + self.expected_throughput[frame_size][nb_desc] = round( + self.throughput[frame_size][nb_desc], 3 + ) + + def handle_results(self): + """ + results handled process: + 1, save to self.test_results + 2, create test results table + 3, save to json file for Open Lab + """ + header = self.table_header + for frame_size in self.test_parameters.keys(): + ret_datas = {} + for nb_desc in self.test_parameters[frame_size]: + ret_data = {} + ret_data[header[0]] = frame_size + ret_data[header[1]] = nb_desc + ret_data[header[2]] = "{:.3f} Mpps".format( + self.throughput[frame_size][nb_desc] + ) + ret_data[header[3]] = "{:.3f} Mpps".format( + self.expected_throughput[frame_size][nb_desc] + ) + ret_data[header[4]] = "{:.3f} Mpps".format( + self.throughput[frame_size][nb_desc] + - self.expected_throughput[frame_size][nb_desc] + ) + ret_datas[nb_desc] = deepcopy(ret_data) + self.test_result[frame_size] = deepcopy(ret_datas) + # Create test results table + self.result_table_create(header) + for frame_size in self.test_parameters.keys(): + for nb_desc in self.test_parameters[frame_size]: + table_row = list() + for i in range(len(header)): + table_row.append(self.test_result[frame_size][nb_desc][header[i]]) + self.result_table_add(table_row) + # present test results to screen + self.result_table_print() + # save test results as a file + if self.save_result_flag: + self.save_result(self.test_result) + + def save_result(self, data): + """ + Saves the test results as a separated file named with + self.nic+_single_core_perf.json in output folder + if self.save_result_flag is True + """ + case_name = self.running_case + self.json_obj[case_name] = list() + status_result = [] + for frame_size in self.test_parameters.keys(): + for nb_desc in self.test_parameters[frame_size]: + row_in = self.test_result[frame_size][nb_desc] + row_dict0 = dict() + row_dict0["performance"] = list() + row_dict0["parameters"] = list() + row_dict0["parameters"] = list() + result_throughput = float(row_in["Throughput"].split()[0]) + expected_throughput = float(row_in["Expected Throughput"].split()[0]) + # delta value and accepted tolerance in percentage + delta = result_throughput - expected_throughput + gap = expected_throughput * -self.gap * 0.01 + delta = float(delta) + gap = float(gap) + self.logger.info( + "Accept tolerance of %d are (Mpps) %f" % (frame_size, gap) + ) + self.logger.info( + "Throughput Difference of %d are (Mpps) %f" % (frame_size, delta) + ) + if result_throughput > expected_throughput + gap: + row_dict0["status"] = "PASS" + else: + row_dict0["status"] = "FAIL" + row_dict1 = dict( + name="Throughput", value=result_throughput, unit="Mpps", delta=delta + ) + row_dict2 = dict( + name="Txd/Rxd", value=row_in["TXD/RXD"], unit="descriptor" + ) + row_dict3 = dict( + name="frame_size", value=row_in["Frame Size"], unit="bytes" + ) + row_dict0["performance"].append(row_dict1) + row_dict0["parameters"].append(row_dict2) + row_dict0["parameters"].append(row_dict3) + self.json_obj[case_name].append(row_dict0) + status_result.append(row_dict0["status"]) + with open( + os.path.join( + rst.path2Result, "{0:s}_{1}.json".format(self.nic, self.suite_name) + ), + "w", + ) as fp: + json.dump(self.json_obj, fp) + self.verify("FAIL" not in status_result, "Exceeded Gap") + + def test_loopback_split_ring_inorder_mergeable_idxd(self): + """ + Test Case 1: loopback vhost async test with split ring inorder mergeable path using IDXD kernel driver + """ + self.DC.create_work_queue(work_queue_number=2, dsa_index=0) + dmas = "txq0@wq0.0;rxq0@wq0.1" + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[%s]'" % dmas + ) + vhost_param = "--nb-cores=1 --txd=1024 --rxd=1024" + self.start_vhost_user_testpmd(eal_param=vhost_eal_param, param=vhost_param) + virtio_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,in_order=1,mrg_rxbuf=1" + virtio_param = "--tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024" + self.start_virtio_user_testpmd(eal_param=virtio_eal_param, param=virtio_param) + for frame_size in self.frame_sizes: + self.send_and_verify(frame_size) + self.vhost_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.quit() + if frame_size != self.frame_sizes[-1]: + self.start_virtio_user_testpmd( + eal_param=virtio_eal_param, param=virtio_param + ) + + self.quit_all_testpmd() + self.expected_throughput = self.get_suite_cfg()["expected_throughput"][ + self.running_case + ] + self.handle_expected() + self.handle_results() + + def test_loopback_split_ring_inorder_non_mergeable_idxd(self): + """ + Test Case 2: loopback vhost async test with split ring inorder non-mergeable path using IDXD kernel driver + """ + self.DC.create_work_queue(work_queue_number=2, dsa_index=0) + dmas = "txq0@wq0.0;rxq0@wq0.1" + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[%s]'" % dmas + ) + vhost_param = "--nb-cores=1 --txd=1024 --rxd=1024" + self.start_vhost_user_testpmd(eal_param=vhost_eal_param, param=vhost_param) + virtio_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,in_order=1,mrg_rxbuf=0" + virtio_param = "--tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024" + self.start_virtio_user_testpmd(eal_param=virtio_eal_param, param=virtio_param) + for frame_size in self.frame_sizes: + self.send_and_verify(frame_size) + self.vhost_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.quit() + if frame_size != self.frame_sizes[-1]: + self.start_virtio_user_testpmd( + eal_param=virtio_eal_param, param=virtio_param + ) + + self.quit_all_testpmd() + self.expected_throughput = self.get_suite_cfg()["expected_throughput"][ + self.running_case + ] + self.handle_expected() + self.handle_results() + + def test_loopback_split_ring_mergeable_idxd(self): + """ + Test Case 3: loopback vhost async test with split ring mergeable path using IDXD kernel driver + """ + self.DC.create_work_queue(work_queue_number=2, dsa_index=0) + dmas = "txq0@wq0.0;rxq0@wq0.1" + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[%s]'" % dmas + ) + vhost_param = "--nb-cores=1 --txd=1024 --rxd=1024" + self.start_vhost_user_testpmd(eal_param=vhost_eal_param, param=vhost_param) + virtio_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,in_order=0,mrg_rxbuf=1" + virtio_param = "--tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024" + self.start_virtio_user_testpmd(eal_param=virtio_eal_param, param=virtio_param) + for frame_size in self.frame_sizes: + self.send_and_verify(frame_size) + self.vhost_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.quit() + if frame_size != self.frame_sizes[-1]: + self.start_virtio_user_testpmd( + eal_param=virtio_eal_param, param=virtio_param + ) + + self.quit_all_testpmd() + self.expected_throughput = self.get_suite_cfg()["expected_throughput"][ + self.running_case + ] + self.handle_expected() + self.handle_results() + + def test_loopback_split_ring_non_mergeable_idxd(self): + """ + Test Case 4: loopback vhost async test with split ring non-mergeable path path using IDXD kernel driver + """ + self.DC.create_work_queue(work_queue_number=2, dsa_index=0) + dmas = "txq0@wq0.0;rxq0@wq0.1" + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[%s]'" % dmas + ) + vhost_param = "--nb-cores=1 --txd=1024 --rxd=1024" + self.start_vhost_user_testpmd(eal_param=vhost_eal_param, param=vhost_param) + virtio_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,in_order=0,mrg_rxbuf=0" + virtio_param = "--tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024" + self.start_virtio_user_testpmd(eal_param=virtio_eal_param, param=virtio_param) + for frame_size in self.frame_sizes: + self.send_and_verify(frame_size) + self.vhost_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.quit() + if frame_size != self.frame_sizes[-1]: + self.start_virtio_user_testpmd( + eal_param=virtio_eal_param, param=virtio_param + ) + + self.quit_all_testpmd() + self.expected_throughput = self.get_suite_cfg()["expected_throughput"][ + self.running_case + ] + self.handle_expected() + self.handle_results() + + def test_loopback_split_ring_vectorized_idxd(self): + """ + Test Case 5: loopback vhost async test with split ring vectorized path using IDXD kernel driver + """ + self.DC.create_work_queue(work_queue_number=2, dsa_index=0) + dmas = "txq0@wq0.0;rxq0@wq0.1" + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[%s]'" % dmas + ) + vhost_param = "--nb-cores=1 --txd=1024 --rxd=1024" + self.start_vhost_user_testpmd(eal_param=vhost_eal_param, param=vhost_param) + virtio_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,in_order=0,mrg_rxbuf=0,vectorized=1" + virtio_param = "--nb-cores=1 --txd=1024 --rxd=1024" + self.start_virtio_user_testpmd(eal_param=virtio_eal_param, param=virtio_param) + for frame_size in self.frame_sizes: + self.send_and_verify(frame_size) + self.vhost_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.quit() + if frame_size != self.frame_sizes[-1]: + self.start_virtio_user_testpmd( + eal_param=virtio_eal_param, param=virtio_param + ) + + self.quit_all_testpmd() + self.expected_throughput = self.get_suite_cfg()["expected_throughput"][ + self.running_case + ] + self.handle_expected() + self.handle_results() + + def test_loopback_packed_ring_inorder_mergeable_idxd(self): + """ + Test Case 6: loopback vhost async test with packed ring inorder mergeable path path using IDXD kernel driver + """ + self.DC.create_work_queue(work_queue_number=2, dsa_index=0) + dmas = "txq0@wq0.0;rxq0@wq0.1" + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[%s]'" % dmas + ) + vhost_param = "--nb-cores=1 --txd=1024 --rxd=1024" + self.start_vhost_user_testpmd(eal_param=vhost_eal_param, param=vhost_param) + virtio_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,packed_vq=1,in_order=1,mrg_rxbuf=1" + virtio_param = "--tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024" + self.start_virtio_user_testpmd(eal_param=virtio_eal_param, param=virtio_param) + for frame_size in self.frame_sizes: + self.send_and_verify(frame_size) + self.vhost_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.quit() + if frame_size != self.frame_sizes[-1]: + self.start_virtio_user_testpmd( + eal_param=virtio_eal_param, param=virtio_param + ) + + self.quit_all_testpmd() + self.expected_throughput = self.get_suite_cfg()["expected_throughput"][ + self.running_case + ] + self.handle_expected() + self.handle_results() + + def test_loopback_packed_ring_inorder_non_mergeable_idxd(self): + """ + Test Case 7: loopback vhost async test with packed ring inorder non-mergeable path path using IDXD kernel driver + """ + self.DC.create_work_queue(work_queue_number=2, dsa_index=0) + dmas = "txq0@wq0.0;rxq0@wq0.1" + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[%s]'" % dmas + ) + vhost_param = "--nb-cores=1 --txd=1024 --rxd=1024" + self.start_vhost_user_testpmd(eal_param=vhost_eal_param, param=vhost_param) + virtio_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,packed_vq=1,in_order=1,mrg_rxbuf=0" + virtio_param = "--tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024" + self.start_virtio_user_testpmd(eal_param=virtio_eal_param, param=virtio_param) + for frame_size in self.frame_sizes: + self.send_and_verify(frame_size) + self.vhost_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.quit() + if frame_size != self.frame_sizes[-1]: + self.start_virtio_user_testpmd( + eal_param=virtio_eal_param, param=virtio_param + ) + + self.quit_all_testpmd() + self.expected_throughput = self.get_suite_cfg()["expected_throughput"][ + self.running_case + ] + self.handle_expected() + self.handle_results() + + def test_loopback_packed_ring_mergeable_idxd(self): + """ + Test Case 8: loopback vhost async test with packed ring mergeable path path using IDXD kernel driver + """ + self.DC.create_work_queue(work_queue_number=2, dsa_index=0) + dmas = "txq0@wq0.0;rxq0@wq0.1" + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[%s]'" % dmas + ) + vhost_param = "--nb-cores=1 --txd=1024 --rxd=1024" + self.start_vhost_user_testpmd(eal_param=vhost_eal_param, param=vhost_param) + virtio_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,packed_vq=1,in_order=0,mrg_rxbuf=1" + virtio_param = "--tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024" + self.start_virtio_user_testpmd(eal_param=virtio_eal_param, param=virtio_param) + for frame_size in self.frame_sizes: + self.send_and_verify(frame_size) + self.vhost_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.quit() + if frame_size != self.frame_sizes[-1]: + self.start_virtio_user_testpmd( + eal_param=virtio_eal_param, param=virtio_param + ) + + self.quit_all_testpmd() + self.expected_throughput = self.get_suite_cfg()["expected_throughput"][ + self.running_case + ] + self.handle_expected() + self.handle_results() + + def test_loopback_packed_ring_non_mergeable_idxd(self): + """ + Test Case 9: loopback vhost async test with packed ring non-mergeable path path using IDXD kernel driver + """ + self.DC.create_work_queue(work_queue_number=2, dsa_index=0) + dmas = "txq0@wq0.0;rxq0@wq0.1" + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[%s]'" % dmas + ) + vhost_param = "--nb-cores=1 --txd=1024 --rxd=1024" + self.start_vhost_user_testpmd(eal_param=vhost_eal_param, param=vhost_param) + virtio_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,packed_vq=1,in_order=0,mrg_rxbuf=0" + virtio_param = "--tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024" + self.start_virtio_user_testpmd(eal_param=virtio_eal_param, param=virtio_param) + for frame_size in self.frame_sizes: + self.send_and_verify(frame_size) + self.vhost_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.quit() + if frame_size != self.frame_sizes[-1]: + self.start_virtio_user_testpmd( + eal_param=virtio_eal_param, param=virtio_param + ) + + self.quit_all_testpmd() + self.expected_throughput = self.get_suite_cfg()["expected_throughput"][ + self.running_case + ] + self.handle_expected() + self.handle_results() + + def test_loopback_packed_ring_vectorized_idxd(self): + """ + Test Case 10: loopback vhost async test with packed ring vectorized path using IDXD kernel driver + """ + self.DC.create_work_queue(work_queue_number=2, dsa_index=0) + dmas = "txq0@wq0.0;rxq0@wq0.1" + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[%s]'" % dmas + ) + vhost_param = "--nb-cores=1 --txd=1024 --rxd=1024" + self.start_vhost_user_testpmd(eal_param=vhost_eal_param, param=vhost_param) + virtio_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,packed_vq=1,in_order=1,mrg_rxbuf=0,vectorized=1" + virtio_param = "--nb-cores=1 --txd=1024 --rxd=1024" + self.start_virtio_user_testpmd(eal_param=virtio_eal_param, param=virtio_param) + for frame_size in self.frame_sizes: + self.send_and_verify(frame_size) + self.vhost_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.quit() + if frame_size != self.frame_sizes[-1]: + self.start_virtio_user_testpmd( + eal_param=virtio_eal_param, param=virtio_param + ) + + self.quit_all_testpmd() + self.expected_throughput = self.get_suite_cfg()["expected_throughput"][ + self.running_case + ] + self.handle_expected() + self.handle_results() + + def test_loopback_split_ring_inorder_mergeable_vfio_pci(self): + """ + Test Case 11: loopback vhost async test with split ring inorder mergeable path using vfio-pci driver + """ + self.use_dsa_list = self.DC.bind_dsa_to_dpdk( + dsa_number=1, driver_name="vfio-pci", socket=self.ports_socket + ) + dmas = "txq0@%s-q0;" "rxq0@%s-q1" % (self.use_dsa_list[0], self.use_dsa_list[0]) + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[%s]'" % dmas + ) + vhost_param = "--nb-cores=1 --txd=1024 --rxd=1024" + port_options = {self.use_dsa_list[0]: "max_queues=2"} + self.start_vhost_user_testpmd( + eal_param=vhost_eal_param, + param=vhost_param, + no_pci=False, + ports=self.use_dsa_list, + port_options=port_options, + ) + virtio_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,in_order=1,mrg_rxbuf=1" + virtio_param = "--tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024" + self.start_virtio_user_testpmd(eal_param=virtio_eal_param, param=virtio_param) + for frame_size in self.frame_sizes: + self.send_and_verify(frame_size) + self.vhost_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.quit() + if frame_size != self.frame_sizes[-1]: + self.start_virtio_user_testpmd( + eal_param=virtio_eal_param, param=virtio_param + ) + + self.quit_all_testpmd() + self.expected_throughput = self.get_suite_cfg()["expected_throughput"][ + self.running_case + ] + self.handle_expected() + self.handle_results() + + def test_loopback_split_ring_inorder_non_mergeable_vfio_pci(self): + """ + Test Case 12: loopback vhost async test with split ring inorder non-mergeable path using vfio-pci driver + """ + self.use_dsa_list = self.DC.bind_dsa_to_dpdk( + dsa_number=1, driver_name="vfio-pci", socket=self.ports_socket + ) + dmas = "txq0@%s-q0;" "rxq0@%s-q1" % (self.use_dsa_list[0], self.use_dsa_list[0]) + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[%s]'" % dmas + ) + vhost_param = "--nb-cores=1 --txd=1024 --rxd=1024" + port_options = {self.use_dsa_list[0]: "max_queues=2"} + self.start_vhost_user_testpmd( + eal_param=vhost_eal_param, + param=vhost_param, + no_pci=False, + ports=self.use_dsa_list, + port_options=port_options, + ) + virtio_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,in_order=1,mrg_rxbuf=0" + virtio_param = "--tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024" + self.start_virtio_user_testpmd(eal_param=virtio_eal_param, param=virtio_param) + for frame_size in self.frame_sizes: + self.send_and_verify(frame_size) + self.vhost_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.quit() + if frame_size != self.frame_sizes[-1]: + self.start_virtio_user_testpmd( + eal_param=virtio_eal_param, param=virtio_param + ) + + self.quit_all_testpmd() + self.expected_throughput = self.get_suite_cfg()["expected_throughput"][ + self.running_case + ] + self.handle_expected() + self.handle_results() + + def test_loopback_split_ring_mergeable_vfio_pci(self): + """ + Test Case 13: loopback vhost async test with split ring mergeable path using vfio-pci driver + """ + self.use_dsa_list = self.DC.bind_dsa_to_dpdk( + dsa_number=1, driver_name="vfio-pci", socket=self.ports_socket + ) + dmas = "txq0@%s-q0;" "rxq0@%s-q1" % (self.use_dsa_list[0], self.use_dsa_list[0]) + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[%s]'" % dmas + ) + vhost_param = "--nb-cores=1 --txd=1024 --rxd=1024" + port_options = {self.use_dsa_list[0]: "max_queues=2"} + self.start_vhost_user_testpmd( + eal_param=vhost_eal_param, + param=vhost_param, + no_pci=False, + ports=self.use_dsa_list, + port_options=port_options, + ) + virtio_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,in_order=0,mrg_rxbuf=1" + virtio_param = "--tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024" + self.start_virtio_user_testpmd(eal_param=virtio_eal_param, param=virtio_param) + for frame_size in self.frame_sizes: + self.send_and_verify(frame_size) + self.vhost_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.quit() + if frame_size != self.frame_sizes[-1]: + self.start_virtio_user_testpmd( + eal_param=virtio_eal_param, param=virtio_param + ) + + self.quit_all_testpmd() + self.expected_throughput = self.get_suite_cfg()["expected_throughput"][ + self.running_case + ] + self.handle_expected() + self.handle_results() + + def test_loopback_split_ring_non_mergeable_vfio_pci(self): + """ + Test Case 14: loopback vhost async test with split ring non-mergeable path using vfio-pci driver + """ + self.use_dsa_list = self.DC.bind_dsa_to_dpdk( + dsa_number=1, driver_name="vfio-pci", socket=self.ports_socket + ) + dmas = "txq0@%s-q0;" "rxq0@%s-q1" % (self.use_dsa_list[0], self.use_dsa_list[0]) + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[%s]'" % dmas + ) + vhost_param = "--nb-cores=1 --txd=1024 --rxd=1024" + port_options = {self.use_dsa_list[0]: "max_queues=2"} + self.start_vhost_user_testpmd( + eal_param=vhost_eal_param, + param=vhost_param, + no_pci=False, + ports=self.use_dsa_list, + port_options=port_options, + ) + virtio_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,in_order=0,mrg_rxbuf=0" + virtio_param = "--tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024" + self.start_virtio_user_testpmd(eal_param=virtio_eal_param, param=virtio_param) + for frame_size in self.frame_sizes: + self.send_and_verify(frame_size) + self.vhost_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.quit() + if frame_size != self.frame_sizes[-1]: + self.start_virtio_user_testpmd( + eal_param=virtio_eal_param, param=virtio_param + ) + + self.quit_all_testpmd() + self.expected_throughput = self.get_suite_cfg()["expected_throughput"][ + self.running_case + ] + self.handle_expected() + self.handle_results() + + def test_loopback_split_ring_vectorized_vfio_pci(self): + """ + Test Case 15: loopback vhost async test with split ring vectorized path using vfio-pci driver + """ + self.use_dsa_list = self.DC.bind_dsa_to_dpdk( + dsa_number=1, driver_name="vfio-pci", socket=self.ports_socket + ) + dmas = "txq0@%s-q0;" "rxq0@%s-q1" % (self.use_dsa_list[0], self.use_dsa_list[0]) + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[%s]'" % dmas + ) + vhost_param = "--nb-cores=1 --txd=1024 --rxd=1024" + port_options = {self.use_dsa_list[0]: "max_queues=2"} + self.start_vhost_user_testpmd( + eal_param=vhost_eal_param, + param=vhost_param, + no_pci=False, + ports=self.use_dsa_list, + port_options=port_options, + ) + virtio_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,in_order=0,mrg_rxbuf=0,vectorized=1" + virtio_param = "--nb-cores=1 --txd=1024 --rxd=1024" + self.start_virtio_user_testpmd(eal_param=virtio_eal_param, param=virtio_param) + for frame_size in self.frame_sizes: + self.send_and_verify(frame_size) + self.vhost_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.quit() + if frame_size != self.frame_sizes[-1]: + self.start_virtio_user_testpmd( + eal_param=virtio_eal_param, param=virtio_param + ) + + self.quit_all_testpmd() + self.expected_throughput = self.get_suite_cfg()["expected_throughput"][ + self.running_case + ] + self.handle_expected() + self.handle_results() + + def test_loopback_packed_ring_inorder_mergeable_vfio_pci(self): + """ + Test Case 16: loopback vhost async test with packed ring inorder mergeable path using vfio-pci driver + """ + self.use_dsa_list = self.DC.bind_dsa_to_dpdk( + dsa_number=1, driver_name="vfio-pci", socket=self.ports_socket + ) + dmas = "txq0@%s-q0;" "rxq0@%s-q1" % (self.use_dsa_list[0], self.use_dsa_list[0]) + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[%s]'" % dmas + ) + vhost_param = "--nb-cores=1 --txd=1024 --rxd=1024" + port_options = {self.use_dsa_list[0]: "max_queues=2"} + self.start_vhost_user_testpmd( + eal_param=vhost_eal_param, + param=vhost_param, + no_pci=False, + ports=self.use_dsa_list, + port_options=port_options, + ) + virtio_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,packed_vq=1,in_order=1,mrg_rxbuf=1" + virtio_param = "--tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024" + self.start_virtio_user_testpmd(eal_param=virtio_eal_param, param=virtio_param) + for frame_size in self.frame_sizes: + self.send_and_verify(frame_size) + self.vhost_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.quit() + if frame_size != self.frame_sizes[-1]: + self.start_virtio_user_testpmd( + eal_param=virtio_eal_param, param=virtio_param + ) + + self.quit_all_testpmd() + self.expected_throughput = self.get_suite_cfg()["expected_throughput"][ + self.running_case + ] + self.handle_expected() + self.handle_results() + + def test_loopback_packed_ring_inorder_non_mergeable_vfio_pci(self): + """ + Test Case 17: loopback vhost async test with packed ring inorder non-mergeable path using vfio-pci driver + """ + self.use_dsa_list = self.DC.bind_dsa_to_dpdk( + dsa_number=1, driver_name="vfio-pci", socket=self.ports_socket + ) + dmas = "txq0@%s-q0;" "rxq0@%s-q1" % (self.use_dsa_list[0], self.use_dsa_list[0]) + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[%s]'" % dmas + ) + vhost_param = "--nb-cores=1 --txd=1024 --rxd=1024" + port_options = {self.use_dsa_list[0]: "max_queues=2"} + self.start_vhost_user_testpmd( + eal_param=vhost_eal_param, + param=vhost_param, + no_pci=False, + ports=self.use_dsa_list, + port_options=port_options, + ) + virtio_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,packed_vq=1,in_order=1,mrg_rxbuf=0" + virtio_param = "--tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024" + self.start_virtio_user_testpmd(eal_param=virtio_eal_param, param=virtio_param) + for frame_size in self.frame_sizes: + self.send_and_verify(frame_size) + self.vhost_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.quit() + if frame_size != self.frame_sizes[-1]: + self.start_virtio_user_testpmd( + eal_param=virtio_eal_param, param=virtio_param + ) + + self.quit_all_testpmd() + self.expected_throughput = self.get_suite_cfg()["expected_throughput"][ + self.running_case + ] + self.handle_expected() + self.handle_results() + + def test_loopback_packed_ring_mergeable_vfio_pci(self): + """ + Test Case 18: loopback vhost async test with packed ring mergeable path using vfio-pci driver + """ + self.use_dsa_list = self.DC.bind_dsa_to_dpdk( + dsa_number=1, driver_name="vfio-pci", socket=self.ports_socket + ) + dmas = "txq0@%s-q0;" "rxq0@%s-q1" % (self.use_dsa_list[0], self.use_dsa_list[0]) + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[%s]'" % dmas + ) + vhost_param = "--nb-cores=1 --txd=1024 --rxd=1024" + port_options = {self.use_dsa_list[0]: "max_queues=2"} + self.start_vhost_user_testpmd( + eal_param=vhost_eal_param, + param=vhost_param, + no_pci=False, + ports=self.use_dsa_list, + port_options=port_options, + ) + virtio_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,packed_vq=1,in_order=0,mrg_rxbuf=1" + virtio_param = "--tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024" + self.start_virtio_user_testpmd(eal_param=virtio_eal_param, param=virtio_param) + for frame_size in self.frame_sizes: + self.send_and_verify(frame_size) + self.vhost_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.quit() + if frame_size != self.frame_sizes[-1]: + self.start_virtio_user_testpmd( + eal_param=virtio_eal_param, param=virtio_param + ) + + self.quit_all_testpmd() + self.expected_throughput = self.get_suite_cfg()["expected_throughput"][ + self.running_case + ] + self.handle_expected() + self.handle_results() + + def test_loopback_packed_ring_non_mergeable_vfio_pci(self): + """ + Test Case 19: loopback vhost async test with packed ring non-mergeable path using vfio-pci driver + """ + self.use_dsa_list = self.DC.bind_dsa_to_dpdk( + dsa_number=1, driver_name="vfio-pci", socket=self.ports_socket + ) + dmas = "txq0@%s-q0;" "rxq0@%s-q1" % (self.use_dsa_list[0], self.use_dsa_list[0]) + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[%s]'" % dmas + ) + vhost_param = "--nb-cores=1 --txd=1024 --rxd=1024" + port_options = {self.use_dsa_list[0]: "max_queues=2"} + self.start_vhost_user_testpmd( + eal_param=vhost_eal_param, + param=vhost_param, + no_pci=False, + ports=self.use_dsa_list, + port_options=port_options, + ) + virtio_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,packed_vq=1,in_order=0,mrg_rxbuf=0" + virtio_param = "--tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024" + self.start_virtio_user_testpmd(eal_param=virtio_eal_param, param=virtio_param) + for frame_size in self.frame_sizes: + self.send_and_verify(frame_size) + self.vhost_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.quit() + if frame_size != self.frame_sizes[-1]: + self.start_virtio_user_testpmd( + eal_param=virtio_eal_param, param=virtio_param + ) + + self.quit_all_testpmd() + self.expected_throughput = self.get_suite_cfg()["expected_throughput"][ + self.running_case + ] + self.handle_expected() + self.handle_results() + + def test_loopback_packed_ring_vectorized_vfio_pci(self): + """ + Test Case 20: loopback vhost async test with packed ring vectorized path using vfio-pci driver + """ + self.use_dsa_list = self.DC.bind_dsa_to_dpdk( + dsa_number=1, driver_name="vfio-pci", socket=self.ports_socket + ) + dmas = "txq0@%s-q0;" "rxq0@%s-q1" % (self.use_dsa_list[0], self.use_dsa_list[0]) + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[%s]'" % dmas + ) + vhost_param = "--nb-cores=1 --txd=1024 --rxd=1024" + port_options = {self.use_dsa_list[0]: "max_queues=2"} + self.start_vhost_user_testpmd( + eal_param=vhost_eal_param, + param=vhost_param, + no_pci=False, + ports=self.use_dsa_list, + port_options=port_options, + ) + virtio_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,packed_vq=1,in_order=0,mrg_rxbuf=0,vectorized=1" + virtio_param = "--nb-cores=1 --txd=1024 --rxd=1024" + self.start_virtio_user_testpmd(eal_param=virtio_eal_param, param=virtio_param) + for frame_size in self.frame_sizes: + self.send_and_verify(frame_size) + self.vhost_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.execute_cmd("stop") + self.virtio_user_pmd.quit() + if frame_size != self.frame_sizes[-1]: + self.start_virtio_user_testpmd( + eal_param=virtio_eal_param, param=virtio_param + ) + + self.quit_all_testpmd() + self.expected_throughput = self.get_suite_cfg()["expected_throughput"][ + self.running_case + ] + self.handle_expected() + self.handle_results() + + def quit_all_testpmd(self): + self.virtio_user_pmd.quit() + self.vhost_user_pmd.quit() + + def tear_down(self): + """ + Run after each test case. + """ + self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#") + self.dut.send_expect("rm -rf %s/vhost-net*" % self.base_dir, "#") + self.DC.reset_all_work_queue() + self.DC.bind_all_dsa_to_kernel() + + def tear_down_all(self): + """ + Run after each test suite. + """ + self.dut.close_session(self.virtio_user) + self.dut.close_session(self.vhost_user) From patchwork Thu Feb 16 08:09:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 124046 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 5F74F41CAE; Thu, 16 Feb 2023 09:23:23 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5666D40EE3; Thu, 16 Feb 2023 09:23:23 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 8B18E40E0F for ; Thu, 16 Feb 2023 09:23:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676535801; x=1708071801; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=MzEiG3GT8oHUNZrtJ/jqBNn7AgiPl1xTnSBWvG+yQ20=; b=G1p6c0M7038tIB8p/L9Pl0ALdAO4n/l6keZ0JvPcznrimBkSbDTBWOgi GImOEgEtajH9akNAXJjIa3pBGLl7n2T15jH8YaItEIoCEvj9DfY5ru3p3 8C9GiecYYvruDeUGw44iNgC3/Gk6QU0o323RYoEQcRiwlAWrXnyQ5qxNV j925grsQv4Ohb7aOJHhWUYFnG7Zl66V5K5odkIYZOHleSRtzMFRmmQfGE 5NkikOWk/QKHozWbRueIPwNNDczR01FiTR5wSKU5u9EU7E0dZgb2F8nSP OK3fHHn79UOp0HZHDWhrzR2AH3uLkm9HfQh7YgjWBgLf0HyAlw1bPDK1B Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="311287500" X-IronPort-AV: E=Sophos;i="5.97,301,1669104000"; d="scan'208";a="311287500" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2023 00:23:12 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="670041587" X-IronPort-AV: E=Sophos;i="5.97,301,1669104000"; d="scan'208";a="670041587" Received: from unknown (HELO localhost.localdomain) ([10.239.252.222]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2023 00:23:11 -0800 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V2 4/4] conf/loopback_vhost_async_perf_dsa: add new testsuite config file Date: Thu, 16 Feb 2023 16:09:44 +0800 Message-Id: <20230216080944.1025523-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 conf/loopback_vhost_async_perf_dsa.cfg. Signed-off-by: Wei Ling --- conf/loopback_vhost_async_perf_dsa.cfg | 165 +++++++++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 conf/loopback_vhost_async_perf_dsa.cfg diff --git a/conf/loopback_vhost_async_perf_dsa.cfg b/conf/loopback_vhost_async_perf_dsa.cfg new file mode 100644 index 00000000..bba33d76 --- /dev/null +++ b/conf/loopback_vhost_async_perf_dsa.cfg @@ -0,0 +1,165 @@ +[suite] +update_expected = True +test_parameters = {64: [1024], 128: [1024], 256: [1024], 512: [1024], 1024: [1024], 1518: [1024]} +test_duration = 60 +accepted_tolerance = 1 +expected_throughput = { + 'test_loopback_split_ring_inorder_mergedable_idxd': { + 64: {1024: 0.00}, + 128: {1024: 0.00}, + 256: {1024: 0.00}, + 512: {1024: 0.00}, + 1024: {1024: 0.00}, + 1518: {1024: 0.00} + }, + 'test_loopback_split_ring_inorder_non_mergedable_idxd': { + 64: {1024: 0.00}, + 128: {1024: 0.00}, + 256: {1024: 0.00}, + 512: {1024: 0.00}, + 1024: {1024: 0.00}, + 1518: {1024: 0.00} + }, + 'test_loopback_split_ring_mergedable_idxd': { + 64: {1024: 0.00}, + 128: {1024: 0.00}, + 256: {1024: 0.00}, + 512: {1024: 0.00}, + 1024: {1024: 0.00}, + 1518: {1024: 0.00} + }, + 'test_loopback_split_ring_non_mergedable_idxd': { + 64: {1024: 0.00}, + 128: {1024: 0.00}, + 256: {1024: 0.00}, + 512: {1024: 0.00}, + 1024: {1024: 0.00}, + 1518: {1024: 0.00} + }, + 'test_loopback_split_ring_vector_rx_idxd': { + 64: {1024: 0.00}, + 128: {1024: 0.00}, + 256: {1024: 0.00}, + 512: {1024: 0.00}, + 1024: {1024: 0.00}, + 1518: {1024: 0.00} + }, + 'test_loopback_packed_ring_inorder_mergedable_idxd': { + 64: {1024: 0.00}, + 128: {1024: 0.00}, + 256: {1024: 0.00}, + 512: {1024: 0.00}, + 1024: {1024: 0.00}, + 1518: {1024: 0.00} + }, + 'test_loopback_packed_ring_inorder_non_mergedable_idxd': { + 64: {1024: 0.00}, + 128: {1024: 0.00}, + 256: {1024: 0.00}, + 512: {1024: 0.00}, + 1024: {1024: 0.00}, + 1518: {1024: 0.00} + }, + 'test_loopback_packed_ring_mergedable_idxd': { + 64: {1024: 0.00}, + 128: {1024: 0.00}, + 256: {1024: 0.00}, + 512: {1024: 0.00}, + 1024: {1024: 0.00}, + 1518: {1024: 0.00} + }, + 'test_loopback_packed_ring_non_mergedable_idxd': { + 64: {1024: 0.00}, + 128: {1024: 0.00}, + 256: {1024: 0.00}, + 512: {1024: 0.00}, + 1024: {1024: 0.00}, + 1518: {1024: 0.00} + }, + 'test_loopback_packed_ring_vector_rx_idxd': { + 64: {1024: 0.00}, + 128: {1024: 0.00}, + 256: {1024: 0.00}, + 512: {1024: 0.00}, + 1024: {1024: 0.00}, + 1518: {1024: 0.00} + }, + 'test_loopback_split_ring_inorder_mergedable_vfio_pci': { + 64: {1024: 0.00}, + 128: {1024: 0.00}, + 256: {1024: 0.00}, + 512: {1024: 0.00}, + 1024: {1024: 0.00}, + 1518: {1024: 0.00} + }, + 'test_loopback_split_ring_inorder_non_mergedable_vfio_pci': { + 64: {1024: 0.00}, + 128: {1024: 0.00}, + 256: {1024: 0.00}, + 512: {1024: 0.00}, + 1024: {1024: 0.00}, + 1518: {1024: 0.00} + }, + 'test_loopback_split_ring_mergedable_vfio_pci': { + 64: {1024: 0.00}, + 128: {1024: 0.00}, + 256: {1024: 0.00}, + 512: {1024: 0.00}, + 1024: {1024: 0.00}, + 1518: {1024: 0.00} + }, + 'test_loopback_split_ring_non_mergedable_vfio_pci': { + 64: {1024: 0.00}, + 128: {1024: 0.00}, + 256: {1024: 0.00}, + 512: {1024: 0.00}, + 1024: {1024: 0.00}, + 1518: {1024: 0.00} + }, + 'test_loopback_split_ring_vector_rx_vfio_pci': { + 64: {1024: 0.00}, + 128: {1024: 0.00}, + 256: {1024: 0.00}, + 512: {1024: 0.00}, + 1024: {1024: 0.00}, + 1518: {1024: 0.00} + }, + 'test_loopback_packed_ring_inorder_mergedable_vfio_pci': { + 64: {1024: 0.00}, + 128: {1024: 0.00}, + 256: {1024: 0.00}, + 512: {1024: 0.00}, + 1024: {1024: 0.00}, + 1518: {1024: 0.00} + }, + 'test_loopback_packed_ring_inorder_non_mergedable_vfio_pci': { + 64: {1024: 0.00}, + 128: {1024: 0.00}, + 256: {1024: 0.00}, + 512: {1024: 0.00}, + 1024: {1024: 0.00}, + 1518: {1024: 0.00} + }, + 'test_loopback_packed_ring_mergedable_vfio_pci': { + 64: {1024: 0.00}, + 128: {1024: 0.00}, + 256: {1024: 0.00}, + 512: {1024: 0.00}, + 1024: {1024: 0.00}, + 1518: {1024: 0.00} + }, + 'test_loopback_packed_ring_non_mergedable_vfio_pci': { + 64: {1024: 0.00}, + 128: {1024: 0.00}, + 256: {1024: 0.00}, + 512: {1024: 0.00}, + 1024: {1024: 0.00}, + 1518: {1024: 0.00} + }, + 'test_loopback_packed_ring_vector_rx_vfio_pci': { + 64: {1024: 0.00}, + 128: {1024: 0.00}, + 256: {1024: 0.00}, + 512: {1024: 0.00}, + 1024: {1024: 0.00}, + 1518: {1024: 0.00}}}