From: Haiyang Zhao <haiyangx.zhao@intel.com>
To: dts@dpdk.org, lijuan.tu@intel.com
Cc: Haiyang Zhao <haiyangx.zhao@intel.com>
Subject: [dts] [PATCH V1 1/2] framework/project_dpdk: fix meson compile failed when set rx mode
Date: Wed, 18 Nov 2020 14:01:13 +0800 [thread overview]
Message-ID: <20201118060114.14553-2-haiyangx.zhao@intel.com> (raw)
In-Reply-To: <20201118060114.14553-1-haiyangx.zhao@intel.com>
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
next prev parent reply other threads:[~2020-11-18 6:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-18 6:01 [dts] [PATCH V1 0/2] framework: " Haiyang Zhao
2020-11-18 6:01 ` Haiyang Zhao [this message]
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
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=20201118060114.14553-2-haiyangx.zhao@intel.com \
--to=haiyangx.zhao@intel.com \
--cc=dts@dpdk.org \
--cc=lijuan.tu@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).