From patchwork Wed Sep 4 15:08:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Burakov, Anatoly" X-Patchwork-Id: 143585 X-Patchwork-Delegate: thomas@monjalon.net 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 2750845903; Wed, 4 Sep 2024 17:08:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D18BD4275A; Wed, 4 Sep 2024 17:08:46 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by mails.dpdk.org (Postfix) with ESMTP id A175842670 for ; Wed, 4 Sep 2024 17:08:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725462525; x=1756998525; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=YIzhZVqttpyLC/oZ99Aq57/Z6OlfuAei26N47e0613o=; b=OAxdltrawCuoAociKprGZZVfHpcqFyFrzxt6kp1n7sE6fNFJV92w6Qp7 DCPygZKBQp8WekSmAuKI0jHE/72ZwVG7mFopQzuALd7G8FNvePwbpnvxZ bZnFH/I558KIL5g7NoeAzLjAB8OhdBmbx8vlRW0dBjr89TdHRxwBvLTVj /6sUzDD/6JusxYG0tGztefA6wuzXFX56QlAmqoTkRJ0a9kxlQWEYYQxNc wCMu4vh0j03QPAKd7OHbDyBrDss1SmNPf/lRSs6zbR2RyKsEBvHJfaXzs bU2qv+/NvCl8B8ocXybC6k5TUVAD4I8sI3hEJF+cZ9T+nESF+3M5BP4KN w==; X-CSE-ConnectionGUID: pgHWThjhR2SPHbcNMjMWpw== X-CSE-MsgGUID: GZLEsZX7Q8eaWNx+EEm3Bg== X-IronPort-AV: E=McAfee;i="6700,10204,11185"; a="23641070" X-IronPort-AV: E=Sophos;i="6.10,202,1719903600"; d="scan'208";a="23641070" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2024 08:08:44 -0700 X-CSE-ConnectionGUID: RlzOOXo5Q0KcgvRlo9E0Bg== X-CSE-MsgGUID: 7/8z8lFNTZWb0xTij5ySHg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,202,1719903600"; d="scan'208";a="96107835" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by fmviesa001.fm.intel.com with ESMTP; 04 Sep 2024 08:08:42 -0700 From: Anatoly Burakov To: dev@dpdk.org, Reshma Pattan , Nicolas Chautru , Brian Dooley , Aman Singh , Akhil Goyal , Fan Zhang , David Hunt , Sivaprasad Tummala Subject: [PATCH v3 1/8] build: split dependencies into mandatory and optional Date: Wed, 4 Sep 2024 16:08:29 +0100 Message-ID: <69a7b78dd7cb91892620b129ac5cf3a7f7e09e2b.1725462264.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: References: <20240730145508.551075-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 Allow specifying dependencies as either mandatory or optional. This does not change anything about the build, but it is useful for tooling to know if a dependency is required or not. Signed-off-by: Anatoly Burakov --- app/meson.build | 3 ++- app/proc-info/meson.build | 2 +- app/test-bbdev/meson.build | 8 ++++---- app/test-crypto-perf/meson.build | 2 +- app/test-pmd/meson.build | 26 +++++++++++++------------- app/test/meson.build | 12 ++++++------ drivers/meson.build | 3 ++- examples/ethtool/meson.build | 2 +- examples/l2fwd-crypto/meson.build | 2 +- examples/l3fwd/meson.build | 2 +- examples/meson.build | 3 ++- examples/vm_power_manager/meson.build | 6 +++--- lib/meson.build | 3 ++- 13 files changed, 39 insertions(+), 35 deletions(-) diff --git a/app/meson.build b/app/meson.build index 5b2c80c7a1..1c61cd862c 100644 --- a/app/meson.build +++ b/app/meson.build @@ -65,6 +65,7 @@ foreach app:apps # external package/library requirements ext_deps = [] deps = [] + optional_deps = [] if not enable_apps.contains(app) build = false @@ -84,7 +85,7 @@ foreach app:apps if build dep_objs = [] - foreach d:deps + foreach d:deps + optional_deps var_name = get_option('default_library') + '_rte_' + d if not is_variable(var_name) build = false diff --git a/app/proc-info/meson.build b/app/proc-info/meson.build index 4f83f29a64..156592119b 100644 --- a/app/proc-info/meson.build +++ b/app/proc-info/meson.build @@ -10,5 +10,5 @@ endif sources = files('main.c') deps += ['ethdev', 'security', 'eventdev'] if dpdk_conf.has('RTE_LIB_METRICS') - deps += 'metrics' + optional_deps += 'metrics' endif diff --git a/app/test-bbdev/meson.build b/app/test-bbdev/meson.build index 926e0a5271..c26e46a987 100644 --- a/app/test-bbdev/meson.build +++ b/app/test-bbdev/meson.build @@ -15,14 +15,14 @@ sources = files( ) deps += ['bbdev', 'bus_vdev'] if dpdk_conf.has('RTE_BASEBAND_FPGA_LTE_FEC') - deps += ['baseband_fpga_lte_fec'] + optional_deps += ['baseband_fpga_lte_fec'] endif if dpdk_conf.has('RTE_BASEBAND_FPGA_5GNR_FEC') - deps += ['baseband_fpga_5gnr_fec'] + optional_deps += ['baseband_fpga_5gnr_fec'] endif if dpdk_conf.has('RTE_BASEBAND_ACC') - deps += ['baseband_acc'] + optional_deps += ['baseband_acc'] endif if dpdk_conf.has('RTE_BASEBAND_LA12XX') - deps += ['baseband_la12xx'] + optional_deps += ['baseband_la12xx'] endif diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-perf/meson.build index 7b02b518f0..05c71e0a0c 100644 --- a/app/test-crypto-perf/meson.build +++ b/app/test-crypto-perf/meson.build @@ -21,5 +21,5 @@ sources = files( ) deps += ['cryptodev', 'net', 'security'] if dpdk_conf.has('RTE_CRYPTO_SCHEDULER') - deps += 'crypto_scheduler' + optional_deps += 'crypto_scheduler' endif diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build index 719f875be0..5559829e09 100644 --- a/app/test-pmd/meson.build +++ b/app/test-pmd/meson.build @@ -36,44 +36,44 @@ endif deps += ['ethdev', 'cmdline'] if dpdk_conf.has('RTE_CRYPTO_SCHEDULER') - deps += 'crypto_scheduler' + optional_deps += 'crypto_scheduler' endif if dpdk_conf.has('RTE_LIB_BITRATESTATS') - deps += 'bitratestats' + optional_deps += 'bitratestats' endif if dpdk_conf.has('RTE_LIB_BPF') sources += files('bpf_cmd.c') - deps += 'bpf' + optional_deps += 'bpf' endif if dpdk_conf.has('RTE_LIB_GRO') - deps += 'gro' + optional_deps += 'gro' endif if dpdk_conf.has('RTE_LIB_GSO') - deps += 'gso' + optional_deps += 'gso' endif if dpdk_conf.has('RTE_LIB_LATENCYSTATS') - deps += 'latencystats' + optional_deps += 'latencystats' endif if dpdk_conf.has('RTE_LIB_METRICS') - deps += 'metrics' + optional_deps += 'metrics' endif if dpdk_conf.has('RTE_LIB_PDUMP') - deps += 'pdump' + optional_deps += 'pdump' endif if dpdk_conf.has('RTE_NET_BNXT') - deps += 'net_bnxt' + optional_deps += 'net_bnxt' endif if dpdk_conf.has('RTE_NET_I40E') - deps += 'net_i40e' + optional_deps += 'net_i40e' endif if dpdk_conf.has('RTE_NET_IXGBE') - deps += 'net_ixgbe' + optional_deps += 'net_ixgbe' endif if dpdk_conf.has('RTE_NET_DPAA') - deps += ['bus_dpaa', 'mempool_dpaa', 'net_dpaa'] + optional_deps += ['bus_dpaa', 'mempool_dpaa', 'net_dpaa'] endif # Driver-specific commands are located in driver directories. includes = include_directories('.') sources += testpmd_drivers_sources -deps += testpmd_drivers_deps +optional_deps += testpmd_drivers_deps diff --git a/app/test/meson.build b/app/test/meson.build index e29258e6ec..bb0a38b3a5 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', 'lpm'] +opt_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. @@ -217,8 +217,8 @@ foreach f, f_deps : source_file_deps break else # technically we might not need this dep, but adding it is harmless - if d not in deps - deps += d + if d not in optional_deps + optional_deps += d endif endif endforeach @@ -239,9 +239,9 @@ foreach f, f_deps : source_file_deps endif endforeach # add the optional dependencies -foreach d:optional_deps - if is_variable(def_lib + '_rte_' + d) and d not in deps - deps += d +foreach d:opt_deps + if is_variable(def_lib + '_rte_' + d) and d not in optional_deps + optional_deps += d endif endforeach diff --git a/drivers/meson.build b/drivers/meson.build index 66931d4241..b9a18a5986 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -128,6 +128,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 @@ -169,7 +170,7 @@ foreach subpath:subdirs # get dependency objs from strings shared_deps = ext_deps static_deps = ext_deps - foreach d:deps + foreach d:deps + optional_deps if not build break endif diff --git a/examples/ethtool/meson.build b/examples/ethtool/meson.build index d7f63d48af..e8638a8607 100644 --- a/examples/ethtool/meson.build +++ b/examples/ethtool/meson.build @@ -20,7 +20,7 @@ includes = include_directories('lib', 'ethtool-app') deps += 'bus_pci' if dpdk_conf.has('RTE_NET_IXGBE') - deps += 'net_ixgbe' + optional_deps += 'net_ixgbe' endif allow_experimental_apis = true diff --git a/examples/l2fwd-crypto/meson.build b/examples/l2fwd-crypto/meson.build index bb44c88882..f16ebadc74 100644 --- a/examples/l2fwd-crypto/meson.build +++ b/examples/l2fwd-crypto/meson.build @@ -8,7 +8,7 @@ deps += 'cryptodev' if dpdk_conf.has('RTE_CRYPTO_SCHEDULER') - deps += 'crypto_scheduler' + optional_deps += 'crypto_scheduler' endif allow_experimental_apis = true sources = files( diff --git a/examples/l3fwd/meson.build b/examples/l3fwd/meson.build index c25de77bba..5938452607 100644 --- a/examples/l3fwd/meson.build +++ b/examples/l3fwd/meson.build @@ -19,5 +19,5 @@ sources = files( 'main.c', ) if dpdk_conf.has('RTE_LIB_EVENTDEV') - deps += 'eventdev' + optional_deps += 'eventdev' endif diff --git a/examples/meson.build b/examples/meson.build index 8e8968a1fa..82151d09b4 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -98,11 +98,12 @@ foreach example: examples ext_deps = [] includes = [include_directories(example, 'common')] deps = ['eal', 'mempool', 'net', 'mbuf', 'ethdev', 'cmdline'] + optional_deps = [] subdir(example) if build dep_objs = ext_deps - foreach d:deps + foreach d:deps + optional_deps var_name = get_option('default_library') + '_rte_' + d if not is_variable(var_name) build = false diff --git a/examples/vm_power_manager/meson.build b/examples/vm_power_manager/meson.build index b866d8fd54..25e5bcb71b 100644 --- a/examples/vm_power_manager/meson.build +++ b/examples/vm_power_manager/meson.build @@ -9,15 +9,15 @@ deps += ['power'] if dpdk_conf.has('RTE_NET_BNXT') - deps += ['net_bnxt'] + optional_deps += ['net_bnxt'] endif if dpdk_conf.has('RTE_NET_I40E') - deps += ['net_i40e'] + optional_deps += ['net_i40e'] endif if dpdk_conf.has('RTE_NET_IXGBE') - deps += ['net_ixgbe'] + optional_deps += ['net_ixgbe'] endif allow_experimental_apis = true diff --git a/lib/meson.build b/lib/meson.build index 162287753f..7916deadd9 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -134,6 +134,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'] @@ -171,7 +172,7 @@ foreach l:libraries shared_deps = ext_deps static_deps = ext_deps - foreach d:deps + foreach d:deps + optional_deps if not build break endif From patchwork Wed Sep 4 15:08:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Burakov, Anatoly" X-Patchwork-Id: 143586 X-Patchwork-Delegate: thomas@monjalon.net 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 8DE7245903; Wed, 4 Sep 2024 17:08:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6F6D1410ED; Wed, 4 Sep 2024 17:08:48 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by mails.dpdk.org (Postfix) with ESMTP id F0C0242670 for ; Wed, 4 Sep 2024 17:08:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725462526; x=1756998526; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=I4kKLSj2hwZHDw/zd/supgP64bEPshcsjWyLCJ2K/xw=; b=XI1s3+PYlwGwxPswy2YthNb6+DIA0zDqLPirZpP3zd2ZI3GVh2B7Ef9s Q2//8efzaWBqCWK2bpp64DO6BxGQVmts2+ftfFReuwHjdQ7E9pnZ7LiJA ZsiZzXpU5IWi87ztMEGvr4WzJ9MzFIElsq6Yb1dUGhCepc5k2E5mmBo/W 04D/u29hMNS9GqWAcV9im9BUjHUP1f45bA2uaa8SX4PS0I+00+UsOpUbf oAG9xO6rC/NHGitM3ajt0VWccJFqzy2b3q44v1YcAcUskGnGDrQYWl8C7 ndk9UcbGC+4cmY/9iXJFsX05DP1M4yuDuY1IIq4ZdFkH+kq95FXgoSEQu A==; X-CSE-ConnectionGUID: dkSTh1opTP6mXRTkgNkVfw== X-CSE-MsgGUID: 4orllQuOSUO9Ar4hkTSfwg== X-IronPort-AV: E=McAfee;i="6700,10204,11185"; a="23641078" X-IronPort-AV: E=Sophos;i="6.10,202,1719903600"; d="scan'208";a="23641078" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2024 08:08:46 -0700 X-CSE-ConnectionGUID: nCKArReVSCyIAwUX4IxvGA== X-CSE-MsgGUID: CTd+y0CtRDWVqj7qTzE/uA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,202,1719903600"; d="scan'208";a="96107838" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by fmviesa001.fm.intel.com with ESMTP; 04 Sep 2024 08:08:44 -0700 From: Anatoly Burakov To: dev@dpdk.org Subject: [PATCH v3 2/8] build: output a dependency log in build directory Date: Wed, 4 Sep 2024 16:08:30 +0100 Message-ID: <44ec47b5f303229389a5717ec13d4c95ccb15d66.1725462264.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: References: <20240730145508.551075-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 From: Bruce Richardson As meson processes our DPDK source tree it manages dependencies specified by each individual driver. To enable future analysis of the dependency links between components, log the dependencies of each DPDK component as it gets processed. This could potentially allow other tools to automatically enable or disable components based on the desired end components to be built, e.g. if the user requests net/ice, ensure that common/iavf is also enabled in the drivers. The output file produced is in "dot" or "graphviz" format, which allows producing a graphical representation of the DPDK dependency tree if so desired. For example: "dot -Tpng -O build/deps.dot" to produce the image file "build/deps.dot.png". Signed-off-by: Bruce Richardson Acked-by: Konstantin Ananyev Signed-off-by: Anatoly Burakov --- app/meson.build | 8 ++++- buildtools/log-deps.py | 81 ++++++++++++++++++++++++++++++++++++++++++ buildtools/meson.build | 2 ++ drivers/meson.build | 6 ++++ examples/meson.build | 8 ++++- lib/meson.build | 5 +++ 6 files changed, 108 insertions(+), 2 deletions(-) create mode 100644 buildtools/log-deps.py diff --git a/app/meson.build b/app/meson.build index 1c61cd862c..55a1f076cd 100644 --- a/app/meson.build +++ b/app/meson.build @@ -75,8 +75,14 @@ foreach app:apps reason = 'explicitly disabled via build config' endif + app_name = 'dpdk-' + name if build subdir(name) + type_cmd = '--type=app' + run_command([log_deps_cmd, type_cmd, app_name, deps], check: false) + if optional_deps.length() > 0 + run_command([log_deps_cmd, '--optional', type_cmd, app_name, optional_deps], check: false) + endif if not build and require_apps error('Cannot build explicitly requested app "@0@".\n'.format(name) + '\tReason: ' + reason) @@ -115,7 +121,7 @@ foreach app:apps link_libs = dpdk_static_libraries + dpdk_drivers endif - exec = executable('dpdk-' + name, + exec = executable(app_name, sources, c_args: cflags, link_args: ldflags, diff --git a/buildtools/log-deps.py b/buildtools/log-deps.py new file mode 100644 index 0000000000..e11a102242 --- /dev/null +++ b/buildtools/log-deps.py @@ -0,0 +1,81 @@ +#! /usr/bin/env python3 +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2024 Intel Corporation + +"""Utility script to build up a list of dependencies from meson.""" + +import os +import sys +import argparse +import typing as T + + +def file_to_list(filename: str) -> T.List[str]: + """Read file into a list of strings.""" + with open(filename, encoding="utf-8") as f: + return f.readlines() + + +def list_to_file(filename: str, lines: T.List[str]): + """Write a list of strings out to a file.""" + with open(filename, "w", encoding="utf-8") as f: + f.writelines(lines) + + +def gen_deps( + component_type: str, optional: bool, component: str, deps: T.List[str] +) -> str: + """Generate a dependency graph for meson.""" + dep_list_str = '", "'.join(deps) + deps_str = "" if not deps else f' -> {{ "{dep_list_str}" }}' + # we define custom attributes for the nodes + attr_str = f'dpdk_componentType="{component_type}"' + if optional: + # we use a dotted line to represent optional dependencies + attr_str += ',style="dotted"' + return f'"{component}"{deps_str} [{attr_str}]\n' + + +def _main(): + depsfile = f'{os.environ["MESON_BUILD_ROOT"]}/deps.dot' + + # to reset the deps file on each build, the script is called without any params + if len(sys.argv) == 1: + os.remove(depsfile) + sys.exit(0) + + # we got arguments, parse them + parser = argparse.ArgumentParser( + description="Generate a dependency graph for meson." + ) + # type is required + parser.add_argument( + "--type", required=True, help="Type of dependency (lib, examples, etc.)" + ) + parser.add_argument( + "--optional", action="store_true", help="Whether the dependency is optional" + ) + # component is required + parser.add_argument("component", help="The component to add to the graph") + parser.add_argument("deps", nargs="*", help="The dependencies of the component") + + parsed = parser.parse_args() + + try: + contents = file_to_list(depsfile) + except FileNotFoundError: + contents = ["digraph {\n", "}\n"] + + c_type = parsed.type + optional = parsed.optional + component = parsed.component + deps = parsed.deps + contents[-1] = gen_deps(c_type, optional, component, deps) + + contents.append("}\n") + + list_to_file(depsfile, contents) + + +if __name__ == "__main__": + _main() diff --git a/buildtools/meson.build b/buildtools/meson.build index 3adf34e1a8..e2ba9d0ad4 100644 --- a/buildtools/meson.build +++ b/buildtools/meson.build @@ -24,6 +24,8 @@ get_numa_count_cmd = py3 + files('get-numa-count.py') get_test_suites_cmd = py3 + files('get-test-suites.py') has_hugepages_cmd = py3 + files('has-hugepages.py') cmdline_gen_cmd = py3 + files('dpdk-cmdline-gen.py') +log_deps_cmd = py3 + files('log-deps.py') +run_command(log_deps_cmd, check: false) # call with no parameters to reset the file # install any build tools that end-users might want also install_data([ diff --git a/drivers/meson.build b/drivers/meson.build index b9a18a5986..32c9e3f88a 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -155,6 +155,12 @@ foreach subpath:subdirs if build # pull in driver directory which should update all the local variables subdir(drv_path) + type_cmd = '--type=drivers' + drv_name = class + '_' + name + run_command([log_deps_cmd, type_cmd, drv_name, deps], check: false) + if optional_deps.length() > 0 + run_command([log_deps_cmd, '--optional', type_cmd, drv_name, optional_deps], check: false) + endif if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0 and require_iova_in_mbuf build = false diff --git a/examples/meson.build b/examples/meson.build index 82151d09b4..1589a3057e 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -101,8 +101,14 @@ foreach example: examples optional_deps = [] subdir(example) + example_name = 'dpdk-' + name if build dep_objs = ext_deps + type_cmd = '--type=examples' + run_command([log_deps_cmd, type_cmd, example_name, deps], check: false) + if optional_deps.length() > 0 + run_command([log_deps_cmd, '--optional', type_cmd, example_name, optional_deps], check: false) + endif foreach d:deps + optional_deps var_name = get_option('default_library') + '_rte_' + d if not is_variable(var_name) @@ -125,7 +131,7 @@ foreach example: examples if allow_experimental_apis cflags += '-DALLOW_EXPERIMENTAL_API' endif - executable('dpdk-' + name, sources, + executable(example_name, sources, include_directories: includes, link_whole: link_whole_libs, link_args: ldflags, diff --git a/lib/meson.build b/lib/meson.build index 7916deadd9..f2ac800f5a 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -161,6 +161,11 @@ foreach l:libraries if build subdir(l) + type_cmd = '--type=lib' + run_command([log_deps_cmd, type_cmd, l, deps], check: false) + if optional_deps.length() > 0 + run_command([log_deps_cmd, '--optional', type_cmd, l, optional_deps], check: false) + endif if not build and require_libs error('Cannot build explicitly requested lib "@0@".\n'.format(name) +'\tReason: ' + reason) From patchwork Wed Sep 4 15:08:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Burakov, Anatoly" X-Patchwork-Id: 143587 X-Patchwork-Delegate: thomas@monjalon.net 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 B25B745903; Wed, 4 Sep 2024 17:09:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AD4FF4278C; Wed, 4 Sep 2024 17:08:49 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by mails.dpdk.org (Postfix) with ESMTP id C2C5C42759 for ; Wed, 4 Sep 2024 17:08:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725462527; x=1756998527; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=jZuzEVD67ftBHLFhkb4gHgEVAnctIIAy7gwzZz7EWys=; b=Bn30wc8qNVEd+Cuuqy+lPSrNcaVdFzs3YimD5edYJUTDSwb0XXHR9x11 8unmizMDz2R2DJG6YFEFTtquyU5nwYcpMzEDYf3HDDWgNo8XqKVNPtrwr IvwWDMeQofzkOPfH5TAZzR0MQnegcptesmfsycUL1jnMT+mwkdzMMyQ+K w8vktgNCO7xl5dZrxok2VzIkKypoU2vhJpTHbmPuZ1FboT6Ic4+sF8CPO DCehq4i8I2t96cXzplPgmRXepi8XznqTAHZVi/BvI7Mjd/mVuTWRNOXTF 10rcJ+n+DV4/MK6yiSEpriNFKNfShlWKWT8160wS6XX+1fHNR5/Y1beyY w==; X-CSE-ConnectionGUID: qmpDocHRQdKndo6q9s7j9Q== X-CSE-MsgGUID: OPw+u4N9RySfV5Pi3Rx95g== X-IronPort-AV: E=McAfee;i="6700,10204,11185"; a="23641082" X-IronPort-AV: E=Sophos;i="6.10,202,1719903600"; d="scan'208";a="23641082" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2024 08:08:47 -0700 X-CSE-ConnectionGUID: yZUfpk3eQQq/DWP2emqKDg== X-CSE-MsgGUID: cvK5ZhCAQmechANoqkMJWw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,202,1719903600"; d="scan'208";a="96107845" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by fmviesa001.fm.intel.com with ESMTP; 04 Sep 2024 08:08:46 -0700 From: Anatoly Burakov To: dev@dpdk.org Subject: [PATCH v3 3/8] devtools: add script to flag unneeded dependencies Date: Wed, 4 Sep 2024 16:08:31 +0100 Message-ID: <6da0eb59d1967f42b612bbbaa74c6ddc3cbf7b7d.1725462264.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: References: <20240730145508.551075-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 From: Bruce Richardson While not a serious problem, DPDK components often list more dependencies than are actually necessary to build, due to the use of recursive dependencies. In extreme cases, such as with core libraries, this can lead to longer configuration times due to meson having to deduplicate long lists of dependencies. Therefore we can add a script to identify when a component has got unnecessary dependencies listed. Signed-off-by: Bruce Richardson --- devtools/find-duplicate-deps.py | 53 +++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100755 devtools/find-duplicate-deps.py diff --git a/devtools/find-duplicate-deps.py b/devtools/find-duplicate-deps.py new file mode 100755 index 0000000000..b1eacf21ce --- /dev/null +++ b/devtools/find-duplicate-deps.py @@ -0,0 +1,53 @@ +#! /usr/bin/env python3 +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2024 Intel Corporation + +"""Identify any superfluous dependencies listed in DPDK deps graph.""" + +import sys + +all_deps = {} + + +class dep: + """Holds a component and its dependencies.""" + + def __init__(self, name, dep_names): + """Create and process a component and its deps.""" + self.name = name.strip('" ') + self.base_deps = [all_deps[dn.strip('" ')] for dn in dep_names] + self.recursive_deps = [] + for d in self.base_deps: + self.recursive_deps.extend(d.base_deps) + self.recursive_deps.extend(d.recursive_deps) + self.extra_deps = [] + for d in self.base_deps: + if d in self.recursive_deps: + self.extra_deps.append(d.name) + if self.extra_deps: + print(f'{self.name}: extra deps {self.extra_deps}') + + def dict_add(self, d): + """Add this object to a dictionary by name.""" + d[self.name] = self + + +def main(argv): + """Read the dependency tree from a dot file and process it.""" + if len(argv) != 2: + print(f'Usage: {argv[0]} /deps.dot', file=sys.stderr) + sys.exit(1) + + with open(argv[1]) as f: + for ln in f.readlines(): + ln = ln.strip() + if '->' in ln: + name, deps = ln.split('->') + deps = deps.strip(' {}') + dep(name, deps.split(',')).dict_add(all_deps) + elif ln.startswith('"') and ln.endswith('"'): + dep(ln.strip('"'), []).dict_add(all_deps) + + +if __name__ == '__main__': + main(sys.argv) From patchwork Wed Sep 4 15:08:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Burakov, Anatoly" X-Patchwork-Id: 143588 X-Patchwork-Delegate: thomas@monjalon.net 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 D9D9645903; Wed, 4 Sep 2024 17:09:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8C15C4279A; Wed, 4 Sep 2024 17:08:51 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by mails.dpdk.org (Postfix) with ESMTP id A2BD842789 for ; Wed, 4 Sep 2024 17:08:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725462529; x=1756998529; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=zIT7UDQ88A2/1umB8XGaCO2+sY3bUyhKdje8FYr/WTE=; b=mH61cvjzv8lxnMMPFAgXGO+HITqC1c+5GvQkYjIRqEaQLavqot7TNnDE vidrxRC2SWoS8eiOH104rYO+Ikh9qk2SD6o5703ZKjmbMEjJB/MqgAS03 l35oJ1wg/ViDCJ+OQD4y1ReTXcL1EOGV+CNdnodoBZMAEFS2d5s6FD7o9 hWLU64fZPkKUa9QdWzME1evWSbXj5ukidtU4F0b0br7AwbwrilzuSuILz blODmNIpThmKytRNgDy+5wFsmiQAgwVFQ+zVoZA0yPHq2r50K5Y8eKGJV WmstpEcEkt5u99r5zI3SyO0DlirJBQFtNjJWkWgrqdyUlKkv/4fvA2/b+ A==; X-CSE-ConnectionGUID: FCOHVPyFQC+lwODHMoBi2Q== X-CSE-MsgGUID: +MzK/8K1SHyCob11neTitw== X-IronPort-AV: E=McAfee;i="6700,10204,11185"; a="23641086" X-IronPort-AV: E=Sophos;i="6.10,202,1719903600"; d="scan'208";a="23641086" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2024 08:08:48 -0700 X-CSE-ConnectionGUID: PbOlSSB3T3SVDYQqBmW+YA== X-CSE-MsgGUID: mpxRYaF4Req68SZGPUNSqA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,202,1719903600"; d="scan'208";a="96107849" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by fmviesa001.fm.intel.com with ESMTP; 04 Sep 2024 08:08:47 -0700 From: Anatoly Burakov To: dev@dpdk.org Subject: [PATCH v3 4/8] build: remove kvargs from driver class dependencies Date: Wed, 4 Sep 2024 16:08:32 +0100 Message-ID: X-Mailer: git-send-email 2.43.5 In-Reply-To: References: <20240730145508.551075-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 From: Bruce Richardson The kvargs library is used by EAL, and therefore is implicitly a dependency of every DPDK driver. Remove it from the minimum set of dependencies for each driver class as it's unnecessary to call it out there. Signed-off-by: Bruce Richardson --- drivers/event/meson.build | 2 +- drivers/net/meson.build | 2 +- drivers/regex/meson.build | 2 +- drivers/vdpa/meson.build | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/event/meson.build b/drivers/event/meson.build index d6706b57f7..2708833adf 100644 --- a/drivers/event/meson.build +++ b/drivers/event/meson.build @@ -19,4 +19,4 @@ if not (toolchain == 'gcc' and cc.version().version_compare('<4.8.6') and dpdk_conf.has('RTE_ARCH_ARM64')) drivers += 'octeontx' endif -std_deps = ['eventdev', 'kvargs'] +std_deps = ['eventdev'] diff --git a/drivers/net/meson.build b/drivers/net/meson.build index fb6d34b782..ebd12364df 100644 --- a/drivers/net/meson.build +++ b/drivers/net/meson.build @@ -63,6 +63,6 @@ drivers = [ 'virtio', 'vmxnet3', ] -std_deps = ['ethdev', 'kvargs'] # 'ethdev' also pulls in mbuf, net, eal etc +std_deps = ['ethdev'] # 'ethdev' also pulls in mbuf, net, eal etc std_deps += ['bus_pci'] # very many PMDs depend on PCI, so make std std_deps += ['bus_vdev'] # same with vdev bus diff --git a/drivers/regex/meson.build b/drivers/regex/meson.build index ff2a8fea89..10192e7c77 100644 --- a/drivers/regex/meson.build +++ b/drivers/regex/meson.build @@ -5,4 +5,4 @@ drivers = [ 'mlx5', 'cn9k', ] -std_deps = ['ethdev', 'kvargs', 'regexdev'] # 'ethdev' also pulls in mbuf, net, eal etc +std_deps = ['ethdev', 'regexdev'] # 'ethdev' also pulls in mbuf, net, eal etc diff --git a/drivers/vdpa/meson.build b/drivers/vdpa/meson.build index 896e8e0304..e01c277b9e 100644 --- a/drivers/vdpa/meson.build +++ b/drivers/vdpa/meson.build @@ -11,5 +11,5 @@ drivers = [ 'nfp', 'sfc', ] -std_deps = ['bus_pci', 'kvargs'] +std_deps = ['bus_pci'] std_deps += ['vhost'] From patchwork Wed Sep 4 15:08:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Burakov, Anatoly" X-Patchwork-Id: 143589 X-Patchwork-Delegate: thomas@monjalon.net 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 29F4045903; Wed, 4 Sep 2024 17:09:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CB9A64279E; Wed, 4 Sep 2024 17:09:15 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by mails.dpdk.org (Postfix) with ESMTP id ED23342793 for ; Wed, 4 Sep 2024 17:09:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725462554; x=1756998554; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=WdS3Sy03OubawBALJzHHYATtLCaVOix8DwBarMbWhQA=; b=BCvHy27TjtujDfkp6EeeP7Cs+HpdFZSxY05dAF6b7cPioktgmwpA5mel 8dJioIBYt9l0FnjOEI1s/yeEoBQeX7IscMvwxj0lsHtXLAsnJB8kR5Onb pXu8OBfEWAve4gA9gqoRleysC3AVg94xePTfEkxh+QOJ1KkXXAJ20eQbp Ff6zEm9ytrcghl7871f2K/azaSkApwGPjIaBn9i8i6J6VxBO9aoUtr0bl dnle9h+sBXI+QzDDyPt1JYBke+QGfXrbLh4ISKFZXzJmXCObuofhFBWeu vO13ncO2luLHQL8RAiMuME+PI7bcffr+zuFEadLMmVQfO/lG009UUWrYy Q==; X-CSE-ConnectionGUID: q2ohrGOwQtefsaWd2wEWag== X-CSE-MsgGUID: W25j8S5YSxqxLO6/rLhQlQ== X-IronPort-AV: E=McAfee;i="6700,10204,11185"; a="23641135" X-IronPort-AV: E=Sophos;i="6.10,202,1719903600"; d="scan'208";a="23641135" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2024 08:08:56 -0700 X-CSE-ConnectionGUID: Ni+TcQBqQn+xURZDbqQ82w== X-CSE-MsgGUID: I3E4LWfETDSlEUiPWvS4uA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,202,1719903600"; d="scan'208";a="96107911" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by fmviesa001.fm.intel.com with ESMTP; 04 Sep 2024 08:08:48 -0700 From: Anatoly Burakov To: dev@dpdk.org, Chengwen Feng , Nicolas Chautru , Konstantin Ananyev , Fan Zhang , Ashish Gupta , Akhil Goyal , =?utf-8?q?Mattias_R=C3=B6nnblom?= , David Hunt , Kevin Laatz , Bruce Richardson , Byron Marohn , Yipeng Wang , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Jerin Jacob , Vladimir Medvedkin , Elena Agostini , Kiran Kumar K , Nithin Dabilpuram , Zhirun Yan , Jiayu Hu , Sameh Gobriel , Reshma Pattan , =?utf-8?q?Morten_Br=C3=B8rup?= , Srikanth Yalavarthi , Pavan Nikhilesh , Stephen Hemminger , Anoob Joseph , Volodymyr Fialko , Cristian Dumitrescu , Sivaprasad Tummala , Sachin Saxena , Hemant Agrawal , Honnappa Nagarahalli , Ori Kam , Maxime Coquelin , Chenbo Xia Subject: [PATCH v3 5/8] build: reduce library dependencies Date: Wed, 4 Sep 2024 16:08:33 +0100 Message-ID: X-Mailer: git-send-email 2.43.5 In-Reply-To: References: <20240730145508.551075-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 From: Bruce Richardson Rather than having each library depend up on EAL + any extra libs, we can take advantage of recursive dependency support in meson and just assign the dependencies of each directory directly, rather than appending to the array. For libraries which only depend upon EAL, keep that as a default, but for libraries which depend upon even a single extra lib, that EAL dependency is unnecessary. Going further, we can identify using the find_duplicate_deps.py script any unnecessary deps in each library's list, and remove them to slim the dependency tree down. Reducing number of dependencies means that meson takes less time processing and deduplicating the dependency tree for each component, and also shrinks the dependency graph for DPDK itself. Signed-off-by: Bruce Richardson --- lib/argparse/meson.build | 2 +- lib/bbdev/meson.build | 2 +- lib/bitratestats/meson.build | 2 +- lib/bpf/meson.build | 2 +- lib/cmdline/meson.build | 2 +- lib/compressdev/meson.build | 2 +- lib/cryptodev/meson.build | 2 +- lib/dispatcher/meson.build | 2 +- lib/distributor/meson.build | 2 +- lib/dmadev/meson.build | 2 -- lib/eal/meson.build | 5 +---- lib/efd/meson.build | 2 +- lib/ethdev/meson.build | 2 +- lib/eventdev/meson.build | 3 +-- lib/fib/meson.build | 2 +- lib/gpudev/meson.build | 2 +- lib/graph/meson.build | 2 +- lib/gro/meson.build | 2 +- lib/gso/meson.build | 2 +- lib/hash/meson.build | 4 +--- lib/ip_frag/meson.build | 2 +- lib/ipsec/meson.build | 2 +- lib/kvargs/meson.build | 2 +- lib/latencystats/meson.build | 2 +- lib/lpm/meson.build | 3 +-- lib/mbuf/meson.build | 2 +- lib/member/meson.build | 2 +- lib/mempool/meson.build | 2 +- lib/metrics/meson.build | 2 +- lib/mldev/meson.build | 2 +- lib/net/meson.build | 2 +- lib/node/meson.build | 2 +- lib/pcapng/meson.build | 2 +- lib/pdcp/meson.build | 2 +- lib/pdump/meson.build | 2 +- lib/pipeline/meson.build | 2 +- lib/port/meson.build | 2 +- lib/power/meson.build | 2 +- lib/rawdev/meson.build | 2 -- lib/rcu/meson.build | 2 +- lib/regexdev/meson.build | 2 +- lib/reorder/meson.build | 2 +- lib/rib/meson.build | 2 +- lib/ring/meson.build | 1 - lib/sched/meson.build | 2 +- lib/security/meson.build | 2 +- lib/table/meson.build | 2 +- lib/telemetry/meson.build | 2 +- lib/vhost/meson.build | 2 +- 49 files changed, 46 insertions(+), 58 deletions(-) diff --git a/lib/argparse/meson.build b/lib/argparse/meson.build index 8ab4c408ee..5d602c1f2a 100644 --- a/lib/argparse/meson.build +++ b/lib/argparse/meson.build @@ -10,4 +10,4 @@ endif sources = files('rte_argparse.c') headers = files('rte_argparse.h') -deps += ['log'] +deps = ['log'] diff --git a/lib/bbdev/meson.build b/lib/bbdev/meson.build index 07685e7578..2e68aa7873 100644 --- a/lib/bbdev/meson.build +++ b/lib/bbdev/meson.build @@ -11,4 +11,4 @@ sources = files('rte_bbdev.c') headers = files('rte_bbdev.h', 'rte_bbdev_pmd.h', 'rte_bbdev_op.h') -deps += ['mbuf'] +deps = ['mbuf'] diff --git a/lib/bitratestats/meson.build b/lib/bitratestats/meson.build index ede7e0a579..8defcd53bf 100644 --- a/lib/bitratestats/meson.build +++ b/lib/bitratestats/meson.build @@ -3,4 +3,4 @@ sources = files('rte_bitrate.c') headers = files('rte_bitrate.h') -deps += ['ethdev', 'metrics'] +deps = ['metrics'] diff --git a/lib/bpf/meson.build b/lib/bpf/meson.build index aa258a9061..82127bc657 100644 --- a/lib/bpf/meson.build +++ b/lib/bpf/meson.build @@ -31,7 +31,7 @@ headers = files('bpf_def.h', 'rte_bpf.h', 'rte_bpf_ethdev.h') -deps += ['mbuf', 'net', 'ethdev'] +deps = ['ethdev'] dep = dependency('libelf', required: false, method: 'pkg-config') if dep.found() diff --git a/lib/cmdline/meson.build b/lib/cmdline/meson.build index 63fb69100d..4451f3da29 100644 --- a/lib/cmdline/meson.build +++ b/lib/cmdline/meson.build @@ -31,4 +31,4 @@ else sources += files('cmdline_os_unix.c') endif -deps += ['net'] +deps = ['net'] diff --git a/lib/compressdev/meson.build b/lib/compressdev/meson.build index c80295dc0d..4b86955baf 100644 --- a/lib/compressdev/meson.build +++ b/lib/compressdev/meson.build @@ -16,4 +16,4 @@ driver_sdk_headers = files( 'rte_compressdev_pmd.h', 'rte_compressdev_internal.h', ) -deps += ['kvargs', 'mbuf'] +deps = ['mbuf'] diff --git a/lib/cryptodev/meson.build b/lib/cryptodev/meson.build index 4734acf321..74e42ac700 100644 --- a/lib/cryptodev/meson.build +++ b/lib/cryptodev/meson.build @@ -20,4 +20,4 @@ driver_sdk_headers += files( 'cryptodev_pmd.h', ) -deps += ['kvargs', 'mbuf', 'rcu', 'telemetry'] +deps = ['mbuf', 'rcu'] diff --git a/lib/dispatcher/meson.build b/lib/dispatcher/meson.build index ffaef26a6d..4dc1759951 100644 --- a/lib/dispatcher/meson.build +++ b/lib/dispatcher/meson.build @@ -10,4 +10,4 @@ endif sources = files('rte_dispatcher.c') headers = files('rte_dispatcher.h') -deps += ['eventdev'] +deps = ['eventdev'] diff --git a/lib/distributor/meson.build b/lib/distributor/meson.build index 24988c5827..ba43273bc3 100644 --- a/lib/distributor/meson.build +++ b/lib/distributor/meson.build @@ -14,4 +14,4 @@ else sources += files('rte_distributor_match_generic.c') endif headers = files('rte_distributor.h') -deps += ['mbuf'] +deps = ['mbuf'] diff --git a/lib/dmadev/meson.build b/lib/dmadev/meson.build index e66dcb66b0..70b375f1cb 100644 --- a/lib/dmadev/meson.build +++ b/lib/dmadev/meson.build @@ -11,5 +11,3 @@ sources = files('rte_dmadev.c', 'rte_dmadev_trace_points.c') headers = files('rte_dmadev.h') indirect_headers += files('rte_dmadev_core.h', 'rte_dmadev_trace_fp.h') driver_sdk_headers += files('rte_dmadev_pmd.h') - -deps += ['telemetry'] diff --git a/lib/eal/meson.build b/lib/eal/meson.build index e1d6c4cf17..d25443d097 100644 --- a/lib/eal/meson.build +++ b/lib/eal/meson.build @@ -14,10 +14,7 @@ subdir(exec_env) subdir(arch_subdir) -deps += ['log', 'kvargs'] -if not is_windows - deps += ['telemetry'] -endif +deps = ['kvargs', 'telemetry'] if dpdk_conf.has('RTE_USE_LIBBSD') ext_deps += libbsd endif diff --git a/lib/efd/meson.build b/lib/efd/meson.build index 343f14e1f3..da0ee7f803 100644 --- a/lib/efd/meson.build +++ b/lib/efd/meson.build @@ -9,4 +9,4 @@ endif sources = files('rte_efd.c') headers = files('rte_efd.h') -deps += ['ring', 'hash'] +deps = ['hash'] diff --git a/lib/ethdev/meson.build b/lib/ethdev/meson.build index f1d2586591..fc53a9c309 100644 --- a/lib/ethdev/meson.build +++ b/lib/ethdev/meson.build @@ -53,7 +53,7 @@ if is_linux ) endif -deps += ['net', 'kvargs', 'meter', 'telemetry'] +deps = ['net', 'meter'] if is_freebsd annotate_locks = false diff --git a/lib/eventdev/meson.build b/lib/eventdev/meson.build index a04bb86f0f..237df998ce 100644 --- a/lib/eventdev/meson.build +++ b/lib/eventdev/meson.build @@ -38,5 +38,4 @@ driver_sdk_headers += files( 'event_timer_adapter_pmd.h', ) -deps += ['ring', 'ethdev', 'hash', 'mempool', 'mbuf', 'timer', 'cryptodev', 'dmadev'] -deps += ['telemetry'] +deps = ['ethdev', 'hash', 'timer', 'cryptodev', 'dmadev'] diff --git a/lib/fib/meson.build b/lib/fib/meson.build index 6795f41a0a..9ba8e50fe0 100644 --- a/lib/fib/meson.build +++ b/lib/fib/meson.build @@ -10,7 +10,7 @@ endif sources = files('rte_fib.c', 'rte_fib6.c', 'dir24_8.c', 'trie.c') headers = files('rte_fib.h', 'rte_fib6.h') -deps += ['rib'] +deps = ['rib'] # compile AVX512 version if: # we are building 64-bit binary AND binutils can generate proper code diff --git a/lib/gpudev/meson.build b/lib/gpudev/meson.build index d21fadc052..5d883b85a1 100644 --- a/lib/gpudev/meson.build +++ b/lib/gpudev/meson.build @@ -13,4 +13,4 @@ sources = files( 'gpudev.c', ) -deps += ['mbuf'] +deps = ['mbuf'] diff --git a/lib/graph/meson.build b/lib/graph/meson.build index 0cb15442ab..f58f107d52 100644 --- a/lib/graph/meson.build +++ b/lib/graph/meson.build @@ -25,4 +25,4 @@ indirect_headers += files( 'rte_graph_worker_common.h', ) -deps += ['eal', 'pcapng', 'mempool', 'ring'] +deps = ['pcapng'] diff --git a/lib/gro/meson.build b/lib/gro/meson.build index dbce05220d..c6de6ceebc 100644 --- a/lib/gro/meson.build +++ b/lib/gro/meson.build @@ -10,4 +10,4 @@ sources = files( 'gro_vxlan_udp4.c', ) headers = files('rte_gro.h') -deps += ['ethdev'] +deps = ['ethdev'] diff --git a/lib/gso/meson.build b/lib/gso/meson.build index 622411df8f..bc99109933 100644 --- a/lib/gso/meson.build +++ b/lib/gso/meson.build @@ -10,4 +10,4 @@ sources = files( 'rte_gso.c', ) headers = files('rte_gso.h') -deps += ['ethdev'] +deps = ['ethdev'] diff --git a/lib/hash/meson.build b/lib/hash/meson.build index 277eb9fa93..74b81397f9 100644 --- a/lib/hash/meson.build +++ b/lib/hash/meson.build @@ -25,6 +25,4 @@ sources = files( 'rte_thash_gfni.c', ) -deps += ['net'] -deps += ['ring'] -deps += ['rcu'] +deps = ['net', 'rcu'] diff --git a/lib/ip_frag/meson.build b/lib/ip_frag/meson.build index ea2de09f75..cacf391460 100644 --- a/lib/ip_frag/meson.build +++ b/lib/ip_frag/meson.build @@ -10,4 +10,4 @@ sources = files( 'ip_frag_internal.c', ) headers = files('rte_ip_frag.h') -deps += ['ethdev', 'hash'] +deps = ['ethdev', 'hash'] diff --git a/lib/ipsec/meson.build b/lib/ipsec/meson.build index 5c5a4aae78..7abbac5b6a 100644 --- a/lib/ipsec/meson.build +++ b/lib/ipsec/meson.build @@ -14,6 +14,6 @@ sources = files('esp_inb.c', 'esp_outb.c', headers = files('rte_ipsec.h', 'rte_ipsec_sa.h', 'rte_ipsec_sad.h') indirect_headers += files('rte_ipsec_group.h') -deps += ['mbuf', 'net', 'cryptodev', 'security', 'hash', 'telemetry'] +deps = ['security', 'hash'] annotate_locks = false diff --git a/lib/kvargs/meson.build b/lib/kvargs/meson.build index 7eae744a8f..7282b0ff8d 100644 --- a/lib/kvargs/meson.build +++ b/lib/kvargs/meson.build @@ -1,6 +1,6 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation -deps += 'log' +deps = ['log'] sources = files('rte_kvargs.c') headers = files('rte_kvargs.h') diff --git a/lib/latencystats/meson.build b/lib/latencystats/meson.build index 286558dd79..f8b9a8aeec 100644 --- a/lib/latencystats/meson.build +++ b/lib/latencystats/meson.build @@ -3,4 +3,4 @@ sources = files('rte_latencystats.c') headers = files('rte_latencystats.h') -deps += ['metrics', 'ethdev'] +deps = ['metrics'] diff --git a/lib/lpm/meson.build b/lib/lpm/meson.build index ae30f80b69..5031b085c4 100644 --- a/lib/lpm/meson.build +++ b/lib/lpm/meson.build @@ -18,5 +18,4 @@ indirect_headers += files( 'rte_lpm_sse.h', 'rte_lpm_sve.h', ) -deps += ['hash'] -deps += ['rcu'] +deps = ['hash'] diff --git a/lib/mbuf/meson.build b/lib/mbuf/meson.build index 2cee9057a5..22f5a3038b 100644 --- a/lib/mbuf/meson.build +++ b/lib/mbuf/meson.build @@ -20,4 +20,4 @@ headers = files( 'rte_mbuf_pool_ops.h', 'rte_mbuf_dyn.h', ) -deps += ['mempool'] +deps = ['mempool'] diff --git a/lib/member/meson.build b/lib/member/meson.build index 02ef59795e..b951aa566e 100644 --- a/lib/member/meson.build +++ b/lib/member/meson.build @@ -16,7 +16,7 @@ sources = files( 'rte_member_vbf.c', ) -deps += ['hash', 'ring'] +deps = ['hash'] # compile AVX512 version if: if dpdk_conf.has('RTE_ARCH_X86_64') and binutils_ok diff --git a/lib/mempool/meson.build b/lib/mempool/meson.build index acce66cb97..25b26a50fa 100644 --- a/lib/mempool/meson.build +++ b/lib/mempool/meson.build @@ -25,4 +25,4 @@ headers = files( 'rte_mempool.h', 'rte_mempool_trace_fp.h', ) -deps += ['ring', 'telemetry'] +deps = ['ring'] diff --git a/lib/metrics/meson.build b/lib/metrics/meson.build index 8c1c4b4b49..5165967646 100644 --- a/lib/metrics/meson.build +++ b/lib/metrics/meson.build @@ -8,4 +8,4 @@ if dpdk_conf.has('RTE_HAS_JANSSON') ext_deps += jansson_dep endif -deps += ['ethdev', 'telemetry'] +deps = ['ethdev'] diff --git a/lib/mldev/meson.build b/lib/mldev/meson.build index 2c933baad6..6069fff1f0 100644 --- a/lib/mldev/meson.build +++ b/lib/mldev/meson.build @@ -41,7 +41,7 @@ driver_sdk_headers += files( 'mldev_utils.h', ) -deps += ['mempool', 'mbuf'] +deps = ['mbuf'] if get_option('buildtype').contains('debug') cflags += [ '-DRTE_LIBRTE_ML_DEV_DEBUG' ] diff --git a/lib/net/meson.build b/lib/net/meson.build index 0b69138949..2cb511f046 100644 --- a/lib/net/meson.build +++ b/lib/net/meson.build @@ -34,7 +34,7 @@ sources = files( 'rte_net.c', 'rte_net_crc.c', ) -deps += ['mbuf'] +deps = ['mbuf'] if dpdk_conf.has('RTE_ARCH_X86_64') net_crc_sse42_cpu_support = (cc.get_define('__PCLMUL__', args: machine_args) != '') diff --git a/lib/node/meson.build b/lib/node/meson.build index 0bed97a96c..368ce1dc63 100644 --- a/lib/node/meson.build +++ b/lib/node/meson.build @@ -34,4 +34,4 @@ headers = files( # Strict-aliasing rules are violated by uint8_t[] to context size casts. cflags += '-fno-strict-aliasing' -deps += ['graph', 'mbuf', 'lpm', 'ethdev', 'mempool', 'cryptodev', 'ip_frag'] +deps = ['graph', 'lpm', 'cryptodev', 'ip_frag'] diff --git a/lib/pcapng/meson.build b/lib/pcapng/meson.build index 4549925d41..e8f059a9b0 100644 --- a/lib/pcapng/meson.build +++ b/lib/pcapng/meson.build @@ -4,4 +4,4 @@ sources = files('rte_pcapng.c') headers = files('rte_pcapng.h') -deps += ['ethdev'] +deps = ['ethdev'] diff --git a/lib/pdcp/meson.build b/lib/pdcp/meson.build index f4f9246bcb..f6f3d6237a 100644 --- a/lib/pdcp/meson.build +++ b/lib/pdcp/meson.build @@ -18,4 +18,4 @@ sources = files( headers = files('rte_pdcp.h') indirect_headers += files('rte_pdcp_group.h') -deps += ['mbuf', 'net', 'cryptodev', 'security', 'reorder'] +deps = ['security', 'reorder'] diff --git a/lib/pdump/meson.build b/lib/pdump/meson.build index da8d51b616..23d7db794b 100644 --- a/lib/pdump/meson.build +++ b/lib/pdump/meson.build @@ -9,4 +9,4 @@ endif sources = files('rte_pdump.c') headers = files('rte_pdump.h') -deps += ['ethdev', 'bpf', 'pcapng'] +deps = ['bpf', 'pcapng'] diff --git a/lib/pipeline/meson.build b/lib/pipeline/meson.build index fd5e0dc6bb..f08eca70d1 100644 --- a/lib/pipeline/meson.build +++ b/lib/pipeline/meson.build @@ -25,4 +25,4 @@ headers = files( 'rte_swx_extern.h', 'rte_swx_ctl.h', ) -deps += ['port', 'table', 'meter', 'sched', 'cryptodev', 'ipsec'] +deps = ['table', 'ipsec'] diff --git a/lib/port/meson.build b/lib/port/meson.build index b597772872..0524c3c049 100644 --- a/lib/port/meson.build +++ b/lib/port/meson.build @@ -40,7 +40,7 @@ headers = files( 'rte_swx_port_ring.h', 'rte_swx_port_source_sink.h', ) -deps += ['ethdev', 'sched', 'ip_frag', 'cryptodev', 'eventdev'] +deps = ['sched', 'ip_frag', 'eventdev'] if dpdk_conf.has('RTE_HAS_LIBPCAP') dpdk_conf.set('RTE_PORT_PCAP', 1) diff --git a/lib/power/meson.build b/lib/power/meson.build index b8426589b2..190bbf90a2 100644 --- a/lib/power/meson.build +++ b/lib/power/meson.build @@ -33,4 +33,4 @@ headers = files( if cc.has_argument('-Wno-cast-qual') cflags += '-Wno-cast-qual' endif -deps += ['timer', 'ethdev'] +deps = ['timer', 'ethdev'] diff --git a/lib/rawdev/meson.build b/lib/rawdev/meson.build index 7dfc3d5cf9..8841f003d7 100644 --- a/lib/rawdev/meson.build +++ b/lib/rawdev/meson.build @@ -9,5 +9,3 @@ endif sources = files('rte_rawdev.c') headers = files('rte_rawdev.h', 'rte_rawdev_pmd.h') - -deps += ['telemetry'] diff --git a/lib/rcu/meson.build b/lib/rcu/meson.build index 71143f5210..b78f46fad7 100644 --- a/lib/rcu/meson.build +++ b/lib/rcu/meson.build @@ -10,4 +10,4 @@ endif sources = files('rte_rcu_qsbr.c') headers = files('rte_rcu_qsbr.h') -deps += ['ring'] +deps = ['ring'] diff --git a/lib/regexdev/meson.build b/lib/regexdev/meson.build index 426e764ece..3e20fa387d 100644 --- a/lib/regexdev/meson.build +++ b/lib/regexdev/meson.build @@ -10,4 +10,4 @@ endif sources = files('rte_regexdev.c') headers = files('rte_regexdev.h', 'rte_regexdev_driver.h') indirect_headers += files('rte_regexdev_core.h') -deps += ['mbuf'] +deps = ['mbuf'] diff --git a/lib/reorder/meson.build b/lib/reorder/meson.build index 03aed53d90..1e088a7d97 100644 --- a/lib/reorder/meson.build +++ b/lib/reorder/meson.build @@ -3,4 +3,4 @@ sources = files('rte_reorder.c') headers = files('rte_reorder.h') -deps += ['mbuf'] +deps = ['mbuf'] diff --git a/lib/rib/meson.build b/lib/rib/meson.build index 7bacbb4535..2085beb444 100644 --- a/lib/rib/meson.build +++ b/lib/rib/meson.build @@ -4,4 +4,4 @@ sources = files('rte_rib.c', 'rte_rib6.c') headers = files('rte_rib.h', 'rte_rib6.h') -deps += ['mempool'] +deps = ['mempool'] diff --git a/lib/ring/meson.build b/lib/ring/meson.build index 7fca958ed7..c20685c689 100644 --- a/lib/ring/meson.build +++ b/lib/ring/meson.build @@ -18,4 +18,3 @@ indirect_headers += files ( 'rte_ring_rts.h', 'rte_ring_rts_elem_pvt.h', ) -deps += ['telemetry'] diff --git a/lib/sched/meson.build b/lib/sched/meson.build index df75db51ed..7ca8ec09df 100644 --- a/lib/sched/meson.build +++ b/lib/sched/meson.build @@ -15,4 +15,4 @@ headers = files( 'rte_sched_common.h', 'rte_pie.h', ) -deps += ['mbuf', 'meter'] +deps = ['mbuf', 'meter'] diff --git a/lib/security/meson.build b/lib/security/meson.build index 1034a7a299..e4545a8c72 100644 --- a/lib/security/meson.build +++ b/lib/security/meson.build @@ -3,4 +3,4 @@ sources = files('rte_security.c') headers = files('rte_security.h', 'rte_security_driver.h') -deps += ['mempool', 'cryptodev', 'net'] +deps = ['cryptodev', 'net'] diff --git a/lib/table/meson.build b/lib/table/meson.build index 9b3d9ac759..78d7e87eab 100644 --- a/lib/table/meson.build +++ b/lib/table/meson.build @@ -39,7 +39,7 @@ headers = files( 'rte_table_lpm_ipv6.h', 'rte_table_stub.h', ) -deps += ['mbuf', 'port', 'lpm', 'hash', 'acl'] +deps = ['port', 'lpm', 'acl'] indirect_headers += files( 'rte_lru_arm64.h', diff --git a/lib/telemetry/meson.build b/lib/telemetry/meson.build index 489d000047..3e3a2cfc32 100644 --- a/lib/telemetry/meson.build +++ b/lib/telemetry/meson.build @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Intel Corporation -deps += 'log' +deps = ['log'] sources = files('telemetry.c', 'telemetry_data.c', 'telemetry_legacy.c') headers = files('rte_telemetry.h') includes += include_directories('../metrics') diff --git a/lib/vhost/meson.build b/lib/vhost/meson.build index 41b622a9be..51bbd87397 100644 --- a/lib/vhost/meson.build +++ b/lib/vhost/meson.build @@ -42,4 +42,4 @@ headers = files( driver_sdk_headers = files( 'vdpa_driver.h', ) -deps += ['ethdev', 'cryptodev', 'hash', 'pci', 'dmadev'] +deps = ['ethdev', 'cryptodev', 'hash', 'pci', 'dmadev'] From patchwork Wed Sep 4 15:08:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Burakov, Anatoly" X-Patchwork-Id: 143590 X-Patchwork-Delegate: thomas@monjalon.net 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 DF0F345903; Wed, 4 Sep 2024 17:09:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 86334427A8; Wed, 4 Sep 2024 17:09:19 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by mails.dpdk.org (Postfix) with ESMTP id 77794427A8 for ; Wed, 4 Sep 2024 17:09:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725462558; x=1756998558; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=+kKbEo72onIrrbtrP6/8wFOrpZzOBi71NO8wC1Iy81s=; b=Fm2CSKgwu+jgm5KumCIpzNQ7AeXd+hfF9SjlyRuxnvHd/N/ERjoYNMmu BtaKUGZOHLvE1UifXeAMsKYfg2qXKqAgBSFhfa6WCBzOm5wn8GYHQ/XqQ JreP4tyTUqSUp08IGaStpiMGEspkSdeheUsulSV7V1TtbbSNi00XoaH/d Whqsu+QZP14fBkRP7MeaEIg3/kdWQY25qk4oq8uX1X6/ukvVjF0hH4kai SzY/8XoT5/D6fARzp6ZSwkqGRVtyjA5p0mNyv2lVc6H0WHPje3zY/ZHgG TnNITgc/RDk52r6GC74ZmFNAYB+5aR6Pj7LyjrqjDMcqcd42L7/nb7HlR w==; X-CSE-ConnectionGUID: ubgX38AZQWuFXHNZQTEtiQ== X-CSE-MsgGUID: iIWC2GmoST2Q6+kLBTJf2g== X-IronPort-AV: E=McAfee;i="6700,10204,11185"; a="23641204" X-IronPort-AV: E=Sophos;i="6.10,202,1719903600"; d="scan'208";a="23641204" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2024 08:09:07 -0700 X-CSE-ConnectionGUID: gNNaeLBcTPKV73TJb2exBg== X-CSE-MsgGUID: eclSzRaTS8Wju1Vd6Rl9cg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,202,1719903600"; d="scan'208";a="96108016" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by fmviesa001.fm.intel.com with ESMTP; 04 Sep 2024 08:08:56 -0700 From: Anatoly Burakov To: dev@dpdk.org, Nicolas Chautru , Gagandeep Singh , Hemant Agrawal , Parav Pandit , Xueming Li , Sachin Saxena , Rosen Xu , Chenbo Xia , Nipun Gupta , Tomasz Duszynski , Chengwen Feng , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Harman Kalra , Anoob Joseph , Jingjing Wu , Dariusz Sosnowski , Viacheslav Ovsiienko , Bing Zhao , Ori Kam , Suanming Mou , Matan Azrad , Fan Zhang , Ashish Gupta , Nagadheeraj Rottela , Ajit Khaparde , Raveendra Padasalagi , Vikas Gupta , Ankur Dwivedi , Tejasree Kondoj , Kai Ji , Pablo de Lara , Srikanth Jampala , Vamsi Attunuru , Gowrishankar Muthukrishnan , Vidya Sagar Velumuri , Kevin Laatz , Bruce Richardson , Pavan Nikhilesh , Shijith Thotton , Abdullah Sevincer , Jerin Jacob , Harry van Haaren , Ashwin Sekhar T K , Long Li , Wei Hu , Andrew Rybchenko , Cristian Dumitrescu , Jakub Palider , Vijay Kumar Srivastava Subject: [PATCH v3 6/8] build: reduce driver dependencies Date: Wed, 4 Sep 2024 16:08:34 +0100 Message-ID: X-Mailer: git-send-email 2.43.5 In-Reply-To: References: <20240730145508.551075-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 From: Bruce Richardson Remove any unnecessary dependencies from the driver dependency lists. This will give each driver a near-minimum set of required dependencies. Signed-off-by: Bruce Richardson --- drivers/baseband/fpga_5gnr_fec/meson.build | 2 +- drivers/baseband/fpga_lte_fec/meson.build | 2 +- drivers/baseband/la12xx/meson.build | 2 +- drivers/baseband/null/meson.build | 2 +- drivers/baseband/turbo_sw/meson.build | 2 +- drivers/bus/auxiliary/meson.build | 2 -- drivers/bus/dpaa/meson.build | 2 +- drivers/bus/fslmc/meson.build | 2 +- drivers/bus/ifpga/meson.build | 2 +- drivers/bus/pci/meson.build | 4 +--- drivers/bus/platform/meson.build | 1 - drivers/bus/uacce/meson.build | 2 -- drivers/bus/vdev/meson.build | 2 -- drivers/common/cnxk/meson.build | 4 ++-- drivers/common/cpt/meson.build | 2 +- drivers/common/idpf/meson.build | 2 +- drivers/common/mlx5/meson.build | 2 +- drivers/compress/mlx5/meson.build | 2 +- drivers/compress/nitrox/meson.build | 2 +- drivers/compress/octeontx/meson.build | 2 +- drivers/crypto/bcmfs/meson.build | 2 +- drivers/crypto/cnxk/meson.build | 2 +- drivers/crypto/dpaa_sec/meson.build | 2 +- drivers/crypto/ipsec_mb/meson.build | 2 +- drivers/crypto/mlx5/meson.build | 2 +- drivers/crypto/nitrox/meson.build | 2 +- drivers/dma/cnxk/meson.build | 2 +- drivers/dma/dpaa/meson.build | 2 +- drivers/dma/dpaa2/meson.build | 2 +- drivers/dma/odm/meson.build | 2 +- drivers/dma/skeleton/meson.build | 2 +- drivers/event/cnxk/meson.build | 2 +- drivers/event/dlb2/meson.build | 2 +- drivers/event/dpaa2/meson.build | 2 +- drivers/event/octeontx/meson.build | 3 +-- drivers/event/sw/meson.build | 2 +- drivers/mempool/cnxk/meson.build | 2 +- drivers/mempool/dpaa/meson.build | 2 +- drivers/mempool/dpaa2/meson.build | 2 +- drivers/mempool/octeontx/meson.build | 2 +- drivers/net/cnxk/meson.build | 3 +-- drivers/net/iavf/meson.build | 2 +- drivers/net/ice/meson.build | 2 +- drivers/net/mana/meson.build | 2 +- drivers/net/mlx5/meson.build | 2 +- drivers/net/sfc/meson.build | 2 +- drivers/net/softnic/meson.build | 2 +- drivers/raw/cnxk_bphy/meson.build | 2 +- drivers/raw/cnxk_gpio/meson.build | 2 +- drivers/raw/ntb/meson.build | 2 +- drivers/raw/skeleton/meson.build | 2 +- drivers/regex/mlx5/meson.build | 2 +- drivers/vdpa/ifc/meson.build | 2 +- drivers/vdpa/meson.build | 3 +-- drivers/vdpa/mlx5/meson.build | 2 +- drivers/vdpa/sfc/meson.build | 2 +- 56 files changed, 53 insertions(+), 65 deletions(-) diff --git a/drivers/baseband/fpga_5gnr_fec/meson.build b/drivers/baseband/fpga_5gnr_fec/meson.build index c3678d23eb..31b9e92fbb 100644 --- a/drivers/baseband/fpga_5gnr_fec/meson.build +++ b/drivers/baseband/fpga_5gnr_fec/meson.build @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2020 Intel Corporation -deps += ['bus_vdev', 'ring', 'pci', 'bus_pci'] +deps += ['bus_vdev', 'bus_pci'] sources = files('rte_fpga_5gnr_fec.c') diff --git a/drivers/baseband/fpga_lte_fec/meson.build b/drivers/baseband/fpga_lte_fec/meson.build index 14e07826ef..fbf24755db 100644 --- a/drivers/baseband/fpga_lte_fec/meson.build +++ b/drivers/baseband/fpga_lte_fec/meson.build @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2019 Intel Corporation -deps += ['bus_vdev', 'ring', 'pci', 'bus_pci'] +deps += ['bus_vdev', 'bus_pci'] sources = files('fpga_lte_fec.c') diff --git a/drivers/baseband/la12xx/meson.build b/drivers/baseband/la12xx/meson.build index 7b7e41c961..e1dbdd0fa7 100644 --- a/drivers/baseband/la12xx/meson.build +++ b/drivers/baseband/la12xx/meson.build @@ -1,6 +1,6 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright 2020-2021 NXP -deps += ['bus_vdev', 'ring'] +deps += ['bus_vdev'] sources = files('bbdev_la12xx.c') diff --git a/drivers/baseband/null/meson.build b/drivers/baseband/null/meson.build index 22863f0bd8..716d6c6fdb 100644 --- a/drivers/baseband/null/meson.build +++ b/drivers/baseband/null/meson.build @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Luca Boccassi -deps += ['bus_vdev', 'ring'] +deps += ['bus_vdev'] sources = files('bbdev_null.c') diff --git a/drivers/baseband/turbo_sw/meson.build b/drivers/baseband/turbo_sw/meson.build index a9035a753e..ac18e8a9b6 100644 --- a/drivers/baseband/turbo_sw/meson.build +++ b/drivers/baseband/turbo_sw/meson.build @@ -26,5 +26,5 @@ if dep_dec5g.found() cflags += ['-DRTE_BBDEV_SDK_AVX512'] endif -deps += ['bus_vdev', 'ring'] +deps += ['bus_vdev'] sources = files('bbdev_turbo_software.c') diff --git a/drivers/bus/auxiliary/meson.build b/drivers/bus/auxiliary/meson.build index 10468fd130..a113f11743 100644 --- a/drivers/bus/auxiliary/meson.build +++ b/drivers/bus/auxiliary/meson.build @@ -13,5 +13,3 @@ if is_linux endif require_iova_in_mbuf = false - -deps += ['kvargs'] diff --git a/drivers/bus/dpaa/meson.build b/drivers/bus/dpaa/meson.build index 114e0a2265..d0ae5a9ff0 100644 --- a/drivers/bus/dpaa/meson.build +++ b/drivers/bus/dpaa/meson.build @@ -6,7 +6,7 @@ if not is_linux reason = 'only supported on Linux' endif -deps += ['common_dpaax', 'eventdev'] +deps = ['common_dpaax', 'eventdev'] sources = files( 'base/fman/fman.c', 'base/fman/fman_hw.c', diff --git a/drivers/bus/fslmc/meson.build b/drivers/bus/fslmc/meson.build index 162ca286fe..989a47c7a0 100644 --- a/drivers/bus/fslmc/meson.build +++ b/drivers/bus/fslmc/meson.build @@ -6,7 +6,7 @@ if not is_linux reason = 'only supported on Linux' endif -deps += ['common_dpaax', 'eventdev', 'kvargs'] +deps = ['common_dpaax', 'eventdev'] sources = files( 'fslmc_bus.c', 'fslmc_vfio.c', diff --git a/drivers/bus/ifpga/meson.build b/drivers/bus/ifpga/meson.build index dedc94db2d..e87b08eaf4 100644 --- a/drivers/bus/ifpga/meson.build +++ b/drivers/bus/ifpga/meson.build @@ -7,6 +7,6 @@ if is_windows subdir_done() endif -deps += ['pci', 'kvargs', 'rawdev'] +deps = ['pci', 'rawdev'] driver_sdk_headers += files('bus_ifpga_driver.h') sources = files('ifpga_bus.c') diff --git a/drivers/bus/pci/meson.build b/drivers/bus/pci/meson.build index fede114dc7..776c3d1550 100644 --- a/drivers/bus/pci/meson.build +++ b/drivers/bus/pci/meson.build @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation -deps += ['pci'] +deps = ['pci'] headers = files('rte_bus_pci.h') driver_sdk_headers = files('bus_pci_driver.h') sources = files('pci_common.c', @@ -31,5 +31,3 @@ if is_windows endif require_iova_in_mbuf = false - -deps += ['kvargs'] diff --git a/drivers/bus/platform/meson.build b/drivers/bus/platform/meson.build index 8633cc4e75..2039c23ac6 100644 --- a/drivers/bus/platform/meson.build +++ b/drivers/bus/platform/meson.build @@ -10,7 +10,6 @@ endif require_iova_in_mbuf = false -deps += ['kvargs'] sources = files( 'platform_params.c', 'platform.c', diff --git a/drivers/bus/uacce/meson.build b/drivers/bus/uacce/meson.build index a659d65f23..130148a315 100644 --- a/drivers/bus/uacce/meson.build +++ b/drivers/bus/uacce/meson.build @@ -8,5 +8,3 @@ endif sources = files('uacce.c') driver_sdk_headers += files('bus_uacce_driver.h') - -deps += ['kvargs'] diff --git a/drivers/bus/vdev/meson.build b/drivers/bus/vdev/meson.build index 50f0c8918d..24993c88a3 100644 --- a/drivers/bus/vdev/meson.build +++ b/drivers/bus/vdev/meson.build @@ -9,5 +9,3 @@ headers = files('rte_bus_vdev.h') driver_sdk_headers = files('bus_vdev_driver.h') require_iova_in_mbuf = false - -deps += ['kvargs'] diff --git a/drivers/common/cnxk/meson.build b/drivers/common/cnxk/meson.build index e0e4600989..8ff080ee19 100644 --- a/drivers/common/cnxk/meson.build +++ b/drivers/common/cnxk/meson.build @@ -8,7 +8,7 @@ if not is_linux or not dpdk_conf.get('RTE_ARCH_64') subdir_done() endif -deps = ['eal', 'pci', 'bus_pci', 'mbuf', 'security'] +deps = ['bus_pci', 'security'] sources = files( 'roc_ae.c', 'roc_aes.c', @@ -91,7 +91,7 @@ sources += files('cnxk_telemetry_bphy.c', 'cnxk_telemetry_sso.c', ) -deps += ['bus_pci', 'net', 'telemetry'] +deps += ['bus_pci'] require_iova_in_mbuf = false diff --git a/drivers/common/cpt/meson.build b/drivers/common/cpt/meson.build index c09824a651..a4b000dc37 100644 --- a/drivers/common/cpt/meson.build +++ b/drivers/common/cpt/meson.build @@ -9,5 +9,5 @@ endif sources = files('cpt_fpm_tables.c', 'cpt_pmd_ops_helper.c') -deps = ['kvargs', 'pci', 'cryptodev'] +deps = ['pci', 'cryptodev'] includes += include_directories('../../crypto/octeontx') diff --git a/drivers/common/idpf/meson.build b/drivers/common/idpf/meson.build index 80c8906f80..adf5430487 100644 --- a/drivers/common/idpf/meson.build +++ b/drivers/common/idpf/meson.build @@ -7,7 +7,7 @@ endif includes += include_directories('../iavf') -deps += ['mbuf'] +deps = ['mbuf'] sources = files( 'idpf_common_device.c', diff --git a/drivers/common/mlx5/meson.build b/drivers/common/mlx5/meson.build index 1eefc02f06..b94c956495 100644 --- a/drivers/common/mlx5/meson.build +++ b/drivers/common/mlx5/meson.build @@ -12,7 +12,7 @@ if is_windows and not is_ms_linker and not meson.is_cross_build() subdir_done() endif -deps += ['hash', 'pci', 'bus_pci', 'bus_auxiliary', 'net', 'eal', 'kvargs'] +deps += ['hash', 'bus_pci', 'bus_auxiliary'] sources += files( 'mlx5_devx_cmds.c', 'mlx5_common.c', diff --git a/drivers/compress/mlx5/meson.build b/drivers/compress/mlx5/meson.build index 26a0e0cd09..ddb9e0f82c 100644 --- a/drivers/compress/mlx5/meson.build +++ b/drivers/compress/mlx5/meson.build @@ -7,7 +7,7 @@ if not is_linux subdir_done() endif -deps += ['common_mlx5', 'eal', 'compressdev'] +deps += ['common_mlx5', 'compressdev'] if not dpdk_conf.has('RTE_COMMON_MLX5') # avoid referencing undefined variables from common/mlx5 subdir_done() diff --git a/drivers/compress/nitrox/meson.build b/drivers/compress/nitrox/meson.build index 1becc66912..c3db4ac2bb 100644 --- a/drivers/compress/nitrox/meson.build +++ b/drivers/compress/nitrox/meson.build @@ -6,7 +6,7 @@ if not is_linux reason = 'only supported on Linux' endif -deps += ['common_nitrox', 'bus_pci', 'compressdev'] +deps += ['common_nitrox', 'compressdev'] sources += files( 'nitrox_comp.c', diff --git a/drivers/compress/octeontx/meson.build b/drivers/compress/octeontx/meson.build index 16f973f4d7..0ccde449e8 100644 --- a/drivers/compress/octeontx/meson.build +++ b/drivers/compress/octeontx/meson.build @@ -9,7 +9,7 @@ endif sources = files('otx_zip.c', 'otx_zip_pmd.c') includes += include_directories('include') -deps += ['mempool_octeontx', 'bus_pci'] +deps += ['mempool_octeontx'] ext_deps += dep require_iova_in_mbuf = false diff --git a/drivers/crypto/bcmfs/meson.build b/drivers/crypto/bcmfs/meson.build index 5842f83a3b..678bab7398 100644 --- a/drivers/crypto/bcmfs/meson.build +++ b/drivers/crypto/bcmfs/meson.build @@ -9,7 +9,7 @@ if is_windows subdir_done() endif -deps += ['eal', 'bus_vdev'] +deps += ['bus_vdev'] sources = files( 'bcmfs_logs.c', 'bcmfs_device.c', diff --git a/drivers/crypto/cnxk/meson.build b/drivers/crypto/cnxk/meson.build index aa840fb7bb..c5a5725e1a 100644 --- a/drivers/crypto/cnxk/meson.build +++ b/drivers/crypto/cnxk/meson.build @@ -25,7 +25,7 @@ sources = files( ) headers = files('rte_pmd_cnxk_crypto.h') -deps += ['bus_pci', 'common_cnxk', 'security', 'eventdev'] +deps += ['common_cnxk', 'eventdev'] includes += include_directories('../../../lib/net', '../../event/cnxk') if get_option('buildtype').contains('debug') diff --git a/drivers/crypto/dpaa_sec/meson.build b/drivers/crypto/dpaa_sec/meson.build index f87ad6c7e7..9efac952c4 100644 --- a/drivers/crypto/dpaa_sec/meson.build +++ b/drivers/crypto/dpaa_sec/meson.build @@ -6,7 +6,7 @@ if not is_linux reason = 'only supported on Linux' endif -deps += ['bus_dpaa', 'mempool_dpaa', 'security'] +deps += ['mempool_dpaa', 'security'] sources = files('dpaa_sec.c', 'dpaa_sec_raw_dp.c') includes += include_directories('../../bus/dpaa/include') diff --git a/drivers/crypto/ipsec_mb/meson.build b/drivers/crypto/ipsec_mb/meson.build index 87bf965554..739cbd1b6e 100644 --- a/drivers/crypto/ipsec_mb/meson.build +++ b/drivers/crypto/ipsec_mb/meson.build @@ -45,5 +45,5 @@ sources = files( 'pmd_snow3g.c', 'pmd_zuc.c', ) -deps += ['bus_vdev', 'net', 'security'] +deps += ['bus_vdev', 'security'] require_iova_in_mbuf = false diff --git a/drivers/crypto/mlx5/meson.build b/drivers/crypto/mlx5/meson.build index d7bc8ec967..595053d8cd 100644 --- a/drivers/crypto/mlx5/meson.build +++ b/drivers/crypto/mlx5/meson.build @@ -7,7 +7,7 @@ if not (is_linux or is_windows) subdir_done() endif -deps += ['common_mlx5', 'eal', 'cryptodev'] +deps += ['common_mlx5', 'cryptodev'] if not dpdk_conf.has('RTE_COMMON_MLX5') # avoid referencing undefined variables from common/mlx5 subdir_done() diff --git a/drivers/crypto/nitrox/meson.build b/drivers/crypto/nitrox/meson.build index f8887713d2..85e3ca2b28 100644 --- a/drivers/crypto/nitrox/meson.build +++ b/drivers/crypto/nitrox/meson.build @@ -6,7 +6,7 @@ if not is_linux reason = 'only supported on Linux' endif -deps += ['common_nitrox', 'bus_pci', 'cryptodev'] +deps += ['common_nitrox', 'cryptodev'] sources += files( 'nitrox_sym.c', diff --git a/drivers/dma/cnxk/meson.build b/drivers/dma/cnxk/meson.build index 8ccc1c2cb7..738774d542 100644 --- a/drivers/dma/cnxk/meson.build +++ b/drivers/dma/cnxk/meson.build @@ -12,7 +12,7 @@ driver_sdk_headers = files( 'cnxk_dma_event_dp.h', ) -deps += ['bus_pci', 'common_cnxk', 'dmadev', 'eventdev'] +deps += ['common_cnxk', 'eventdev'] includes += include_directories('../../event/cnxk') diff --git a/drivers/dma/dpaa/meson.build b/drivers/dma/dpaa/meson.build index c31a6d91fe..fec4a45767 100644 --- a/drivers/dma/dpaa/meson.build +++ b/drivers/dma/dpaa/meson.build @@ -6,7 +6,7 @@ if not is_linux reason = 'only supported on linux' endif -deps += ['dmadev', 'bus_dpaa'] +deps += ['bus_dpaa'] sources = files('dpaa_qdma.c') if cc.has_argument('-Wno-pointer-arith') diff --git a/drivers/dma/dpaa2/meson.build b/drivers/dma/dpaa2/meson.build index a99151e2a5..2b5b76ec5f 100644 --- a/drivers/dma/dpaa2/meson.build +++ b/drivers/dma/dpaa2/meson.build @@ -8,7 +8,7 @@ endif build = dpdk_conf.has('RTE_MEMPOOL_DPAA2') reason = 'missing dependency, DPDK DPAA2 mempool driver' -deps += ['dmadev', 'bus_fslmc', 'mempool_dpaa2', 'ring', 'kvargs'] +deps += ['mempool_dpaa2'] sources = files('dpaa2_qdma.c') if cc.has_argument('-Wno-pointer-arith') diff --git a/drivers/dma/odm/meson.build b/drivers/dma/odm/meson.build index d597762d37..959e7e685d 100644 --- a/drivers/dma/odm/meson.build +++ b/drivers/dma/odm/meson.build @@ -7,7 +7,7 @@ if not is_linux or not dpdk_conf.get('RTE_ARCH_64') subdir_done() endif -deps += ['bus_pci', 'dmadev', 'eal', 'mempool', 'pci'] +deps += ['bus_pci', 'dmadev', 'mempool'] sources = files('odm_dmadev.c', 'odm.c') diff --git a/drivers/dma/skeleton/meson.build b/drivers/dma/skeleton/meson.build index 77055683ad..0d703a36eb 100644 --- a/drivers/dma/skeleton/meson.build +++ b/drivers/dma/skeleton/meson.build @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2021 HiSilicon Limited -deps += ['dmadev', 'kvargs', 'ring', 'bus_vdev'] +deps += ['dmadev', 'ring', 'bus_vdev'] sources = files( 'skeleton_dmadev.c', ) diff --git a/drivers/event/cnxk/meson.build b/drivers/event/cnxk/meson.build index e0e350570d..b365fff0cb 100644 --- a/drivers/event/cnxk/meson.build +++ b/drivers/event/cnxk/meson.build @@ -337,7 +337,7 @@ foreach flag: extra_flags endforeach headers = files('rte_pmd_cnxk_eventdev.h') -deps += ['bus_pci', 'common_cnxk', 'net_cnxk', 'crypto_cnxk', 'dma_cnxk'] +deps += ['net_cnxk', 'crypto_cnxk', 'dma_cnxk'] require_iova_in_mbuf = false diff --git a/drivers/event/dlb2/meson.build b/drivers/event/dlb2/meson.build index 515d1795fe..217abc174d 100644 --- a/drivers/event/dlb2/meson.build +++ b/drivers/event/dlb2/meson.build @@ -67,4 +67,4 @@ endif headers = files('rte_pmd_dlb2.h') -deps += ['mbuf', 'mempool', 'ring', 'pci', 'bus_pci'] +deps += ['bus_pci'] diff --git a/drivers/event/dpaa2/meson.build b/drivers/event/dpaa2/meson.build index dd5063af43..7dae1da32b 100644 --- a/drivers/event/dpaa2/meson.build +++ b/drivers/event/dpaa2/meson.build @@ -5,7 +5,7 @@ if not is_linux build = false reason = 'only supported on Linux' endif -deps += ['bus_vdev', 'net_dpaa2', 'crypto_dpaa2_sec'] +deps += ['net_dpaa2', 'crypto_dpaa2_sec'] sources = files( 'dpaa2_hw_dpcon.c', 'dpaa2_eventdev.c', diff --git a/drivers/event/octeontx/meson.build b/drivers/event/octeontx/meson.build index eb17e059d8..1227b2e18d 100644 --- a/drivers/event/octeontx/meson.build +++ b/drivers/event/octeontx/meson.build @@ -17,5 +17,4 @@ sources = files( 'timvf_probe.c', ) -deps += ['common_octeontx', 'mempool_octeontx', 'bus_vdev', 'net_octeontx'] -deps += ['crypto_octeontx'] +deps = ['net_octeontx', 'crypto_octeontx'] diff --git a/drivers/event/sw/meson.build b/drivers/event/sw/meson.build index 3a3ebd72a3..450969aa7a 100644 --- a/drivers/event/sw/meson.build +++ b/drivers/event/sw/meson.build @@ -8,5 +8,5 @@ sources = files( 'sw_evdev_xstats.c', 'sw_evdev.c', ) -deps += ['hash', 'bus_vdev'] +deps += ['bus_vdev'] require_iova_in_mbuf = false diff --git a/drivers/mempool/cnxk/meson.build b/drivers/mempool/cnxk/meson.build index e388cce26a..7bbed325df 100644 --- a/drivers/mempool/cnxk/meson.build +++ b/drivers/mempool/cnxk/meson.build @@ -18,5 +18,5 @@ sources = files( ) headers = files('rte_pmd_cnxk_mempool.h') -deps += ['eal', 'mbuf', 'kvargs', 'bus_pci', 'common_cnxk', 'mempool'] +deps = ['common_cnxk'] require_iova_in_mbuf = false diff --git a/drivers/mempool/dpaa/meson.build b/drivers/mempool/dpaa/meson.build index c4e9994b83..39fc312344 100644 --- a/drivers/mempool/dpaa/meson.build +++ b/drivers/mempool/dpaa/meson.build @@ -6,5 +6,5 @@ if not is_linux reason = 'only supported on Linux' endif -deps += ['bus_dpaa'] +deps = ['bus_dpaa'] sources = files('dpaa_mempool.c') diff --git a/drivers/mempool/dpaa2/meson.build b/drivers/mempool/dpaa2/meson.build index 3d16d44158..0099b20b97 100644 --- a/drivers/mempool/dpaa2/meson.build +++ b/drivers/mempool/dpaa2/meson.build @@ -6,7 +6,7 @@ if not is_linux reason = 'only supported on Linux' endif -deps += ['bus_fslmc'] +deps = ['bus_fslmc'] sources = files('dpaa2_hw_mempool.c') headers = files('rte_dpaa2_mempool.h') diff --git a/drivers/mempool/octeontx/meson.build b/drivers/mempool/octeontx/meson.build index 3ccecac75d..f97bcf4a5a 100644 --- a/drivers/mempool/octeontx/meson.build +++ b/drivers/mempool/octeontx/meson.build @@ -12,6 +12,6 @@ sources = files( 'rte_mempool_octeontx.c', ) -deps += ['mbuf', 'bus_pci', 'common_octeontx'] +deps = ['mbuf', 'bus_pci', 'common_octeontx'] require_iova_in_mbuf = false diff --git a/drivers/net/cnxk/meson.build b/drivers/net/cnxk/meson.build index 7bce80098a..f2f8f60f83 100644 --- a/drivers/net/cnxk/meson.build +++ b/drivers/net/cnxk/meson.build @@ -231,8 +231,7 @@ sources += files( endif endif -deps += ['bus_pci', 'cryptodev', 'eventdev', 'security'] -deps += ['common_cnxk', 'mempool_cnxk'] +deps = ['eventdev', 'mempool_cnxk'] # Allow implicit vector conversions and strict aliasing warning extra_flags = ['-flax-vector-conversions', '-Wno-strict-aliasing'] diff --git a/drivers/net/iavf/meson.build b/drivers/net/iavf/meson.build index 83aebd5596..a96d9c0bc0 100644 --- a/drivers/net/iavf/meson.build +++ b/drivers/net/iavf/meson.build @@ -11,7 +11,7 @@ includes += include_directories('../../common/iavf') testpmd_sources = files('iavf_testpmd.c') -deps += ['common_iavf', 'security', 'cryptodev'] +deps += ['common_iavf', 'security'] sources = files( 'iavf_ethdev.c', diff --git a/drivers/net/ice/meson.build b/drivers/net/ice/meson.build index b7f2188e62..99344211cb 100644 --- a/drivers/net/ice/meson.build +++ b/drivers/net/ice/meson.build @@ -18,7 +18,7 @@ sources = files( testpmd_sources = files('ice_testpmd.c') -deps += ['hash', 'net', 'common_iavf'] +deps += ['hash', 'common_iavf'] includes += include_directories('base', '../../common/iavf') if arch_subdir == 'x86' diff --git a/drivers/net/mana/meson.build b/drivers/net/mana/meson.build index 2d72eca5a8..c97f117fd7 100644 --- a/drivers/net/mana/meson.build +++ b/drivers/net/mana/meson.build @@ -7,7 +7,7 @@ if not is_linux or not dpdk_conf.has('RTE_ARCH_X86') subdir_done() endif -deps += ['pci', 'bus_pci', 'net', 'eal', 'kvargs'] +deps += ['bus_pci'] sources += files( 'gdma.c', diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build index b279ddf47c..ec679d11ab 100644 --- a/drivers/net/mlx5/meson.build +++ b/drivers/net/mlx5/meson.build @@ -8,7 +8,7 @@ if not (is_linux or is_windows) subdir_done() endif -deps += ['hash', 'common_mlx5'] +deps += ['common_mlx5'] if not dpdk_conf.has('RTE_COMMON_MLX5') # avoid referencing undefined variables from common/mlx5 subdir_done() diff --git a/drivers/net/sfc/meson.build b/drivers/net/sfc/meson.build index 5adde68517..820ee6c91e 100644 --- a/drivers/net/sfc/meson.build +++ b/drivers/net/sfc/meson.build @@ -71,7 +71,7 @@ if not cc.links(atomic_check_code) ext_deps += libatomic_dep endif -deps += ['common_sfc_efx', 'bus_pci', 'hash'] +deps += ['common_sfc_efx', 'hash'] sources = files( 'sfc_ethdev.c', 'sfc_kvargs.c', diff --git a/drivers/net/softnic/meson.build b/drivers/net/softnic/meson.build index 5dfbd16c77..1529ef38f9 100644 --- a/drivers/net/softnic/meson.build +++ b/drivers/net/softnic/meson.build @@ -15,4 +15,4 @@ sources = files( 'rte_eth_softnic_swq.c', 'rte_eth_softnic_thread.c', ) -deps += ['pipeline', 'port', 'table'] +deps += ['pipeline'] diff --git a/drivers/raw/cnxk_bphy/meson.build b/drivers/raw/cnxk_bphy/meson.build index bb5d2ffb80..b38b071697 100644 --- a/drivers/raw/cnxk_bphy/meson.build +++ b/drivers/raw/cnxk_bphy/meson.build @@ -2,7 +2,7 @@ # Copyright(C) 2021 Marvell. # -deps += ['bus_pci', 'common_cnxk', 'rawdev'] +deps += ['common_cnxk', 'rawdev'] sources = files( 'cnxk_bphy.c', 'cnxk_bphy_cgx.c', diff --git a/drivers/raw/cnxk_gpio/meson.build b/drivers/raw/cnxk_gpio/meson.build index 9d9a527392..6d17fe573f 100644 --- a/drivers/raw/cnxk_gpio/meson.build +++ b/drivers/raw/cnxk_gpio/meson.build @@ -2,7 +2,7 @@ # Copyright(C) 2021 Marvell. # -deps += ['bus_vdev', 'common_cnxk', 'rawdev', 'kvargs'] +deps += ['bus_vdev', 'common_cnxk', 'rawdev'] sources = files( 'cnxk_gpio.c', 'cnxk_gpio_irq.c', diff --git a/drivers/raw/ntb/meson.build b/drivers/raw/ntb/meson.build index 9096f2b25a..8f79d3b16a 100644 --- a/drivers/raw/ntb/meson.build +++ b/drivers/raw/ntb/meson.build @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2019 Intel Corporation. -deps += ['rawdev', 'mbuf', 'mempool', 'pci', 'bus_pci'] +deps += ['rawdev', 'mbuf', 'bus_pci'] sources = files('ntb.c', 'ntb_hw_intel.c') headers = files('rte_pmd_ntb.h') diff --git a/drivers/raw/skeleton/meson.build b/drivers/raw/skeleton/meson.build index 9d5fcf6514..7d76fe71b3 100644 --- a/drivers/raw/skeleton/meson.build +++ b/drivers/raw/skeleton/meson.build @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright 2018 NXP -deps += ['rawdev', 'kvargs', 'mbuf', 'bus_vdev'] +deps += ['rawdev', 'mbuf', 'bus_vdev'] sources = files( 'skeleton_rawdev.c', 'skeleton_rawdev_test.c', diff --git a/drivers/regex/mlx5/meson.build b/drivers/regex/mlx5/meson.build index 6070b37501..f75bf2e084 100644 --- a/drivers/regex/mlx5/meson.build +++ b/drivers/regex/mlx5/meson.build @@ -7,7 +7,7 @@ if not is_linux subdir_done() endif -deps += ['common_mlx5', 'eal'] +deps += ['common_mlx5'] if not dpdk_conf.has('RTE_COMMON_MLX5') # avoid referencing undefined variables from common/mlx5 subdir_done() diff --git a/drivers/vdpa/ifc/meson.build b/drivers/vdpa/ifc/meson.build index f78d36a715..f4ed4f491f 100644 --- a/drivers/vdpa/ifc/meson.build +++ b/drivers/vdpa/ifc/meson.build @@ -1,6 +1,6 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Intel Corporation -deps += 'vhost' +deps += 'bus_pci' sources = files('ifcvf_vdpa.c', 'base/ifcvf.c') includes += include_directories('base') diff --git a/drivers/vdpa/meson.build b/drivers/vdpa/meson.build index e01c277b9e..747cdc7c55 100644 --- a/drivers/vdpa/meson.build +++ b/drivers/vdpa/meson.build @@ -11,5 +11,4 @@ drivers = [ 'nfp', 'sfc', ] -std_deps = ['bus_pci'] -std_deps += ['vhost'] +std_deps = ['vhost'] diff --git a/drivers/vdpa/mlx5/meson.build b/drivers/vdpa/mlx5/meson.build index e224d1bcc9..1263ac43a4 100644 --- a/drivers/vdpa/mlx5/meson.build +++ b/drivers/vdpa/mlx5/meson.build @@ -7,7 +7,7 @@ if not is_linux subdir_done() endif -deps += ['hash', 'common_mlx5', 'vhost', 'pci', 'eal', 'sched'] +deps += ['common_mlx5', 'vhost', 'sched'] if not dpdk_conf.has('RTE_COMMON_MLX5') # avoid referencing undefined variables from common/mlx5 subdir_done() diff --git a/drivers/vdpa/sfc/meson.build b/drivers/vdpa/sfc/meson.build index 933f3f18f3..465ca9f220 100644 --- a/drivers/vdpa/sfc/meson.build +++ b/drivers/vdpa/sfc/meson.build @@ -16,7 +16,7 @@ foreach flag: extra_flags endif endforeach -deps += ['common_sfc_efx', 'bus_pci'] +deps += ['common_sfc_efx'] sources = files( 'sfc_vdpa.c', 'sfc_vdpa_hw.c', From patchwork Wed Sep 4 15:08:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Burakov, Anatoly" X-Patchwork-Id: 143591 X-Patchwork-Delegate: thomas@monjalon.net 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 AB46045903; Wed, 4 Sep 2024 17:09:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 45091427B4; Wed, 4 Sep 2024 17:09:21 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by mails.dpdk.org (Postfix) with ESMTP id D3698427A8 for ; Wed, 4 Sep 2024 17:09:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725462559; x=1756998559; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=L5k8GxZ+xVT5B2h8QRN1kUu+YY2q2scNm8Q1Co8fRsk=; b=ij+Es+cGQvbIuXqTykpUL9MxPw99+PQtlGEVE6ldUz9AvUO6Q/As6vy6 M4XD2G1VHXztBRu0DNPAYOVaRboYPYbG0HBkNFjo/0UIiQPIoyyH4z/+K AHdXS1mPfR7XzkKiKsrvdEM+PHoxZ+vsbde4OgJzvedN970ktyqc8A3E4 tfQh6kxFctV+t48cgsZ3bJbUHRcIeO7g4XrAtq8NagnOMz591wwYanypt uqcbUxzPc7akY14QHnBTXYaXwXGxBn90LYisgPTCxFjFnnfcKJNU6jyho aM7Gw9uhRwM+5RWQmWeC+2Xjv7wFyx2xvyg6lMgGXd1w6jNPwmoQcynZz g==; X-CSE-ConnectionGUID: PEM4IofcTn2sWMAWR0T9dw== X-CSE-MsgGUID: MXLJRwNKSbWo/0UGvpu3YA== X-IronPort-AV: E=McAfee;i="6700,10204,11185"; a="23641229" X-IronPort-AV: E=Sophos;i="6.10,202,1719903600"; d="scan'208";a="23641229" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2024 08:09:09 -0700 X-CSE-ConnectionGUID: 5Tg3TINYSKyTGE7joOTCOQ== X-CSE-MsgGUID: 6fgmIv3/TlyFEgqLLUDIZg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,202,1719903600"; d="scan'208";a="96108041" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by fmviesa001.fm.intel.com with ESMTP; 04 Sep 2024 08:09:07 -0700 From: Anatoly Burakov To: dev@dpdk.org, Reshma Pattan , Stephen Hemminger , Sunil Kumar Kori , Rakesh Kudurumalla , Brian Dooley , Vladimir Medvedkin , Konstantin Ananyev Subject: [PATCH v3 7/8] build: reduce app dependencies Date: Wed, 4 Sep 2024 16:08:35 +0100 Message-ID: <397cae94a44ffe3eeb3c4ec6998d183cb415e280.1725462264.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: References: <20240730145508.551075-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 From: Bruce Richardson Remove any unnecessary dependencies from the app dependency lists. This will give each app a near-minimum set of required dependencies. Signed-off-by: Bruce Richardson --- app/dumpcap/meson.build | 2 +- app/graph/meson.build | 2 +- app/pdump/meson.build | 2 +- app/proc-info/meson.build | 2 +- app/test-crypto-perf/meson.build | 2 +- app/test-fib/meson.build | 2 +- app/test-sad/meson.build | 2 +- app/test/meson.build | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/dumpcap/meson.build b/app/dumpcap/meson.build index 69c016c780..6204cf051a 100644 --- a/app/dumpcap/meson.build +++ b/app/dumpcap/meson.build @@ -14,4 +14,4 @@ endif ext_deps += pcap_dep sources = files('main.c') -deps += ['ethdev', 'pdump', 'pcapng', 'bpf'] +deps += ['pdump'] diff --git a/app/graph/meson.build b/app/graph/meson.build index 6dc54d5ee6..9c4cd080d9 100644 --- a/app/graph/meson.build +++ b/app/graph/meson.build @@ -9,7 +9,7 @@ if not build subdir_done() endif -deps += ['graph', 'eal', 'lpm', 'ethdev', 'node', 'cmdline'] +deps += ['node', 'cmdline'] sources = files( 'cli.c', 'conn.c', diff --git a/app/pdump/meson.build b/app/pdump/meson.build index fb282bba1f..a10f9d6124 100644 --- a/app/pdump/meson.build +++ b/app/pdump/meson.build @@ -8,4 +8,4 @@ if is_windows endif sources = files('main.c') -deps += ['ethdev', 'kvargs', 'pdump'] +deps += ['pdump'] diff --git a/app/proc-info/meson.build b/app/proc-info/meson.build index 156592119b..24b75b9ace 100644 --- a/app/proc-info/meson.build +++ b/app/proc-info/meson.build @@ -8,7 +8,7 @@ if is_windows endif sources = files('main.c') -deps += ['ethdev', 'security', 'eventdev'] +deps += ['security', 'eventdev'] if dpdk_conf.has('RTE_LIB_METRICS') optional_deps += 'metrics' endif diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-perf/meson.build index 05c71e0a0c..8904f8607d 100644 --- a/app/test-crypto-perf/meson.build +++ b/app/test-crypto-perf/meson.build @@ -19,7 +19,7 @@ sources = files( 'cperf_test_verify.c', 'main.c', ) -deps += ['cryptodev', 'net', 'security'] +deps += ['cryptodev'] if dpdk_conf.has('RTE_CRYPTO_SCHEDULER') optional_deps += 'crypto_scheduler' endif diff --git a/app/test-fib/meson.build b/app/test-fib/meson.build index eb36772cf3..25e2ea1a1d 100644 --- a/app/test-fib/meson.build +++ b/app/test-fib/meson.build @@ -8,4 +8,4 @@ if is_windows endif sources = files('main.c') -deps += ['fib', 'lpm', 'net'] +deps += ['fib', 'lpm'] diff --git a/app/test-sad/meson.build b/app/test-sad/meson.build index a50616a9c7..414e2a05cb 100644 --- a/app/test-sad/meson.build +++ b/app/test-sad/meson.build @@ -8,4 +8,4 @@ if is_windows endif sources = files('main.c') -deps += ['ipsec', 'net'] +deps += ['ipsec'] diff --git a/app/test/meson.build b/app/test/meson.build index bb0a38b3a5..f0a8e58218 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -2,7 +2,7 @@ # Copyright(c) 2017-2023 Intel Corporation # the main test files [test.c and commands.c] relies on these libraries -deps += ['cmdline', 'ring', 'mempool', 'mbuf'] +deps += ['cmdline'] sources += files('commands.c', 'test.c') # optional dependencies: some files may use these - and so we should link them in - From patchwork Wed Sep 4 15:08:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Burakov, Anatoly" X-Patchwork-Id: 143592 X-Patchwork-Delegate: thomas@monjalon.net 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 D8B9D45903; Wed, 4 Sep 2024 17:09:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9339A427A1; Wed, 4 Sep 2024 17:09:22 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by mails.dpdk.org (Postfix) with ESMTP id B694E427A3 for ; Wed, 4 Sep 2024 17:09:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725462560; x=1756998560; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=yFVLtlo+veGQz2CSSkuZrVjMsI6rLl5te2ZjGQ+6z5o=; b=GocBRnnazIhPOBTdynyIreoTARoOMRWhg+7GmpcE9LraBXMN1TKYKiS+ xZmfK8vUPkClrRbmARxRquHuh4d9ulq4UxcxSklR4djaXUhXFJ/7okX4A Rv26HucM6TTG9jbqvGpE9ss+r7KJ7z+P+93eNdzvFFKwCEXfbE7nRZW5M pf72+s4ipPGstZUdQSQg3pWo7yYR77VexnK8M7Mip1nz9ZtfA7p27jjs9 V8uPvzu8eF6gRWd4yCbsHt9qr4Jk3UMSzGw2AlHGGB4L3vDX4sUqJLpM+ nEOlhIZTJ0Zm5oCaTdBFvgXylXcnCst/mgJRt88vL7I4Ef+atmRHGmaEp g==; X-CSE-ConnectionGUID: /wkFiK1ARDiYYcuGomz/pQ== X-CSE-MsgGUID: u+OYPOmgQ7ad76zOxxfXZA== X-IronPort-AV: E=McAfee;i="6700,10204,11185"; a="23641237" X-IronPort-AV: E=Sophos;i="6.10,202,1719903600"; d="scan'208";a="23641237" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2024 08:09:10 -0700 X-CSE-ConnectionGUID: 2nDBA4E0TOGB1mHKubLe2g== X-CSE-MsgGUID: wZr7Pq3ARmapEZnWULGJrA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,202,1719903600"; d="scan'208";a="96108047" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by fmviesa001.fm.intel.com with ESMTP; 04 Sep 2024 08:09:09 -0700 From: Anatoly Burakov To: dev@dpdk.org Subject: [PATCH v3 8/8] devtools: add script to generate DPDK dependency graphs Date: Wed, 4 Sep 2024 16:08:36 +0100 Message-ID: <93a74f4a058388066f1f615ba96b0ac7fca4ce8c.1725462264.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: References: <20240730145508.551075-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 From: Bruce Richardson Rather than the single monolithic graph that would be output from the deps.dot file in a build directory, we can post-process that to generate simpler graphs for different tasks. This new "draw_dependency_graphs" script takes the "deps.dot" as input and generates an output file that has the nodes categorized, filtering them based off the requested node or category. For example, use "--match net/ice" to show the dependency tree from that driver, or "--match lib" to show just the library dependency tree. Signed-off-by: Bruce Richardson Signed-off-by: Anatoly Burakov --- devtools/draw-dependency-graphs.py | 223 +++++++++++++++++++++++++++++ 1 file changed, 223 insertions(+) create mode 100755 devtools/draw-dependency-graphs.py diff --git a/devtools/draw-dependency-graphs.py b/devtools/draw-dependency-graphs.py new file mode 100755 index 0000000000..4fb765498d --- /dev/null +++ b/devtools/draw-dependency-graphs.py @@ -0,0 +1,223 @@ +#! /usr/bin/env python3 +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2024 Intel Corporation + +import argparse +import collections +import sys +import typing as T + +# typedef for dependency data types +Deps = T.Set[str] +DepData = T.Dict[str, T.Dict[str, T.Dict[bool, Deps]]] + + +def parse_dep_line(line: str) -> T.Tuple[str, Deps, str, bool]: + """Parse digraph line into (component, {dependencies}, type, optional).""" + # extract attributes first + first, last = line.index("["), line.rindex("]") + edge_str, attr_str = line[:first], line[first + 1 : last] + # key=value, key=value, ... + attrs = { + key.strip('" '): value.strip('" ') + for attr_kv in attr_str.split(",") + for key, value in [attr_kv.strip().split("=", 1)] + } + # check if edge is defined as dotted line, meaning it's optional + optional = "dotted" in attrs.get("style", "") + try: + component_type = attrs["dpdk_componentType"] + except KeyError as _e: + raise ValueError(f"Error: missing component type: {line}") from _e + + # now, extract component name and any of its dependencies + deps: T.Set[str] = set() + try: + component, deps_str = edge_str.strip('" ').split("->", 1) + component = component.strip().strip('" ') + deps_str = deps_str.strip().strip("{}") + deps = {d.strip('" ') for d in deps_str.split(",")} + except ValueError as _e: + component = edge_str.strip('" ') + + return component, deps, component_type, optional + + +def gen_dep_line(component: str, deps: T.Set[str], optional: bool) -> str: + """Generate a dependency line for a component.""" + # we use dotted line to represent optional components + attr_str = ' [style="dotted"]' if optional else "" + dep_list_str = '", "'.join(deps) + deps_str = "" if not deps else f' -> {{ "{dep_list_str}" }}' + return f' "{component}"{deps_str}{attr_str}\n' + + +def read_deps_list(lines: T.List[str]) -> DepData: + """Read a list of dependency lines into a dictionary.""" + deps_data: T.Dict[str, T.Any] = {} + for ln in lines: + if ln.startswith("digraph") or ln == "}": + continue + + component, deps, component_type, optional = parse_dep_line(ln) + + # each component will have two sets of dependencies - required and optional + c_dict = deps_data.setdefault(component_type, {}).setdefault(component, {}) + c_dict[optional] = deps + return deps_data + + +def create_classified_graph(deps_data: DepData) -> T.Iterator[str]: + """Create a graph of dependencies with components classified by type.""" + yield "digraph dpdk_dependencies {\n overlap=false\n model=subset\n" + for n, deps_t in enumerate(deps_data.items()): + component_type, component_dict = deps_t + yield f' subgraph cluster_{n} {{\n label = "{component_type}"\n' + for component, optional_d in component_dict.items(): + for optional, deps in optional_d.items(): + yield gen_dep_line(component, deps, optional) + yield " }\n" + yield "}\n" + + +def parse_match(line: str, dep_data: DepData) -> T.List[str]: + """Extract list of components from a category string.""" + # if this is not a compound string, we have very few valid choices + if "/" not in line: + # is this a category? + if line in dep_data: + return list(dep_data[line].keys()) + # this isn't a category. maybe an app name? + maybe_app_name = f"dpdk-{line}" + if maybe_app_name in dep_data["app"]: + return [maybe_app_name] + if maybe_app_name in dep_data["examples"]: + return [maybe_app_name] + # this isn't an app name either, so just look for component with that name + for _, component_dict in dep_data.items(): + if line in component_dict: + return [line] + # nothing found still. one last try: maybe it's a driver? we have to be careful though + # because a driver name may not be unique, e.g. common/iavf and net/iavf. so, only pick + # a driver if we can find exactly one driver that matches. + found_drivers: T.List[str] = [] + for component in dep_data["drivers"].keys(): + _, drv_name = component.split("_", 1) + if drv_name == line: + found_drivers.append(component) + if len(found_drivers) == 1: + return found_drivers + # we failed to find anything, report error + raise ValueError(f"Error: unknown component: {line}") + + # this is a compound string, so we have to do some matching. we may have two or three levels + # of hierarchy, as driver/net/ice and net/ice should both be valid. + + # if there are three levels of hierarchy, this must be a driver + try: + ctype, drv_class, drv_name = line.split("/", 2) + component_name = f"{drv_class}_{drv_name}" + # we want to directly access the dict to trigger KeyError, and not catch them here + if component_name in dep_data[ctype]: + return [component_name] + else: + raise KeyError(f"Unknown category: {line}") + except ValueError: + # not three levels of hierarchy, try two + pass + + first, second = line.split("/", 1) + + # this could still be a driver, just without the "drivers" prefix + for component in dep_data["drivers"].keys(): + if component == f"{first}_{second}": + return [component] + # could be driver wildcard, e.g. drivers/net + if first == "drivers": + drv_match: T.List[str] = [ + drv_name + for drv_name in dep_data["drivers"] + if drv_name.startswith(f"{second}_") + ] + if drv_match: + return drv_match + # may be category + component + if first in dep_data: + # go through all components in the category + if second in dep_data[first]: + return [second] + # if it's an app or an example, it may have "dpdk-" in front + if first in ["app", "examples"]: + maybe_app_name = f"dpdk-{second}" + if maybe_app_name in dep_data[first]: + return [maybe_app_name] + # and nothing of value was found + raise ValueError(f"Error: unknown component: {line}") + + +def filter_deps(dep_data: DepData, criteria: T.List[str]) -> None: + """Filter dependency data to include only specified components.""" + # this is a two step process: when we get a list of components, we need to + # go through all of them and note any dependencies they have, and expand the + # list of components with those dependencies. then we filter. + + # walk the dependency list and include all possible dependencies + deps_seen: Deps = set() + deps_stack = collections.deque(criteria) + while deps_stack: + component = deps_stack.popleft() + if component in deps_seen: + continue + deps_seen.add(component) + for component_type, component_dict in dep_data.items(): + try: + deps = component_dict[component] + except KeyError: + # wrong component type + continue + for _, dep_list in deps.items(): + deps_stack.extend(dep_list) + criteria += list(deps_seen) + + # now, "components" has all the dependencies we need to include, so we can filter + for component_type, component_dict in dep_data.items(): + dep_data[component_type] = { + component: deps + for component, deps in component_dict.items() + if component in criteria + } + + +def main(): + parser = argparse.ArgumentParser( + description="Utility to generate dependency tree graphs for DPDK" + ) + parser.add_argument( + "--match", + type=str, + help="Output hierarchy for component or category, e.g. net/ice, lib, app, drivers/net, etc.", + ) + parser.add_argument( + "input_file", + type=argparse.FileType("r"), + help="Path to the deps.dot file from a DPDK build directory", + ) + parser.add_argument( + "output_file", + type=argparse.FileType("w"), + help="Path to the desired output dot file", + ) + args = parser.parse_args() + + deps = read_deps_list([ln.strip() for ln in args.input_file.readlines()]) + if args.match: + try: + filter_deps(deps, parse_match(args.match, deps)) + except (KeyError, ValueError) as e: + print(e, file=sys.stderr) + return + args.output_file.writelines(create_classified_graph(deps)) + + +if __name__ == "__main__": + main()