[1/2] net/bnxt: add meson build option
Checks
Commit Message
Add an option in meson build to indicate the memory management scheme.
bnxt_eem_system is set to false by default.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
doc/guides/nics/bnxt.rst | 9 +++++++++
drivers/net/bnxt/meson.build | 16 ++++++++++++++--
meson_options.txt | 2 ++
3 files changed, 25 insertions(+), 2 deletions(-)
Comments
On 7/21/2020 6:47 PM, Ajit Khaparde wrote:
> Add an option in meson build to indicate the memory management scheme.
> bnxt_eem_system is set to false by default.
>
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
<...>
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -2,6 +2,8 @@
>
> option('armv8_crypto_dir', type: 'string', value: '',
> description: 'path to the armv8_crypto library installation directory')
> +option('bnxt_eem_system', type: 'boolean', value: false,
> + description: 'EEM system memory support')
> option('disable_drivers', type: 'string', value: '',
> description: 'Comma-separated list of drivers to explicitly disable.')
> option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>',
>
I think it was a design decision to not have all Make config options to meson
build, and reduce compile time configuration as much as possible.
For a while we are pushing back new compile time config options unless they are
really must, the 'RTE_LIBRTE_BNXT_PMD_SYSTEM' has been merged mostly because it
has been missed.
Instead of introducing this PMD level compile time option to meson, can it be
possible to convert the config to runtime config. In the past we have used the
device arguments many times for same reason, can something similar be used here?
On Tue, Jul 21, 2020 at 4:09 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> On 7/21/2020 6:47 PM, Ajit Khaparde wrote:
> > Add an option in meson build to indicate the memory management scheme.
> > bnxt_eem_system is set to false by default.
> >
> > Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
>
> <...>
>
> > --- a/meson_options.txt
> > +++ b/meson_options.txt
> > @@ -2,6 +2,8 @@
> >
> > option('armv8_crypto_dir', type: 'string', value: '',
> > description: 'path to the armv8_crypto library installation
> directory')
> > +option('bnxt_eem_system', type: 'boolean', value: false,
> > + description: 'EEM system memory support')
> > option('disable_drivers', type: 'string', value: '',
> > description: 'Comma-separated list of drivers to explicitly
> disable.')
> > option('drivers_install_subdir', type: 'string', value:
> 'dpdk/pmds-<VERSION>',
> >
>
> I think it was a design decision to not have all Make config options to
> meson
> build, and reduce compile time configuration as much as possible.
>
> For a while we are pushing back new compile time config options unless
> they are
> really must, the 'RTE_LIBRTE_BNXT_PMD_SYSTEM' has been merged mostly
> because it
> has been missed.
>
> Instead of introducing this PMD level compile time option to meson, can it
> be
> possible to convert the config to runtime config. In the past we have used
> the
> device arguments many times for same reason, can something similar be used
> here?
>
Sure. I can take a look at that.
@@ -809,6 +809,15 @@ is stopped.
Note that TX (or RX) vector mode can be enabled independently from RX (or TX)
vector mode.
+Configuration
+-------------
+
+Compilation options
+~~~~~~~~~~~~~~~~~~~
+
+- ``bnxt_eem_system`` (default **false**)
+This option allows to select the flow table memory management scheme.
+
Appendix
--------
@@ -4,6 +4,14 @@
install_headers('rte_pmd_bnxt.h')
+bnxt_eem_sys = (get_option('bnxt_eem_system'))
+if bnxt_eem_sys
+ dpdk_conf.set('RTE_LIBRTE_BNXT_PMD_SYSTEM', true)
+ cflags += [
+ '-DTF_USE_SYSTEM_MEM'
+ ]
+endif
+
includes += include_directories('tf_ulp')
includes += include_directories('tf_core')
@@ -29,7 +37,6 @@ sources = files('bnxt_cpr.c',
'tf_core/rand.c',
'tf_core/stack.c',
'tf_core/tf_em_common.c',
- 'tf_core/tf_em_host.c',
'tf_core/tf_em_internal.c',
'tf_core/tf_rm.c',
'tf_core/tf_tbl.c',
@@ -45,7 +52,6 @@ sources = files('bnxt_cpr.c',
'tf_core/tf_if_tbl.c',
'tf_core/ll.c',
'tf_core/tf_global_cfg.c',
- 'tf_core/tf_em_host.c',
'tf_core/tf_shadow_identifier.c',
'hcapi/hcapi_cfa_p4.c',
@@ -67,6 +73,12 @@ sources = files('bnxt_cpr.c',
'rte_pmd_bnxt.c')
+if bnxt_eem_sys
+ sources += files('tf_core/tf_em_system.c')
+elif not bnxt_eem_sys
+ sources += files('tf_core/tf_em_host.c')
+endif
+
if arch_subdir == 'x86'
sources += files('bnxt_rxtx_vec_sse.c')
elif arch_subdir == 'arm' and host_machine.cpu_family().startswith('aarch64')
@@ -2,6 +2,8 @@
option('armv8_crypto_dir', type: 'string', value: '',
description: 'path to the armv8_crypto library installation directory')
+option('bnxt_eem_system', type: 'boolean', value: false,
+ description: 'EEM system memory support')
option('disable_drivers', type: 'string', value: '',
description: 'Comma-separated list of drivers to explicitly disable.')
option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>',