From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F1588A0093; Fri, 11 Mar 2022 04:25:40 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E5F0B40E78; Fri, 11 Mar 2022 04:25:40 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id B095C40042 for ; Fri, 11 Mar 2022 04:25:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646969138; x=1678505138; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=et4p533oZye6VdkaiTN11BF5zLeBnHPH91ujivXPOY0=; b=dbvlSmsDMGMxdZjU5/A3s1yJeVVisrODOtY3GzHQTvvgPZv+bHLaAxFW guLXzJ9Ehb5lU+IeB0K2L2/loBdIYehLiwJs/NowYG8ZMWQSinZpx8Nya 9vwfzN9eTp8Qp+YZQZeOYD5M+CNpwb695f4MhZfxEOpwT2izq3T5w4Zui kcfSa2HjoS0opUx0NlLU/uNvHKwuYg5NXk04juqXzXI6BYbZr5BD/4GNF u3gLPRnEi8w3tHiIJ03IzAurwKZ/oESD+5zFNVqOJm2YoEi00MmqoFZsV tjA807GGI5b5Mwvkj4X16Xyy0BFiKlHB4c7FjyGypzhoNqim+drrck9D5 A==; X-IronPort-AV: E=McAfee;i="6200,9189,10282"; a="235440116" X-IronPort-AV: E=Sophos;i="5.90,172,1643702400"; d="scan'208";a="235440116" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2022 19:25:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,172,1643702400"; d="scan'208";a="688943887" Received: from dpdk-lijuan-icelake2.sh.intel.com ([10.67.118.188]) by fmsmga001.fm.intel.com with ESMTP; 10 Mar 2022 19:25:36 -0800 From: hanyingya To: dts@dpdk.org Cc: hanyingya Subject: [dts][PATCH V1]l3fwd: make RX and TX queue size configurable Date: Fri, 11 Mar 2022 03:25:29 +0000 Message-Id: <20220311032529.1384459-1-yingyax.han@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 make RX and TX queue sizes configurable from the command line. please refer to dpdk commit 8efffaec56e30ed92c2c3f6. Signed-off-by: hanyingya --- conf/l3fwd.cfg | 5 +++- conf/l3fwd_em.cfg | 5 +++- conf/l3fwd_lpm_ipv4.cfg | 5 +++- conf/l3fwd_lpm_ipv4_rfc2544.cfg | 5 +++- conf/l3fwd_lpm_ipv6.cfg | 5 +++- conf/vf_l3fwd_em_kernelpf.cfg | 1 + conf/vf_l3fwd_kernelpf.cfg | 5 +++- conf/vf_l3fwd_lpm_ipv4_kernelpf.cfg | 1 + conf/vf_l3fwd_lpm_ipv4_rfc2544_kernelpf.cfg | 1 + conf/vf_l3fwd_lpm_ipv6_kernelpf.cfg | 1 + tests/perf_test_base.py | 28 ++++++--------------- 11 files changed, 35 insertions(+), 27 deletions(-) diff --git a/conf/l3fwd.cfg b/conf/l3fwd.cfg index 1e3e1ca8..5801acd3 100644 --- a/conf/l3fwd.cfg +++ b/conf/l3fwd.cfg @@ -12,6 +12,8 @@ # ...... # } # +# - rxtx_queue_size defines the l3fwd new parameters "--rx-queue-size" and "--tx-queue-size". +# # - test_duration is how many seconds each combination performance will # be recorded, default is 60s # @@ -56,6 +58,7 @@ update_expected = True port_list=None +rxtx_queue_size = None test_duration = 12 accepted_tolerance = 1 test_parameters = { @@ -401,4 +404,4 @@ expected_rfc2544 = { '512': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } }, '1024': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } }, '1280': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } }, - '1518': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } } },},},} \ No newline at end of file + '1518': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } } },},},} diff --git a/conf/l3fwd_em.cfg b/conf/l3fwd_em.cfg index 63923454..cfbf4e61 100644 --- a/conf/l3fwd_em.cfg +++ b/conf/l3fwd_em.cfg @@ -9,6 +9,8 @@ # ...... # } # +# - rxtx_queue_size defines the l3fwd new parameters "--rx-queue-size" and "--tx-queue-size". +# # - test_duration is how many seconds each combination performance will # be recorded, default is 60s # @@ -52,6 +54,7 @@ [suite] update_expected = True +rxtx_queue_size = None test_duration = 12 accepted_tolerance = 1 test_parameters = { @@ -144,4 +147,4 @@ expected_throughput = { '512': '0.00', '1024': '0.00', '1280': '0.00', - '1518': '0.00', },},},} \ No newline at end of file + '1518': '0.00', },},},} diff --git a/conf/l3fwd_lpm_ipv4.cfg b/conf/l3fwd_lpm_ipv4.cfg index 5935c659..1ceb5157 100644 --- a/conf/l3fwd_lpm_ipv4.cfg +++ b/conf/l3fwd_lpm_ipv4.cfg @@ -9,6 +9,8 @@ # ...... # } # +# - rxtx_queue_size defines the l3fwd new parameters "--rx-queue-size" and "--tx-queue-size". +# # - test_duration is how many seconds each combination performance will # be recorded, default is 60s # @@ -52,6 +54,7 @@ [suite] update_expected = True +rxtx_queue_size = None test_duration = 60 accepted_tolerance = 1 test_parameters = { @@ -102,4 +105,4 @@ expected_throughput = { '512': '0.00', '1024': '0.00', '1280': '0.00', - '1518': '0.00', },},}, } \ No newline at end of file + '1518': '0.00', },},}, } diff --git a/conf/l3fwd_lpm_ipv4_rfc2544.cfg b/conf/l3fwd_lpm_ipv4_rfc2544.cfg index 3518e94f..1d767716 100644 --- a/conf/l3fwd_lpm_ipv4_rfc2544.cfg +++ b/conf/l3fwd_lpm_ipv4_rfc2544.cfg @@ -9,6 +9,8 @@ # ...... # } # +# - rxtx_queue_size defines the l3fwd new parameters "--rx-queue-size" and "--tx-queue-size". +# # - test_duration is how many seconds each combination performance will # be recorded, default is 60s # @@ -52,6 +54,7 @@ [suite] update_expected = True +rxtx_queue_size = None test_duration = 60 accepted_tolerance = 1 test_parameters = { @@ -102,4 +105,4 @@ expected_rfc2544 = { '512': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } }, '1024': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } }, '1280': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } }, - '1518': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } } },},},} \ No newline at end of file + '1518': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } } },},},} diff --git a/conf/l3fwd_lpm_ipv6.cfg b/conf/l3fwd_lpm_ipv6.cfg index 04d1aaca..2bbd47fe 100644 --- a/conf/l3fwd_lpm_ipv6.cfg +++ b/conf/l3fwd_lpm_ipv6.cfg @@ -9,6 +9,8 @@ # ...... # } # +# - rxtx_queue_size defines the l3fwd new parameters "--rx-queue-size" and "--tx-queue-size". +# # - test_duration is how many seconds each combination performance will # be recorded, default is 60s # @@ -52,6 +54,7 @@ [suite] update_expected = True +rxtx_queue_size = None test_duration = 60 accepted_tolerance = 1 test_parameters = { @@ -102,4 +105,4 @@ expected_throughput = { '512': '0.00', '1024': '0.00', '1280': '0.00', - '1518': '0.00', },},}, } \ No newline at end of file + '1518': '0.00', },},}, } diff --git a/conf/vf_l3fwd_em_kernelpf.cfg b/conf/vf_l3fwd_em_kernelpf.cfg index 4a6c0e9f..da9422b4 100644 --- a/conf/vf_l3fwd_em_kernelpf.cfg +++ b/conf/vf_l3fwd_em_kernelpf.cfg @@ -6,6 +6,7 @@ [suite] test_duration = 60 accepted_tolerance = '1%%' +rxtx_queue_size = None test_parameters = { '1C/1T-1Q': ['64', '128', '256', '512', '1024', '1280', '1518',], diff --git a/conf/vf_l3fwd_kernelpf.cfg b/conf/vf_l3fwd_kernelpf.cfg index 283ed8c9..c86e4709 100644 --- a/conf/vf_l3fwd_kernelpf.cfg +++ b/conf/vf_l3fwd_kernelpf.cfg @@ -9,6 +9,8 @@ # ...... # } # +# - rxtx_queue_size defines the l3fwd new parameters "--rx-queue-size" and "--tx-queue-size". +# # - test_duration is how many seconds each combination performance will # be recorded, default is 60s # @@ -52,6 +54,7 @@ [suite] test_duration = 60 accepted_tolerance = '1%%' +rxtx_queue_size = None test_parameters = { '1C/1T-1Q': ['64', '128', '256', '512', '1024', '1280', '1518',], @@ -398,4 +401,4 @@ expected_rfc2544 = { '512': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } }, '1024': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } }, '1280': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } }, - '1518': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } } },},},} \ No newline at end of file + '1518': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } } },},},} diff --git a/conf/vf_l3fwd_lpm_ipv4_kernelpf.cfg b/conf/vf_l3fwd_lpm_ipv4_kernelpf.cfg index fae8f10d..8390dd7a 100644 --- a/conf/vf_l3fwd_lpm_ipv4_kernelpf.cfg +++ b/conf/vf_l3fwd_lpm_ipv4_kernelpf.cfg @@ -6,6 +6,7 @@ [suite] test_duration = 60 accepted_tolerance = '1%%' +rxtx_queue_size = None test_parameters = { '1C/1T-1Q': ['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 afd039ed..f39feb9e 100644 --- a/conf/vf_l3fwd_lpm_ipv4_rfc2544_kernelpf.cfg +++ b/conf/vf_l3fwd_lpm_ipv4_rfc2544_kernelpf.cfg @@ -6,6 +6,7 @@ [suite] test_duration = 60 accepted_tolerance = '1%%' +rxtx_queue_size = None test_parameters = { '1C/1T-1Q': ['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 ac20f6fc..1039c86f 100644 --- a/conf/vf_l3fwd_lpm_ipv6_kernelpf.cfg +++ b/conf/vf_l3fwd_lpm_ipv6_kernelpf.cfg @@ -6,6 +6,7 @@ [suite] test_duration = 60 accepted_tolerance = '1%%' +rxtx_queue_size = None test_parameters = { '1C/1T-1Q': ['64', '128', '256', '512', '1024', '1280', '1518',], diff --git a/tests/perf_test_base.py b/tests/perf_test_base.py index c2d6041d..e6d68f45 100644 --- a/tests/perf_test_base.py +++ b/tests/perf_test_base.py @@ -146,6 +146,7 @@ class PerfTestBase(object): 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 self.__valports = valports @@ -663,21 +664,9 @@ class PerfTestBase(object): self.dut.set_build_options(compile_flags) self.dut.build_install_dpdk(self.target) - def __preset_l3fwd_compilation(self): - # init l3fwd binary file - if self.nic not in ["columbiaville_100g", "columbiaville_25g", "columbiaville_25gx2"]: - self.logger.info( - "Configure RX/TX descriptor to 2048, re-build ./examples/l3fwd") - self.d_con(( - "sed -i -e 's/" - "define RTE_TEST_RX_DESC_DEFAULT.*$/" - "define RTE_TEST_RX_DESC_DEFAULT 2048/' " - "./examples/l3fwd/l3fwd.h")) - self.d_con(( - "sed -i -e 's/" - "define RTE_TEST_TX_DESC_DEFAULT.*$/" - "define RTE_TEST_TX_DESC_DEFAULT 2048/' " - "./examples/l3fwd/l3fwd.h")) + def __preset_compilation(self): + # Update compile config file and rebuild to get best perf on different nics + self.__preset_dpdk_compilation() if self.__mode is SUITE_TYPE.VF: # init testpmd if self.__pf_driver is not NIC_DRV.PCI_STUB: @@ -685,12 +674,6 @@ class PerfTestBase(object): self.__l3fwd_em = self.__l3fwd_init(MATCH_MODE.EM) self.__l3fwd_lpm = self.__l3fwd_init(MATCH_MODE.LPM) - def __preset_compilation(self): - # Update compile config file and rebuild to get best perf on different nics - self.__preset_dpdk_compilation() - if self.__bin_type is BIN_TYPE.L3FWD: - self.__preset_l3fwd_compilation() - def __init_host_testpmd(self): ''' apply under vf testing scenario @@ -847,6 +830,8 @@ class PerfTestBase(object): "niantic", "columbiaville_100g", "columbiaville_25g", "columbiaville_25gx2", ] + if self.__rxtx_queue_size: + command_line += " --rx-queue-size {rxtx} --tx-queue-size {rxtx}". format(rxtx= self.__rxtx_queue_size) if self.nic in suppored_nics or self.__mode is SUITE_TYPE.VF: command_line += " --parse-ptype" if frame_size > 1518: @@ -1376,6 +1361,7 @@ class PerfTestBase(object): if self.__bin_type is BIN_TYPE.L3FWD: self.__bin_ps_wait_up = test_content.get('l3fwd_wait_up', 0) self.__bin_ps_restart = test_content.get('l3fwd_restart', True) + self.__rxtx_queue_size = test_content.get('rxtx_queue_size', None) else: self.__bin_ps_wait_up = test_content.get('bin_ps_wait_up', 0) self.__bin_ps_restart = test_content.get('bin_ps_restart', True) -- 2.25.1