From patchwork Mon Mar 22 14:06:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriel Ganne X-Patchwork-Id: 89637 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 E6619A034F; Mon, 22 Mar 2021 15:06:18 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7326640040; Mon, 22 Mar 2021 15:06:18 +0100 (CET) Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by mails.dpdk.org (Postfix) with ESMTP id 442324003D for ; Mon, 22 Mar 2021 15:06:17 +0100 (CET) Received: from localhost (unknown [10.16.0.62]) by proxy.6wind.com (Postfix) with ESMTP id 2C463914819; Mon, 22 Mar 2021 15:06:17 +0100 (CET) From: Gabriel Ganne To: Aaron Conole , Michael Santana , Dmitry Kozlyuk , Narcisa Ana Maria Vasile , Dmitry Malloy , Pallavi Kadam , Bruce Richardson Cc: dev@dpdk.org, olivier.matz@6wind.com, thierry.herbelot@6wind.com, Gabriel Ganne Date: Mon, 22 Mar 2021 15:06:07 +0100 Message-Id: <20210322140609.7564-1-gabriel.ganne@6wind.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 1/3] meson: fix minimum required meson version 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 Sender: "dev" WARNING: Project targeting '>= 0.47.1' but tried to use feature introduced in '0.48.0': console arg in custom_target console argument is used within kernel/linux/kni/meson.build Update documentation and travis setup script accordingly. Signed-off-by: Gabriel Ganne --- .ci/linux-setup.sh | 2 +- doc/guides/linux_gsg/sys_reqs.rst | 2 +- doc/guides/prog_guide/build-sdk-meson.rst | 2 +- doc/guides/windows_gsg/build_dpdk.rst | 2 +- meson.build | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.ci/linux-setup.sh b/.ci/linux-setup.sh index 5d3089cadd62..a181029ec49a 100755 --- a/.ci/linux-setup.sh +++ b/.ci/linux-setup.sh @@ -1,7 +1,7 @@ #!/bin/sh -xe # need to install as 'root' since some of the unit tests won't run without it -sudo python3 -m pip install --upgrade 'meson==0.47.1' +sudo python3 -m pip install --upgrade 'meson==0.48' # setup hugepages. error ignored because having hugepage is not mandatory. cat /proc/meminfo diff --git a/doc/guides/linux_gsg/sys_reqs.rst b/doc/guides/linux_gsg/sys_reqs.rst index d7ea8520e558..6a1712f3145c 100644 --- a/doc/guides/linux_gsg/sys_reqs.rst +++ b/doc/guides/linux_gsg/sys_reqs.rst @@ -45,7 +45,7 @@ Compilation of the DPDK * Python 3.5 or later. -* Meson (version 0.47.1+) and ninja +* Meson (version 0.48.0+) and ninja * ``meson`` & ``ninja-build`` packages in most Linux distributions diff --git a/doc/guides/prog_guide/build-sdk-meson.rst b/doc/guides/prog_guide/build-sdk-meson.rst index 3429e264797d..4f3d0bd21f1a 100644 --- a/doc/guides/prog_guide/build-sdk-meson.rst +++ b/doc/guides/prog_guide/build-sdk-meson.rst @@ -35,7 +35,7 @@ The ``meson`` tool is used to configure a DPDK build. On most Linux distributions this can be got using the local package management system, e.g. ``dnf install meson`` or ``apt-get install meson``. If meson is not available as a suitable package, it can also be installed using the Python -3 ``pip`` tool, e.g. ``pip3 install meson``. Version 0.47.1 of meson is +3 ``pip`` tool, e.g. ``pip3 install meson``. Version 0.48.0 of meson is required - if the version packaged is too old, the latest version is generally available from "pip". diff --git a/doc/guides/windows_gsg/build_dpdk.rst b/doc/guides/windows_gsg/build_dpdk.rst index 5f1395f3d483..854b8b05cfff 100644 --- a/doc/guides/windows_gsg/build_dpdk.rst +++ b/doc/guides/windows_gsg/build_dpdk.rst @@ -64,7 +64,7 @@ A good option to choose is the MSI installer for both meson and ninja together:: http://mesonbuild.com/Getting-meson.html#installing-meson-and-ninja-with-the-msi-installer%22 -Recommended version is either Meson 0.47.1 (baseline) or the latest release. +Recommended version is either Meson 0.48.0 (baseline) or the latest release. Install the Backend ------------------- diff --git a/meson.build b/meson.build index 7778e18200a9..65c46f051365 100644 --- a/meson.build +++ b/meson.build @@ -8,7 +8,7 @@ project('DPDK', 'C', files('VERSION')).stdout().strip(), license: 'BSD', default_options: ['buildtype=release', 'default_library=static'], - meson_version: '>= 0.47.1' + meson_version: '>= 0.48.0' ) # set up some global vars for compiler, platform, configuration, etc. From patchwork Mon Mar 22 14:07:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriel Ganne X-Patchwork-Id: 89638 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 066C4A034F; Mon, 22 Mar 2021 15:08:01 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E13B940040; Mon, 22 Mar 2021 15:08:00 +0100 (CET) Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by mails.dpdk.org (Postfix) with ESMTP id C96C94003D for ; Mon, 22 Mar 2021 15:07:58 +0100 (CET) Received: from localhost (unknown [10.16.0.62]) by proxy.6wind.com (Postfix) with ESMTP id BDB1D91481F; Mon, 22 Mar 2021 15:07:58 +0100 (CET) From: Gabriel Ganne To: Bruce Richardson , Kevin Laatz Cc: dev@dpdk.org, olivier.matz@6wind.com, thierry.herbelot@6wind.com, Gabriel Ganne Date: Mon, 22 Mar 2021 15:07:56 +0100 Message-Id: <20210322140757.7888-1-gabriel.ganne@6wind.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 2/3] meson: use threads dependency as provided by meson 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 Sender: "dev" meson guarantees this is portable, so this also allows us to remove a is_windows switch. Link: https://mesonbuild.com/howtox.html#enable-threads Signed-off-by: Gabriel Ganne --- config/meson.build | 5 +---- lib/librte_metrics/meson.build | 2 ++ lib/librte_telemetry/meson.build | 2 ++ 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/config/meson.build b/config/meson.build index 3cf560b8a3f5..0fb7e1b27a0f 100644 --- a/config/meson.build +++ b/config/meson.build @@ -113,10 +113,7 @@ if not is_windows endif # use pthreads if available for the platform -if not is_windows - add_project_link_arguments('-pthread', language: 'c') - dpdk_extra_ldflags += '-pthread' -endif +threads_dep = dependency('threads') # on some OS, maths functions are in a separate library if cc.find_library('m', required : false).found() diff --git a/lib/librte_metrics/meson.build b/lib/librte_metrics/meson.build index d5be6a214530..29d922eded53 100644 --- a/lib/librte_metrics/meson.build +++ b/lib/librte_metrics/meson.build @@ -4,6 +4,8 @@ sources = files('rte_metrics.c', 'rte_metrics_telemetry.c') headers = files('rte_metrics.h', 'rte_metrics_telemetry.h') +ext_deps += threads_dep + jansson = dependency('jansson', required: false, method: 'pkg-config') if jansson.found() dpdk_conf.set('RTE_HAS_JANSSON', 1) diff --git a/lib/librte_telemetry/meson.build b/lib/librte_telemetry/meson.build index 719973ff9240..46ac9829e54b 100644 --- a/lib/librte_telemetry/meson.build +++ b/lib/librte_telemetry/meson.build @@ -3,6 +3,8 @@ includes = [global_inc] +ext_deps += threads_dep + sources = files('telemetry.c', 'telemetry_data.c', 'telemetry_legacy.c') headers = files('rte_telemetry.h') includes += include_directories('../librte_metrics') From patchwork Mon Mar 22 14:07:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriel Ganne X-Patchwork-Id: 89639 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 D92B5A034F; Mon, 22 Mar 2021 15:08:05 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3544C406A3; Mon, 22 Mar 2021 15:08:02 +0100 (CET) Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by mails.dpdk.org (Postfix) with ESMTP id 8CD0A4003D for ; Mon, 22 Mar 2021 15:07:59 +0100 (CET) Received: from localhost (unknown [10.16.0.62]) by proxy.6wind.com (Postfix) with ESMTP id 80398914820; Mon, 22 Mar 2021 15:07:59 +0100 (CET) From: Gabriel Ganne To: Bruce Richardson Cc: dev@dpdk.org, olivier.matz@6wind.com, thierry.herbelot@6wind.com, Gabriel Ganne Date: Mon, 22 Mar 2021 15:07:57 +0100 Message-Id: <20210322140757.7888-2-gabriel.ganne@6wind.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210322140757.7888-1-gabriel.ganne@6wind.com> References: <20210322140757.7888-1-gabriel.ganne@6wind.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 3/3] meson: remove unnecessary explicit link to libpcap 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 Sender: "dev" libpcap is already found and registered as a dependency by meson, and the dependency is already correctly used in librte_port. This line is just unnecessary. It also has the side effect of messing with the meson link line: dpdk link will be declared twice: manually and then through pkg-config. If you configure meson to prefer static linking over dynamic, this will cause the build to fail on librte_port, since the pcap deps are not yet seen by the linker. Signed-off-by: Gabriel Ganne --- config/meson.build | 1 - 1 file changed, 1 deletion(-) diff --git a/config/meson.build b/config/meson.build index 0fb7e1b27a0f..3eb90327dfcc 100644 --- a/config/meson.build +++ b/config/meson.build @@ -177,7 +177,6 @@ if not pcap_dep.found() endif if pcap_dep.found() and cc.has_header('pcap.h', dependencies: pcap_dep) dpdk_conf.set('RTE_PORT_PCAP', 1) - dpdk_extra_ldflags += '-lpcap' endif # for clang 32-bit compiles we need libatomic for 64-bit atomic ops