From patchwork Fri Apr 26 16:50:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 53110 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1A4301B750; Fri, 26 Apr 2019 18:51:02 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 0FAA01B729 for ; Fri, 26 Apr 2019 18:50:58 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Apr 2019 09:50:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,398,1549958400"; d="scan'208";a="165364478" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.222.236]) by fmsmga004.fm.intel.com with ESMTP; 26 Apr 2019 09:50:57 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: thomas@monjalon.net, bluca@debian.org, Bruce Richardson Date: Fri, 26 Apr 2019 17:50:38 +0100 Message-Id: <20190426165043.17268-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190426165043.17268-1-bruce.richardson@intel.com> References: <20190423220644.54589-1-bruce.richardson@intel.com> <20190426165043.17268-1-bruce.richardson@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 1/6] examples/l3fwd: fix compile on FreeBSD X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On freebsd we need to include sys/socket.h to get the definition of AF_INET in order to compile. Fixes: d5ceea4ab160 ("examples/l3fwd: format IP addresses for printing") Signed-off-by: Bruce Richardson Acked-by: Luca Boccassi --- examples/l3fwd/l3fwd_lpm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c index 172a036b2..60a00639e 100644 --- a/examples/l3fwd/l3fwd_lpm.c +++ b/examples/l3fwd/l3fwd_lpm.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include From patchwork Fri Apr 26 16:50:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 53111 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6C59C1B75A; Fri, 26 Apr 2019 18:51:06 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 5B0921B73C for ; Fri, 26 Apr 2019 18:51:01 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Apr 2019 09:51:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,398,1549958400"; d="scan'208";a="165364491" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.222.236]) by fmsmga004.fm.intel.com with ESMTP; 26 Apr 2019 09:51:00 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: thomas@monjalon.net, bluca@debian.org, Bruce Richardson Date: Fri, 26 Apr 2019 17:50:39 +0100 Message-Id: <20190426165043.17268-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190426165043.17268-1-bruce.richardson@intel.com> References: <20190423220644.54589-1-bruce.richardson@intel.com> <20190426165043.17268-1-bruce.richardson@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 2/6] examples: install examples as part of ninja install X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" When we install dpdk onto a system, we want to put the examples into the /usr/share/dpdk (or /usr/local/share) directory for reference. Signed-off-by: Bruce Richardson Acked-by: Luca Boccassi --- examples/meson.build | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/examples/meson.build b/examples/meson.build index e4babf6bf..1a6134f12 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -8,12 +8,20 @@ endif execinfo = cc.find_library('execinfo', required: false) -allow_skips = true # don't flag an error if we can't build an app +all_examples = run_command('sh', '-c', + 'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR && for d in * ; do if [ -d $d ] ; then echo $d ; fi ; done' + ).stdout().split() +# install all example code on install - irrespective of whether the example in +# question is to be built as part of this build or not. +foreach ex:all_examples + install_subdir(ex, + install_dir: get_option('datadir') + '/dpdk/examples', + exclude_files: 'meson.build') +endforeach if get_option('examples').to_lower() == 'all' - dirs = run_command('sh', '-c', - 'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR && for d in * ; do if [ -d $d ] ; then echo $d ; fi ; done') - examples = dirs.stdout().split() + examples = all_examples + allow_skips = true # don't flag an error if we can't build an app else examples = get_option('examples').split(',') allow_skips = false # error out if we can't build a requested app From patchwork Fri Apr 26 16:50:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 53112 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6D3991B765; Fri, 26 Apr 2019 18:51:09 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 93B211B758 for ; Fri, 26 Apr 2019 18:51:03 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Apr 2019 09:51:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,398,1549958400"; d="scan'208";a="165364511" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.222.236]) by fmsmga004.fm.intel.com with ESMTP; 26 Apr 2019 09:51:02 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: thomas@monjalon.net, bluca@debian.org, Bruce Richardson Date: Fri, 26 Apr 2019 17:50:40 +0100 Message-Id: <20190426165043.17268-4-bruce.richardson@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190426165043.17268-1-bruce.richardson@intel.com> References: <20190423220644.54589-1-bruce.richardson@intel.com> <20190426165043.17268-1-bruce.richardson@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 3/6] build: fix ninja install on FreeBSD X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The post-install script to symlink the PMDs from their own PMD directory to the regular lib directory (so they would be found by ld at runtime) was using the "-r" flag to ln to create relative symlinks. This flag is unsupported by ln on FreeBSD causing the ninja install step to fail. Reworking the script to take the relative driver path as parameter removes the need for ln to calculate the relative path ensuring compatibility with FreeBSD. As part of the fix, we move the registration of the install script to the config/meson.build file, from the top level one. This improves readability as the script takes as parameters the variables set in that file. Fixes: ed4d43d73e2b ("build: symlink drivers to library directory") Signed-off-by: Bruce Richardson Acked-by: Luca Boccassi --- buildtools/symlink-drivers-solibs.sh | 7 ++++--- config/meson.build | 7 +++++++ meson.build | 7 ------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/buildtools/symlink-drivers-solibs.sh b/buildtools/symlink-drivers-solibs.sh index 9826c6ae3..42985e855 100644 --- a/buildtools/symlink-drivers-solibs.sh +++ b/buildtools/symlink-drivers-solibs.sh @@ -7,6 +7,7 @@ # others, e.g. PCI device PMDs depending on the PCI bus driver. # parameters to script are paths relative to install prefix: -# 1. directory containing driver files e.g. lib64/dpdk/drivers -# 2. directory for installed regular libs e.g. lib64 -ln -rsf ${DESTDIR}/${MESON_INSTALL_PREFIX}/$1/* ${DESTDIR}/${MESON_INSTALL_PREFIX}/$2 +# 1. directory for installed regular libs e.g. lib64 +# 2. subdirectory of libdir where the pmds are + +cd ${MESON_INSTALL_DESTDIR_PREFIX}/$1 && ln -sfv $2/librte_*.so* . diff --git a/config/meson.build b/config/meson.build index f8aded6ed..3678348de 100644 --- a/config/meson.build +++ b/config/meson.build @@ -42,6 +42,13 @@ endif driver_install_path = join_paths(get_option('libdir'), pmd_subdir_opt) eal_pmd_path = join_paths(get_option('prefix'), driver_install_path) +# driver .so files often depend upon the bus drivers for their connect bus, +# e.g. ixgbe depends on librte_bus_pci. This means that the bus drivers need +# to be in the library path, so symlink the drivers from the main lib directory. +meson.add_install_script('../buildtools/symlink-drivers-solibs.sh', + get_option('libdir'), + pmd_subdir_opt) + # set the machine type and cflags for it if meson.is_cross_build() machine = host_machine.cpu() diff --git a/meson.build b/meson.build index a96486597..d1e8e5239 100644 --- a/meson.build +++ b/meson.build @@ -63,13 +63,6 @@ configure_file(output: build_cfg, # them. dpdk_drivers = ['-Wl,--whole-archive'] + dpdk_drivers + ['-Wl,--no-whole-archive'] -# driver .so files often depend upon the bus drivers for their connect bus, -# e.g. ixgbe depends on librte_bus_pci. This means that the bus drivers need -# to be in the library path, so symlink the drivers from the main lib directory. -meson.add_install_script('buildtools/symlink-drivers-solibs.sh', - driver_install_path, - get_option('libdir')) - pkg = import('pkgconfig') pkg.generate(name: meson.project_name(), filebase: 'lib' + meson.project_name().to_lower(), From patchwork Fri Apr 26 16:50:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 53113 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0D9721B76D; Fri, 26 Apr 2019 18:51:13 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 83C541B75D for ; Fri, 26 Apr 2019 18:51:06 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Apr 2019 09:51:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,398,1549958400"; d="scan'208";a="165364521" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.222.236]) by fmsmga004.fm.intel.com with ESMTP; 26 Apr 2019 09:51:05 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: thomas@monjalon.net, bluca@debian.org, Bruce Richardson Date: Fri, 26 Apr 2019 17:50:41 +0100 Message-Id: <20190426165043.17268-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190426165043.17268-1-bruce.richardson@intel.com> References: <20190423220644.54589-1-bruce.richardson@intel.com> <20190426165043.17268-1-bruce.richardson@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 4/6] devtools/test-meson-builds: add testing of pkg-config file X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The pkg-config file generated as part of the build of DPDK should allow applications to be built with an installed DPDK. We can test this as part of the build by doing an install of DPDK to a temporary directory within the build folder, and by then compiling up a few sample apps using make working off that directory. Signed-off-by: Bruce Richardson Acked-by: Luca Boccassi --- devtools/test-meson-builds.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index 630a1a6fe..73f993b98 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -15,6 +15,11 @@ srcdir=$(dirname $(readlink -f $0))/.. MESON=${MESON:-meson} use_shared="--default-library=shared" +if command -v gmake >/dev/null 2>&1 ; then + MAKE=gmake +else + MAKE=make +fi if command -v ninja >/dev/null 2>&1 ; then ninja_cmd=ninja elif command -v ninja-build >/dev/null 2>&1 ; then @@ -90,3 +95,25 @@ if command -v $c >/dev/null 2>&1 ; then $use_shared --cross-file $f done fi + +############## +# Test installation of the x86-default target, to be used for checking +# the sample apps build using the pkg-config file for cflags and libs +############### +build_path=build-x86-default +DESTDIR=`pwd`/$build_path/install-root ; export DESTDIR +$ninja_cmd -C $build_path install + +pc_file=$(find $DESTDIR -name libdpdk.pc) +PKG_CONFIG_PATH=$(dirname $pc_file) ; export PKG_CONFIG_PATH + +# rather than hacking our environment, just edit the .pc file prefix value +sed -i -e "s|prefix=|prefix=$DESTDIR|" $pc_file + +for example in helloworld l2fwd l3fwd skeleton timer; do + echo "## Building $example" + $MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example +done + +echo "" +echo "## $0: Completed OK" From patchwork Fri Apr 26 16:50:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 53114 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5CC8A1B7C4; Fri, 26 Apr 2019 18:51:16 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id DA9821B767 for ; Fri, 26 Apr 2019 18:51:09 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Apr 2019 09:51:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,398,1549958400"; d="scan'208";a="165364536" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.222.236]) by fmsmga004.fm.intel.com with ESMTP; 26 Apr 2019 09:51:08 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: thomas@monjalon.net, bluca@debian.org, Bruce Richardson Date: Fri, 26 Apr 2019 17:50:42 +0100 Message-Id: <20190426165043.17268-6-bruce.richardson@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190426165043.17268-1-bruce.richardson@intel.com> References: <20190423220644.54589-1-bruce.richardson@intel.com> <20190426165043.17268-1-bruce.richardson@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 5/6] build: add libbsd to pkg-config file if enabled X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" If libbsd is enabled in DPDK, the strlcpy and strlcat functions in rte_string_fns.h redirect to the varients in libbsd, only using the fallbacks if it is not enabled. Therefore, if libbsd is enabled, it needs to be called out as a DPDK dependency in the pkgconfig file. To ensure that we don't have undefined variables on non-Linux platforms, we can remove the linux condition around the libbsd check - no harm comes in looking for it on other OS, since it's an optional dependency. To verify this builds correctly, the cmdline sample app is added to the list of examples compiled by test-meson-builds. Without this change compilation fails if libbsd is present on the system Signed-off-by: Bruce Richardson Acked-by: Luca Boccassi --- config/meson.build | 10 ++++------ devtools/test-meson-builds.sh | 2 +- meson.build | 2 ++ 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config/meson.build b/config/meson.build index 3678348de..0d25646f5 100644 --- a/config/meson.build +++ b/config/meson.build @@ -132,12 +132,10 @@ if numa_dep.found() and cc.has_header('numaif.h') dpdk_extra_ldflags += '-lnuma' endif -# check for strlcpy -if is_linux - libbsd = dependency('libbsd', required: false) - if libbsd.found() - dpdk_conf.set('RTE_USE_LIBBSD', 1) - endif +# check for libbsd +libbsd = dependency('libbsd', required: false) +if libbsd.found() + dpdk_conf.set('RTE_USE_LIBBSD', 1) endif # add -include rte_config to cflags diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index 73f993b98..a9fdce81f 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -110,7 +110,7 @@ PKG_CONFIG_PATH=$(dirname $pc_file) ; export PKG_CONFIG_PATH # rather than hacking our environment, just edit the .pc file prefix value sed -i -e "s|prefix=|prefix=$DESTDIR|" $pc_file -for example in helloworld l2fwd l3fwd skeleton timer; do +for example in cmdline helloworld l2fwd l3fwd skeleton timer; do echo "## Building $example" $MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example done diff --git a/meson.build b/meson.build index d1e8e5239..46f9c5683 100644 --- a/meson.build +++ b/meson.build @@ -70,6 +70,8 @@ pkg.generate(name: meson.project_name(), libraries: dpdk_libraries, libraries_private: dpdk_drivers + dpdk_static_libraries + ['-Wl,-Bdynamic'] + dpdk_extra_ldflags, + requires: libbsd, # apps using rte_string_fns.h may need this if enabled + # if libbsd is not enabled, then this is blank description: '''The Data Plane Development Kit (DPDK). Note that CFLAGS might contain an -march flag higher than typical baseline. This is required for a number of static inline functions in the public headers.''', From patchwork Fri Apr 26 16:50:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 53115 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4CE161B7E1; Fri, 26 Apr 2019 18:51:20 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id A86381B7C4 for ; Fri, 26 Apr 2019 18:51:14 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Apr 2019 09:51:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,398,1549958400"; d="scan'208";a="165364549" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.222.236]) by fmsmga004.fm.intel.com with ESMTP; 26 Apr 2019 09:51:12 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: thomas@monjalon.net, bluca@debian.org, Bruce Richardson Date: Fri, 26 Apr 2019 17:50:43 +0100 Message-Id: <20190426165043.17268-7-bruce.richardson@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190426165043.17268-1-bruce.richardson@intel.com> References: <20190423220644.54589-1-bruce.richardson@intel.com> <20190426165043.17268-1-bruce.richardson@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 6/6] examples: remove auto-generation of examples list X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The examples/meson.build file scanned the filesystem to find all examples to build (for examples=all option) and install. However, using run_command and scanning the filesystem prevented ninja from properly detecting the addition or removal of any examples - one had to recreate the build directory from scratch to guarantee correct detection of all examples. This patch replaces this generated list with a static list of examples, thereby allowing proper tracking by ninja/meson, but at the cost of having to update this file when a new example is added or removed. Signed-off-by: Bruce Richardson Acked-by: Luca Boccassi --- examples/meson.build | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/examples/meson.build b/examples/meson.build index 1a6134f12..8b6577cf7 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -8,9 +8,34 @@ endif execinfo = cc.find_library('execinfo', required: false) -all_examples = run_command('sh', '-c', - 'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR && for d in * ; do if [ -d $d ] ; then echo $d ; fi ; done' - ).stdout().split() +# list of all example apps. Keep 1-3 per line, in alphabetical order. +all_examples = [ + 'bbdev_app', 'bond', + 'bpf', 'cmdline', + 'distributor', 'ethtool', + 'eventdev_pipeline', 'exception_path', + 'fips_validation', 'flow_classify', + 'flow_filtering', 'helloworld', + 'ip_fragmentation', 'ip_pipeline', + 'ip_reassembly', 'ipsec-secgw', + 'ipv4_multicast', 'kni', + 'l2fwd', 'l2fwd-cat', + 'l2fwd-crypto', 'l2fwd-jobstats', + 'l2fwd-keepalive', 'l3fwd', + 'l3fwd-acl', 'l3fwd-power', + 'l3fwd-vf', 'link_status_interrupt', + 'load_balancer', 'multi_process', + 'netmap_compat', 'packet_ordering', + 'performance-thread', 'ptpclient', + 'qos_meter', 'qos_sched', + 'quota_watermark', 'rxtx_callbacks', + 'server_node_efd', 'service_cores', + 'skeleton', 'tep_termination', + 'timer', 'vdpa', + 'vhost', 'vhost_crypto', + 'vhost_scsi', 'vm_power_manager', + 'vmdq', 'vmdq_dcb', +] # install all example code on install - irrespective of whether the example in # question is to be built as part of this build or not. foreach ex:all_examples