test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [V1] remove changing source code before meson build
@ 2022-03-16  9:36 Jun Dong
  2022-03-23  7:08 ` lijuan.tu
  0 siblings, 1 reply; 2+ messages in thread
From: Jun Dong @ 2022-03-16  9:36 UTC (permalink / raw)
  To: dts; +Cc: lijuan.tu, qingx.sun, junx.dong

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [dts] [V1] remove changing source code before meson build
  2022-03-16  9:36 [dts] [V1] remove changing source code before meson build Jun Dong
@ 2022-03-23  7:08 ` lijuan.tu
  0 siblings, 0 replies; 2+ messages in thread
From: lijuan.tu @ 2022-03-23  7:08 UTC (permalink / raw)
  To: dts, Jun Dong; +Cc: lijuan.tu, qingx.sun, junx.dong

On Wed, 16 Mar 2022 17:36:05 +0800, Jun Dong <junx.dong@intel.com> wrote:
> Signed-off-by: Jun Dong <junx.dong@intel.com>

Reviewed-by: Lijuan Tu \<lijuan.tu@intel.com\>
Applied, thanks

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-23  7:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-16  9:36 [dts] [V1] remove changing source code before meson build Jun Dong
2022-03-23  7:08 ` lijuan.tu

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).