From: Bruce Richardson <bruce.richardson@intel.com>
To: "Morten Brørup" <mb@smartsharesystems.com>
Cc: Thomas Monjalon <thomas@monjalon.net>, dev@dpdk.org
Subject: Re: [PATCH 3/3] build: support disabling drivers with meson
Date: Fri, 7 Jan 2022 13:42:36 +0000 [thread overview]
Message-ID: <YdhDTL/KoiVwdXme@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D86DE1@smartserver.smartshare.dk>
On Thu, Jan 06, 2022 at 11:10:27AM +0100, Morten Brørup wrote:
> > From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > Sent: Thursday, 6 January 2022 10.49
> >
> > 06/01/2022 09:23, Morten Brørup:
> > > > From: Bruce Richardson [mailto:bruce.richardson@intel.com]
> > > > Sent: Wednesday, 25 September 2019 16.56
> > > >
> > > > 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>
> > >
> > > Hi Bruce,
> > >
> > > I was trying something along the lines of:
> > >
> > > meson configure -Ddisable_drivers=net/* -Denable_drivers=net/i40e
> > >
> > > But it seems that enable_drivers does not override disable_drivers.
> > Ninja says:
> >
> > It is the opposite logic. "disable" overrides "enable":
> >
> > if not enable_drivers.contains(drv_path)
> > build = false
> > reason = 'not in enabled drivers build config'
> > elif disable_drivers.contains(drv_path)
> > if always_enable.contains(drv_path)
> > message('Driver @0@ cannot be disabled, not
> > disabling.'.format(drv_path))
> > else
> > build = false
> > reason = 'explicitly disabled via build config'
> > endif
> > endif
> >
> > In this case, you don't need to disable everything because of this:
> >
> > if enable_drivers.length() == 0
> > enable_drivers = run_command(list_dir_globs, '*/*', check:
> > true).stdout().split()
> > endif
> >
>
> Thank you, @Thomas! That solved the drivers part of my question.
>
> @Bruce:
>
> If you have too much time on your hands, and want to experiment with set theory on Meson, you could implement a "longest prefix match" for this, making the narrower selection take precedence. Just kidding! Enabling/disabling drivers as Thomas described works great.
>
> Still, a similar Meson option for selecting libraries would be nice.
>
Yes, I understand. I have a few concerns about implementing this just now
though. David previously posted a patch[1] to do what you are looking for, and
please see the discussion in that thread [2].
[1] http://inbox.dpdk.org/dev/20211110164814.5231-6-david.marchand@redhat.com/
[2] http://inbox.dpdk.org/dev/YYwCj0voYVUUYVMf@bricha3-MOBL.ger.corp.intel.com/
next prev parent reply other threads:[~2022-01-07 13:42 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 ` [dpdk-dev] [PATCH 3/3] build: support disabling drivers with meson Bruce Richardson
2022-01-06 8:23 ` 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 [this message]
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=YdhDTL/KoiVwdXme@bricha3-MOBL.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=mb@smartsharesystems.com \
--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).