DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 1/2] net/bnxt: add meson build option
Date: Tue, 21 Jul 2020 10:47:11 -0700	[thread overview]
Message-ID: <20200721174712.48625-1-ajit.khaparde@broadcom.com> (raw)

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(-)

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)


             reply	other threads:[~2020-07-21 17:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-21 17:47 Ajit Khaparde [this message]
2020-07-21 17:47 ` [dpdk-dev] [PATCH 2/2] doc: update bnxt doc Ajit Khaparde
2020-07-21 23:09 ` [dpdk-dev] [PATCH 1/2] net/bnxt: add meson build option Ferruh Yigit
2020-07-22  0:18   ` Ajit Khaparde

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=20200721174712.48625-1-ajit.khaparde@broadcom.com \
    --to=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    /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).