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.khapa...@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(-) diff --git a/doc/guides/nics/bnxt.rst b/doc/guides/nics/bnxt.rst index 6ff75d0a2..dcb4309d2 100644 --- a/doc/guides/nics/bnxt.rst +++ b/doc/guides/nics/bnxt.rst @@ -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 -------- diff --git a/drivers/net/bnxt/meson.build b/drivers/net/bnxt/meson.build index 8529b333c..21a1df915 100644 --- a/drivers/net/bnxt/meson.build +++ b/drivers/net/bnxt/meson.build @@ -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') diff --git a/meson_options.txt b/meson_options.txt index 9bf18ab6b..24d72fb10 100644 --- 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>', -- 2.21.1 (Apple Git-122.3)