From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: bluca@debian.org, thomas@monjalon.net, mb@smartsharesystems.com,
techboard@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>
Subject: [dpdk-dev] [PATCH 3/3] build: support disabling drivers with meson
Date: Wed, 25 Sep 2019 15:55:31 +0100 [thread overview]
Message-ID: <20190925145531.52705-4-bruce.richardson@intel.com> (raw)
In-Reply-To: <20190925145531.52705-1-bruce.richardson@intel.com>
Add support for a new build option to turn off certain drivers. Any other
drivers which depend on the one being disabled will also be disabled with a
suitable debug message.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/meson.build | 16 ++++++++++++----
meson_options.txt | 2 ++
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/drivers/meson.build b/drivers/meson.build
index ee5db4157..e7a696d52 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -16,6 +16,8 @@ dpdk_driver_classes = ['common',
'baseband', # depends on common and bus.
'raw'] # depends on common, bus, mempool, net and event.
+disabled_drivers = get_option('disable_drivers').split(',')
+
default_cflags = machine_args
if cc.has_argument('-Wno-format-truncation')
default_cflags += '-Wno-format-truncation'
@@ -59,17 +61,23 @@ foreach class:dpdk_driver_classes
# pull in driver directory which should assign to each of the above
subdir(drv_path)
- if build
+ if drv_path in disabled_drivers
+ build = false
+ reason = 'Explicitly disabled via build config'
+ elif build
# get dependency objs from strings
shared_deps = ext_deps
static_deps = ext_deps
foreach d:deps
if not is_variable('shared_rte_' + d)
- error('Missing internal dependency "@0@" for @1@ [@2@]'
+ build = false
+ reason = 'Missing internal dependency, "@0@"'.format(d)
+ message('Disabling @1@ [@2@]: missing internal dependency "@0@"'
.format(d, name, 'drivers/' + drv_path))
+ else
+ shared_deps += [get_variable('shared_rte_' + d)]
+ static_deps += [get_variable('static_rte_' + d)]
endif
- shared_deps += [get_variable('shared_rte_' + d)]
- static_deps += [get_variable('static_rte_' + d)]
endforeach
endif
diff --git a/meson_options.txt b/meson_options.txt
index 448f3e63d..89650b0e9 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -2,6 +2,8 @@
option('allow_invalid_socket_id', type: 'boolean', value: false,
description: 'allow out-of-range NUMA socket id\'s for platforms that don\'t report the value correctly')
+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>',
description: 'Subdirectory of libdir where to install PMDs. Defaults to using a versioned subdirectory.')
option('enable_docs', type: 'boolean', value: false,
--
2.21.0
next prev parent reply other threads:[~2019-09-25 14:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-25 14:55 [dpdk-dev] [PATCH 0/3] RFC: Support disabling DPDK drivers in meson builds Bruce Richardson
2019-09-25 14:55 ` [dpdk-dev] [PATCH 1/3] build: align variable names between drivers and libs Bruce Richardson
2019-09-25 14:55 ` [dpdk-dev] [PATCH 2/3] build: process dependencies before main build check Bruce Richardson
2019-09-25 14:55 ` Bruce Richardson [this message]
2022-01-06 8:23 ` [PATCH 3/3] build: support disabling drivers with meson Morten Brørup
2022-01-06 9:48 ` Thomas Monjalon
2022-01-06 10:10 ` Morten Brørup
2022-01-07 13:42 ` Bruce Richardson
2019-09-25 18:01 ` [dpdk-dev] [PATCH 0/3] RFC: Support disabling DPDK drivers in meson builds Luca Boccassi
2019-09-26 8:33 ` Bruce Richardson
2019-09-26 15:28 ` Morten Brørup
2019-10-23 21:24 ` Thomas Monjalon
2019-09-27 7:14 ` [dpdk-dev] [dpdk-techboard] " Maxime Coquelin
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=20190925145531.52705-4-bruce.richardson@intel.com \
--to=bruce.richardson@intel.com \
--cc=bluca@debian.org \
--cc=dev@dpdk.org \
--cc=mb@smartsharesystems.com \
--cc=techboard@dpdk.org \
--cc=thomas@monjalon.net \
/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).