From patchwork Wed Dec 20 14:21:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 135398 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B41054374A; Wed, 20 Dec 2023 15:22:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3624B410E4; Wed, 20 Dec 2023 15:22:10 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id D33A040EE4 for ; Wed, 20 Dec 2023 15:22:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703082129; x=1734618129; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=L/8iQkGJxehxmmE1+JQelzs2Elo8OI74gyaFId/sFmY=; b=h/9Fj0I8DQP17GfS2QrqGmRYjIJQrIIzR9siYHt34V3Yq1om+rh31Lqh R7Qe4AasJAoJOwJrpy8h70pb4PFeUNj+6HGDSxlWpI8I+BJSXmnXWk3FJ h3w8KycrXQQHkyX85ZFDa0bGdORTDQggM2rJbwbgF23RFJBp3dXPalZXq yTZ6sOU2/HiQ6t7qpyRIn57w6Xw//bghWtjDfDbPAD1rhoz9fadRmPcrP VL08M+h9V65/0nVGTuYh+KOHTyrbyKqiGHQGCgy03u7O5VT3AzkatC2gT 5ZQUhJnKA8Z3/Toi/WMfibjGxJPPIas/Mg5EzE+gZyuFvJWB9tu62WbrQ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10930"; a="375974396" X-IronPort-AV: E=Sophos;i="6.04,291,1695711600"; d="scan'208";a="375974396" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2023 06:22:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10930"; a="899730849" X-IronPort-AV: E=Sophos;i="6.04,291,1695711600"; d="scan'208";a="899730849" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.148]) by orsmga004.jf.intel.com with ESMTP; 20 Dec 2023 06:22:07 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: mb@smartsharesystems.com, Bruce Richardson Subject: [PATCH v3 1/3] build: track mandatory rather than optional libs Date: Wed, 20 Dec 2023 14:21:50 +0000 Message-Id: <20231220142152.492556-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231220142152.492556-1-bruce.richardson@intel.com> References: <20231103162830.593702-1-bruce.richardson@intel.com> <20231220142152.492556-1-bruce.richardson@intel.com> MIME-Version: 1.0 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 DPDK now has more optional libraries than mandatory ones, so invert the list stored in the meson.build file from the optional ones to the "always_enable" ones. As well as being a shorter list: * we can remove the loop building up the "always_enable" list dynamically from the optional list * it better aligns with the drivers/meson.build file which maintains an always_enable list. Signed-off-by: Bruce Richardson Acked-by: Morten Brørup --- lib/meson.build | 70 +++++++++++++++++-------------------------------- 1 file changed, 24 insertions(+), 46 deletions(-) diff --git a/lib/meson.build b/lib/meson.build index 6c143ce5a6..8c922d3097 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -75,52 +75,29 @@ if is_ms_compiler ] endif -optional_libs = [ - 'bbdev', - 'bitratestats', - 'bpf', - 'cfgfile', - 'compressdev', - 'cryptodev', - 'dispatcher', - 'distributor', - 'dmadev', - 'efd', - 'eventdev', - 'gpudev', - 'graph', - 'gro', - 'gso', - 'ip_frag', - 'ipsec', - 'jobstats', - 'latencystats', - 'member', - 'metrics', - 'mldev', - 'node', - 'pcapng', - 'pdcp', - 'pdump', - 'pipeline', - 'port', - 'power', - 'rawdev', - 'regexdev', - 'reorder', - 'sched', - 'security', - 'table', - 'vhost', +always_enable = [ + 'acl', + 'cmdline', + 'eal', + 'ethdev', + 'fib', + 'hash', + 'kvargs', + 'log', + 'lpm', + 'mbuf', + 'mempool', + 'meter', + 'net', + 'pci', + 'rcu', + 'rib', + 'ring', + 'stack', + 'telemetry', + 'timer', ] -always_enable = [] -foreach l:libraries - if not optional_libs.contains(l) - always_enable += l - endif -endforeach - enable_deprecated_libs = [] foreach l:run_command(list_dir_globs, get_option('enable_deprecated_libs'), check: true).stdout().split() @@ -136,9 +113,10 @@ enable_libs = run_command(list_dir_globs, get_option('enable_libs'), check: true require_libs = true if enable_libs.length() == 0 require_libs = false - enable_libs += optional_libs + enable_libs = libraries +else + enable_libs += always_enable endif -enable_libs += always_enable default_cflags = machine_args default_cflags += ['-DALLOW_EXPERIMENTAL_API'] From patchwork Wed Dec 20 14:21:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 135399 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CF63B4374A; Wed, 20 Dec 2023 15:22:18 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7E6B942DDB; Wed, 20 Dec 2023 15:22:13 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 0E804402DD for ; Wed, 20 Dec 2023 15:22:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703082132; x=1734618132; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ulWDhu3PePWZ52ieIDDobnpN0ruFY9qyL/twPACqSHw=; b=ensep+5rmXInGNnWw5S+Rayk8JlNvCoQk2hMu9WclFU86WRHwt3A+RMh 3dciKhahFUv3YwPSOd9kWuqJ3Qq9HqJw44WMhtw1uYZR7ZNf5deKdm4Gb yGBT6WunIbMr4I+n7Ra5+39V66xDXL/I7KcSfzfn4jWyri23MyNNrkCUn brLDz9rp/FAb9l1+UJFgs8Fy1L1VJixqji6zs0LLBV7pf5HxxcS/SPpAg W0mFFQN/uyLADcqJq5XXX58E8kJdM3UlFq7YX6g4t3QI0HpzzHw/XPpyF NLhWay6FJg5ltZ5GBvzSXihkJFvTzIbBBLNIfFOiEPEMbglBWvcur5OT7 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10930"; a="375974402" X-IronPort-AV: E=Sophos;i="6.04,291,1695711600"; d="scan'208";a="375974402" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2023 06:22:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10930"; a="899730860" X-IronPort-AV: E=Sophos;i="6.04,291,1695711600"; d="scan'208";a="899730860" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.148]) by orsmga004.jf.intel.com with ESMTP; 20 Dec 2023 06:22:10 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: mb@smartsharesystems.com, Bruce Richardson Subject: [PATCH v3 2/3] build: remove 5 libs from mandatory list Date: Wed, 20 Dec 2023 14:21:51 +0000 Message-Id: <20231220142152.492556-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231220142152.492556-1-bruce.richardson@intel.com> References: <20231103162830.593702-1-bruce.richardson@intel.com> <20231220142152.492556-1-bruce.richardson@intel.com> MIME-Version: 1.0 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 Remove five more libs from the mandatory build list. Only one needing any special treatment is LPM, which is an optional dependency for some secondary process autotests. Signed-off-by: Bruce Richardson Acked-by: Morten Brørup --- app/test/meson.build | 4 ++-- lib/meson.build | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/app/test/meson.build b/app/test/meson.build index dcc93f4a43..6389ae83ee 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -7,7 +7,7 @@ sources += files('commands.c', 'test.c') # optional dependencies: some files may use these - and so we should link them in - # but do not explicitly require them so they are not listed in the per-file lists below -optional_deps = ['crypto_scheduler'] +optional_deps = ['crypto_scheduler', 'lpm'] # some other utility C files, providing functions used by various tests # so we need to include these deps in the dependency list for the files using those fns. @@ -126,7 +126,7 @@ source_file_deps = { 'test_memzone.c': [], 'test_meter.c': ['meter'], 'test_metrics.c': ['metrics'], - 'test_mp_secondary.c': ['hash', 'lpm'], + 'test_mp_secondary.c': ['hash'], 'test_net_ether.c': ['net'], 'test_pcapng.c': ['ethdev', 'net', 'pcapng', 'bus_vdev'], 'test_pdcp.c': ['eventdev', 'pdcp', 'net', 'timer', 'security'], diff --git a/lib/meson.build b/lib/meson.build index 8c922d3097..72e9138d14 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -76,26 +76,21 @@ if is_ms_compiler endif always_enable = [ - 'acl', 'cmdline', 'eal', 'ethdev', - 'fib', 'hash', 'kvargs', 'log', - 'lpm', 'mbuf', 'mempool', 'meter', 'net', 'pci', 'rcu', - 'rib', 'ring', 'stack', 'telemetry', - 'timer', ] enable_deprecated_libs = [] From patchwork Wed Dec 20 14:21:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 135400 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 317934374A; Wed, 20 Dec 2023 15:22:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BC75842E6B; Wed, 20 Dec 2023 15:22:16 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 2E66242E6B for ; Wed, 20 Dec 2023 15:22:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703082135; x=1734618135; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Ci4PhxlxAU3bj39lK6pqx7OyOmfp3aLWwzz9aH0MXNs=; b=O+GtHeW19H6wXqYtwql1fMcXlOJrAiO1PS3lBDyIKt31dMi8Hy2ZH5mM Fg2h/PbRDn/yITJq4HpyN58RJOu+V5TazDAxHd4+919IafNBY6yK5g7DX 9qZOaBDQ8qEpr8cT0ayYVD+CqAerl16hvN83fV8I13+5OZWS+5Mg1pkU6 Y9oV10ZS6WT5Bt+dDCGwSzEVMZiJR38H6snSpIlNbulpUw/FnLYA2SBPg 9V5F4aBdUGs23GxoSBCuEWdZdOXnkt8QmCGU56BJn0UeVqujNvEgnAP+1 iFk7JYdnCiEPo69rcsCeA18lWeLwev02ZosMGYRhttqT7LdtabayGYqPe Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10930"; a="375974406" X-IronPort-AV: E=Sophos;i="6.04,291,1695711600"; d="scan'208";a="375974406" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2023 06:22:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10930"; a="899730864" X-IronPort-AV: E=Sophos;i="6.04,291,1695711600"; d="scan'208";a="899730864" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.148]) by orsmga004.jf.intel.com with ESMTP; 20 Dec 2023 06:22:13 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: mb@smartsharesystems.com, Bruce Richardson Subject: [PATCH v3 3/3] build: RFC - add support for optional dependencies Date: Wed, 20 Dec 2023 14:21:52 +0000 Message-Id: <20231220142152.492556-4-bruce.richardson@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231220142152.492556-1-bruce.richardson@intel.com> References: <20231103162830.593702-1-bruce.richardson@intel.com> <20231220142152.492556-1-bruce.richardson@intel.com> MIME-Version: 1.0 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 In order to remove more libraries from the mandatory list, we need to have support for optionally having a dependency from a driver or library to another driver or lib. This patch adds this support by adding a new optional_deps variable, the contents of which are added to the deps list if those optional dependencies are present in the build. Signed-off-by: Bruce Richardson --- drivers/meson.build | 7 +++++++ lib/meson.build | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/drivers/meson.build b/drivers/meson.build index 5ba534049a..af2d8da5a8 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -127,6 +127,7 @@ foreach subpath:subdirs includes = [include_directories(drv_path)] # set up internal deps. Drivers can append/override as necessary deps = std_deps + optional_deps = [] # ext_deps: Stores external library dependency got # using dependency() (preferred) or find_library(). # For the find_library() case (but not with dependency()) we also @@ -168,6 +169,12 @@ foreach subpath:subdirs # get dependency objs from strings shared_deps = ext_deps static_deps = ext_deps + foreach d:optional_deps + #if optional dep exists, add it to the deps list + if is_variable('shared_rte_' + d) + deps += d + endif + endforeach foreach d:deps if not build break diff --git a/lib/meson.build b/lib/meson.build index 72e9138d14..733412c276 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -140,6 +140,7 @@ foreach l:libraries # external package/library requirements ext_deps = [] deps = [] + optional_deps = [] # eal is standard dependency once built if dpdk_conf.has('RTE_LIB_EAL') deps += ['eal'] @@ -177,6 +178,12 @@ foreach l:libraries shared_deps = ext_deps static_deps = ext_deps + foreach d:optional_deps + #if optional dep exists, add it to the deps list + if is_variable('shared_rte_' + d) + deps += d + endif + endforeach foreach d:deps if not build break