[V1,3/3] framework/dut: add eal parameters for different rx_mode

Message ID 20201104092108.13778-4-haiyangx.zhao@intel.com (mailing list archive)
State Accepted
Headers
Series framework: add eal paramters for different rx modes |

Commit Message

Zhao, HaiyangX Nov. 4, 2020, 9:21 a.m. UTC
  *.add eal parameters for novector/sse/avx2/avx512.

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

Patch

diff --git a/framework/dut.py b/framework/dut.py
index bef0d15..656cb59 100644
--- a/framework/dut.py
+++ b/framework/dut.py
@@ -229,6 +229,15 @@  class Dut(Crb):
         shared_lib_path = settings.load_global_setting(settings.HOST_SHARED_LIB_PATH)
         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 rx_mode == 'novector':
+            eal_str = eal_str + ' --force-max-simd-bitwidth=64 '
+        elif rx_mode == 'sse':
+            eal_str = eal_str + ' --force-max-simd-bitwidth=128 '
+        elif rx_mode == 'avx2':
+            eal_str = eal_str + ' --force-max-simd-bitwidth=256 '
+        elif rx_mode == 'avx512':
+            eal_str = eal_str + ' --force-max-simd-bitwidth=512 '
 
         return eal_str