From patchwork Wed May 18 06:20:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yingya Han X-Patchwork-Id: 111269 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 5A617A0505; Wed, 18 May 2022 08:20:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4510442686; Wed, 18 May 2022 08:20:47 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 2242E40685 for ; Wed, 18 May 2022 08:20:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652854846; x=1684390846; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WyG9eDBqafTOgdRvbEDn5X4YgQLYaaYQI2MLY6yZSG0=; b=ABeC+r4UU1S8qiQGcKhbcGFSfxbwXwLLDRa35XIfzFgfHyHvgxvlkYR4 K9NKQpJ1e3tgmSGdio2HR/0jH3ao1GA3bGHuIP7h2fKFCrYIJdFJaUzUv EGMFg1UJr5Ah1gz2aK8E4/EJPKghSkSirx5ZGcT27pTqVqGBZ9LID33bl Z/GsG9Pxl+jdCwR05vE0Cs+1mg5GxN30opbk9qMWE3vxbvsba51rBgK9l PJvKLD66B5IRjNeHCJR/YDuETXxNDd3pEosbxbhR8WMHxywheIdPQYuIf nHfET/R1qIokdZedTSZCbVBGeMik6mYq1/151rQxRyMhWoGjLDJ6sQpqL Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10350"; a="296791179" X-IronPort-AV: E=Sophos;i="5.91,234,1647327600"; d="scan'208";a="296791179" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2022 23:20:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,234,1647327600"; d="scan'208";a="556159029" Received: from dpdk-lijuan-icelake4.sh.intel.com ([10.67.118.178]) by orsmga002.jf.intel.com with ESMTP; 17 May 2022 23:20:44 -0700 From: Yingya Han To: dts@dpdk.org Cc: Yingya Han Subject: [dts][PTACH V1 1/3]conf/*: improve performance conf settings Date: Wed, 18 May 2022 14:20:37 +0800 Message-Id: <20220518062039.2234504-2-yingyax.han@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220518062039.2234504-1-yingyax.han@intel.com> References: <20220518062039.2234504-1-yingyax.han@intel.com> 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 Signed-off-by: Yingya Han --- conf/l3fwd.cfg | 8 +++++-- conf/l3fwd_em.cfg | 6 ++++- conf/l3fwd_lpm_ipv4.cfg | 26 ++++++++++++--------- conf/l3fwd_lpm_ipv4_rfc2544.cfg | 8 +++++-- conf/l3fwd_lpm_ipv6.cfg | 6 ++++- conf/testpmd_perf.cfg | 17 +++++--------- conf/vf_l3fwd_em_kernelpf.cfg | 6 ++++- conf/vf_l3fwd_kernelpf.cfg | 5 ++++ conf/vf_l3fwd_lpm_ipv4_kernelpf.cfg | 6 ++++- conf/vf_l3fwd_lpm_ipv4_rfc2544_kernelpf.cfg | 8 +++++-- conf/vf_l3fwd_lpm_ipv6_kernelpf.cfg | 6 ++++- 11 files changed, 69 insertions(+), 33 deletions(-) diff --git a/conf/l3fwd.cfg b/conf/l3fwd.cfg index 66274d8c..62cd6814 100644 --- a/conf/l3fwd.cfg +++ b/conf/l3fwd.cfg @@ -56,11 +56,15 @@ [suite] update_expected = True - -port_list=None +compile_rx_desc = 16 +port_list = None rxtx_queue_size = None test_duration = 12 +l3fwd_wait_up = 2 +traffic_stop_wait_time = 2 accepted_tolerance = 1 +l3fwd_restart = False +cores_for_all = True test_parameters = { '1C/1T-1Q': ['64', '128', '256', '512', '1024', '1280', '1518',], '1C/2T-2Q': ['64', '128', '256', '512', '1024', '1280', '1518',], diff --git a/conf/l3fwd_em.cfg b/conf/l3fwd_em.cfg index cc236370..e9ea322c 100644 --- a/conf/l3fwd_em.cfg +++ b/conf/l3fwd_em.cfg @@ -53,10 +53,14 @@ [suite] update_expected = True - +compile_rx_desc = 16 rxtx_queue_size = None test_duration = 12 +l3fwd_wait_up = 2 +traffic_stop_wait_time = 2 accepted_tolerance = 1 +l3fwd_restart = False +cores_for_all = True test_parameters = { '1C/1T-1Q': ['64', '128', '256', '512', '1024', '1280', '1518',], '1C/2T-2Q': ['64', '128', '256', '512', '1024', '1280', '1518',], diff --git a/conf/l3fwd_lpm_ipv4.cfg b/conf/l3fwd_lpm_ipv4.cfg index fd8cb95b..53e30928 100644 --- a/conf/l3fwd_lpm_ipv4.cfg +++ b/conf/l3fwd_lpm_ipv4.cfg @@ -53,20 +53,24 @@ [suite] update_expected = True - +compile_rx_desc = 16 rxtx_queue_size = None test_duration = 60 +l3fwd_wait_up = 2 +traffic_stop_wait_time = 2 accepted_tolerance = 1 +l3fwd_restart = False +cores_for_all = True test_parameters = { - '1C/1T/1Q': ['64', '128', '256', '512', '1024', '1280', '1518',], - '1C/2T/2Q': ['64', '128', '256', '512', '1024', '1280', '1518',], - '2C/2T/2Q': ['64', '128', '256', '512', '1024', '1280', '1518',], - '2C/4T/4Q': ['64', '128', '256', '512', '1024', '1280', '1518',], - '4C/4T/4Q': ['64', '128', '256', '512', '1024', '1280', '1518',],} + '1C/1T-1Q': ['64', '128', '256', '512', '1024', '1280', '1518',], + '1C/2T-2Q': ['64', '128', '256', '512', '1024', '1280', '1518',], + '2C/2T-2Q': ['64', '128', '256', '512', '1024', '1280', '1518',], + '2C/4T-4Q': ['64', '128', '256', '512', '1024', '1280', '1518',], + '4C/4T-4Q': ['64', '128', '256', '512', '1024', '1280', '1518',],} expected_throughput = { 'test_perf_throughput_ipv4_lpm': { 'IXGBE_10G-82599_SFP': { - '1C/1T/1Q': { + '1C/1T-1Q': { '64': '0.00', '128': '0.00', '256': '0.00', @@ -74,7 +78,7 @@ expected_throughput = { '1024': '0.00', '1280': '0.00', '1518': '0.00', }, - '1C/2T/2Q': { + '1C/2T-2Q': { '64': '0.00', '128': '0.00', '256': '0.00', @@ -82,7 +86,7 @@ expected_throughput = { '1024': '0.00', '1280': '0.00', '1518': '0.00', }, - '2C/2T/2Q': { + '2C/2T-2Q': { '64': '0.00', '128': '0.00', '256': '0.00', @@ -90,7 +94,7 @@ expected_throughput = { '1024': '0.00', '1280': '0.00', '1518': '0.00', }, - '2C/4T/4Q': { + '2C/4T-4Q': { '64': '0.00', '128': '0.00', '256': '0.00', @@ -98,7 +102,7 @@ expected_throughput = { '1024': '0.00', '1280': '0.00', '1518': '0.00', }, - '4C/4T/4Q': { + '4C/4T-4Q': { '64': '0.00', '128': '0.00', '256': '0.00', diff --git a/conf/l3fwd_lpm_ipv4_rfc2544.cfg b/conf/l3fwd_lpm_ipv4_rfc2544.cfg index 4c1ee00e..8039f8ed 100644 --- a/conf/l3fwd_lpm_ipv4_rfc2544.cfg +++ b/conf/l3fwd_lpm_ipv4_rfc2544.cfg @@ -53,10 +53,14 @@ [suite] update_expected = True - +compile_rx_desc = 16 rxtx_queue_size = None -test_duration = 60 +test_duration = 20 +l3fwd_wait_up = 2 +traffic_stop_wait_time = 2 accepted_tolerance = 1 +l3fwd_restart = False +cores_for_all = True test_parameters = { '1C/1T-1Q': ['64', '128', '256', '512', '1024', '1280', '1518',], '1C/2T-2Q': ['64', '128', '256', '512', '1024', '1280', '1518',], diff --git a/conf/l3fwd_lpm_ipv6.cfg b/conf/l3fwd_lpm_ipv6.cfg index 103a5104..13c9a298 100644 --- a/conf/l3fwd_lpm_ipv6.cfg +++ b/conf/l3fwd_lpm_ipv6.cfg @@ -53,10 +53,14 @@ [suite] update_expected = True - +compile_rx_desc = 16 rxtx_queue_size = None test_duration = 60 +l3fwd_wait_up = 2 +traffic_stop_wait_time = 2 accepted_tolerance = 1 +l3fwd_restart = False +cores_for_all = True test_parameters = { '1C/1T-1Q': ['64', '128', '256', '512', '1024', '1280', '1518',], '1C/2T-2Q': ['64', '128', '256', '512', '1024', '1280', '1518',], diff --git a/conf/testpmd_perf.cfg b/conf/testpmd_perf.cfg index dc558435..e974fc84 100644 --- a/conf/testpmd_perf.cfg +++ b/conf/testpmd_perf.cfg @@ -6,12 +6,6 @@ # e.g. # compile_rx_desc=16 # -# - compile_avx -# compile switch flag CONFIG_RTE_ENABLE_, support 'AVX512' or 'AVX2' -# -# e.g. -# compile_avx='AVX512' or 'AVX2' -# # - forwarding_mode # testpmd set the packet forwarding mode, support 'io'/'mac' # @@ -83,19 +77,20 @@ # [suite] -# compile_rx_desc=16 -# compile_avx='AVX512' or 'AVX2' +update_expected = True +compile_rx_desc = 16 # 'io', 'mac' forwarding_mode = 'io' descriptor_numbers = { 'txd': 2048, 'rxd': 2048, } - # port_list=None -cores_for_all=True test_duration = 60 +bin_ps_wait_up = 2 +traffic_stop_wait_time = 2 accepted_tolerance = 1 - +bin_ps_restart = False +cores_for_all = True test_parameters = { '1C/1T-1Q': ['64', '128', '256', '512', '1024', '1280', '1518',], '1C/2T-2Q': ['64', '128', '256', '512', '1024', '1280', '1518',], diff --git a/conf/vf_l3fwd_em_kernelpf.cfg b/conf/vf_l3fwd_em_kernelpf.cfg index 95e228cd..ef5aa460 100644 --- a/conf/vf_l3fwd_em_kernelpf.cfg +++ b/conf/vf_l3fwd_em_kernelpf.cfg @@ -4,10 +4,14 @@ # [suite] +update_expected = True test_duration = 60 accepted_tolerance = '1%%' rxtx_queue_size = None - +l3fwd_wait_up = 2 +traffic_stop_wait_time = 2 +l3fwd_restart = False +cores_for_all = True test_parameters = { '1C/1T-1Q': ['64', '128', '256', '512', '1024', '1280', '1518',], '1C/2T-2Q': ['64', '128', '256', '512', '1024', '1280', '1518',], diff --git a/conf/vf_l3fwd_kernelpf.cfg b/conf/vf_l3fwd_kernelpf.cfg index 5b831f0a..ca590272 100644 --- a/conf/vf_l3fwd_kernelpf.cfg +++ b/conf/vf_l3fwd_kernelpf.cfg @@ -52,9 +52,14 @@ # tests as usual. [suite] +update_expected = True test_duration = 60 accepted_tolerance = '1%%' rxtx_queue_size = None +l3fwd_wait_up = 2 +traffic_stop_wait_time = 2 +l3fwd_restart = False +cores_for_all = True test_parameters = { '1C/1T-1Q': ['64', '128', '256', '512', '1024', '1280', '1518',], diff --git a/conf/vf_l3fwd_lpm_ipv4_kernelpf.cfg b/conf/vf_l3fwd_lpm_ipv4_kernelpf.cfg index 6dcd07a2..1be258ca 100644 --- a/conf/vf_l3fwd_lpm_ipv4_kernelpf.cfg +++ b/conf/vf_l3fwd_lpm_ipv4_kernelpf.cfg @@ -4,10 +4,14 @@ # [suite] +update_expected = True test_duration = 60 accepted_tolerance = '1%%' rxtx_queue_size = None - +l3fwd_wait_up = 2 +traffic_stop_wait_time = 2 +l3fwd_restart = False +cores_for_all = True test_parameters = { '1C/1T-1Q': ['64', '128', '256', '512', '1024', '1280', '1518',], '1C/2T-2Q': ['64', '128', '256', '512', '1024', '1280', '1518',], diff --git a/conf/vf_l3fwd_lpm_ipv4_rfc2544_kernelpf.cfg b/conf/vf_l3fwd_lpm_ipv4_rfc2544_kernelpf.cfg index 6d70acf3..a853afbf 100644 --- a/conf/vf_l3fwd_lpm_ipv4_rfc2544_kernelpf.cfg +++ b/conf/vf_l3fwd_lpm_ipv4_rfc2544_kernelpf.cfg @@ -4,10 +4,14 @@ # [suite] -test_duration = 60 +update_expected = True +test_duration = 20 accepted_tolerance = '1%%' rxtx_queue_size = None - +l3fwd_wait_up = 2 +traffic_stop_wait_time = 2 +l3fwd_restart = False +cores_for_all = True test_parameters = { '1C/1T-1Q': ['64', '128', '256', '512', '1024', '1280', '1518',], '1C/2T-2Q': ['64', '128', '256', '512', '1024', '1280', '1518',], diff --git a/conf/vf_l3fwd_lpm_ipv6_kernelpf.cfg b/conf/vf_l3fwd_lpm_ipv6_kernelpf.cfg index 47c4a36f..1a6a8c94 100644 --- a/conf/vf_l3fwd_lpm_ipv6_kernelpf.cfg +++ b/conf/vf_l3fwd_lpm_ipv6_kernelpf.cfg @@ -4,10 +4,14 @@ # [suite] +update_expected = True test_duration = 60 accepted_tolerance = '1%%' rxtx_queue_size = None - +l3fwd_wait_up = 2 +traffic_stop_wait_time = 2 +l3fwd_restart = False +cores_for_all = True test_parameters = { '1C/1T-1Q': ['64', '128', '256', '512', '1024', '1280', '1518',], '1C/2T-2Q': ['64', '128', '256', '512', '1024', '1280', '1518',], From patchwork Wed May 18 06:20:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yingya Han X-Patchwork-Id: 111270 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 65930A0506; Wed, 18 May 2022 08:20:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5F61D41157; Wed, 18 May 2022 08:20:48 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 8BA1D40685 for ; Wed, 18 May 2022 08:20:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652854847; x=1684390847; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YWB9fKw55xyCOoULOzSxhZhxvAmeusrUt0Y2lR14SH0=; b=Z82uR12iGlfjDh3WVWCTyKszJFL1tQ7b+8qqrOOITuTm5akyV0bW1Hwp WyLQ2Kqyh/G2Ht9qcwiUBbLO1MVIrVHmPpPY7RrbejQL8XqsPyuwaT55C 3u0Ct91Dx0TFOkYkwn11ScRFWTT7lmTPWzCkFwy9WqLMeGbQcuBExli/G fEvvEcTlORUr5YfyJe7nLYpIo3PrByc59s7sC2LVaVoCQICSYBzgN8vkH 04QfDAvdjqroZ3o09/f9P+cUVIjqHRSVx3CT7kjnUvD28/1YHA5WxtgpV JrOpNyFXkk/ECVZoKzqlrVjrwWkeJp8mGNhyoP9/e/wPTng/HrgPZTZ3M g==; X-IronPort-AV: E=McAfee;i="6400,9594,10350"; a="296791183" X-IronPort-AV: E=Sophos;i="5.91,234,1647327600"; d="scan'208";a="296791183" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2022 23:20:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,234,1647327600"; d="scan'208";a="556159034" Received: from dpdk-lijuan-icelake4.sh.intel.com ([10.67.118.178]) by orsmga002.jf.intel.com with ESMTP; 17 May 2022 23:20:45 -0700 From: Yingya Han To: dts@dpdk.org Cc: Yingya Han Subject: [dts][PTACH V1 2/3]test_plan/l3fwd: remove invalid compilation Date: Wed, 18 May 2022 14:20:38 +0800 Message-Id: <20220518062039.2234504-3-yingyax.han@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220518062039.2234504-1-yingyax.han@intel.com> References: <20220518062039.2234504-1-yingyax.han@intel.com> 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 remove makefile compilation Signed-off-by: Yingya Han --- test_plans/l3fwd_test_plan.rst | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/test_plans/l3fwd_test_plan.rst b/test_plans/l3fwd_test_plan.rst index efd761dd..768782af 100644 --- a/test_plans/l3fwd_test_plan.rst +++ b/test_plans/l3fwd_test_plan.rst @@ -76,16 +76,6 @@ Prerequisites 4. Software application requirements - - Configuration for mode - - -The following Settings are required when using exact mode:: - - sed -i '/^APP\>/a\\CFLAGS += -DAPP_LOOKUP_METHOD=APP_LOOKUP_EXACT_MATCH' examples/l3fwd/Makefile - - -The following Settings are required when using LPM mode:: - - sed -i '/^APP\>/a\\CFLAGS += -DAPP_LOOKUP_METHOD=APP_LOOKUP_LPM' examples/l3fwd/Makefile - - Routing table for IPv4 packets - In LPM mode, the LPM table used for packet routing is: From patchwork Wed May 18 06:20:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yingya Han X-Patchwork-Id: 111271 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 83FB8A0503; Wed, 18 May 2022 08:20:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7F50640A7A; Wed, 18 May 2022 08:20:50 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 17DAD40685 for ; Wed, 18 May 2022 08:20:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652854849; x=1684390849; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=maz4ZbhSIwm54xfbGRiT7aCUP28Iq2CXVdU3jLWaEgg=; b=ZSw29UFFc4PNwLu5Jg9+IZrd55D9PQEf3Q3qcV1z/scsxYWFeDjxXN/6 hizfertXf5YNG1ZTHbrFT8O7QfAuUmYiqDo7yHfGKR13Bb0bgUBVCWIQ2 EpSIWJDTO68JPSzRZr3j/P78zodntSgY6NPxIVivYJLWHPRs9QDpMOnfe UJDpBL4qsmHS+0WQeNOqtNaruQmYohbKONQb7cyrkwTMbSVGnKvZ82vB+ jkGK4XKbYz+4tkJ0GPja1yhjd04DDaspm2b2HDnJAt0a9DGi12lmpvWZz MuzAga/vGvpZVOUZBnhFO/flNYuORxE790fuSbz55X2LQ6k2as7ahTQoc g==; X-IronPort-AV: E=McAfee;i="6400,9594,10350"; a="296791189" X-IronPort-AV: E=Sophos;i="5.91,234,1647327600"; d="scan'208";a="296791189" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2022 23:20:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,234,1647327600"; d="scan'208";a="556159038" Received: from dpdk-lijuan-icelake4.sh.intel.com ([10.67.118.178]) by orsmga002.jf.intel.com with ESMTP; 17 May 2022 23:20:46 -0700 From: Yingya Han To: dts@dpdk.org Cc: Yingya Han Subject: [dts][PTACH V1 3/3]tests/perf_test_base: optimize l3fwd related cases Date: Wed, 18 May 2022 14:20:39 +0800 Message-Id: <20220518062039.2234504-4-yingyax.han@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220518062039.2234504-1-yingyax.han@intel.com> References: <20220518062039.2234504-1-yingyax.han@intel.com> 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 1) framework already supports rx_mode, delete the avx2/avx512 setting in case. 2) l3fwd uses the parameters "-E" and "-L" to correspond to EM and LPM modes respectively. the default is LPM mode. Signed-off-by: Yingya Han --- tests/perf_test_base.py | 100 +++++++++++++++------------------------- 1 file changed, 37 insertions(+), 63 deletions(-) diff --git a/tests/perf_test_base.py b/tests/perf_test_base.py index fb4f123a..9a73787a 100644 --- a/tests/perf_test_base.py +++ b/tests/perf_test_base.py @@ -145,7 +145,6 @@ class PerfTestBase(object): def __init__(self, valports, socket, mode=None, bin_type=None): self.__bin_type = bin_type or BIN_TYPE.L3FWD self.__compile_rx_desc = None - self.__compile_avx = None self.__rxtx_queue_size = None self.__mode = mode or SUITE_TYPE.PF self.__suite = None @@ -378,6 +377,7 @@ class PerfTestBase(object): layer = { "ether": { "dst": dmacs[self.__valports.index(port_id)], + "src": "02:00:00:00:00:0%d" % port_id, }, } else: @@ -385,6 +385,7 @@ class PerfTestBase(object): layer = { "ether": { "dst": dmac, + "src": "02:00:00:00:00:0%d" % port_id, }, } return layer @@ -694,8 +695,7 @@ class PerfTestBase(object): # init testpmd if self.__pf_driver is not NIC_DRV.PCI_STUB: self.__init_host_testpmd() - self.__l3fwd_em = self.__l3fwd_init(MATCH_MODE.EM) - self.__l3fwd_lpm = self.__l3fwd_init(MATCH_MODE.LPM) + self.__l3fwd_init() def __init_host_testpmd(self): """ @@ -767,7 +767,7 @@ class PerfTestBase(object): ) return "loop" if port_num == 1 else "chained" - def __testpmd_start(self, mode, core_mask, config, frame_size): + def __testpmd_start(self, mode, eal_para, config, frame_size): # use test pmd bin = os.path.join(self.__target_dir, self.dut.apps_name["test-pmd"]) fwd_mode, _config = config @@ -775,21 +775,16 @@ class PerfTestBase(object): command_line = ( "{bin} " "-v " - "-c {cores} " - "-n {channel} " - "{allowlist}" + "{eal_para}" "-- -i " + "--portmask {port_mask} " "{config} " "{port_topo} " "" ).format( **{ "bin": bin, - "cores": core_mask, - "channel": self.dut.get_memory_channels(), - "allowlist": self.__bin_ps_allow_list - if self.__bin_ps_allow_list - else "", + "eal_para": eal_para, "port_mask": utils.create_mask(self.__valports), "config": _config, "port_topo": port_topo, @@ -823,53 +818,30 @@ class PerfTestBase(object): self.dut.send_expect("quit", "# ") self.__is_bin_ps_on = False - def __l3fwd_init(self, mode, rename=True): + def __l3fwd_init(self): """ - Prepare long prefix match table, __replace P(x) port pattern + compile l3fwd """ self.app_name = self.dut.apps_name["l3fwd"].replace(" ", "") - l3fwd_method = "".join(["_", mode.value]) - flg = 1 if mode is MATCH_MODE.LPM else 0 - _opt = ( - "USER_FLAGS=-DAPP_LOOKUP_METHOD={}".format(flg) - if self.__mode is SUITE_TYPE.PF - else "" - ) - out = self.dut.build_dpdk_apps("./examples/l3fwd", _opt) + out = self.dut.build_dpdk_apps("./examples/l3fwd") self.verify("Error" not in out, "compilation error 1") self.verify("No such file" not in out, "compilation error 2") - if not rename: - return "./" + self.app_name - # rename binary file - self.d_con( - ("mv -f " + self.app_name + " " + self.app_name + "{}").format( - l3fwd_method - ) - ) - l3fwd_bin = os.path.join("./" + self.app_name + l3fwd_method) - return l3fwd_bin + self.__l3fwd_bin = os.path.join("./" + self.app_name) - def __l3fwd_start(self, mode, core_mask, config, frame_size): - bin = self.__l3fwd_em if mode is MATCH_MODE.EM else self.__l3fwd_lpm + def __l3fwd_start(self, mode, eal_para, config, frame_size): # Start L3fwd application command_line = ( "{bin} " "-v " - "-c {cores} " - "-n {channel} " - "{allowlist}" + "{eal_para}" "-- " "-p {port_mask} " "--config '{config}'" "" ).format( **{ - "bin": bin, - "cores": core_mask, - "channel": self.dut.get_memory_channels(), - "allowlist": self.__bin_ps_allow_list - if self.__bin_ps_allow_list - else "", + "bin": self.__l3fwd_bin, + "eal_para": eal_para, "port_mask": utils.create_mask(self.__valports), "config": config, } @@ -886,6 +858,9 @@ class PerfTestBase(object): ) if self.nic in suppored_nics or self.__mode is SUITE_TYPE.VF: command_line += " --parse-ptype" + if mode == MATCH_MODE.EM: + # use exact mode + command_line += " -E" if frame_size > 1518: command_line += " --enable-jumbo --max-pkt-len %d" % frame_size # ignore duplicate start binary with the same option @@ -909,13 +884,18 @@ class PerfTestBase(object): self.d_con(["^C", "# ", 25]) self.__is_bin_ps_on = False - def __bin_ps_start(self, mode, core_mask, config, frame_size): + def __bin_ps_start(self, mode, core_list, config, frame_size): + eal_para = self.dut.create_eal_parameters( + cores=core_list, + ports=self.__bin_ps_allow_list, + socket=self.__socket, + ) bin_methods = { BIN_TYPE.PMD: self.__testpmd_start, BIN_TYPE.L3FWD: self.__l3fwd_start, } start_func = bin_methods.get(self.__bin_type) - start_func(mode, core_mask, config, frame_size) + start_func(mode, eal_para, config, frame_size) def __bin_ps_close(self): bin_methods = { @@ -1210,7 +1190,7 @@ class PerfTestBase(object): try: test_content = self.__test_content.get("port_configs") results = [] - for config, core_mask, port_conf, frame_size in test_content: + for config, core_list, port_conf, frame_size in test_content: # Start application binary process self.logger.info( ( @@ -1224,7 +1204,7 @@ class PerfTestBase(object): self.__bin_type.value, ) ) - self.__bin_ps_start(mode, core_mask, port_conf, frame_size) + self.__bin_ps_start(mode, core_list, port_conf, frame_size) result = self.__throughput(l3_proto, mode, frame_size) # Stop binary process self.__bin_ps_close() @@ -1249,7 +1229,7 @@ class PerfTestBase(object): try: test_content = self.__test_content.get("port_configs") results = [] - for config, core_mask, port_conf, frame_size in test_content: + for config, core_list, port_conf, frame_size in test_content: # Start application binary process self.logger.info( ( @@ -1263,7 +1243,7 @@ class PerfTestBase(object): self.__bin_type.value, ) ) - self.__bin_ps_start(mode, core_mask, port_conf, frame_size) + self.__bin_ps_start(mode, core_list, port_conf, frame_size) result = self.__rfc2544(config, l3_proto, mode, frame_size) # Stop binary process self.__bin_ps_close() @@ -1365,12 +1345,12 @@ class PerfTestBase(object): if self.__bin_type == BIN_TYPE.PMD: # keep only one logic core of the main core - cores_mask = utils.create_mask(corelist[thread_num - 1 :]) + _corelist = corelist[thread_num - 1 :] [ configs.append( [ test_item, - cores_mask, + _corelist, [ fixed_config[0], fixed_config[1] @@ -1384,7 +1364,6 @@ class PerfTestBase(object): ] # (port,queue,lcore) else: - cores_mask = utils.create_mask(corelist) total = len(grp) # ignore first 2 cores _corelist = (corelist * (total // len(corelist) + 1))[:total] @@ -1393,7 +1372,7 @@ class PerfTestBase(object): configs.append( [ test_item, - cores_mask, + _corelist, ",".join( [ "({0},{1},{2})".format(port, queue, core) @@ -1509,7 +1488,6 @@ class PerfTestBase(object): cores_for_all = test_content.get("cores_for_all", False) self.__compile_rx_desc = test_content.get("compile_rx_desc") if self.__bin_type == BIN_TYPE.PMD: - self.__compile_avx = test_content.get("compile_avx") forwarding_mode = test_content.get("forwarding_mode") or "io" descriptor_numbers = test_content.get("descriptor_numbers") or { "txd": 2048, @@ -1536,7 +1514,7 @@ class PerfTestBase(object): return test_content def __get_bin_ps_allowlist(self, port_list=None): - allowlist = "" + allowlist = [] if self.__mode is SUITE_TYPE.PF: if not port_list: return None @@ -1544,15 +1522,11 @@ class PerfTestBase(object): pci = self.dut.ports_info[port_index].get("pci") if not pci: continue - allowlist += "-a {} ".format(pci) + allowlist.append(pci) else: - allowlist = "".join( - [ - "-a {} ".format(pci) - for _, info in self.__vf_ports_info.items() - for pci in info.get("vfs_pci") - ] - ) + for _, info in self.__vf_ports_info.items(): + for pci in info.get("vfs_pci"): + allowlist.append(pci) return allowlist