From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C9B2AA04A3; Fri, 7 Jan 2022 14:42:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F05A40140; Fri, 7 Jan 2022 14:42:43 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id B3C8E40042 for ; Fri, 7 Jan 2022 14:42:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1641562962; x=1673098962; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=Mt8yjs1bRviW7InWd9Rm1bpQWzXoxQNA9qc981EKFL4=; b=oDfWwj+MntsDdrToFbkHdALeRZHidgHVGrE/TSrILDT6CL+KQgtgU+qh HNY7J5tYp2TkNSuefpv9R7NX8Ug9LzWfbcUDgXDbLbewch5dKZjBYJHFY Cfqhykm5/qdgUILp/XIT0u3oOqLawCOhHhlsvxALDOIetO1yZ3X9KojPc /gR8FduSJgiP58ZIuTH90JNXE+Ggs2TxuE+82JhX4Za17zse3eFxQYETF Ai3CUy/+v4OqlooPmcbnNGodoDomoRZ+3VWckjzqNTqARD4m0i25HMrEd mZf5oS28AeU3abAjLoWgc9QRHjcDcMIAdkagd1l5k+Ql7eNUQ7TlxMfAg A==; X-IronPort-AV: E=McAfee;i="6200,9189,10219"; a="223563560" X-IronPort-AV: E=Sophos;i="5.88,270,1635231600"; d="scan'208";a="223563560" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jan 2022 05:42:41 -0800 X-IronPort-AV: E=Sophos;i="5.88,270,1635231600"; d="scan'208";a="471311460" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.26.15]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 07 Jan 2022 05:42:40 -0800 Date: Fri, 7 Jan 2022 13:42:36 +0000 From: Bruce Richardson To: Morten =?iso-8859-1?Q?Br=F8rup?= Cc: Thomas Monjalon , dev@dpdk.org Subject: Re: [PATCH 3/3] build: support disabling drivers with meson Message-ID: References: <20190925145531.52705-1-bruce.richardson@intel.com> <20190925145531.52705-4-bruce.richardson@intel.com> <98CBD80474FA8B44BF855DF32C47DC35D86DDF@smartserver.smartshare.dk> <1807554.CQOukoFCf9@thomas> <98CBD80474FA8B44BF855DF32C47DC35D86DE1@smartserver.smartshare.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D86DE1@smartserver.smartshare.dk> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 > > > > > > 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/