From: Jun Dong <junx.dong@intel.com>
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 [thread overview]
Message-ID: <20220316093605.1446-1-junx.dong@intel.com> (raw)
Signed-off-by: Jun Dong <junx.dong@intel.com>
---
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
next reply other threads:[~2022-03-16 9:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-16 9:36 Jun Dong [this message]
2022-03-23 7:08 ` lijuan.tu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220316093605.1446-1-junx.dong@intel.com \
--to=junx.dong@intel.com \
--cc=dts@dpdk.org \
--cc=lijuan.tu@intel.com \
--cc=qingx.sun@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).