From patchwork Fri Mar 11 01:44:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 108669 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 04FD3A0093; Fri, 11 Mar 2022 02:44:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ED70C40F35; Fri, 11 Mar 2022 02:44:40 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id D261940042 for ; Fri, 11 Mar 2022 02:44:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646963080; x=1678499080; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=sUb4iuZtIur6woNJqbHOkE3ZnCIDzAlfMrVchlxr++Y=; b=fR2h4ll0h1CNGetqZ37x0YdS+2AiNvInW69AHMFlA9BQJTYOBFvNGOGy nchEs83Ph6HYJWmxb+qo5c01R4MLwoTUX+N/cjsVxT+1W/Po/tiFUzv0O d2ebrzSf7FbQG+LtSREzVi06H3I16IZ9hVvajv6pF93gJ5MjXhMEXvOUc VJ6seE/n3DirH7Yzc9kqje+FepUATsgaYSWZ6orQAceCU+aCWN2qVsuau cRhvS4ViuuATa/WxyhGzPRgyAtMyZoe181CK61LUOPgm0CE/KF2TI1dj+ SjwXGD46YL7wDlFa2JO3tpgX2zbxpO/gHjEx4Oz6ccf3ICcOMu4OYOf8s g==; X-IronPort-AV: E=McAfee;i="6200,9189,10282"; a="254296601" X-IronPort-AV: E=Sophos;i="5.90,172,1643702400"; d="scan'208";a="254296601" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2022 17:44:38 -0800 X-IronPort-AV: E=Sophos;i="5.90,172,1643702400"; d="scan'208";a="712667971" Received: from unknown (HELO localhost.localdomain) ([10.239.251.222]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2022 17:44:37 -0800 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V1 1/2] test_plans/vswitch_sample_cbdma_test_plan: modify testplan by DPDK change Date: Fri, 11 Mar 2022 09:44:32 +0800 Message-Id: <20220311014432.974722-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 By DPDK commit 917229c24e, no need to modify DPDK code to test. 1.Delete modify DPDK code steps. 2.Add --total-num-mbufs 600000 params when start dpdk-vhost. Signed-off-by: Wei Ling --- test_plans/vswitch_sample_cbdma_test_plan.rst | 25 +++++-------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/test_plans/vswitch_sample_cbdma_test_plan.rst b/test_plans/vswitch_sample_cbdma_test_plan.rst index 659609e5..af2e62d1 100644 --- a/test_plans/vswitch_sample_cbdma_test_plan.rst +++ b/test_plans/vswitch_sample_cbdma_test_plan.rst @@ -45,19 +45,6 @@ from 21.05,packed ring also can support cbdma copy with vhost enqueue direction. Prerequisites ============= -Modify the testpmd code as following:: - - --- a/examples/vhost/main.c - +++ b/examples/vhost/main.c - @@ -29,7 +29,7 @@ - #include "main.h" - - #ifndef MAX_QUEUES - -#define MAX_QUEUES 128 - +#define MAX_QUEUES 512 - #endif - - /* the maximum number of external ports supported */ Test Case1: PVP performance check with CBDMA channel using vhost async driver ============================================================================= @@ -67,7 +54,7 @@ Test Case1: PVP performance check with CBDMA channel using vhost async driver 2. On host, launch dpdk-vhost by below command:: ./x86_64-native-linuxapp-gcc/examples/dpdk-vhost -l 31-32 -n 4 -- \ - -p 0x1 --mergeable 1 --vm2vm 1 --dma-type ioat --stats 1 --socket-file /tmp/vhost-net --dmas [txd0@0000:00:04.0] --client + -p 0x1 --mergeable 1 --vm2vm 1 --dma-type ioat --stats 1 --socket-file /tmp/vhost-net --dmas [txd0@0000:00:04.0] --client --total-num-mbufs 600000 3. Launch virtio-user with packed ring:: @@ -103,7 +90,7 @@ Test Case2: PVP test with two VM and two CBDMA channels using vhost async driver 2. On host, launch dpdk-vhost by below command:: ./x86_64-native-linuxapp-gcc/examples/dpdk-vhost -l 26-28 -n 4 -- \ - -p 0x1 --mergeable 1 --vm2vm 1 --dma-type ioat --stats 1 --socket-file /tmp/vhost-net0 --socket-file /tmp/vhost-net1 --dmas [txd0@0000:00:01.0,txd1@0000:00:01.1] --client + -p 0x1 --mergeable 1 --vm2vm 1 --dma-type ioat --stats 1 --socket-file /tmp/vhost-net0 --socket-file /tmp/vhost-net1 --dmas [txd0@0000:00:01.0,txd1@0000:00:01.1] --client--total-num-mbufs 600000 3. launch two virtio-user ports:: @@ -141,7 +128,7 @@ Test Case3: VM2VM forwarding test with two CBDMA channels 2. On host, launch dpdk-vhost by below command:: ./x86_64-native-linuxapp-gcc/examples/dpdk-vhost -l 26-28 -n 4 -- -p 0x1 --mergeable 1 --vm2vm 1 --dma-type ioat \ - --socket-file /tmp/vhost-net0 --socket-file /tmp/vhost-net1 --dmas [txd0@0000:00:04.0,txd1@0000:00:04.1] --client + --socket-file /tmp/vhost-net0 --socket-file /tmp/vhost-net1 --dmas [txd0@0000:00:04.0,txd1@0000:00:04.1] --client --total-num-mbufs 600000 3. Launch virtio-user:: @@ -188,7 +175,7 @@ Test Case4: VM2VM test with cbdma channels register/unregister stable check 2. On host, launch dpdk-vhost by below command:: ./x86_64-native-linuxapp-gcc/examples/dpdk-vhost -l 26-28 -n 4 -- -p 0x1 --mergeable 1 --vm2vm 1 --dma-type ioat \ - --socket-file /tmp/vhost-net0 --socket-file /tmp/vhost-net1 --dmas [txd0@0000:00:04.0,txd1@0000:00:04.1] --client + --socket-file /tmp/vhost-net0 --socket-file /tmp/vhost-net1 --dmas [txd0@0000:00:04.0,txd1@0000:00:04.1] --client --total-num-mbufs 600000 3. Start VM0 with qemu-5.2.0:: @@ -268,7 +255,7 @@ Test Case5: VM2VM split ring test with iperf and reconnect stable check 2. On host, launch dpdk-vhost by below command:: ./x86_64-native-linuxapp-gcc/examples/dpdk-vhost -l 26-28 -n 4 -- -p 0x1 --mergeable 1 --vm2vm 1 --dma-type ioat \ - --socket-file /tmp/vhost-net0 --socket-file /tmp/vhost-net1 --dmas [txd0@0000:00:04.0,txd1@0000:00:04.1] --client + --socket-file /tmp/vhost-net0 --socket-file /tmp/vhost-net1 --dmas [txd0@0000:00:04.0,txd1@0000:00:04.1] --client --total-num-mbufs 600000 3. Start VM0 with qemu-5.2.0:: @@ -327,7 +314,7 @@ Test Case6: VM2VM packed ring test with iperf and reconnect stable test 2. On host, launch dpdk-vhost by below command:: ./x86_64-native-linuxapp-gcc/examples/dpdk-vhost -l 26-28 -n 4 -- -p 0x1 --mergeable 1 --vm2vm 1 --dma-type ioat \ - --socket-file /tmp/vhost-net0 --socket-file /tmp/vhost-net1 --dmas [txd0@0000:00:04.0,txd1@0000:00:04.1] + --socket-file /tmp/vhost-net0 --socket-file /tmp/vhost-net1 --dmas [txd0@0000:00:04.0,txd1@0000:00:04.1] --total-num-mbufs 600000 3. Start VM0 with qemu-5.2.0:: From patchwork Fri Mar 11 01:44:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 108670 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 2C15FA0093; Fri, 11 Mar 2022 02:44:56 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 24179410E3; Fri, 11 Mar 2022 02:44:56 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id B80AB40042 for ; Fri, 11 Mar 2022 02:44:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646963094; x=1678499094; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=AovUY506D/xtrUuYP6SFHMl/WLprgO0o4Xe9Pj+IyYU=; b=Kc0oyjYGIFlmWGcS2VJwMT8DiECkPa04jeUVyykEK6P9bdI/ZmurLb7W XlWuz5T1GbtdPYYXhC5SRHpgatlb3POgc8sEUMHDrArnUpi4WbbC5rgVv 10FmhzRAD0C9V0uX67q0gqSK2mGHx470NNc4KINvk35y/7CQ6cBImRagg ytfIQvbKvuRuElRPgnCVgHUVGTcJ/HncmUtrFOpPUXZweL7ndlTe1C8mQ pZLPJPBkcHQZ3rPPX1n7W3Ph8T8A9BQuld0X4Fa/jP9xH7dSLGmeWcOw8 m5zPDmeZwWC3Bsmg7h8ll6A+iGNrdKd4cxogqVUe/2AJgRBKwGwjKZI00 w==; X-IronPort-AV: E=McAfee;i="6200,9189,10282"; a="280210583" X-IronPort-AV: E=Sophos;i="5.90,172,1643702400"; d="scan'208";a="280210583" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2022 17:44:50 -0800 X-IronPort-AV: E=Sophos;i="5.90,172,1643702400"; d="scan'208";a="712668017" Received: from unknown (HELO localhost.localdomain) ([10.239.251.222]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2022 17:44:49 -0800 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V1 2/2] tests/vswitch_sample_cbdma: modify testsuite by DPDK change Date: Fri, 11 Mar 2022 09:44:44 +0800 Message-Id: <20220311014444.974780-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 By DPDK commit 917229c24e, no need to modify DPDK code to test. 1.Delete modify DPDK code steps. 2.Add --total-num-mbufs 600000 params when start dpdk-vhost. 3.Modify verify the test result expect value. Signed-off-by: Wei Ling --- tests/TestSuite_vswitch_sample_cbdma.py | 27 +++++++------------------ 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/tests/TestSuite_vswitch_sample_cbdma.py b/tests/TestSuite_vswitch_sample_cbdma.py index bd41135b..514a39b2 100644 --- a/tests/TestSuite_vswitch_sample_cbdma.py +++ b/tests/TestSuite_vswitch_sample_cbdma.py @@ -54,7 +54,6 @@ class TestVswitchSampleCBDMA(TestCase): """ Run at the start of each test suite. """ - self.set_max_queues(512) self.build_vhost_app() self.tester_tx_port_num = 1 self.dut_ports = self.dut.get_ports() @@ -111,11 +110,6 @@ class TestVswitchSampleCBDMA(TestCase): self.vm_dut = [] self.vm = [] - def set_max_queues(self, max_queues=512): - self.logger.info("Configure MAX_QUEUES to {}".format(max_queues)) - self.dut.send_expect("sed -i -e 's/#define MAX_QUEUES .*$/#define MAX_QUEUES {}/' " - "./examples/vhost/main.c".format(max_queues), "#", 20) - def build_vhost_app(self): out = self.dut.build_dpdk_apps('./examples/vhost') self.verify('Error' not in out, 'compilation vhost error') @@ -141,15 +135,15 @@ class TestVswitchSampleCBDMA(TestCase): allow_option += ' -a {}'.format(item) if with_cbdma: if client_mode: - params = (" -c {} -n {} {} -- -p 0x1 --mergeable 1 --vm2vm 1 --dma-type ioat --stats 1 " - + socket_file_param + "--dmas [{}] --client").format(self.vhost_core_mask, self.mem_channels, + params = (" -c {} -n {} {} -- -p 0x1 --mergeable 1 --vm2vm 1 --stats 1 " + + socket_file_param + "--dmas [{}] --client --total-num-mbufs 600000").format(self.vhost_core_mask, self.mem_channels, allow_option, self.dmas_info) else: - params = (" -c {} -n {} {} -- -p 0x1 --mergeable 1 --vm2vm 1 --dma-type ioat --stats 1 " - + socket_file_param + "--dmas [{}]").format(self.vhost_core_mask, self.mem_channels, + params = (" -c {} -n {} {} -- -p 0x1 --mergeable 1 --vm2vm 1 --stats 1 " + + socket_file_param + "--dmas [{}] --total-num-mbufs 600000").format(self.vhost_core_mask, self.mem_channels, allow_option, self.dmas_info) else: - params = (" -c {} -n {} {} -- -p 0x1 --mergeable 1 --vm2vm 1 --stats 1 " + socket_file_param).format( + params = (" -c {} -n {} {} -- -p 0x1 --mergeable 1 --vm2vm 1 --stats 1 " + socket_file_param + "--total-num-mbufs 600000").format( self.vhost_core_mask, self.mem_channels, allow_option) self.command_line = self.app_path + params self.vhost_user.send_command(self.command_line) @@ -589,15 +583,9 @@ class TestVswitchSampleCBDMA(TestCase): self.result_table_add(table_row) self.result_table_print() for key in before_relunch_result.keys(): - if key == 64: - self.verify(before_relunch_result[key] > 1, "The perf test result is lower than 1 Mpps") - else: - self.verify(before_relunch_result[key] > 0.1, "The perf test result is lower than 0.1 Mpps") + self.verify(before_relunch_result[key] > 0.1, "The perf test result is lower than 0.1 Mpps") for key in after_relunch_result.keys(): - if key == 64: - self.verify(after_relunch_result[key] > 1, "The perf test result is lower than 1 Mpps") - else: - self.verify(after_relunch_result[key] > 0.1, "The perf test result is lower than 0.1 Mpps") + self.verify(after_relunch_result[key] > 0.1, "The perf test result is lower than 0.1 Mpps") def vm2vm_check_with_two_vhost_device(self): rx_throughput = {} @@ -828,5 +816,4 @@ class TestVswitchSampleCBDMA(TestCase): """ Run after each test suite. """ - self.set_max_queues(128) self.close_all_session()