DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] build: don't parse build configs of explicitly disabled drivers
Date: Thu, 26 Mar 2020 11:03:21 +0000	[thread overview]
Message-ID: <20200326110321.GA1362@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <20200326092259.33957-1-dariusz.stojaczyk@intel.com>

On Thu, Mar 26, 2020 at 10:22:59AM +0100, Darek Stojaczyk wrote:
> Even when a PMD was disabled with meson's disable_drivers option
> its config file was still being parsed. Some of the PMD configs
> attempt to find a library they depend on and parse its header files
> with certain assumptions. If the library is found, but it's simply
> too old to contain the necessary header files, the meson build
> fails and it can only be fixed by either updating that library, or
> expanding the meson script for the faulty PMD.
> 
> While the latter should be still done for the sake of DPDK quality,
> an intermediate solution would be to skip building the faulty PMD
> - there's a chance we don't need it. That's what this patch allows.
> 
> Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
> ---
>  drivers/meson.build | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/meson.build b/drivers/meson.build
> index 5502bf9924..a13c62a3b0 100644
> --- a/drivers/meson.build
> +++ b/drivers/meson.build
> @@ -60,9 +60,6 @@ foreach class:dpdk_driver_classes
>  		ext_deps = []
>  		pkgconfig_extra_libs = []
>  
> -		# pull in driver directory which should assign to each of the above
> -		subdir(drv_path)
> -
>  		# skip disabled drivers. For meson 0.49 change this to use
>  		# "in" keyword
>  		foreach disable_path: disabled_drivers
> @@ -71,6 +68,12 @@ foreach class:dpdk_driver_classes
>  				reason = 'Explicitly disabled via build config'
>  			endif
>  		endforeach
> +
> +		if build
> +			# pull in driver directory which should update all the local variables
> +			subdir(drv_path)
> +		endif
> +
>  		if build
>  			# get dependency objs from strings
>  			shared_deps = ext_deps
> -- 

Good idea to fix this. The original idea was to parse the subdir files so
that the "reason" field could report out on any missing dependencies even
if the driver was explicitly disabled. However, that choice did cause other
problems so I think skipping the parsing as you do here is the better
choice.

Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Note: if for a future release we bump our minimum meson version to 0.49 or
greater we should be able to simplify all these loops and "if build" checks
as the "break" and "continue" keywords become available, as does the "in"
keyword for checking for a value in an array.

  reply	other threads:[~2020-03-26 11:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-26  9:22 Darek Stojaczyk
2020-03-26 11:03 ` Bruce Richardson [this message]
2020-03-30 13:52 ` Bruce Richardson
2020-05-07 10:16   ` Stojaczyk, Dariusz
2020-05-07 10:13 ` [dpdk-dev] [PATCH v2] " Darek Stojaczyk
2020-05-19 14:50   ` Thomas Monjalon

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=20200326110321.GA1362@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dariusz.stojaczyk@intel.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).