From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 645F8A057C; Thu, 26 Mar 2020 12:03:30 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3DE5F374C; Thu, 26 Mar 2020 12:03:30 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 006422C15 for ; Thu, 26 Mar 2020 12:03:27 +0100 (CET) IronPort-SDR: 0o/Wuk2xKmLkze/2cDdt4/f02HMu7vfztHKOolSaGmSNjNnqqs6mY67FwnxKcDyAQ+KUDUJeD0 TuaYSSoRnBmQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2020 04:03:27 -0700 IronPort-SDR: ybVQvoJisu9Vg1rA+yw6CuSo/RLigW6IKCENY93Ieu4JqOl+5rGXdpz1mBtO2k+LZJExI8Mb+w DB3WlgAZbkjw== X-IronPort-AV: E=Sophos;i="5.72,308,1580803200"; d="scan'208";a="420663815" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.60.164]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 26 Mar 2020 04:03:25 -0700 Date: Thu, 26 Mar 2020 11:03:21 +0000 From: Bruce Richardson To: Darek Stojaczyk Cc: dev@dpdk.org Message-ID: <20200326110321.GA1362@bricha3-MOBL.ger.corp.intel.com> References: <20200326092259.33957-1-dariusz.stojaczyk@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200326092259.33957-1-dariusz.stojaczyk@intel.com> Subject: Re: [dpdk-dev] [PATCH] build: don't parse build configs of explicitly disabled drivers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > --- > 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 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.