* [dts] [PATCH V1 0/2] framework: fix meson compile failed when set rx mode
@ 2020-11-18 6:01 Haiyang Zhao
2020-11-18 6:01 ` [dts] [PATCH V1 1/2] framework/project_dpdk: " Haiyang Zhao
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Haiyang Zhao @ 2020-11-18 6:01 UTC (permalink / raw)
To: dts, lijuan.tu; +Cc: Haiyang Zhao
The rx modes are supported dynamically since DPDK 20.11,
and by modifying the DPDK configuration to use the rx mode is
only supported by makefile compiling , so need add a jugement.
And only add rx mode eal parameter for meson compile type.
Haiyang Zhao (2):
framework/project_dpdk: fix meson compile failed when set rx mode
framework/dut: optmize code when setting eal param for rx mode
framework/dut.py | 4 +++-
framework/project_dpdk.py | 43 ++++++++++++++++++++++-----------------
2 files changed, 27 insertions(+), 20 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dts] [PATCH V1 1/2] framework/project_dpdk: fix meson compile failed when set rx mode
2020-11-18 6:01 [dts] [PATCH V1 0/2] framework: fix meson compile failed when set rx mode Haiyang Zhao
@ 2020-11-18 6:01 ` Haiyang Zhao
2020-11-18 6:01 ` [dts] [PATCH V1 2/2] framework/dut: optmize code when setting eal param for " Haiyang Zhao
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Haiyang Zhao @ 2020-11-18 6:01 UTC (permalink / raw)
To: dts, lijuan.tu; +Cc: Haiyang Zhao
rx mode is supported dynamically since DPDK 20.11, and modify the rte_config.h
to compile DPDK by meson will be failed. so add a jugement for build type to
fix this issue and update the doc.
Signed-off-by: Haiyang Zhao <haiyangx.zhao@intel.com>
---
framework/project_dpdk.py | 43 ++++++++++++++++++++++-----------------
1 file changed, 24 insertions(+), 19 deletions(-)
diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py
index fbbc78d..259282f 100644
--- a/framework/project_dpdk.py
+++ b/framework/project_dpdk.py
@@ -187,28 +187,33 @@ class DPDKdut(Dut):
def set_rxtx_mode(self):
"""
Set default RX/TX PMD function,
- only i40e support scalar/full RX/TX model.
- ixgbe and fm10k only support vector and no vector model
- all NIC default rx/tx model is vector PMD
+ the rx mode scalar/full/novector are supported dynamically since DPDK 20.11,
+ The DPDK version should be <=20.08 when compiling DPDK by makefile to use these rx modes,
+ Rx mode avx512 is only supported in DPDK 20.11 and later version.
"""
mode = load_global_setting(DPDK_RXMODE_SETTING)
- if mode == 'scalar':
- self.set_build_options({'RTE_LIBRTE_I40E_INC_VECTOR': 'n',
- 'RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC': 'y'})
- if mode == 'full':
- self.set_build_options({'RTE_LIBRTE_I40E_INC_VECTOR': 'n',
- 'RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC': 'n'})
- if mode == 'novector':
- self.set_build_options({'RTE_IXGBE_INC_VECTOR': 'n',
- 'RTE_LIBRTE_I40E_INC_VECTOR': 'n',
- 'RTE_LIBRTE_FM10K_INC_VECTOR': 'n'})
- if mode == 'avx512':
- out = self.send_expect('lscpu | grep avx512', '#')
- if 'avx512f' not in out or 'no-avx512f' in out:
- self.logger.warning(RED('*********The DUT CPU do not support AVX512 test!!!********'))
- self.logger.warning(RED('*********Now set the rx_mode to default!!!**********'))
- save_global_setting(DPDK_RXMODE_SETTING, 'default')
+ build_type = load_global_setting(HOST_BUILD_TYPE_SETTING)
+ if build_type == 'makefile':
+ if mode == 'scalar':
+ self.set_build_options({'RTE_LIBRTE_I40E_INC_VECTOR': 'n',
+ 'RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC': 'y'})
+ elif mode == 'full':
+ self.set_build_options({'RTE_LIBRTE_I40E_INC_VECTOR': 'n',
+ 'RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC': 'n'})
+ elif mode == 'novector':
+ self.set_build_options({'RTE_IXGBE_INC_VECTOR': 'n',
+ 'RTE_LIBRTE_I40E_INC_VECTOR': 'n',
+ 'RTE_LIBRTE_FM10K_INC_VECTOR': 'n'})
+ elif mode == 'avx512':
+ self.logger.warning(RED('*********AVX512 is not supported by makefile!!!********'))
+ else:
+ if mode == 'avx512':
+ out = self.send_expect('lscpu | grep avx512', '#')
+ if 'avx512f' not in out or 'no-avx512f' in out:
+ self.logger.warning(RED('*********The DUT CPU do not support AVX512 test!!!********'))
+ self.logger.warning(RED('*********Now set the rx_mode to default!!!**********'))
+ save_global_setting(DPDK_RXMODE_SETTING, 'default')
def set_package(self, pkg_name="", patch_list=[]):
self.package = pkg_name
--
2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dts] [PATCH V1 2/2] framework/dut: optmize code when setting eal param for rx mode
2020-11-18 6:01 [dts] [PATCH V1 0/2] framework: fix meson compile failed when set rx mode Haiyang Zhao
2020-11-18 6:01 ` [dts] [PATCH V1 1/2] framework/project_dpdk: " Haiyang Zhao
@ 2020-11-18 6:01 ` Haiyang Zhao
2020-11-18 7:10 ` [dts] [PATCH V1 0/2] framework: fix meson compile failed when set " Zhao, HaiyangX
2020-11-19 8:39 ` Tu, Lijuan
3 siblings, 0 replies; 5+ messages in thread
From: Haiyang Zhao @ 2020-11-18 6:01 UTC (permalink / raw)
To: dts, lijuan.tu; +Cc: Haiyang Zhao
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(-)
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':
--
2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] [PATCH V1 0/2] framework: fix meson compile failed when set rx mode
2020-11-18 6:01 [dts] [PATCH V1 0/2] framework: fix meson compile failed when set rx mode Haiyang Zhao
2020-11-18 6:01 ` [dts] [PATCH V1 1/2] framework/project_dpdk: " Haiyang Zhao
2020-11-18 6:01 ` [dts] [PATCH V1 2/2] framework/dut: optmize code when setting eal param for " Haiyang Zhao
@ 2020-11-18 7:10 ` Zhao, HaiyangX
2020-11-19 8:39 ` Tu, Lijuan
3 siblings, 0 replies; 5+ messages in thread
From: Zhao, HaiyangX @ 2020-11-18 7:10 UTC (permalink / raw)
To: Zhao, HaiyangX, dts, Tu, Lijuan
[-- Attachment #1: Type: text/plain, Size: 399 bytes --]
Tested-by: Haiyang Zhao <haiyangx.zhao@intel.com>
Best Regards,
Zhao Haiyang
> -----Original Message-----
> From: Haiyang Zhao <haiyangx.zhao@intel.com>
> Sent: Wednesday, November 18, 2020 14:01
> To: dts@dpdk.org; Tu, Lijuan <lijuan.tu@intel.com>
> Cc: Zhao, HaiyangX <haiyangx.zhao@intel.com>
> Subject: [dts][PATCH V1 0/2] framework: fix meson compile failed when set
> rx mode
[-- Attachment #2: dts.log --]
[-- Type: application/octet-stream, Size: 32436 bytes --]
[-- Attachment #3: TestChecksumOffload.log --]
[-- Type: application/octet-stream, Size: 18969 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] [PATCH V1 0/2] framework: fix meson compile failed when set rx mode
2020-11-18 6:01 [dts] [PATCH V1 0/2] framework: fix meson compile failed when set rx mode Haiyang Zhao
` (2 preceding siblings ...)
2020-11-18 7:10 ` [dts] [PATCH V1 0/2] framework: fix meson compile failed when set " Zhao, HaiyangX
@ 2020-11-19 8:39 ` Tu, Lijuan
3 siblings, 0 replies; 5+ messages in thread
From: Tu, Lijuan @ 2020-11-19 8:39 UTC (permalink / raw)
To: Zhao, HaiyangX, dts; +Cc: Zhao, HaiyangX
> The rx modes are supported dynamically since DPDK 20.11, and by modifying
> the DPDK configuration to use the rx mode is only supported by makefile
> compiling , so need add a jugement.
> And only add rx mode eal parameter for meson compile type.
>
>
> Haiyang Zhao (2):
> framework/project_dpdk: fix meson compile failed when set rx mode
> framework/dut: optmize code when setting eal param for rx mode
>
> framework/dut.py | 4 +++-
> framework/project_dpdk.py | 43 ++++++++++++++++++++++-----------------
> 2 files changed, 27 insertions(+), 20 deletions(-)
>
Applied
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-11-19 8:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-18 6:01 [dts] [PATCH V1 0/2] framework: fix meson compile failed when set rx mode Haiyang Zhao
2020-11-18 6:01 ` [dts] [PATCH V1 1/2] framework/project_dpdk: " Haiyang Zhao
2020-11-18 6:01 ` [dts] [PATCH V1 2/2] framework/dut: optmize code when setting eal param for " Haiyang Zhao
2020-11-18 7:10 ` [dts] [PATCH V1 0/2] framework: fix meson compile failed when set " Zhao, HaiyangX
2020-11-19 8:39 ` Tu, Lijuan
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).