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 E21D7A0032; Wed, 16 Mar 2022 10:36:15 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AF620410EC; Wed, 16 Mar 2022 10:36:15 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 68FFA40395 for ; Wed, 16 Mar 2022 10:36:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1647423374; x=1678959374; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=kZjdKPu4MMnNBgDz5oswwmoVOGnYPW9EZogzD5SydmY=; b=NBdYuj52mx3twpj+3ASWsmSyf7weUejpts26xgISKfC0N6KqXFndmlYb 3LsDCrrft5TZKAIWasNbw9kkTI63R+AJ0DA824806xroZxf8fSCnVIJNn miBji+w1vwMUtklN82DMy1ePbXuEUF6sc3oXd7KDcZ0WfQHZdegNy/D7D E2agjBMgtGHbbDKy0BT1L5RsjWpbIUzJbGRThZFc4DSNxTv6sl1Lpd2lV eNRxWqjYhI7LazVls6L15ykuch+1bsi38OFZUcBVwYPRsiBJbhPQcxwIt jDWulOlgCQOWcBCSdK/1GEg0ctU7hxnn278/gxod24FWHUMgAcggmAfqz g==; X-IronPort-AV: E=McAfee;i="6200,9189,10286"; a="255365903" X-IronPort-AV: E=Sophos;i="5.90,186,1643702400"; d="scan'208";a="255365903" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2022 02:36:13 -0700 X-IronPort-AV: E=Sophos;i="5.90,186,1643702400"; d="scan'208";a="634911693" Received: from shwdenpg197.ccr.corp.intel.com ([10.253.109.70]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2022 02:36:11 -0700 From: Jun Dong To: dts@dpdk.org Cc: lijuan.tu@intel.com, qingx.sun@intel.com, junx.dong@intel.com Subject: [dts] [V1] remove changing source code before meson build Date: Wed, 16 Mar 2022 17:36:05 +0800 Message-Id: <20220316093605.1446-1-junx.dong@intel.com> X-Mailer: git-send-email 2.33.1.windows.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 Signed-off-by: Jun Dong --- framework/project_dpdk.py | 12 -------- tests/TestSuite_ieee1588.py | 3 +- tests/TestSuite_pvp_share_lib.py | 6 ++-- tests/perf_test_base.py | 53 +++++++++----------------------- 4 files changed, 18 insertions(+), 56 deletions(-) diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py index eb6ea44d..4104e016 100644 --- a/framework/project_dpdk.py +++ b/framework/project_dpdk.py @@ -80,10 +80,6 @@ class DPDKdut(Dut): self.set_rxtx_mode() - drivername = load_global_setting(HOST_DRIVER_SETTING) - - self.set_driver_specific_configurations(drivername) - self.apps_name = self.apps_name_conf["meson"] # use the dut target directory instead of 'target' string in app name for app in self.apps_name: @@ -567,14 +563,6 @@ class DPDKdut(Dut): # No blocklist option in FreeBSD return blocklist - def set_driver_specific_configurations(self, drivername): - """ - Set configurations required for specific drivers before compilation. - """ - # Enable Mellanox drivers - if drivername == "mlx5_core" or drivername == "mlx4_core": - self.set_build_options({"RTE_LIBRTE_MLX5_PMD": "y"}) - class DPDKtester(Tester): diff --git a/tests/TestSuite_ieee1588.py b/tests/TestSuite_ieee1588.py index e192ebbe..dc7d43d9 100644 --- a/tests/TestSuite_ieee1588.py +++ b/tests/TestSuite_ieee1588.py @@ -174,6 +174,5 @@ class TestIeee1588(TestCase): """ self.dut.send_expect("quit", "# ", 30) - # Restore the config file and recompile the package. - self.dut.set_build_options({"RTE_LIBRTE_IEEE1588": "n"}) + # recompile the package with default options. self.dut.build_install_dpdk(self.target) diff --git a/tests/TestSuite_pvp_share_lib.py b/tests/TestSuite_pvp_share_lib.py index eee4233f..f9c1f5da 100644 --- a/tests/TestSuite_pvp_share_lib.py +++ b/tests/TestSuite_pvp_share_lib.py @@ -99,11 +99,11 @@ class TestPVPShareLib(TestCase): self.result_table_create(self.table_header) def prepare_share_lib_env(self): - self.dut.set_build_options({"RTE_BUILD_SHARED_LIB": "y"}) - self.dut.build_install_dpdk(self.dut.target) + self.dut.build_install_dpdk( + self.dut.target, extra_options="-Dc_args=-DRTE_BUILD_SHARED_LIB" + ) def restore_env(self): - self.dut.set_build_options({"RTE_BUILD_SHARED_LIB": "n"}) self.dut.build_install_dpdk(self.dut.target) def send_and_verify(self): diff --git a/tests/perf_test_base.py b/tests/perf_test_base.py index 337a37dd..0666f3bf 100644 --- a/tests/perf_test_base.py +++ b/tests/perf_test_base.py @@ -664,53 +664,28 @@ class PerfTestBase(object): self.__vf_ports_info = None def __preset_dpdk_compilation(self): - # set compile flag and rebuild to get best perf - compile_flags = {} + # rebuild to get best perf # RX_DESC - if self.__compile_rx_desc: - rx_desc_flag = "RTE_LIBRTE_{nic_drv}_{bit}BYTE_RX_DESC".format( - **{ - "nic_drv": self.kdriver.upper(), - "bit": self.__compile_rx_desc or 32, - } + rx_desc_comlication_flag = self.__get_rx_desc_complication_flag() + if rx_desc_comlication_flag: + self.dut.build_install_dpdk( + self.target, extra_options=rx_desc_comlication_flag ) - if self.__compile_rx_desc == 32: - msg = f"{rx_desc_flag} is dpdk default compile flag, ignore this compile flag" - self.logger.warning(msg) - else: - compile_flags[rx_desc_flag] = "y" - # AVX flag - if self.__bin_type is BIN_TYPE.PMD: - if self.__compile_avx: - compile_flags[f"RTE_ENABLE_{self.__compile_avx.upper()}"] = "y" - if not compile_flags: - return - self.dut.set_build_options(compile_flags) - self.dut.build_install_dpdk(self.target) def __restore_compilation(self): - compile_flags = {} - # RX_DESC + # restore build + rx_desc_comlication_flag = self.__get_rx_desc_complication_flag() + if rx_desc_comlication_flag: + self.dut.build_install_dpdk(self.target) + + def __get_rx_desc_complication_flag(self): + rx_desc_flag = "" if self.__compile_rx_desc: - rx_desc_flag = "RTE_LIBRTE_{nic_drv}_{bit}BYTE_RX_DESC".format( - **{ - "nic_drv": self.kdriver.upper(), - "bit": self.__compile_rx_desc or 32, - } - ) + rx_desc_flag = f"RTE_LIBRTE_{self.kdriver.upper()}_{self.__compile_rx_desc}BYTE_RX_DESC" if self.__compile_rx_desc == 32: msg = f"{rx_desc_flag} is dpdk default compile flag, ignore this compile flag" self.logger.warning(msg) - else: - compile_flags[rx_desc_flag] = "n" - # AVX flag - if self.__bin_type is BIN_TYPE.PMD: - if self.__compile_avx: - compile_flags[f"RTE_ENABLE_{self.__compile_avx.upper()}"] = "n" - if not compile_flags: - return - self.dut.set_build_options(compile_flags) - self.dut.build_install_dpdk(self.target) + return rx_desc_flag def __preset_compilation(self): # Update compile config file and rebuild to get best perf on different nics -- 2.25.1