[V1,2/2] framework/dut: optmize code when setting eal param for rx mode

Message ID 20201118060114.14553-3-haiyangx.zhao@intel.com (mailing list archive)
State Accepted
Headers
Series framework: fix meson compile failed when set rx mode |

Commit Message

Zhao, HaiyangX Nov. 18, 2020, 6:01 a.m. UTC
  Dynamically adding rx mode eal parameter is only supported with meson
build, so add a jugement to fix the potential bug.

Signed-off-by: Haiyang Zhao <haiyangx.zhao@intel.com>
---
 framework/dut.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
  

Patch

diff --git a/framework/dut.py b/framework/dut.py
index d6862e8..2863848 100644
--- a/framework/dut.py
+++ b/framework/dut.py
@@ -230,7 +230,9 @@  class Dut(Crb):
         if use_shared_lib == 'true' and shared_lib_path and 'Virt' not in str(self):
             eal_str = eal_str + ' -d {} '.format(shared_lib_path)
         rx_mode = settings.load_global_setting(settings.DPDK_RXMODE_SETTING)
-        if 'other_eal_param' not in config or 'force-max-simd-bitwidth' not in config['other_eal_param']:
+        build_type = settings.load_global_setting(settings.HOST_BUILD_TYPE_SETTING)
+        if build_type == 'meson' and ('other_eal_param' not in config or
+                                      'force-max-simd-bitwidth' not in config['other_eal_param']):
             if rx_mode == 'novector':
                 eal_str = eal_str + ' --force-max-simd-bitwidth=64 '
             elif rx_mode == 'sse':