Building DPDK with meson and ninja
Subsystems (4)
v2 cover Building DPDK with meson and ninja
Following on from previous RFC [http://dpdk.org/dev/patchwork/patch/25104/]
here is a second draft implementation for building DPDK with meson and ninja. While still not building all of DPDK, and needing patch cleanup so that patches don't overwrite previous work, it is more complete in many ways than the previous version and includes:
* dynamic build configuration e.g. building pcap driver only if pcap is found, only build af_packet if the target is linux, and only building QAT and openssl crypto drivers if libcrypto is found
* support for pmdinfo inside the PMDs(for shared builds) and binaries (for static builds)
* generalized/standardized way of building libs and drivers, though the drivers code still needs generalization at the driver, rather than driver-class level.
* support for having a pkgconfig file for DPDK on install, and helloworld and l2fwd can be built using the pkgconfig info (via make, not ninja)
* support for library versions
* an implementation for FreeBSD as well as Linux
* all libraries are included in the build, as well as a number of NIC, crypto, and mempool drivers
* the igb_uio kernel module is build via the kernel Kbuild system as part of a meson/ninja DPDK build
there is still plenty to do on this, but please review and test it out. I've kept the patches split so that the evolution of the work is a bit clearer than having it all send in a monolithic patch. All feedback welcome. I recommend one uses the latest meson release for this, though the minimum version supported should be v0.4.
I've tested static and dynamic builds with clang and gcc on Fedora 26, and done test builds on FreeBSD 11 with clang too. Build with other compilers and on other OS's may have issues, so YMMV.
To do a basic build, using gcc and with shared libs, in a folder called "gcc-build":
user@host:dpdk$ meson gcc-build .... user@host:dpdk$ cd gcc-build user@host:gcc-build$ ninja user@host:gcc-build$ sudo ninja install
To do a build with clang, using static libs:
user@host:dpdk$ CC=clang meson --default_library=static clang-build .... user@host:dpdk$ cd clang-build user@host:clang-build$ ninja user@host:clang-build$ sudo ninja install
Other options can be adjusted by running "mesonconf" in the build directory, i.e. gcc-build or clang-build in the examples above.
Bruce Richardson (40):
build: initial hooks for using meson with DPDK
build: create pkg-config file for DPDK
build: build linuxapp EAL with meson and ninja
build: add EAL support under BSD
build: add core libraries to meson build system
build: add i40e driver to meson build
build: add pmdinfogen to build
build: generate list of sources for pmdinfogen
build: build i40e driver, including pmdinfo
build: install usertools scripts
build: simplify generation of pmd.c files
build: generalize net driver build to higher level
build: remove hard-coded enablement of vector driver
build: add ixgbe driver to build
build: set up standard deps for drivers
build: add af_packet driver to build
build: add pcap PMD support
build: add symbol version map file support to libs
build: build libraries in a loop for brevity
build: version library .so files
eal: add version information to meson build
build: add mempool drivers to build
build: add gro library to meson build
build: tweak naming of pmd dependencies
build: track driver include directories properly
metrics: add metrics lib to meson build
build: track dependencies recursively
testpmd: compile testpmd with meson and ninja crypto/null: rename the version file to standard crypto/qat: remove dependency on ether library
build: add cryptodev and some crypto drivers to build
igb_uio: add igb_uio to meson build
ip_frag: rename version file to standard name
build: add most remaining libraries to meson build
build: add packet framework libs to meson build
acl: add acl library to meson build
build: add ark and avp PMDs to build
build: fix static library builds with base code
build: fix driver dependencies for static builds
examples: allow basic sample app build using pkg-config
app/meson.build | 32 ++++++
app/test-pmd/meson.build | 74 +++++++++++++
buildtools/gen-pmdinfo-cfile.sh | 41 ++++++++
buildtools/meson.build | 34 ++++++
buildtools/pmdinfogen/meson.build | 43 ++++++++
config/meson.build | 69 +++++++++++++
config/rte_config.h | 114 +++++++++++++++++++++
config/x86/meson.build | 70 +++++++++++++
drivers/crypto/meson.build | 108 +++++++++++++++++++
drivers/crypto/null/Makefile | 2 +-
drivers/crypto/null/meson.build | 32 ++++++
...crypto_version.map => rte_pmd_null_version.map} | 0
drivers/crypto/openssl/meson.build | 38 +++++++
drivers/crypto/qat/meson.build | 41 ++++++++
drivers/crypto/qat/qat_crypto.c | 1 -
drivers/mempool/meson.build | 108 +++++++++++++++++++
drivers/mempool/ring/meson.build | 32 ++++++
drivers/mempool/stack/meson.build | 32 ++++++
drivers/meson.build | 34 ++++++
drivers/net/af_packet/meson.build | 35 +++++++
drivers/net/ark/meson.build | 45 ++++++++
drivers/net/avp/meson.build | 34 ++++++
drivers/net/i40e/base/meson.build | 56 ++++++++++
drivers/net/i40e/meson.build | 61 +++++++++++
drivers/net/ixgbe/base/meson.build | 60 +++++++++++
drivers/net/ixgbe/meson.build | 58 +++++++++++
drivers/net/meson.build | 108 +++++++++++++++++++
drivers/net/pcap/meson.build | 41 ++++++++
examples/helloworld/Makefile | 13 +++
examples/l2fwd/Makefile | 13 +++
lib/librte_acl/meson.build | 60 +++++++++++
lib/librte_bitratestats/meson.build | 34 ++++++
lib/librte_cfgfile/meson.build | 35 +++++++
lib/librte_cmdline/meson.build | 57 +++++++++++
lib/librte_compat/meson.build | 36 +++++++
lib/librte_cryptodev/meson.build | 40 ++++++++
lib/librte_distributor/meson.build | 39 +++++++
lib/librte_eal/bsdapp/eal/meson.build | 67 ++++++++++++
lib/librte_eal/bsdapp/meson.build | 32 ++++++
lib/librte_eal/common/arch/meson.build | 33 ++++++
lib/librte_eal/common/arch/x86/meson.build | 32 ++++++
lib/librte_eal/common/include/arch/meson.build | 33 ++++++
lib/librte_eal/common/include/arch/x86/meson.build | 48 +++++++++
lib/librte_eal/common/include/meson.build | 71 +++++++++++++
lib/librte_eal/common/meson.build | 71 +++++++++++++
lib/librte_eal/linuxapp/eal/meson.build | 72 +++++++++++++
lib/librte_eal/linuxapp/igb_uio/Kbuild | 1 +
lib/librte_eal/linuxapp/igb_uio/meson.build | 47 +++++++++
lib/librte_eal/linuxapp/meson.build | 42 ++++++++
lib/librte_eal/meson.build | 44 ++++++++
lib/librte_efd/meson.build | 34 ++++++
lib/librte_ether/meson.build | 46 +++++++++
lib/librte_eventdev/meson.build | 36 +++++++
lib/librte_gro/meson.build | 34 ++++++
lib/librte_hash/meson.build | 46 +++++++++
lib/librte_ip_frag/Makefile | 2 +-
lib/librte_ip_frag/meson.build | 39 +++++++
..._ipfrag_version.map => rte_ip_frag_version.map} | 0
lib/librte_jobstats/meson.build | 34 ++++++
lib/librte_kni/meson.build | 35 +++++++
lib/librte_kvargs/meson.build | 35 +++++++
lib/librte_latencystats/meson.build | 34 ++++++
lib/librte_lpm/meson.build | 35 +++++++
lib/librte_mbuf/meson.build | 36 +++++++
lib/librte_mempool/meson.build | 35 +++++++
lib/librte_meter/meson.build | 34 ++++++
lib/librte_metrics/meson.build | 34 ++++++
lib/librte_net/meson.build | 46 +++++++++
lib/librte_pdump/meson.build | 34 ++++++
lib/librte_pipeline/meson.build | 35 +++++++
lib/librte_port/meson.build | 58 +++++++++++
lib/librte_power/meson.build | 35 +++++++
lib/librte_reorder/meson.build | 34 ++++++
lib/librte_ring/meson.build | 34 ++++++
lib/librte_sched/meson.build | 36 +++++++
lib/librte_table/meson.build | 52 ++++++++++
lib/librte_timer/meson.build | 34 ++++++
lib/librte_vhost/meson.build | 36 +++++++
lib/meson.build | 105 +++++++++++++++++++
meson.build | 88 ++++++++++++++++
meson_options.txt | 8 ++
usertools/meson.build | 32 ++++++
82 files changed, 3536 insertions(+), 3 deletions(-)
create mode 100644 app/meson.build
create mode 100644 app/test-pmd/meson.build
create mode 100755 buildtools/gen-pmdinfo-cfile.sh
create mode 100644 buildtools/meson.build
create mode 100644 buildtools/pmdinfogen/meson.build
create mode 100644 config/meson.build
create mode 100644 config/rte_config.h
create mode 100644 config/x86/meson.build
create mode 100644 drivers/crypto/meson.build
create mode 100644 drivers/crypto/null/meson.build
rename drivers/crypto/null/{rte_pmd_null_crypto_version.map => rte_pmd_null_version.map} (100%)
create mode 100644 drivers/crypto/openssl/meson.build
create mode 100644 drivers/crypto/qat/meson.build
create mode 100644 drivers/mempool/meson.build
create mode 100644 drivers/mempool/ring/meson.build
create mode 100644 drivers/mempool/stack/meson.build
create mode 100644 drivers/meson.build
create mode 100644 drivers/net/af_packet/meson.build
create mode 100644 drivers/net/ark/meson.build
create mode 100644 drivers/net/avp/meson.build
create mode 100644 drivers/net/i40e/base/meson.build
create mode 100644 drivers/net/i40e/meson.build
create mode 100644 drivers/net/ixgbe/base/meson.build
create mode 100644 drivers/net/ixgbe/meson.build
create mode 100644 drivers/net/meson.build
create mode 100644 drivers/net/pcap/meson.build
create mode 100644 lib/librte_acl/meson.build
create mode 100644 lib/librte_bitratestats/meson.build
create mode 100644 lib/librte_cfgfile/meson.build
create mode 100644 lib/librte_cmdline/meson.build
create mode 100644 lib/librte_compat/meson.build
create mode 100644 lib/librte_cryptodev/meson.build
create mode 100644 lib/librte_distributor/meson.build
create mode 100644 lib/librte_eal/bsdapp/eal/meson.build
create mode 100644 lib/librte_eal/bsdapp/meson.build
create mode 100644 lib/librte_eal/common/arch/meson.build
create mode 100644 lib/librte_eal/common/arch/x86/meson.build
create mode 100644 lib/librte_eal/common/include/arch/meson.build
create mode 100644 lib/librte_eal/common/include/arch/x86/meson.build
create mode 100644 lib/librte_eal/common/include/meson.build
create mode 100644 lib/librte_eal/common/meson.build
create mode 100644 lib/librte_eal/linuxapp/eal/meson.build
create mode 100644 lib/librte_eal/linuxapp/igb_uio/Kbuild
create mode 100644 lib/librte_eal/linuxapp/igb_uio/meson.build
create mode 100644 lib/librte_eal/linuxapp/meson.build
create mode 100644 lib/librte_eal/meson.build
create mode 100644 lib/librte_efd/meson.build
create mode 100644 lib/librte_ether/meson.build
create mode 100644 lib/librte_eventdev/meson.build
create mode 100644 lib/librte_gro/meson.build
create mode 100644 lib/librte_hash/meson.build
create mode 100644 lib/librte_ip_frag/meson.build
rename lib/librte_ip_frag/{rte_ipfrag_version.map => rte_ip_frag_version.map} (100%)
create mode 100644 lib/librte_jobstats/meson.build
create mode 100644 lib/librte_kni/meson.build
create mode 100644 lib/librte_kvargs/meson.build
create mode 100644 lib/librte_latencystats/meson.build
create mode 100644 lib/librte_lpm/meson.build
create mode 100644 lib/librte_mbuf/meson.build
create mode 100644 lib/librte_mempool/meson.build
create mode 100644 lib/librte_meter/meson.build
create mode 100644 lib/librte_metrics/meson.build
create mode 100644 lib/librte_net/meson.build
create mode 100644 lib/librte_pdump/meson.build
create mode 100644 lib/librte_pipeline/meson.build
create mode 100644 lib/librte_port/meson.build
create mode 100644 lib/librte_power/meson.build
create mode 100644 lib/librte_reorder/meson.build
create mode 100644 lib/librte_ring/meson.build
create mode 100644 lib/librte_sched/meson.build
create mode 100644 lib/librte_table/meson.build
create mode 100644 lib/librte_timer/meson.build
create mode 100644 lib/librte_vhost/meson.build
create mode 100644 lib/meson.build
create mode 100644 meson.build
create mode 100644 meson_options.txt
create mode 100644 usertools/meson.buildSignature · 1 line
2.13.4
RFC v2 1/40 build: initial hooks for using meson with DPDK
--- config/meson.build | 47 ++++++++++++++++++++++++++++++++++ config/rte_config.h | 50 +++++++++++++++++++++++++++++++++++++ config/x86/meson.build | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++ meson.build | 60 ++++++++++++++++++++++++++++++++++++++++++++ meson_options.txt | 1 + 5 files changed, 226 insertions(+) create mode 100644 config/meson.build create mode 100644 config/rte_config.h create mode 100644 config/x86/meson.build create mode 100644 meson.build create mode 100644 meson_options.txt
config/meson.build new file +47 -0
@@ -0,0 +1,47 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# set the machine type and cflags for it +machine = get_option('machine') +dpdk_conf.set('RTE_MACHINE', machine) +add_project_arguments('-march=@0@'.format(machine), language: 'c') + +compile_time_cpuflags = [] +if host_machine.cpu_family().startswith('x86') + subdir('x86') +endif +dpdk_conf.set('RTE_COMPILE_TIME_CPUFLAGS', ','.join(compile_time_cpuflags)) + + +# set the install path for the drivers +dpdk_conf.set_quoted('RTE_EAL_PMD_PATH', driver_install_path) + +install_headers('rte_config.h')
config/rte_config.h new file +50 -0
50 lines not on this page · raw message
config/x86/meson.build new file +68 -0
68 lines not on this page · raw message
meson.build new file +60 -0
60 lines not on this page · raw message
meson_options.txt new file +1 -0
@@ -0,0 +1 @@ +option('machine', type : 'string', value : 'native', description : 'set the target machine type')
Signature · 1 line
2.13.4
RFC v2 2/40 build: create pkg-config file for DPDK
In reply to Bruce Richardson--- meson.build | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)
meson.build +16 -1
@@ -36,9 +36,10 @@ project('DPDK', 'C', meson_version: '>= 0.40.1' ) -# set up some global vars for compiler, platform and configuration +# set up some global vars for compiler, platform, configuration, etc. cc = meson.get_compiler('c') dpdk_conf = configuration_data() +dpdk_libraries = [] # for static libs, treat the drivers as regular libraries, otherwise # for shared libs, put them in a driver folder
@@ -58,3 +59,17 @@ build_cfg = 'rte_build_config.h' configure_file(output: build_cfg, configuration: dpdk_conf, install_dir: get_option('includedir')) + +# the DPDK libs needs to be passed to the link command in reverse order +dpdk_link_libs = [] +foreach lib: dpdk_libraries + dpdk_link_libs = [lib] + dpdk_link_libs +endforeach + +pkg = import('pkgconfig') +pkg.generate(name: meson.project_name(), + version: meson.project_version(), + libraries: dpdk_link_libs, + description: 'The Data Plane Development Kit (DPDK)', + extra_cflags: '-include "rte_config.h"' +)
Signature · 1 line
2.13.4
RFC v2 3/40 build: build linuxapp EAL with meson and ninja
In reply to Bruce Richardson--- config/meson.build | 24 +++++++- config/rte_config.h | 9 +++ config/x86/meson.build | 2 + lib/librte_eal/common/arch/meson.build | 33 ++++++++++ lib/librte_eal/common/arch/x86/meson.build | 32 ++++++++++ lib/librte_eal/common/include/arch/meson.build | 33 ++++++++++ lib/librte_eal/common/include/arch/x86/meson.build | 47 ++++++++++++++ lib/librte_eal/common/include/meson.build | 71 ++++++++++++++++++++++ lib/librte_eal/common/meson.build | 71 ++++++++++++++++++++++ lib/librte_eal/linuxapp/eal/meson.build | 62 +++++++++++++++++++ lib/librte_eal/linuxapp/meson.build | 32 ++++++++++ lib/librte_eal/meson.build | 40 ++++++++++++ lib/meson.build | 41 +++++++++++++ meson.build | 3 + meson_options.txt | 7 ++- 15 files changed, 504 insertions(+), 3 deletions(-) create mode 100644 lib/librte_eal/common/arch/meson.build create mode 100644 lib/librte_eal/common/arch/x86/meson.build create mode 100644 lib/librte_eal/common/include/arch/meson.build create mode 100644 lib/librte_eal/common/include/arch/x86/meson.build create mode 100644 lib/librte_eal/common/include/meson.build create mode 100644 lib/librte_eal/common/meson.build create mode 100644 lib/librte_eal/linuxapp/eal/meson.build create mode 100644 lib/librte_eal/linuxapp/meson.build create mode 100644 lib/librte_eal/meson.build create mode 100644 lib/meson.build
config/meson.build +22 -2
@@ -34,14 +34,34 @@ machine = get_option('machine') dpdk_conf.set('RTE_MACHINE', machine) add_project_arguments('-march=@0@'.format(machine), language: 'c') +# add -include rte_config to cflags +add_project_arguments('-include', 'rte_config.h', language: 'c') + +# disable any unwanted warnings +unwanted_warnings = [ + '-Wno-address-of-packed-member', + '-Wno-format-truncation' +] +foreach arg: unwanted_warnings + if cc.has_argument(arg) + add_project_arguments(arg, language: 'c') + endif +endforeach + compile_time_cpuflags = [] if host_machine.cpu_family().startswith('x86') - subdir('x86') + arch_subdir = 'x86' + subdir(arch_subdir) endif dpdk_conf.set('RTE_COMPILE_TIME_CPUFLAGS', ','.join(compile_time_cpuflags)) - # set the install path for the drivers dpdk_conf.set_quoted('RTE_EAL_PMD_PATH', driver_install_path) +# set other values pulled from the build options +dpdk_conf.set('RTE_MAX_LCORE', get_option('max_lcores')) +dpdk_conf.set('RTE_MAX_NUMA_NODES', get_option('max_numa_nodes')) +dpdk_conf.set('RTE_LIBEAL_USE_HPET', get_option('use_hpet')) +dpdk_conf.set('RTE_EAL_ALLOW_INV_SOCKET_ID', get_option('allow_invalid_socket_id')) + install_headers('rte_config.h')
config/rte_config.h +9 -0
@@ -47,4 +47,13 @@#include <rte_build_config.h> +/* EAL defines */ +#define RTE_MAX_MEMSEG 512 +#define RTE_MAX_MEMZONE 2560 +#define RTE_MAX_TAILQ 32 +#define RTE_LOG_LEVEL RTE_LOG_INFO +#define RTE_LOG_DP_LEVEL RTE_LOG_INFO +#define RTE_BACKTRACE 1 +#define RTE_EAL_VFIO 1 +#endif /* _RTE_CONFIG_H_ */
config/x86/meson.build +2 -0
@@ -66,3 +66,5 @@ if cc.get_define('__AVX2__', args: march_opt) != '' dpdk_conf.set('RTE_MACHINE_CPUFLAG_AVX2', 1) compile_time_cpuflags += ['RTE_CPUFLAG_AVX2'] endif + +dpdk_conf.set('RTE_CACHE_LINE_SIZE', 64)
lib/librte_eal/common/arch/meson.build new file +33 -0
@@ -0,0 +1,33 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +eal_inc += include_directories(arch_subdir) +subdir(arch_subdir)
lib/librte_eal/common/arch/x86/meson.build new file +32 -0
@@ -0,0 +1,32 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +eal_common_arch_sources = files('rte_spinlock.c', 'rte_cpuflags.c')
lib/librte_eal/common/include/arch/meson.build new file +33 -0
@@ -0,0 +1,33 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +eal_inc += include_directories(arch_subdir) +subdir(arch_subdir)
lib/librte_eal/common/include/arch/x86/meson.build new file +47 -0
47 lines not on this page · raw message
lib/librte_eal/common/include/meson.build new file +71 -0
71 lines not on this page · raw message
lib/librte_eal/common/meson.build new file +71 -0
71 lines not on this page · raw message
lib/librte_eal/linuxapp/eal/meson.build new file +62 -0
62 lines not on this page · raw message
lib/librte_eal/linuxapp/meson.build new file +32 -0
@@ -0,0 +1,32 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +subdir('eal')
lib/librte_eal/meson.build new file +40 -0
@@ -0,0 +1,40 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +eal_inc = [global_inc] +subdir('common') +if host_machine.system() == 'linux' + subdir('linuxapp') +elif host_machine.system() == 'freebsd' + subdir('bsdapp') +else + error('unsupported system type @0@'.format(hostmachine.system())) +endif
lib/meson.build new file +41 -0
41 lines not on this page · raw message
meson.build +3 -0
@@ -54,6 +54,9 @@ endif global_inc = include_directories('.', 'config') subdir('config') +# now build libs and drivers +subdir('lib') + # write the build config build_cfg = 'rte_build_config.h' configure_file(output: build_cfg,
meson_options.txt +6 -1
@@ -1 +1,6 @@ -option('machine', type : 'string', value : 'native', description : 'set the target machine type') +option('machine', type: 'string', value: 'native', description: 'set the target machine type') +option('max_lcores', type: 'string', value: '128', description: 'maximum number of cores/threads supported by EAL') +option('max_numa_nodes', type: 'string', value: '4', description: 'maximum number of NUMA nodes supported by EAL') +option('use_hpet', type: 'boolean', value: false, description: 'use HPET timer in EAL') +option('allow_invalid_socket_id', type: 'boolean', value: false, + description: 'allow out-of-range NUMA socket id\'s for platforms that don\'t report the value correctly')
Signature · 1 line
2.13.4
RFC v2 4/40 build: add EAL support under BSD
In reply to Bruce Richardson--- lib/librte_eal/bsdapp/eal/meson.build | 58 +++++++++++++++++++++++++++++++++++ lib/librte_eal/bsdapp/meson.build | 32 +++++++++++++++++++ lib/librte_eal/meson.build | 2 ++ 3 files changed, 92 insertions(+) create mode 100644 lib/librte_eal/bsdapp/eal/meson.build create mode 100644 lib/librte_eal/bsdapp/meson.build
lib/librte_eal/bsdapp/eal/meson.build new file +58 -0
@@ -0,0 +1,58 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +eal_inc += include_directories('include') +dpdk_includes += '-I@0@/include'.format(meson.current_source_dir()) +install_subdir('include/exec-env', install_dir: 'include') + +sources = ['eal_alarm.c', + 'eal_debug.c', + 'eal_hugepage_info.c', + 'eal_interrupts.c', + 'eal_lcore.c', + 'eal_thread.c', + 'eal_timer.c', + 'eal.c', + 'eal_memory.c', + 'eal_pci.c', +] + +eal_lib = library('rte_eal', sources, eal_common_sources, eal_common_arch_sources, + dependencies: dependency('threads'), + include_directories : eal_inc, + c_args: '-D_GNU_SOURCE', + link_args: '-lexecinfo', + install: true +) + +dpdk_libraries += ['-pthread', eal_lib] + +rte_eal = declare_dependency(link_with: eal_lib, include_directories: eal_inc)
lib/librte_eal/bsdapp/meson.build new file +32 -0
@@ -0,0 +1,32 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +subdir('eal')
lib/librte_eal/meson.build +2 -0
@@ -32,8 +32,10 @@ eal_inc = [global_inc] subdir('common') if host_machine.system() == 'linux' + dpdk_conf.set('RTE_EXEC_ENV_LINUXAPP', 1) subdir('linuxapp') elif host_machine.system() == 'freebsd' + dpdk_conf.set('RTE_EXEC_ENV_BSDAPP', 1) subdir('bsdapp') else error('unsupported system type @0@'.format(hostmachine.system()))
Signature · 1 line
2.13.4
RFC v2 5/40 build: add core libraries to meson build system
In reply to Bruce Richardson--- config/rte_config.h | 14 ++++++++++ lib/librte_cmdline/meson.build | 63 ++++++++++++++++++++++++++++++++++++++++++ lib/librte_compat/meson.build | 35 +++++++++++++++++++++++ lib/librte_ether/meson.build | 49 ++++++++++++++++++++++++++++++++ lib/librte_hash/meson.build | 54 ++++++++++++++++++++++++++++++++++++ lib/librte_kvargs/meson.build | 43 ++++++++++++++++++++++++++++ lib/librte_mbuf/meson.build | 42 ++++++++++++++++++++++++++++ lib/librte_mempool/meson.build | 43 ++++++++++++++++++++++++++++ lib/librte_net/meson.build | 52 ++++++++++++++++++++++++++++++++++ lib/librte_ring/meson.build | 43 ++++++++++++++++++++++++++++ lib/meson.build | 18 ++++++------ 11 files changed, 447 insertions(+), 9 deletions(-) create mode 100644 lib/librte_cmdline/meson.build create mode 100644 lib/librte_compat/meson.build create mode 100644 lib/librte_ether/meson.build create mode 100644 lib/librte_hash/meson.build create mode 100644 lib/librte_kvargs/meson.build create mode 100644 lib/librte_mbuf/meson.build create mode 100644 lib/librte_mempool/meson.build create mode 100644 lib/librte_net/meson.build create mode 100644 lib/librte_ring/meson.build
config/rte_config.h +14 -0
@@ -56,4 +56,18 @@#define RTE_BACKTRACE 1#define RTE_EAL_VFIO 1 +/* mempool defines */ +#define RTE_MEMPOOL_CACHE_MAX_SIZE 512 + +/* mbuf defines */ +#define RTE_MBUF_DEFAULT_MEMPOOL_OPS "ring_mp_mc" +#define RTE_MBUF_REFCNT_ATOMIC 1 +#define RTE_PKTMBUF_HEADROOM 128 + +/* ether defines */ +#define RTE_MAX_ETHPORTS 32 +#define RTE_MAX_QUEUES_PER_PORT 1024 +#define RTE_ETHDEV_QUEUE_STAT_CNTRS 16 +#define RTE_ETHDEV_RXTX_CALLBACKS 1 +#endif /* _RTE_CONFIG_H_ */
lib/librte_cmdline/meson.build new file +63 -0
63 lines not on this page · raw message
lib/librte_compat/meson.build new file +35 -0
@@ -0,0 +1,35 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +install_headers('rte_compat.h') + +rte_compat = declare_dependency(include_directories: include_directories('.'))
lib/librte_ether/meson.build new file +49 -0
49 lines not on this page · raw message
lib/librte_hash/meson.build new file +54 -0
54 lines not on this page · raw message
lib/librte_kvargs/meson.build new file +43 -0
43 lines not on this page · raw message
lib/librte_mbuf/meson.build new file +42 -0
42 lines not on this page · raw message
lib/librte_mempool/meson.build new file +43 -0
43 lines not on this page · raw message
lib/librte_net/meson.build new file +52 -0
52 lines not on this page · raw message
lib/librte_ring/meson.build new file +43 -0
43 lines not on this page · raw message
lib/meson.build +9 -9
@@ -30,12 +30,12 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. subdir('librte_eal') -#subdir('librte_ring') -#subdir('librte_mempool') -#subdir('librte_cmdline') -#subdir('librte_mbuf') -#subdir('librte_net') -#subdir('librte_ether') -#subdir('librte_compat') -#subdir('librte_hash') -#subdir('librte_kvargs') +subdir('librte_ring') +subdir('librte_mempool') +subdir('librte_cmdline') +subdir('librte_mbuf') +subdir('librte_net') +subdir('librte_ether') +subdir('librte_compat') +subdir('librte_hash') +subdir('librte_kvargs')
Signature · 1 line
2.13.4
RFC v2 6/40 build: add i40e driver to meson build
In reply to Bruce Richardson--- config/rte_config.h | 14 ++++++++ drivers/meson.build | 32 ++++++++++++++++++ drivers/net/i40e/base/meson.build | 55 ++++++++++++++++++++++++++++++ drivers/net/i40e/meson.build | 70 +++++++++++++++++++++++++++++++++++++++ drivers/net/meson.build | 32 ++++++++++++++++++ meson.build | 7 ++++ 6 files changed, 210 insertions(+) create mode 100644 drivers/meson.build create mode 100644 drivers/net/i40e/base/meson.build create mode 100644 drivers/net/i40e/meson.build create mode 100644 drivers/net/meson.build
config/rte_config.h +14 -0
@@ -47,6 +47,8 @@#include <rte_build_config.h> +/****** library defines ********/ +/* EAL defines */ #define RTE_MAX_MEMSEG 512#define RTE_MAX_MEMZONE 2560
@@ -70,4 +72,16 @@#define RTE_ETHDEV_QUEUE_STAT_CNTRS 16#define RTE_ETHDEV_RXTX_CALLBACKS 1 +/****** driver defines ********/ + +/* i40e defines */ +#define RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC 1 +#define RTE_LIBRTE_I40E_INC_VECTOR 1 +#undef RTE_LIBRTE_I40E_16BYTE_RX_DESC +#define RTE_LIBRTE_I40E_QUEUE_NUM_PER_PF 64 +#define RTE_LIBRTE_I40E_QUEUE_NUM_PER_VF 4 +#define RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM 4 +/* interval up to 8160 us, aligned to 2 (or default value) */ +#define RTE_LIBRTE_I40E_ITR_INTERVAL -1 +#endif /* _RTE_CONFIG_H_ */
drivers/meson.build new file +32 -0
@@ -0,0 +1,32 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +subdir('net')
drivers/net/i40e/base/meson.build new file +55 -0
55 lines not on this page · raw message
drivers/net/i40e/meson.build new file +70 -0
70 lines not on this page · raw message
drivers/net/meson.build new file +32 -0
@@ -0,0 +1,32 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +subdir('i40e')
meson.build +7 -0
@@ -40,6 +40,7 @@ project('DPDK', 'C', cc = meson.get_compiler('c') dpdk_conf = configuration_data() dpdk_libraries = [] +dpdk_drivers = [] # for static libs, treat the drivers as regular libraries, otherwise # for shared libs, put them in a driver folder
@@ -56,6 +57,7 @@ subdir('config') # now build libs and drivers subdir('lib') +subdir('drivers') # write the build config build_cfg = 'rte_build_config.h'
@@ -63,6 +65,11 @@ configure_file(output: build_cfg, configuration: dpdk_conf, install_dir: get_option('includedir')) +# for static builds, include the drivers directly +if get_option('default_library') == 'static' + dpdk_libraries = dpdk_drivers + dpdk_libraries +endif + # the DPDK libs needs to be passed to the link command in reverse order dpdk_link_libs = [] foreach lib: dpdk_libraries
Signature · 1 line
2.13.4
RFC v2 7/40 build: add pmdinfogen to build
In reply to Bruce Richardson--- buildtools/meson.build | 32 +++++++++++++++++++++++++++++ buildtools/pmdinfogen/meson.build | 43 +++++++++++++++++++++++++++++++++++++++ meson.build | 1 + 3 files changed, 76 insertions(+) create mode 100644 buildtools/meson.build create mode 100644 buildtools/pmdinfogen/meson.build
buildtools/meson.build new file +32 -0
@@ -0,0 +1,32 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +subdir('pmdinfogen')
buildtools/pmdinfogen/meson.build new file +43 -0
43 lines not on this page · raw message
meson.build +1 -0
@@ -57,6 +57,7 @@ subdir('config') # now build libs and drivers subdir('lib') +subdir('buildtools') subdir('drivers') # write the build config
Signature · 1 line
2.13.4
RFC v2 8/40 build: generate list of sources for pmdinfogen
In reply to Bruce Richardson--- drivers/net/i40e/meson.build | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/net/i40e/meson.build +6 -3
@@ -36,7 +36,7 @@ i40e_cflags = ['-DPF_DRIVER', subdir('base') -sources = [ +sources = files( 'i40e_ethdev.c', 'i40e_rxtx.c', 'i40e_ethdev_vf.c',
@@ -45,12 +45,15 @@ sources = [ 'i40e_flow.c', 'i40e_tm.c', 'rte_pmd_i40e.c' - ] + ) if arch_subdir == 'x86' - sources += 'i40e_rxtx_vec_sse.c' + sources += files('i40e_rxtx_vec_sse.c') endif +pmdinfogen_srcs = run_command('grep', '--files-with-matches', 'RTE_PMD_REGISTER_.*(.*)', sources).stdout().strip().split() +message(pmdinfogen_srcs) + install_headers('rte_pmd_i40e.h') i40e_lib = library('rte_pmd_i40e', sources,
Signature · 1 line
2.13.4
RFC v2 9/40 build: build i40e driver, including pmdinfo
In reply to Bruce Richardson--- buildtools/gen-pmdinfo-cfile.sh | 45 ++++++++++++++++++++++++++ buildtools/meson.build | 2 ++ drivers/net/i40e/meson.build | 30 ++++++++++++----- lib/librte_cmdline/meson.build | 17 +++++----- lib/librte_eal/common/include/arch/meson.build | 1 + lib/librte_eal/common/include/meson.build | 1 + lib/librte_eal/linuxapp/eal/meson.build | 1 + lib/librte_eal/meson.build | 1 + lib/librte_ether/meson.build | 5 ++- lib/librte_hash/meson.build | 5 ++- lib/librte_kvargs/meson.build | 5 ++- lib/librte_mbuf/meson.build | 5 ++- lib/librte_mempool/meson.build | 5 ++- lib/librte_net/meson.build | 5 ++- lib/librte_ring/meson.build | 5 ++- lib/meson.build | 31 ++++++++++++------ meson.build | 13 +++----- 17 files changed, 122 insertions(+), 55 deletions(-) create mode 100755 buildtools/gen-pmdinfo-cfile.sh
buildtools/gen-pmdinfo-cfile.sh new file +45 -0
@@ -0,0 +1,45 @@ +#! /bin/sh +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +input=$1 +output=$2 +pmdinfogen=$3 +CFLAGS=$4 +build_root=$5 + +tmp_o=${output%.c.pmd.o}.o +tmp_c=${output%.o}.c + +set -x +cc -Wfatal-errors $CFLAGS -I$build_root -include rte_config.h -c $input -o $tmp_o && \ + $pmdinfogen $tmp_o $tmp_c && \ + cc -c $tmp_c -o $output
buildtools/meson.build +2 -0
@@ -30,3 +30,5 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. subdir('pmdinfogen') + +pmdinfo = find_program('gen-pmdinfo-cfile.sh')
drivers/net/i40e/meson.build +22 -8
@@ -47,21 +47,35 @@ sources = files( 'rte_pmd_i40e.c' ) +deps = [rte_eal, rte_net, + rte_mbuf, rte_ether, + rte_mempool, rte_ring, + rte_hash, rte_kvargs] + if arch_subdir == 'x86' sources += files('i40e_rxtx_vec_sse.c') endif -pmdinfogen_srcs = run_command('grep', '--files-with-matches', 'RTE_PMD_REGISTER_.*(.*)', sources).stdout().strip().split() -message(pmdinfogen_srcs) - install_headers('rte_pmd_i40e.h') -i40e_lib = library('rte_pmd_i40e', sources, +pmdinfogen_srcs = run_command('grep', '--files-with-matches', + 'RTE_PMD_REGISTER_.*(.*)', sources).stdout().strip().split() +objs = [] +foreach src: pmdinfogen_srcs + out_filename = '@[email protected]'.format(src.split('/')[-1]) + pmd_o_file = custom_target(out_filename, + command: [pmdinfo, '@INPUT@', '@OUTPUT@', + pmdinfogen.full_path(), + ' '.join(dpdk_includes + i40e_cflags + ['-march=@0@'.format(machine)]), + meson.build_root()], + input: src, output: out_filename, + depends: pmdinfogen) + objs += pmd_o_file +endforeach + +i40e_lib = library('rte_pmd_i40e', sources, objs, include_directories: include_directories('base'), - dependencies: [rte_eal, rte_net, - rte_mbuf, rte_ether, - rte_mempool, rte_ring, - rte_hash, rte_kvargs], + dependencies: deps, link_with: base_lib, c_args: i40e_cflags, install: true,
lib/librte_cmdline/meson.build +8 -9
@@ -29,7 +29,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -sources = [ 'cmdline.c', +sources = files('cmdline.c', 'cmdline_cirbuf.c', 'cmdline_parse.c', 'cmdline_parse_etheraddr.c',
@@ -39,9 +39,9 @@ sources = [ 'cmdline.c', 'cmdline_parse_string.c', 'cmdline_rdline.c', 'cmdline_socket.c', - 'cmdline_vt100.c'] + 'cmdline_vt100.c') -install_headers('cmdline.h', +headers = ['cmdline.h', 'cmdline_parse.h', 'cmdline_parse_num.h', 'cmdline_parse_ipaddr.h',
@@ -51,13 +51,12 @@ install_headers('cmdline.h', 'cmdline_vt100.h', 'cmdline_socket.h', 'cmdline_cirbuf.h', - 'cmdline_parse_portlist.h') + 'cmdline_parse_portlist.h'] -cmdline_lib = library('rte_cmdline', sources, dependencies: rte_eal, +install_headers(headers) + +lib = library('rte_cmdline', sources, dependencies: rte_eal, install: true) -rte_cmdline = declare_dependency(link_with: cmdline_lib, +rte_cmdline = declare_dependency(link_with: lib, include_directories: include_directories('.')) -dpdk_libraries += cmdline_lib - -dpdk_conf.set('RTE_LIBRTE_CMDLINE', 1)
lib/librte_eal/common/include/arch/meson.build +1 -0
@@ -30,4 +30,5 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. eal_inc += include_directories(arch_subdir) +dpdk_includes += '-I@0@/@1@'.format(meson.current_source_dir(), arch_subdir) subdir(arch_subdir)
lib/librte_eal/common/include/meson.build +1 -0
@@ -30,6 +30,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. eal_inc += include_directories('.') +dpdk_includes += '-I@0@'.format(meson.current_source_dir()) common_headers = [ 'rte_alarm.h',
lib/librte_eal/linuxapp/eal/meson.build +1 -0
@@ -30,6 +30,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. eal_inc += include_directories('include') +dpdk_includes += '-I@0@/include'.format(meson.current_source_dir()) install_subdir('include/exec-env', install_dir: 'include') sources = ['eal_alarm.c',
lib/librte_eal/meson.build +1 -0
@@ -31,6 +31,7 @@ eal_inc = [global_inc] subdir('common') + if host_machine.system() == 'linux' dpdk_conf.set('RTE_EXEC_ENV_LINUXAPP', 1) subdir('linuxapp')
lib/librte_ether/meson.build +2 -3
@@ -40,10 +40,9 @@ install_headers('rte_ethdev.h', 'rte_flow.h', 'rte_flow_driver.h') -ether_lib = library('rte_ether', sources, +lib = library('rte_ether', sources, dependencies: [rte_eal, rte_ring, rte_mempool, rte_net, rte_mbuf], install: true) -rte_ether = declare_dependency(link_with: ether_lib, +rte_ether = declare_dependency(link_with: lib, include_directories: include_directories('.')) -dpdk_libraries += ether_lib
lib/librte_hash/meson.build +2 -3
@@ -45,10 +45,9 @@ headers = ['rte_cmp_arm64.h', install_headers(headers) -hash_lib = library('rte_hash', sources, +lib = library('rte_hash', sources, dependencies: [rte_eal, rte_ring, rte_compat], install: true) -rte_hash = declare_dependency(link_with: hash_lib, +rte_hash = declare_dependency(link_with: lib, include_directories: include_directories('.')) -dpdk_libraries += hash_lib
lib/librte_kvargs/meson.build +2 -3
@@ -34,10 +34,9 @@ sources = ['rte_kvargs.c'] install_headers('rte_kvargs.h') -kvargs_lib = library('rte_kvargs', sources, +lib = library('rte_kvargs', sources, dependencies: rte_eal, install: true) -rte_kvargs = declare_dependency(link_with: kvargs_lib, +rte_kvargs = declare_dependency(link_with: lib, include_directories: include_directories('.')) -dpdk_libraries += kvargs_lib
lib/librte_mbuf/meson.build +2 -3
@@ -33,10 +33,9 @@ sources = ['rte_mbuf.c', 'rte_mbuf_ptype.c'] install_headers('rte_mbuf.h', 'rte_mbuf_ptype.h') -mbuf_lib = library('rte_mbuf', sources, +lib = library('rte_mbuf', sources, dependencies: [rte_eal, rte_mempool, rte_ring], install: true) -rte_mbuf = declare_dependency(link_with: mbuf_lib, +rte_mbuf = declare_dependency(link_with: lib, include_directories: include_directories('.')) -dpdk_libraries += mbuf_lib
lib/librte_mempool/meson.build +2 -3
@@ -34,10 +34,9 @@ sources = ['rte_mempool.c', 'rte_mempool_ops.c'] install_headers('rte_mempool.h') -mempool_lib = library('rte_mempool', sources, +lib = library('rte_mempool', sources, dependencies: [rte_eal, rte_ring], install: true) -rte_mempool = declare_dependency(link_with: mempool_lib, +rte_mempool = declare_dependency(link_with: lib, include_directories: include_directories('.')) -dpdk_libraries += mempool_lib
lib/librte_net/meson.build +2 -3
@@ -43,10 +43,9 @@ install_headers('rte_ip.h', 'rte_net.h', 'rte_net_crc.h') -net_lib = library('rte_net', sources, +lib = library('rte_net', sources, dependencies: [rte_eal, rte_mbuf, rte_ring, rte_mempool], install: true) -rte_net = declare_dependency(link_with: net_lib, +rte_net = declare_dependency(link_with: lib, include_directories: include_directories('.')) -dpdk_libraries += net_lib
lib/librte_ring/meson.build +2 -3
@@ -34,10 +34,9 @@ sources = ['rte_ring.c'] install_headers('rte_ring.h') -ring_lib = library('rte_ring', sources, +lib = library('rte_ring', sources, dependencies: rte_eal, install: true) -rte_ring = declare_dependency(link_with: ring_lib, +rte_ring = declare_dependency(link_with: lib, include_directories: include_directories('.')) -dpdk_libraries += ring_lib
lib/meson.build +22 -9
@@ -29,13 +29,26 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# special case for eal, not a simple lib subdir('librte_eal') -subdir('librte_ring') -subdir('librte_mempool') -subdir('librte_cmdline') -subdir('librte_mbuf') -subdir('librte_net') -subdir('librte_ether') -subdir('librte_compat') -subdir('librte_hash') -subdir('librte_kvargs') + +# process all libraries equally, as far as possible +libs = ['ring', 'mempool', 'cmdline', 'mbuf', 'net', 'ether', 'compat', 'hash', 'kvargs'] +foreach l:libs + + dpdk_conf.set('RTE_LIBRTE_@0@'.format(l.to_upper()),1) + subdir('librte_@0@'.format(l)) + dpdk_libraries = [lib] + dpdk_libraries + dpdk_includes += '-I@0@/librte_@1@'.format(meson.current_source_dir(), l) + +endforeach + +#subdir('librte_ring') +#subdir('librte_mempool') +#subdir('librte_cmdline') +#subdir('librte_mbuf') +#subdir('librte_net') +#subdir('librte_ether') +#subdir('librte_compat') +#subdir('librte_hash') +#subdir('librte_kvargs')
meson.build +5 -8
@@ -51,8 +51,11 @@ else endif # configure the build, and make sure configs here and in config folder are -# able to be included in any file +# able to be included in any file. We also store a global array of include dirs +# for passing to pmdinfogen scripts global_inc = include_directories('.', 'config') +dpdk_includes = ['-I@0@'.format(meson.current_source_dir()), + '-I@0@/config'.format(meson.current_source_dir())] subdir('config') # now build libs and drivers
@@ -71,16 +74,10 @@ if get_option('default_library') == 'static' dpdk_libraries = dpdk_drivers + dpdk_libraries endif -# the DPDK libs needs to be passed to the link command in reverse order -dpdk_link_libs = [] -foreach lib: dpdk_libraries - dpdk_link_libs = [lib] + dpdk_link_libs -endforeach - pkg = import('pkgconfig') pkg.generate(name: meson.project_name(), version: meson.project_version(), - libraries: dpdk_link_libs, + libraries: dpdk_libraries, description: 'The Data Plane Development Kit (DPDK)', extra_cflags: '-include "rte_config.h"' )
Signature · 1 line
2.13.4
RFC v2 10/40 build: install usertools scripts
In reply to Bruce Richardson--- meson.build | 1 + usertools/meson.build | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 usertools/meson.build
meson.build +1 -0
@@ -62,6 +62,7 @@ subdir('config') subdir('lib') subdir('buildtools') subdir('drivers') +subdir('usertools') # write the build config build_cfg = 'rte_build_config.h'
usertools/meson.build new file +32 -0
@@ -0,0 +1,32 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +install_data(['dpdk-devbind.py', 'dpdk-pmdinfo.py'], install_dir: 'bin')
Signature · 1 line
2.13.4
RFC v2 11/40 build: simplify generation of pmd.c files
In reply to Bruce Richardsonrather than using the compiler to generate a temporary .o file, get meson to do it, so we don't need to track dpdk includes directly, and pass in a range of parameters
--- buildtools/gen-pmdinfo-cfile.sh | 14 +++++--------- drivers/net/i40e/meson.build | 21 ++++++++++----------- lib/librte_eal/bsdapp/eal/meson.build | 1 - lib/librte_eal/common/include/arch/meson.build | 1 - lib/librte_eal/common/include/meson.build | 1 - lib/librte_eal/linuxapp/eal/meson.build | 1 - lib/meson.build | 3 --- meson.build | 2 -- 8 files changed, 15 insertions(+), 29 deletions(-)
buildtools/gen-pmdinfo-cfile.sh +5 -9
@@ -30,16 +30,12 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -input=$1 + +arfile=$1 output=$2 pmdinfogen=$3 -CFLAGS=$4 -build_root=$5 -tmp_o=${output%.c.pmd.o}.o -tmp_c=${output%.o}.c +tmp_o=${output%.c.pmd.c}.tmp.o -set -x -cc -Wfatal-errors $CFLAGS -I$build_root -include rte_config.h -c $input -o $tmp_o && \ - $pmdinfogen $tmp_o $tmp_c && \ - cc -c $tmp_c -o $output +ar p $arfile > $tmp_o && \ + $pmdinfogen $tmp_o $output
drivers/net/i40e/meson.build +10 -11
@@ -60,20 +60,19 @@ install_headers('rte_pmd_i40e.h') pmdinfogen_srcs = run_command('grep', '--files-with-matches', 'RTE_PMD_REGISTER_.*(.*)', sources).stdout().strip().split() -objs = [] foreach src: pmdinfogen_srcs - out_filename = '@[email protected]'.format(src.split('/')[-1]) - pmd_o_file = custom_target(out_filename, - command: [pmdinfo, '@INPUT@', '@OUTPUT@', - pmdinfogen.full_path(), - ' '.join(dpdk_includes + i40e_cflags + ['-march=@0@'.format(machine)]), - meson.build_root()], - input: src, output: out_filename, - depends: pmdinfogen) - objs += pmd_o_file + out_filename = '@[email protected]'.format(src.split('/')[-1]) + tmp_lib = static_library('tmp_@0@'.format(src.underscorify()), + src, include_directories: include_directories('base'), + dependencies: deps, + c_args: i40e_cflags) + sources += custom_target(out_filename, + command: [pmdinfo, tmp_lib.full_path(), '@OUTPUT@', pmdinfogen], + output: out_filename, + depends: [pmdinfogen, tmp_lib]) endforeach -i40e_lib = library('rte_pmd_i40e', sources, objs, +i40e_lib = library('rte_pmd_i40e', sources, include_directories: include_directories('base'), dependencies: deps, link_with: base_lib,
lib/librte_eal/bsdapp/eal/meson.build +0 -1
@@ -30,7 +30,6 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. eal_inc += include_directories('include') -dpdk_includes += '-I@0@/include'.format(meson.current_source_dir()) install_subdir('include/exec-env', install_dir: 'include') sources = ['eal_alarm.c',
lib/librte_eal/common/include/arch/meson.build +0 -1
@@ -30,5 +30,4 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. eal_inc += include_directories(arch_subdir) -dpdk_includes += '-I@0@/@1@'.format(meson.current_source_dir(), arch_subdir) subdir(arch_subdir)
lib/librte_eal/common/include/meson.build +0 -1
@@ -30,7 +30,6 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. eal_inc += include_directories('.') -dpdk_includes += '-I@0@'.format(meson.current_source_dir()) common_headers = [ 'rte_alarm.h',
lib/librte_eal/linuxapp/eal/meson.build +0 -1
@@ -30,7 +30,6 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. eal_inc += include_directories('include') -dpdk_includes += '-I@0@/include'.format(meson.current_source_dir()) install_subdir('include/exec-env', install_dir: 'include') sources = ['eal_alarm.c',
lib/meson.build +0 -3
@@ -35,12 +35,9 @@ subdir('librte_eal') # process all libraries equally, as far as possible libs = ['ring', 'mempool', 'cmdline', 'mbuf', 'net', 'ether', 'compat', 'hash', 'kvargs'] foreach l:libs - dpdk_conf.set('RTE_LIBRTE_@0@'.format(l.to_upper()),1) subdir('librte_@0@'.format(l)) dpdk_libraries = [lib] + dpdk_libraries - dpdk_includes += '-I@0@/librte_@1@'.format(meson.current_source_dir(), l) - endforeach #subdir('librte_ring')
meson.build +0 -2
@@ -54,8 +54,6 @@ endif # able to be included in any file. We also store a global array of include dirs # for passing to pmdinfogen scripts global_inc = include_directories('.', 'config') -dpdk_includes = ['-I@0@'.format(meson.current_source_dir()), - '-I@0@/config'.format(meson.current_source_dir())] subdir('config') # now build libs and drivers
Signature · 1 line
2.13.4
RFC v2 12/40 build: generalize net driver build to higher level
In reply to Bruce RichardsonMove the logic for generating the pmdinfo file and the driver library itself to the meson.build file at the driver/net level, to avoid duplicating code.
--- drivers/net/i40e/base/meson.build | 2 +- drivers/net/i40e/meson.build | 31 ++++--------------------- drivers/net/meson.build | 48 ++++++++++++++++++++++++++++++++++++++- 3 files changed, 52 insertions(+), 29 deletions(-)
drivers/net/i40e/base/meson.build +1 -1
@@ -43,7 +43,7 @@ error_cflags = ['-Wno-sign-compare', '-Wno-unused-value', '-Wno-format', '-Wno-unused-but-set-variable'] -c_args = i40e_cflags +c_args = cflags foreach flag: error_cflags if cc.has_argument(flag) c_args += flag
drivers/net/i40e/meson.build +4 -27
@@ -29,12 +29,13 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -i40e_cflags = ['-DPF_DRIVER', +cflags = ['-DPF_DRIVER', '-DVF_DRIVER', '-DINTEGRATED_VF', '-DX722_A0_SUPPORT'] subdir('base') +libs = [base_lib] sources = files( 'i40e_ethdev.c',
@@ -56,31 +57,7 @@ if arch_subdir == 'x86' sources += files('i40e_rxtx_vec_sse.c') endif -install_headers('rte_pmd_i40e.h') - -pmdinfogen_srcs = run_command('grep', '--files-with-matches', - 'RTE_PMD_REGISTER_.*(.*)', sources).stdout().strip().split() -foreach src: pmdinfogen_srcs - out_filename = '@[email protected]'.format(src.split('/')[-1]) - tmp_lib = static_library('tmp_@0@'.format(src.underscorify()), - src, include_directories: include_directories('base'), - dependencies: deps, - c_args: i40e_cflags) - sources += custom_target(out_filename, - command: [pmdinfo, tmp_lib.full_path(), '@OUTPUT@', pmdinfogen], - output: out_filename, - depends: [pmdinfogen, tmp_lib]) -endforeach +includes = include_directories('base', '.') -i40e_lib = library('rte_pmd_i40e', sources, - include_directories: include_directories('base'), - dependencies: deps, - link_with: base_lib, - c_args: i40e_cflags, - install: true, - install_dir: 'dpdk/drivers') - -dpdk_drivers += i40e_lib +install_headers('rte_pmd_i40e.h') -i40e_pmd = declare_dependency(link_with: i40e_lib, - include_directories: include_directories('.'))
drivers/net/meson.build +47 -1
51 lines not on this page · raw message
Signature · 1 line
2.13.4
RFC v2 13/40 build: remove hard-coded enablement of vector driver
In reply to Bruce Richardson--- config/rte_config.h | 1 - drivers/net/i40e/meson.build | 1 + 2 files changed, 1 insertion(+), 1 deletion(-)
config/rte_config.h +0 -1
@@ -76,7 +76,6 @@/* i40e defines */ #define RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC 1 -#define RTE_LIBRTE_I40E_INC_VECTOR 1#undef RTE_LIBRTE_I40E_16BYTE_RX_DESC#define RTE_LIBRTE_I40E_QUEUE_NUM_PER_PF 64#define RTE_LIBRTE_I40E_QUEUE_NUM_PER_VF 4
drivers/net/i40e/meson.build +1 -0
@@ -54,6 +54,7 @@ deps = [rte_eal, rte_net, rte_hash, rte_kvargs] if arch_subdir == 'x86' + dpdk_conf.set('RTE_LIBRTE_I40E_INC_VECTOR', 1) sources += files('i40e_rxtx_vec_sse.c') endif
Signature · 1 line
2.13.4
RFC v2 14/40 build: add ixgbe driver to build
In reply to Bruce Richardson--- drivers/net/ixgbe/base/meson.build | 59 ++++++++++++++++++++++++++++++++++++ drivers/net/ixgbe/meson.build | 61 ++++++++++++++++++++++++++++++++++++++ drivers/net/meson.build | 5 ++-- 3 files changed, 123 insertions(+), 2 deletions(-) create mode 100644 drivers/net/ixgbe/base/meson.build create mode 100644 drivers/net/ixgbe/meson.build
drivers/net/ixgbe/base/meson.build new file +59 -0
@@ -0,0 +1,59 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +sources = [ + 'ixgbe_82598.c', + 'ixgbe_82599.c', + 'ixgbe_api.c', + 'ixgbe_common.c', + 'ixgbe_dcb_82598.c', + 'ixgbe_dcb_82599.c', + 'ixgbe_dcb.c', + 'ixgbe_hv_vf.c', + 'ixgbe_mbx.c', + 'ixgbe_phy.c', + 'ixgbe_vf.c', + 'ixgbe_x540.c', + 'ixgbe_x550.c' +] + +error_cflags = ['-Wno-unused-value', + '-Wno-unused-but-set-variable'] +c_args = cflags +foreach flag: error_cflags + if cc.has_argument(flag) + c_args += flag + endif +endforeach + +base_lib = static_library('ixgbe_base', sources, + dependencies: rte_eal, + c_args: c_args)
drivers/net/ixgbe/meson.build new file +61 -0
61 lines not on this page · raw message
drivers/net/meson.build +3 -2
@@ -29,7 +29,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -drivers = ['i40e'] +drivers = ['i40e', 'ixgbe'] foreach drv:drivers dpdk_conf.set('RTE_LIBRTE_@0@_PMD'.format(drv.to_upper()),1)
@@ -60,7 +60,8 @@ foreach drv:drivers endforeach # now build the driver itself, and add to the drivers list - lib = library('rte_pmd_@0@'.format(drv), sources, + lib = library('rte_pmd_@0@'.format(drv), + sources, include_directories: includes, dependencies: deps, link_with: libs,
Signature · 1 line
2.13.4
RFC v2 15/40 build: set up standard deps for drivers
In reply to Bruce RichardsonDriver should not need to specify that they depend on EAL, mempool, mbuf etc., since all drivers are likely to depend on those. Instead, have it that drivers only need to append to the deps array any extra dependencies they have.
--- drivers/net/i40e/meson.build | 7 ++----- drivers/net/ixgbe/meson.build | 7 ++----- drivers/net/meson.build | 4 +++- 3 files changed, 7 insertions(+), 11 deletions(-)
drivers/net/i40e/meson.build +2 -5
@@ -48,17 +48,14 @@ sources = files( 'rte_pmd_i40e.c' ) -deps = [rte_eal, rte_net, - rte_mbuf, rte_ether, - rte_mempool, rte_ring, - rte_hash, rte_kvargs] +deps += rte_hash if arch_subdir == 'x86' dpdk_conf.set('RTE_LIBRTE_I40E_INC_VECTOR', 1) sources += files('i40e_rxtx_vec_sse.c') endif -includes = include_directories('base', '.') +includes = include_directories('base') install_headers('rte_pmd_i40e.h')
drivers/net/ixgbe/meson.build +2 -5
@@ -46,16 +46,13 @@ sources = files( 'rte_pmd_ixgbe.c' ) -deps = [rte_eal, rte_net, - rte_mbuf, rte_ether, - rte_mempool, rte_ring, - rte_hash, rte_kvargs] +deps += rte_hash if arch_subdir == 'x86' dpdk_conf.set('RTE_IXGBE_INC_VECTOR', 1) sources += files('ixgbe_rxtx_vec_sse.c') endif -includes = include_directories('base', '.') +includes = include_directories('base') install_headers('rte_pmd_ixgbe.h')
drivers/net/meson.build +3 -1
@@ -38,8 +38,10 @@ foreach drv:drivers sources = [] libs = [] cflags = [] - deps = [] includes = [] + # set up standard deps. Drivers can append/override as necessary + deps = [rte_eal, rte_net, rte_mbuf, rte_ether, + rte_mempool, rte_ring, rte_kvargs] # pull in driver directory which should assign to each of the above subdir(drv)
Signature · 1 line
2.13.4
RFC v2 16/40 build: add af_packet driver to build
In reply to Bruce Richardson--- drivers/net/af_packet/meson.build | 32 ++++++++++++++++++++++++++++++++ drivers/net/meson.build | 5 +++++ 2 files changed, 37 insertions(+) create mode 100644 drivers/net/af_packet/meson.build
drivers/net/af_packet/meson.build new file +32 -0
@@ -0,0 +1,32 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +sources = files('rte_eth_af_packet.c')
drivers/net/meson.build +5 -0
@@ -31,6 +31,11 @@ drivers = ['i40e', 'ixgbe'] +# af_packet only works on linux +if host_machine.system() == 'linux' + drivers += 'af_packet' +endif + foreach drv:drivers dpdk_conf.set('RTE_LIBRTE_@0@_PMD'.format(drv.to_upper()),1)
Signature · 1 line
2.13.4
RFC v2 17/40 build: add pcap PMD support
In reply to Bruce Richardson--- drivers/net/meson.build | 13 ++++++++++--- drivers/net/pcap/meson.build | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 drivers/net/pcap/meson.build
drivers/net/meson.build +10 -3
@@ -29,14 +29,21 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -drivers = ['i40e', 'ixgbe'] +net_drivers = ['i40e', 'ixgbe'] # af_packet only works on linux if host_machine.system() == 'linux' - drivers += 'af_packet' + net_drivers += 'af_packet' endif -foreach drv:drivers +pcap_dep = dependency('pcap', required: false) +# pcap doesn't use pkg-config, but future meson versions should support picking +# it up as a dependency. For older versions <0.42 use find_program instead +if pcap_dep.found() or find_program('pcap-config', required: false).found() + net_drivers += 'pcap' +endif + +foreach drv:net_drivers dpdk_conf.set('RTE_LIBRTE_@0@_PMD'.format(drv.to_upper()),1) # set up empty variables used for build
drivers/net/pcap/meson.build new file +38 -0
@@ -0,0 +1,38 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +sources = files('rte_eth_pcap.c') + +if pcap_dep.found() + deps += pcap_dep +else + deps += cc.find_library('pcap') +endif
Signature · 1 line
2.13.4
RFC v2 18/40 build: add symbol version map file support to libs
In reply to Bruce Richardson--- drivers/net/meson.build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/net/meson.build +6 -1
@@ -74,12 +74,17 @@ foreach drv:net_drivers endforeach # now build the driver itself, and add to the drivers list - lib = library('rte_pmd_@0@'.format(drv), + drv_name = 'rte_pmd_@0@'.format(drv) + version_map = '@0@/@1@/rte_pmd_@1@_version.map'.format( + meson.current_source_dir(), drv) + lib = library(drv_name, sources, include_directories: includes, dependencies: deps, link_with: libs, c_args: cflags, + link_args: '-Wl,--version-script=' + version_map, + link_depends: version_map, install: true, install_dir: driver_install_path)
Signature · 1 line
2.13.4
RFC v2 19/40 build: build libraries in a loop for brevity
In reply to Bruce Richardsonnow each library just has to specify it's source files, header files and dependencies, and the higher level lib directory will take care of the rest. Special case for eal, which is not just in one subdir, and is more complicated. It is also used sometimes by e.g. base code drivers, so give it it's own shortcut dependency in case needed.
--- drivers/net/i40e/meson.build | 2 +- drivers/net/ixgbe/meson.build | 2 +- drivers/net/meson.build | 19 +++++++++++---- drivers/net/pcap/meson.build | 6 ++--- lib/librte_cmdline/meson.build | 12 +++------- lib/librte_compat/meson.build | 3 ++- lib/librte_eal/bsdapp/eal/meson.build | 1 + lib/librte_eal/linuxapp/eal/meson.build | 1 + lib/librte_ether/meson.build | 13 ++++------ lib/librte_hash/meson.build | 16 ++++--------- lib/librte_kvargs/meson.build | 13 +++------- lib/librte_mbuf/meson.build | 12 +++------- lib/librte_mempool/meson.build | 12 +++------- lib/librte_net/meson.build | 12 +++------- lib/librte_ring/meson.build | 14 +++-------- lib/meson.build | 42 +++++++++++++++++++++++---------- 16 files changed, 79 insertions(+), 101 deletions(-)
drivers/net/i40e/meson.build +1 -1
@@ -48,7 +48,7 @@ sources = files( 'rte_pmd_i40e.c' ) -deps += rte_hash +deps += ['hash'] if arch_subdir == 'x86' dpdk_conf.set('RTE_LIBRTE_I40E_INC_VECTOR', 1)
drivers/net/ixgbe/meson.build +1 -1
@@ -46,7 +46,7 @@ sources = files( 'rte_pmd_ixgbe.c' ) -deps += rte_hash +deps += ['hash'] if arch_subdir == 'x86' dpdk_conf.set('RTE_IXGBE_INC_VECTOR', 1)
drivers/net/meson.build +14 -5
@@ -51,13 +51,21 @@ foreach drv:net_drivers libs = [] cflags = [] includes = [] + # dependency managment. External deps managed using dependency + # objects, internal deps managed by name of lib + ext_deps = [] # set up standard deps. Drivers can append/override as necessary - deps = [rte_eal, rte_net, rte_mbuf, rte_ether, - rte_mempool, rte_ring, rte_kvargs] + deps = ['eal', 'net', 'mbuf', 'ether', 'mempool', 'ring', 'kvargs'] # pull in driver directory which should assign to each of the above subdir(drv) + # get dependency objs from strings + dep_objs = ext_deps + foreach d:deps + dep_objs += [get_variable('dep_rte_' + d)] + dep_objs + endforeach + # generate pmdinfo sources pmdinfogen_srcs = run_command('grep', '--files-with-matches', 'RTE_PMD_REGISTER_.*(.*)', sources).stdout().strip().split()
@@ -65,10 +73,11 @@ foreach drv:net_drivers out_filename = '@[email protected]'.format(src.split('/')[-1]) tmp_lib = static_library('tmp_@0@'.format(src.underscorify()), src, include_directories: includes, - dependencies: deps, + dependencies: dep_objs, c_args: cflags) sources += custom_target(out_filename, - command: [pmdinfo, tmp_lib.full_path(), '@OUTPUT@', pmdinfogen], + command: [pmdinfo, tmp_lib.full_path(), + '@OUTPUT@', pmdinfogen], output: out_filename, depends: [pmdinfogen, tmp_lib]) endforeach
@@ -80,7 +89,7 @@ foreach drv:net_drivers lib = library(drv_name, sources, include_directories: includes, - dependencies: deps, + dependencies: dep_objs, link_with: libs, c_args: cflags, link_args: '-Wl,--version-script=' + version_map,
drivers/net/pcap/meson.build +3 -3
@@ -32,7 +32,7 @@ sources = files('rte_eth_pcap.c') if pcap_dep.found() - deps += pcap_dep + ext_deps += pcap_dep else - deps += cc.find_library('pcap') -endif + ext_deps += cc.find_library('pcap') +endif
lib/librte_cmdline/meson.build +3 -9
@@ -41,7 +41,7 @@ sources = files('cmdline.c', 'cmdline_socket.c', 'cmdline_vt100.c') -headers = ['cmdline.h', +headers = files('cmdline.h', 'cmdline_parse.h', 'cmdline_parse_num.h', 'cmdline_parse_ipaddr.h',
@@ -51,12 +51,6 @@ headers = ['cmdline.h', 'cmdline_vt100.h', 'cmdline_socket.h', 'cmdline_cirbuf.h', - 'cmdline_parse_portlist.h'] - -install_headers(headers) - -lib = library('rte_cmdline', sources, dependencies: rte_eal, - install: true) -rte_cmdline = declare_dependency(link_with: lib, - include_directories: include_directories('.')) + 'cmdline_parse_portlist.h') +deps = ['eal']
lib/librte_compat/meson.build +2 -1
@@ -32,4 +32,5 @@ install_headers('rte_compat.h') -rte_compat = declare_dependency(include_directories: include_directories('.')) +set_variable('dep_rte_compat', + declare_dependency(include_directories: include_directories('.')))
lib/librte_eal/bsdapp/eal/meson.build +1 -0
@@ -55,3 +55,4 @@ eal_lib = library('rte_eal', sources, eal_common_sources, eal_common_arch_source dpdk_libraries += ['-pthread', eal_lib] rte_eal = declare_dependency(link_with: eal_lib, include_directories: eal_inc) +set_variable('dep_rte_eal', rte_eal)
lib/librte_eal/linuxapp/eal/meson.build +1 -0
@@ -60,3 +60,4 @@ eal_lib = library('rte_eal', sources, eal_common_sources, eal_common_arch_source dpdk_libraries += ['-pthread', '-ldl', eal_lib] rte_eal = declare_dependency(link_with: eal_lib, include_directories: eal_inc) +set_variable('dep_rte_eal', rte_eal)
lib/librte_ether/meson.build +5 -8
@@ -30,19 +30,16 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -sources = ['rte_ethdev.c', 'rte_flow.c'] +sources = files('rte_ethdev.c', 'rte_flow.c', 'rte_tm.c') -install_headers('rte_ethdev.h', +headers = files('rte_ethdev.h', 'rte_ethdev_pci.h', 'rte_ethdev_vdev.h', 'rte_eth_ctrl.h', 'rte_dev_info.h', 'rte_flow.h', - 'rte_flow_driver.h') + 'rte_flow_driver.h', + 'rte_tm.h') -lib = library('rte_ether', sources, - dependencies: [rte_eal, rte_ring, rte_mempool, rte_net, rte_mbuf], - install: true) -rte_ether = declare_dependency(link_with: lib, - include_directories: include_directories('.')) +deps = ['eal', 'ring', 'mempool', 'net', 'mbuf']
lib/librte_hash/meson.build +4 -12
@@ -29,10 +29,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -sources = ['rte_cuckoo_hash.c', 'rte_fbk_hash.c'] - -headers = ['rte_cmp_arm64.h', +headers = files('rte_cmp_arm64.h', 'rte_cmp_x86.h', 'rte_crc_arm64.h', 'rte_cuckoo_hash.h',
@@ -41,13 +38,8 @@ headers = ['rte_cmp_arm64.h', 'rte_hash_crc.h', 'rte_hash.h', 'rte_jhash.h', - 'rte_thash.h'] - -install_headers(headers) + 'rte_thash.h') -lib = library('rte_hash', sources, - dependencies: [rte_eal, rte_ring, rte_compat], - install: true) -rte_hash = declare_dependency(link_with: lib, - include_directories: include_directories('.')) +sources = files('rte_cuckoo_hash.c', 'rte_fbk_hash.c') +deps = ['eal', 'ring', 'compat']
lib/librte_kvargs/meson.build +3 -10
@@ -30,13 +30,6 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -sources = ['rte_kvargs.c'] - -install_headers('rte_kvargs.h') - -lib = library('rte_kvargs', sources, - dependencies: rte_eal, - install: true) -rte_kvargs = declare_dependency(link_with: lib, - include_directories: include_directories('.')) - +sources = files('rte_kvargs.c') +headers = files('rte_kvargs.h') +deps = ['eal']
lib/librte_mbuf/meson.build +3 -9
@@ -29,13 +29,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -sources = ['rte_mbuf.c', 'rte_mbuf_ptype.c'] - -install_headers('rte_mbuf.h', 'rte_mbuf_ptype.h') - -lib = library('rte_mbuf', sources, - dependencies: [rte_eal, rte_mempool, rte_ring], - install: true) -rte_mbuf = declare_dependency(link_with: lib, - include_directories: include_directories('.')) +sources = files('rte_mbuf.c', 'rte_mbuf_ptype.c') +headers = files('rte_mbuf.h', 'rte_mbuf_ptype.h') +deps = ['eal', 'mempool', 'ring']
lib/librte_mempool/meson.build +3 -9
@@ -30,13 +30,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -sources = ['rte_mempool.c', 'rte_mempool_ops.c'] - -install_headers('rte_mempool.h') - -lib = library('rte_mempool', sources, - dependencies: [rte_eal, rte_ring], - install: true) -rte_mempool = declare_dependency(link_with: lib, - include_directories: include_directories('.')) +sources = files('rte_mempool.c', 'rte_mempool_ops.c') +headers = files('rte_mempool.h') +deps = ['eal', 'ring']
lib/librte_net/meson.build +3 -9
@@ -29,10 +29,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -sources = ['rte_net.c', 'rte_net_crc.c'] - -install_headers('rte_ip.h', +headers = files('rte_ip.h', 'rte_tcp.h', 'rte_udp.h', 'rte_sctp.h',
@@ -43,9 +40,6 @@ install_headers('rte_ip.h', 'rte_net.h', 'rte_net_crc.h') -lib = library('rte_net', sources, - dependencies: [rte_eal, rte_mbuf, rte_ring, rte_mempool], - install: true) -rte_net = declare_dependency(link_with: lib, - include_directories: include_directories('.')) +sources = files('rte_net.c', 'rte_net_crc.c') +deps = ['eal', 'mbuf', 'ring', 'mempool']
lib/librte_ring/meson.build +3 -11
@@ -29,14 +29,6 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -sources = ['rte_ring.c'] - -install_headers('rte_ring.h') - -lib = library('rte_ring', sources, - dependencies: rte_eal, - install: true) -rte_ring = declare_dependency(link_with: lib, - include_directories: include_directories('.')) - +sources = files('rte_ring.c') +headers = files('rte_ring.h') +deps = ['eal']
lib/meson.build +29 -13
52 lines not on this page · raw message
Signature · 1 line
2.13.4
RFC v2 20/40 build: version library .so files
In reply to Bruce RichardsonAlso rename the ether library to ethdev to maintain backwards compatibility
--- drivers/net/meson.build | 2 ++ lib/librte_cmdline/meson.build | 1 + lib/librte_ether/meson.build | 1 + lib/librte_hash/meson.build | 1 + lib/librte_kvargs/meson.build | 2 +- lib/librte_mbuf/meson.build | 1 + lib/librte_mempool/meson.build | 2 +- lib/librte_net/meson.build | 1 + lib/meson.build | 14 +++++++++++++- 9 files changed, 22 insertions(+), 3 deletions(-)
drivers/net/meson.build +2 -0
@@ -47,6 +47,7 @@ foreach drv:net_drivers dpdk_conf.set('RTE_LIBRTE_@0@_PMD'.format(drv.to_upper()),1) # set up empty variables used for build + version = 1 sources = [] libs = [] cflags = []
@@ -94,6 +95,7 @@ foreach drv:net_drivers c_args: cflags, link_args: '-Wl,--version-script=' + version_map, link_depends: version_map, + version: '@[email protected]'.format(version), install: true, install_dir: driver_install_path)
lib/librte_cmdline/meson.build +1 -0
@@ -29,6 +29,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +version = 2 sources = files('cmdline.c', 'cmdline_cirbuf.c', 'cmdline_parse.c',
lib/librte_ether/meson.build +1 -0
@@ -30,6 +30,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +version = 6 sources = files('rte_ethdev.c', 'rte_flow.c', 'rte_tm.c') headers = files('rte_ethdev.h',
lib/librte_hash/meson.build +1 -0
@@ -29,6 +29,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +version = 2 headers = files('rte_cmp_arm64.h', 'rte_cmp_x86.h', 'rte_crc_arm64.h',
lib/librte_kvargs/meson.build +1 -1
@@ -29,7 +29,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - +version = 1 sources = files('rte_kvargs.c') headers = files('rte_kvargs.h') deps = ['eal']
lib/librte_mbuf/meson.build +1 -0
@@ -29,6 +29,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +version = 3 sources = files('rte_mbuf.c', 'rte_mbuf_ptype.c') headers = files('rte_mbuf.h', 'rte_mbuf_ptype.h') deps = ['eal', 'mempool', 'ring']
lib/librte_mempool/meson.build +1 -1
@@ -29,7 +29,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - +version = 2 sources = files('rte_mempool.c', 'rte_mempool_ops.c') headers = files('rte_mempool.h') deps = ['eal', 'ring']
lib/librte_net/meson.build +1 -0
@@ -29,6 +29,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +version = 1 headers = files('rte_ip.h', 'rte_tcp.h', 'rte_udp.h',
lib/meson.build +13 -1
@@ -37,6 +37,7 @@ subdir('librte_compat') libs = ['ring', 'mempool', 'cmdline', 'mbuf', 'net', 'ether', 'hash', 'kvargs'] foreach l:libs + version = 1 sources = [] headers = [] # use "deps" for internal DPDK dependencies, and "ext_deps" for
@@ -55,8 +56,19 @@ foreach l:libs dep_objs = [get_variable('dep_rte_' + d)] + dep_objs endforeach - lib = library('rte_' + l, sources, dependencies: dep_objs, + version_map = '@0@/@1@/rte_@2@_version.map'.format( + meson.current_source_dir(), dir_name, l) + libname = 'rte_' + l + if libname == 'rte_ether' + libname = 'rte_ethdev' + endif + lib = library(libname, + sources, + dependencies: dep_objs, include_directories: include_directories(dir_name), + link_args: '-Wl,--version-script=' + version_map, + link_depends: version_map, + version: '@[email protected]'.format(version), install: true) dep = declare_dependency(link_with: lib, include_directories: include_directories(dir_name))
Signature · 1 line
2.13.4
RFC v2 21/40 eal: add version information to meson build
In reply to Bruce Richardson--- lib/librte_eal/bsdapp/eal/meson.build | 6 +++++- lib/librte_eal/linuxapp/eal/meson.build | 6 +++++- lib/librte_eal/meson.build | 1 + 3 files changed, 11 insertions(+), 2 deletions(-)
lib/librte_eal/bsdapp/eal/meson.build +5 -1
@@ -44,11 +44,15 @@ sources = ['eal_alarm.c', 'eal_pci.c', ] +version_map = join_paths(meson.current_source_dir(), 'rte_eal_version.map') eal_lib = library('rte_eal', sources, eal_common_sources, eal_common_arch_sources, dependencies: dependency('threads'), include_directories : eal_inc, + version: '@[email protected]'.format(version), c_args: '-D_GNU_SOURCE', - link_args: '-lexecinfo', + link_depends: version_map, + link_args: ['-lexecinfo', + '-Wl,--version-script=' + version_map], install: true )
lib/librte_eal/linuxapp/eal/meson.build +5 -1
@@ -49,11 +49,15 @@ sources = ['eal_alarm.c', 'eal_pci.c', ] +version_map = join_paths(meson.current_source_dir(), 'rte_eal_version.map') eal_lib = library('rte_eal', sources, eal_common_sources, eal_common_arch_sources, dependencies: dependency('threads'), include_directories : eal_inc, + version: '@[email protected]'.format(version), c_args: '-D_GNU_SOURCE', - link_args: '-ldl', + link_depends: version_map, + link_args: ['-ldl', + '-Wl,--version-script=' + version_map], install: true )
lib/librte_eal/meson.build +1 -0
@@ -29,6 +29,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +version = 4 # the version of the EAL API eal_inc = [global_inc] subdir('common')
Signature · 1 line
2.13.4
RFC v2 22/40 build: add mempool drivers to build
In reply to Bruce Richardson--- drivers/mempool/meson.build | 97 +++++++++++++++++++++++++++++++++++++++ drivers/mempool/ring/meson.build | 32 +++++++++++++ drivers/mempool/stack/meson.build | 32 +++++++++++++ drivers/meson.build | 1 + 4 files changed, 162 insertions(+) create mode 100644 drivers/mempool/meson.build create mode 100644 drivers/mempool/ring/meson.build create mode 100644 drivers/mempool/stack/meson.build
drivers/mempool/meson.build new file +97 -0
@@ -0,0 +1,97 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +mempool_drivers = ['ring', 'stack'] + +foreach drv:mempool_drivers + dpdk_conf.set('RTE_LIBRTE_@0@_PMD'.format(drv.to_upper()),1) + + # set up empty variables used for build + version = 1 + sources = [] + libs = [] + cflags = [] + includes = [] + # dependency managment. External deps managed using dependency + # objects, internal deps managed by name of lib + ext_deps = [] + # set up standard deps. Drivers can append/override as necessary + deps = ['eal', 'mempool', 'ring'] + + # pull in driver directory which should assign to each of the above + subdir(drv) + + # get dependency objs from strings + dep_objs = ext_deps + foreach d:deps + dep_objs = [get_variable('dep_rte_' + d)] + dep_objs + endforeach + + # generate pmdinfo sources + pmdinfogen_srcs = run_command('grep', '--files-with-matches', + 'RTE_PMD_REGISTER_.*(.*)', sources).stdout().strip().split() + foreach src: pmdinfogen_srcs + out_filename = '@[email protected]'.format(src.split('/')[-1]) + tmp_lib = static_library('tmp_@0@'.format(src.underscorify()), + src, include_directories: includes, + dependencies: dep_objs, + c_args: cflags) + sources += custom_target(out_filename, + command: [pmdinfo, tmp_lib.full_path(), + '@OUTPUT@', pmdinfogen], + output: out_filename, + depends: [pmdinfogen, tmp_lib]) + endforeach + + # now build the driver itself, and add to the drivers list + drv_name = 'rte_mempool_@0@'.format(drv) + version_map = '@0@/@1@/rte_mempool_@1@_version.map'.format( + meson.current_source_dir(), drv) + lib = library(drv_name, + sources, + include_directories: includes, + dependencies: dep_objs, + link_with: libs, + c_args: cflags, + link_args: '-Wl,--version-script=' + version_map, + link_depends: version_map, + version: '@[email protected]'.format(version), + install: true, + install_dir: driver_install_path) + + dpdk_drivers += lib + + # create a dependency object and add it to the global dictionary so + # testpmd or other built-in apps can find it if necessary + set_variable('dep_pmd_@0@'.format(drv), + declare_dependency(link_with: lib, + include_directories: includes)) +endforeach
drivers/mempool/ring/meson.build new file +32 -0
@@ -0,0 +1,32 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +sources = files('rte_mempool_ring.c')
drivers/mempool/stack/meson.build new file +32 -0
@@ -0,0 +1,32 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +sources = files('rte_mempool_stack.c')
drivers/meson.build +1 -0
@@ -30,3 +30,4 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. subdir('net') +subdir('mempool')
Signature · 1 line
2.13.4
RFC v2 23/40 build: add gro library to meson build
In reply to Bruce Richardson--- lib/librte_gro/meson.build | 34 ++++++++++++++++++++++++++++++++++ lib/meson.build | 3 ++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 lib/librte_gro/meson.build
lib/librte_gro/meson.build new file +34 -0
@@ -0,0 +1,34 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +sources = files('rte_gro.c', 'gro_tcp4.c') +headers = files('rte_gro.h') +deps = ['eal', 'mbuf', 'ether', 'net', 'mempool', 'ring']
lib/meson.build +2 -1
@@ -34,7 +34,8 @@ subdir('librte_eal') subdir('librte_compat') # process all libraries equally, as far as possible -libs = ['ring', 'mempool', 'cmdline', 'mbuf', 'net', 'ether', 'hash', 'kvargs'] +libs = ['ring', 'mempool', 'cmdline', 'mbuf', 'net', 'ether', 'hash', + 'kvargs', 'gro'] foreach l:libs version = 1
Signature · 1 line
2.13.4
RFC v2 24/40 build: tweak naming of pmd dependencies
In reply to Bruce Richardson--- drivers/mempool/meson.build | 2 +- drivers/net/meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/mempool/meson.build +1 -1
@@ -91,7 +91,7 @@ foreach drv:mempool_drivers # create a dependency object and add it to the global dictionary so # testpmd or other built-in apps can find it if necessary - set_variable('dep_pmd_@0@'.format(drv), + set_variable('dep_rte_mempool_@0@'.format(drv), declare_dependency(link_with: lib, include_directories: includes)) endforeach
drivers/net/meson.build +1 -1
@@ -103,7 +103,7 @@ foreach drv:net_drivers # create a dependency object and add it to the global dictionary so # testpmd or other built-in apps can find it if necessary - set_variable('dep_pmd_@0@'.format(drv), + set_variable('dep_rte_pmd_@0@'.format(drv), declare_dependency(link_with: lib, include_directories: includes)) endforeach
Signature · 1 line
2.13.4
RFC v2 25/40 build: track driver include directories properly
In reply to Bruce Richardson--- drivers/mempool/meson.build | 2 +- drivers/net/i40e/meson.build | 2 +- drivers/net/ixgbe/meson.build | 2 +- drivers/net/meson.build | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
drivers/mempool/meson.build +1 -1
@@ -39,7 +39,7 @@ foreach drv:mempool_drivers sources = [] libs = [] cflags = [] - includes = [] + includes = [include_directories(drv)] # dependency managment. External deps managed using dependency # objects, internal deps managed by name of lib ext_deps = []
drivers/net/i40e/meson.build +1 -1
@@ -55,7 +55,7 @@ if arch_subdir == 'x86' sources += files('i40e_rxtx_vec_sse.c') endif -includes = include_directories('base') +includes += include_directories('base') install_headers('rte_pmd_i40e.h')
drivers/net/ixgbe/meson.build +1 -1
@@ -53,6 +53,6 @@ if arch_subdir == 'x86' sources += files('ixgbe_rxtx_vec_sse.c') endif -includes = include_directories('base') +includes += include_directories('base') install_headers('rte_pmd_ixgbe.h')
drivers/net/meson.build +1 -1
@@ -51,7 +51,7 @@ foreach drv:net_drivers sources = [] libs = [] cflags = [] - includes = [] + includes = [include_directories(drv)] # dependency managment. External deps managed using dependency # objects, internal deps managed by name of lib ext_deps = []
Signature · 1 line
2.13.4
RFC v2 26/40 metrics: add metrics lib to meson build
In reply to Bruce Richardson--- lib/librte_metrics/meson.build | 34 ++++++++++++++++++++++++++++++++++ lib/meson.build | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 lib/librte_metrics/meson.build
lib/librte_metrics/meson.build new file +34 -0
@@ -0,0 +1,34 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +sources = files('rte_metrics.c') +headers = files('rte_metrics.h') +deps = ['eal']
lib/meson.build +1 -1
@@ -35,7 +35,7 @@ subdir('librte_compat') # process all libraries equally, as far as possible libs = ['ring', 'mempool', 'cmdline', 'mbuf', 'net', 'ether', 'hash', - 'kvargs', 'gro'] + 'kvargs', 'gro', 'metrics'] foreach l:libs version = 1
Signature · 1 line
2.13.4
RFC v2 27/40 build: track dependencies recursively
In reply to Bruce Richardson--- drivers/mempool/meson.build | 3 ++- drivers/net/meson.build | 6 ++++-- lib/librte_eal/bsdapp/eal/meson.build | 5 ++++- lib/librte_eal/linuxapp/eal/meson.build | 5 ++++- lib/meson.build | 3 ++- 5 files changed, 16 insertions(+), 6 deletions(-)
drivers/mempool/meson.build +2 -1
@@ -93,5 +93,6 @@ foreach drv:mempool_drivers # testpmd or other built-in apps can find it if necessary set_variable('dep_rte_mempool_@0@'.format(drv), declare_dependency(link_with: lib, - include_directories: includes)) + include_directories: includes, + dependencies: dep_objs)) endforeach
drivers/net/meson.build +4 -2
@@ -56,7 +56,8 @@ foreach drv:net_drivers # objects, internal deps managed by name of lib ext_deps = [] # set up standard deps. Drivers can append/override as necessary - deps = ['eal', 'net', 'mbuf', 'ether', 'mempool', 'ring', 'kvargs'] + # 'ether' as dep, also pulls in mbuf, net, mempool, ring, eal etc + deps = ['ether', 'kvargs'] # pull in driver directory which should assign to each of the above subdir(drv)
@@ -105,5 +106,6 @@ foreach drv:net_drivers # testpmd or other built-in apps can find it if necessary set_variable('dep_rte_pmd_@0@'.format(drv), declare_dependency(link_with: lib, - include_directories: includes)) + include_directories: includes, + dependencies: dep_objs)) endforeach
lib/librte_eal/bsdapp/eal/meson.build +4 -1
@@ -58,5 +58,8 @@ eal_lib = library('rte_eal', sources, eal_common_sources, eal_common_arch_source dpdk_libraries += ['-pthread', eal_lib] -rte_eal = declare_dependency(link_with: eal_lib, include_directories: eal_inc) +rte_eal = declare_dependency(link_with: eal_lib, + include_directories: eal_inc, + dependencies: dependency('threads'), + link_args: '-lexecinfo') set_variable('dep_rte_eal', rte_eal)
lib/librte_eal/linuxapp/eal/meson.build +4 -1
@@ -63,5 +63,8 @@ eal_lib = library('rte_eal', sources, eal_common_sources, eal_common_arch_source dpdk_libraries += ['-pthread', '-ldl', eal_lib] -rte_eal = declare_dependency(link_with: eal_lib, include_directories: eal_inc) +rte_eal = declare_dependency(link_with: eal_lib, + include_directories: eal_inc, + dependencies: dependency('threads'), + link_args: '-ldl') set_variable('dep_rte_eal', rte_eal)
lib/meson.build +2 -1
@@ -72,7 +72,8 @@ foreach l:libs version: '@[email protected]'.format(version), install: true) dep = declare_dependency(link_with: lib, - include_directories: include_directories(dir_name)) + include_directories: include_directories(dir_name), + dependencies: dep_objs) set_variable('dep_rte_' + l, dep) dpdk_libraries = [lib] + dpdk_libraries
Signature · 1 line
2.13.4
RFC v2 28/40 testpmd: compile testpmd with meson and ninja
In reply to Bruce RichardsonAdd testpmd to build. When done, it was found that the -ldl flag was getting duplicated too many times in the build causing static linkage to fail on testpmd as the commandline got to long. [Possible meson bug]. Fix this by making testpmd link explicitly against libdl (or libexecinfo on BSD) and don't have EAL track it as its dependency.
--- app/meson.build | 32 +++++++++++++++ app/test-pmd/meson.build | 71 +++++++++++++++++++++++++++++++++ lib/librte_eal/bsdapp/eal/meson.build | 9 +++-- lib/librte_eal/linuxapp/eal/meson.build | 9 +++-- meson.build | 6 ++- 5 files changed, 118 insertions(+), 9 deletions(-) create mode 100644 app/meson.build create mode 100644 app/test-pmd/meson.build
app/meson.build new file +32 -0
@@ -0,0 +1,32 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +subdir('test-pmd')
app/test-pmd/meson.build new file +71 -0
71 lines not on this page · raw message
lib/librte_eal/bsdapp/eal/meson.build +5 -4
@@ -44,6 +44,8 @@ sources = ['eal_alarm.c', 'eal_pci.c', ] +eal_extra_link_arg = '-lexecinfo' + version_map = join_paths(meson.current_source_dir(), 'rte_eal_version.map') eal_lib = library('rte_eal', sources, eal_common_sources, eal_common_arch_sources, dependencies: dependency('threads'),
@@ -51,15 +53,14 @@ eal_lib = library('rte_eal', sources, eal_common_sources, eal_common_arch_source version: '@[email protected]'.format(version), c_args: '-D_GNU_SOURCE', link_depends: version_map, - link_args: ['-lexecinfo', + link_args: [eal_extra_link_arg, '-Wl,--version-script=' + version_map], install: true ) -dpdk_libraries += ['-pthread', eal_lib] +dpdk_libraries += [eal_lib, '-pthread', eal_extra_link_arg] rte_eal = declare_dependency(link_with: eal_lib, include_directories: eal_inc, - dependencies: dependency('threads'), - link_args: '-lexecinfo') + dependencies: dependency('threads')) set_variable('dep_rte_eal', rte_eal)
lib/librte_eal/linuxapp/eal/meson.build +5 -4
@@ -49,6 +49,8 @@ sources = ['eal_alarm.c', 'eal_pci.c', ] +eal_extra_link_arg = '-ldl' + version_map = join_paths(meson.current_source_dir(), 'rte_eal_version.map') eal_lib = library('rte_eal', sources, eal_common_sources, eal_common_arch_sources, dependencies: dependency('threads'),
@@ -56,15 +58,14 @@ eal_lib = library('rte_eal', sources, eal_common_sources, eal_common_arch_source version: '@[email protected]'.format(version), c_args: '-D_GNU_SOURCE', link_depends: version_map, - link_args: ['-ldl', + link_args: [eal_extra_link_arg, '-Wl,--version-script=' + version_map], install: true ) -dpdk_libraries += ['-pthread', '-ldl', eal_lib] +dpdk_libraries += [eal_lib, '-pthread', eal_extra_link_arg] rte_eal = declare_dependency(link_with: eal_lib, include_directories: eal_inc, - dependencies: dependency('threads'), - link_args: '-ldl') + dependencies: dependency('threads')) set_variable('dep_rte_eal', rte_eal)
meson.build +5 -1
@@ -60,7 +60,10 @@ subdir('config') subdir('lib') subdir('buildtools') subdir('drivers') + +# build binaries and installable tools subdir('usertools') +subdir('app') # write the build config build_cfg = 'rte_build_config.h'
@@ -68,7 +71,8 @@ configure_file(output: build_cfg, configuration: dpdk_conf, install_dir: get_option('includedir')) -# for static builds, include the drivers directly +# for static builds, include the drivers as libs, and also any +# other dependent libs that DPDK needs to link against if get_option('default_library') == 'static' dpdk_libraries = dpdk_drivers + dpdk_libraries endif
Signature · 1 line
2.13.4
RFC v2 29/40 crypto/null: rename the version file to standard
In reply to Bruce Richardson---
drivers/crypto/null/Makefile | 2 +-
.../null/{rte_pmd_null_crypto_version.map => rte_pmd_null_version.map} | 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename drivers/crypto/null/{rte_pmd_null_crypto_version.map => rte_pmd_null_version.map} (100%)drivers/crypto/null/Makefile +1 -1
@@ -42,7 +42,7 @@ CFLAGS += $(WERROR_FLAGS) LIBABIVER := 1 # versioning export map -EXPORT_MAP := rte_pmd_null_crypto_version.map +EXPORT_MAP := rte_pmd_null_version.map # library source files SRCS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO) += null_crypto_pmd.c
drivers/crypto/null/rte_pmd_null_version.map renamed from drivers/crypto/null/rte_pmd_null_crypto_version.map +0 -0
Signature · 1 line
2.13.4
RFC v2 30/40 crypto/qat: remove dependency on ether library
In reply to Bruce Richardson--- drivers/crypto/qat/qat_crypto.c | 1 - 1 file changed, 1 deletion(-)
drivers/crypto/qat/qat_crypto.c +0 -1
@@ -46,7 +46,6 @@#include <rte_memory.h> #include <rte_memzone.h> #include <rte_tailq.h> -#include <rte_ether.h> #include <rte_malloc.h> #include <rte_launch.h> #include <rte_eal.h>
Signature · 1 line
2.13.4
RFC v2 31/40 build: add cryptodev and some crypto drivers to build
In reply to Bruce Richardson--- config/rte_config.h | 9 ++++ drivers/crypto/meson.build | 103 +++++++++++++++++++++++++++++++++++++ drivers/crypto/null/meson.build | 32 ++++++++++++ drivers/crypto/openssl/meson.build | 33 ++++++++++++ drivers/crypto/qat/meson.build | 36 +++++++++++++ drivers/meson.build | 3 +- lib/librte_cryptodev/meson.build | 39 ++++++++++++++ lib/meson.build | 2 +- 8 files changed, 255 insertions(+), 2 deletions(-) create mode 100644 drivers/crypto/meson.build create mode 100644 drivers/crypto/null/meson.build create mode 100644 drivers/crypto/openssl/meson.build create mode 100644 drivers/crypto/qat/meson.build create mode 100644 lib/librte_cryptodev/meson.build
config/rte_config.h +9 -0
@@ -72,6 +72,9 @@#define RTE_ETHDEV_QUEUE_STAT_CNTRS 16#define RTE_ETHDEV_RXTX_CALLBACKS 1 +/* cryptodev defines */ +#define RTE_CRYPTO_MAX_DEVS 64 +#define RTE_CRYPTODEV_NAME_LEN 64/****** driver defines ********/ /* i40e defines */
@@ -83,4 +86,10 @@/* interval up to 8160 us, aligned to 2 (or default value) */ #define RTE_LIBRTE_I40E_ITR_INTERVAL -1 +/* +* Number of sessions to create in the session memory pool +* on a single QuickAssist device. +*/ +#define RTE_QAT_PMD_MAX_NB_SESSIONS 2048 +#endif /* _RTE_CONFIG_H_ */
drivers/crypto/meson.build new file +103 -0
103 lines not on this page · raw message
drivers/crypto/null/meson.build new file +32 -0
@@ -0,0 +1,32 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +sources = files('null_crypto_pmd.c', 'null_crypto_pmd_ops.c')
drivers/crypto/openssl/meson.build new file +33 -0
@@ -0,0 +1,33 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +sources = files('rte_openssl_pmd.c', 'rte_openssl_pmd_ops.c') +ext_deps += libcrypto_dep
drivers/crypto/qat/meson.build new file +36 -0
@@ -0,0 +1,36 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +sources = files('qat_crypto.c', 'qat_qp.c', + 'qat_adf/qat_algs_build_desc.c', + 'rte_qat_cryptodev.c') +includes += include_directories('qat_adf') +ext_deps += libcrypto_dep
drivers/meson.build +2 -1
@@ -29,5 +29,6 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -subdir('net') subdir('mempool') +subdir('net') +subdir('crypto')
lib/librte_cryptodev/meson.build new file +39 -0
@@ -0,0 +1,39 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +sources = files('rte_cryptodev.c', 'rte_cryptodev_pmd.c') +headers = files('rte_cryptodev.h', + 'rte_cryptodev_pci.h', + 'rte_cryptodev_pmd.h', + 'rte_cryptodev_vdev.h', + 'rte_crypto.h', + 'rte_crypto_sym.h') +deps = ['eal', 'mempool', 'kvargs', 'mbuf']
lib/meson.build +1 -1
@@ -35,7 +35,7 @@ subdir('librte_compat') # process all libraries equally, as far as possible libs = ['ring', 'mempool', 'cmdline', 'mbuf', 'net', 'ether', 'hash', - 'kvargs', 'gro', 'metrics'] + 'kvargs', 'gro', 'metrics', 'cryptodev'] foreach l:libs version = 1
Signature · 1 line
2.13.4
RFC v2 32/40 igb_uio: add igb_uio to meson build
In reply to Bruce Richardson--- lib/librte_eal/linuxapp/igb_uio/Kbuild | 1 + lib/librte_eal/linuxapp/igb_uio/meson.build | 47 +++++++++++++++++++++++++++++ lib/librte_eal/linuxapp/meson.build | 10 ++++++ meson_options.txt | 4 ++- 4 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 lib/librte_eal/linuxapp/igb_uio/Kbuild create mode 100644 lib/librte_eal/linuxapp/igb_uio/meson.build
lib/librte_eal/linuxapp/igb_uio/Kbuild new file +1 -0
@@ -0,0 +1 @@ +obj-m := igb_uio.o
lib/librte_eal/linuxapp/igb_uio/meson.build new file +47 -0
47 lines not on this page · raw message
lib/librte_eal/linuxapp/meson.build +10 -0
@@ -30,3 +30,13 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. subdir('eal') + +if get_option('enable_kmods') + kernel_dir = get_option('kernel_dir') + if kernel_dir == '' + kernel_version = run_command('uname', '-r').stdout().strip() + kernel_dir = '/lib/modules/' + kernel_version + '/build' + endif + + subdir('igb_uio') +endif
meson_options.txt +3 -1
@@ -3,4 +3,6 @@ option('max_lcores', type: 'string', value: '128', description: 'maximum number option('max_numa_nodes', type: 'string', value: '4', description: 'maximum number of NUMA nodes supported by EAL') option('use_hpet', type: 'boolean', value: false, description: 'use HPET timer in EAL') option('allow_invalid_socket_id', type: 'boolean', value: false, - description: 'allow out-of-range NUMA socket id\'s for platforms that don\'t report the value correctly') + description: 'allow out-of-range NUMA socket id\'s for platforms that don\'t report the value correctly') +option('enable_kmods', type: 'boolean', value: true, description: 'build kernel modules') +option('kernel_dir', type: 'string', value: '', description: 'path to the kernel for building kernel modules')
Signature · 1 line
2.13.4
RFC v2 33/40 ip_frag: rename version file to standard name
In reply to Bruce RichardsonThe version file did not quite match the directory name, as it was missing an '_' between ip and frag.
---
lib/librte_ip_frag/Makefile | 2 +-
lib/librte_ip_frag/{rte_ipfrag_version.map => rte_ip_frag_version.map} | 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename lib/librte_ip_frag/{rte_ipfrag_version.map => rte_ip_frag_version.map} (100%)lib/librte_ip_frag/Makefile +1 -1
@@ -37,7 +37,7 @@ LIB = librte_ip_frag.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -EXPORT_MAP := rte_ipfrag_version.map +EXPORT_MAP := rte_ip_frag_version.map LIBABIVER := 1
lib/librte_ip_frag/rte_ip_frag_version.map renamed from lib/librte_ip_frag/rte_ipfrag_version.map +0 -0
Signature · 1 line
2.13.4
RFC v2 34/40 build: add most remaining libraries to meson build
In reply to Bruce RichardsonOnly libraries not included in meson build at this point are the three packet framework libs, and the acl library (which needs some custom handling for the different instruction set levels it has).
--- app/test-pmd/meson.build | 3 +++ config/meson.build | 2 ++ config/rte_config.h | 19 ++++++++++++++++++ drivers/mempool/meson.build | 2 +- lib/librte_bitratestats/meson.build | 34 ++++++++++++++++++++++++++++++++ lib/librte_cfgfile/meson.build | 35 +++++++++++++++++++++++++++++++++ lib/librte_cryptodev/meson.build | 1 + lib/librte_distributor/meson.build | 39 +++++++++++++++++++++++++++++++++++++ lib/librte_efd/meson.build | 34 ++++++++++++++++++++++++++++++++ lib/librte_ether/meson.build | 2 +- lib/librte_eventdev/meson.build | 36 ++++++++++++++++++++++++++++++++++ lib/librte_ip_frag/meson.build | 39 +++++++++++++++++++++++++++++++++++++ lib/librte_jobstats/meson.build | 34 ++++++++++++++++++++++++++++++++ lib/librte_kni/meson.build | 35 +++++++++++++++++++++++++++++++++ lib/librte_latencystats/meson.build | 34 ++++++++++++++++++++++++++++++++ lib/librte_lpm/meson.build | 35 +++++++++++++++++++++++++++++++++ lib/librte_mbuf/meson.build | 2 +- lib/librte_mempool/meson.build | 3 +-- lib/librte_meter/meson.build | 34 ++++++++++++++++++++++++++++++++ lib/librte_net/meson.build | 2 +- lib/librte_pdump/meson.build | 34 ++++++++++++++++++++++++++++++++ lib/librte_power/meson.build | 35 +++++++++++++++++++++++++++++++++ lib/librte_reorder/meson.build | 34 ++++++++++++++++++++++++++++++++ lib/librte_sched/meson.build | 36 ++++++++++++++++++++++++++++++++++ lib/librte_timer/meson.build | 34 ++++++++++++++++++++++++++++++++ lib/librte_vhost/meson.build | 36 ++++++++++++++++++++++++++++++++++ lib/meson.build | 24 +++++++++++++++++++---- 27 files changed, 648 insertions(+), 10 deletions(-) create mode 100644 lib/librte_bitratestats/meson.build create mode 100644 lib/librte_cfgfile/meson.build create mode 100644 lib/librte_distributor/meson.build create mode 100644 lib/librte_efd/meson.build create mode 100644 lib/librte_eventdev/meson.build create mode 100644 lib/librte_ip_frag/meson.build create mode 100644 lib/librte_jobstats/meson.build create mode 100644 lib/librte_kni/meson.build create mode 100644 lib/librte_latencystats/meson.build create mode 100644 lib/librte_lpm/meson.build create mode 100644 lib/librte_meter/meson.build create mode 100644 lib/librte_pdump/meson.build create mode 100644 lib/librte_power/meson.build create mode 100644 lib/librte_reorder/meson.build create mode 100644 lib/librte_sched/meson.build create mode 100644 lib/librte_timer/meson.build create mode 100644 lib/librte_vhost/meson.build
app/test-pmd/meson.build +3 -0
@@ -46,6 +46,9 @@ sources = files('cmdline.c', deps = ['rte_eal', 'rte_net', 'rte_ether', 'rte_mempool', 'rte_ring', 'rte_mbuf', 'rte_gro', 'rte_cmdline', 'rte_metrics'] +if dpdk_conf.has('RTE_LIBRTE_PDUMP') + deps += 'rte_pdump' +endif if dpdk_conf.has('RTE_LIBRTE_I40E_PMD') deps += 'rte_pmd_i40e' endif
config/meson.build +2 -0
@@ -33,6 +33,8 @@ machine = get_option('machine') dpdk_conf.set('RTE_MACHINE', machine) add_project_arguments('-march=@0@'.format(machine), language: 'c') +# some libs depend on maths lib +add_project_link_arguments('-lm', language: 'c') # add -include rte_config to cflags add_project_arguments('-include', 'rte_config.h', language: 'c')
config/rte_config.h +19 -0
@@ -75,6 +75,25 @@/* cryptodev defines */ #define RTE_CRYPTO_MAX_DEVS 64#define RTE_CRYPTODEV_NAME_LEN 64 + +/* eventdev defines */ +#define RTE_EVENT_MAX_DEVS 16 +#define RTE_EVENT_MAX_QUEUES_PER_DEV 64 + +/* ip_fragmentation defines */ +#define RTE_LIBRTE_IP_FRAG_MAX_FRAG 4 +#undef RTE_LIBRTE_IP_FRAG_TBL_STAT + +/* rte_power defines */ +#define RTE_MAX_LCORE_FREQS 64 + +/* rte_sched defines */ +#undef RTE_SCHED_RED +#undef RTE_SCHED_COLLECT_STATS +#undef RTE_SCHED_SUBPORT_TC_OV +#define RTE_SCHED_PORT_N_GRINDERS 8 +#undef RTE_SCHED_VECTOR +/****** driver defines ********/ /* i40e defines */
drivers/mempool/meson.build +1 -1
@@ -52,7 +52,7 @@ foreach drv:mempool_drivers # get dependency objs from strings dep_objs = ext_deps foreach d:deps - dep_objs = [get_variable('dep_rte_' + d)] + dep_objs + dep_objs += [get_variable('dep_rte_' + d)] + dep_objs endforeach # generate pmdinfo sources
lib/librte_bitratestats/meson.build new file +34 -0
@@ -0,0 +1,34 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +sources = files('rte_bitrate.c') +headers = files('rte_bitrate.h') +deps = ['eal', 'ether', 'metrics']
lib/librte_cfgfile/meson.build new file +35 -0
@@ -0,0 +1,35 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +version = 2 +sources = files('rte_cfgfile.c') +headers = files('rte_cfgfile.h') +deps = ['eal']
lib/librte_cryptodev/meson.build +1 -0
@@ -29,6 +29,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +version = 3 sources = files('rte_cryptodev.c', 'rte_cryptodev_pmd.c') headers = files('rte_cryptodev.h', 'rte_cryptodev_pci.h',
lib/librte_distributor/meson.build new file +39 -0
@@ -0,0 +1,39 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +sources = files('rte_distributor.c', 'rte_distributor_v20.c') +if arch_subdir == 'x86' + sources += files('rte_distributor_match_sse.c') +else + sources += files('rte_distributor_match_generic.c') +endif +headers = files('rte_distributor.h') +deps = ['eal', 'mbuf', 'compat']
lib/librte_efd/meson.build new file +34 -0
@@ -0,0 +1,34 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +sources = files('rte_efd.c') +headers = files('rte_efd.h') +deps = ['eal', 'ring', 'hash']
lib/librte_ether/meson.build +1 -1
@@ -42,5 +42,5 @@ headers = files('rte_ethdev.h', 'rte_flow_driver.h', 'rte_tm.h') -deps = ['eal', 'ring', 'mempool', 'net', 'mbuf'] +deps = ['net']
lib/librte_eventdev/meson.build new file +36 -0
@@ -0,0 +1,36 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +sources = files('rte_eventdev.c', 'rte_event_ring.c') +headers = files('rte_eventdev.h', 'rte_eventdev_pmd.h', + 'rte_eventdev_pmd_pci.h', 'rte_eventdev_pmd_vdev.h', + 'rte_event_ring.h') +deps = ['eal', 'ring']
lib/librte_ip_frag/meson.build new file +39 -0
@@ -0,0 +1,39 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +sources = files('rte_ipv4_fragmentation.c', + 'rte_ipv6_fragmentation.c', + 'rte_ipv4_reassembly.c', + 'rte_ipv6_reassembly.c', + 'rte_ip_frag_common.c', + 'ip_frag_internal.c') +headers = files('rte_ip_frag.h') +deps = ['eal', 'mempool', 'mbuf', 'ether', 'hash']
lib/librte_jobstats/meson.build new file +34 -0
@@ -0,0 +1,34 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +sources = files('rte_jobstats.c') +headers = files('rte_jobstats.h') +deps = ['eal']
lib/librte_kni/meson.build new file +35 -0
@@ -0,0 +1,35 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +version = 2 +sources = files('rte_kni.c') +headers = files('rte_kni.h') +deps = ['eal', 'mempool', 'mbuf', 'ether']
lib/librte_latencystats/meson.build new file +34 -0
@@ -0,0 +1,34 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +sources = files('rte_latencystats.c') +headers = files('rte_latencystats.h') +deps = ['eal', 'metrics', 'ether', 'mbuf']
lib/librte_lpm/meson.build new file +35 -0
@@ -0,0 +1,35 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +version = 2 +sources = files('rte_lpm.c', 'rte_lpm6.c') +headers = files('rte_lpm.h', 'rte_lpm6.h') +deps = ['eal', 'compat']
lib/librte_mbuf/meson.build +1 -1
@@ -32,5 +32,5 @@ version = 3 sources = files('rte_mbuf.c', 'rte_mbuf_ptype.c') headers = files('rte_mbuf.h', 'rte_mbuf_ptype.h') -deps = ['eal', 'mempool', 'ring'] +deps = ['mempool']
lib/librte_mempool/meson.build +1 -2
@@ -32,5 +32,4 @@ version = 2 sources = files('rte_mempool.c', 'rte_mempool_ops.c') headers = files('rte_mempool.h') -deps = ['eal', 'ring'] - +deps = ['ring']
lib/librte_meter/meson.build new file +34 -0
@@ -0,0 +1,34 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +sources = files('rte_meter.c') +headers = files('rte_meter.h') +deps = ['eal']
lib/librte_net/meson.build +1 -1
@@ -42,5 +42,5 @@ headers = files('rte_ip.h', 'rte_net_crc.h') sources = files('rte_net.c', 'rte_net_crc.c') -deps = ['eal', 'mbuf', 'ring', 'mempool'] +deps = ['mbuf']
lib/librte_pdump/meson.build new file +34 -0
@@ -0,0 +1,34 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +sources = files('rte_pdump.c') +headers = files('rte_pdump.h') +deps = ['eal', 'mbuf', 'ether']
lib/librte_power/meson.build new file +35 -0
@@ -0,0 +1,35 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +sources = files('rte_power.c', 'rte_power_acpi_cpufreq.c', + 'rte_power_kvm_vm.c', 'guest_channel.c') +headers = files('rte_power.h') +deps = ['eal']
lib/librte_reorder/meson.build new file +34 -0
@@ -0,0 +1,34 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +sources = files('rte_reorder.c') +headers = files('rte_reorder.h') +deps = ['eal', 'mbuf']
lib/librte_sched/meson.build new file +36 -0
@@ -0,0 +1,36 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +sources = files('rte_sched.c', 'rte_red.c', 'rte_approx.c', + 'rte_reciprocal.c') +headers = files('rte_sched.h', 'rte_bitmap.h', 'rte_sched_common.h', + 'rte_red.h', 'rte_approx.h', 'rte_reciprocal.h') +deps = ['mbuf', 'meter']
lib/librte_timer/meson.build new file +34 -0
@@ -0,0 +1,34 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +sources = files('rte_timer.c') +headers = files('rte_timer.h') +deps = ['eal']
lib/librte_vhost/meson.build new file +36 -0
@@ -0,0 +1,36 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +version = 4 +sources = files('fd_man.c', 'socket.c', 'vhost.c', 'vhost_user.c', + 'virtio_net.c') +headers = files('rte_vhost.h') +deps = ['eal', 'mbuf', 'ether']
lib/meson.build +20 -4
@@ -34,8 +34,24 @@ subdir('librte_eal') subdir('librte_compat') # process all libraries equally, as far as possible -libs = ['ring', 'mempool', 'cmdline', 'mbuf', 'net', 'ether', 'hash', - 'kvargs', 'gro', 'metrics', 'cryptodev'] +# "core" libs first, then others alphebetically as far as possible +# NOTE: for speed of meson runs, the dependencies in the subdirectories +# sometimes skip deps that would be implied by others, e.g. if mempool is +# given as a dep, no need to mention ring. This is especially true for the +# core libs which are widely reused, so their deps are kept to a minimum. +libs = ['ring', 'mempool', 'mbuf', 'net', 'ether', # core + 'metrics', # bitrate/latency stats depends on this + 'hash', # efd depends on this + 'kvargs', # cryptodev depends on this + 'bitratestats', 'cfgfile', 'cmdline', 'cryptodev', 'distributor', + 'efd', 'eventdev', 'gro', 'ip_frag', 'jobstats', + 'latencystats', 'lpm', 'meter', 'pdump', 'reorder', 'sched', + 'timer'] +# pipeline, port, table, acl # todo + +if host_machine.system() == 'linux' + libs += ['kni', 'power', 'vhost'] +endif foreach l:libs version = 1
@@ -52,9 +68,9 @@ foreach l:libs install_headers(headers) - dep_objs = [] + dep_objs = ext_deps foreach d:deps - dep_objs = [get_variable('dep_rte_' + d)] + dep_objs + dep_objs += [get_variable('dep_rte_' + d)] + dep_objs endforeach version_map = '@0@/@1@/rte_@2@_version.map'.format(
Signature · 1 line
2.13.4
RFC v2 35/40 build: add packet framework libs to meson build
In reply to Bruce Richardson--- lib/librte_pipeline/meson.build | 35 +++++++++++++++++++++++++ lib/librte_port/meson.build | 58 +++++++++++++++++++++++++++++++++++++++++ lib/librte_table/meson.build | 52 ++++++++++++++++++++++++++++++++++++ lib/meson.build | 6 ++++- 4 files changed, 150 insertions(+), 1 deletion(-) create mode 100644 lib/librte_pipeline/meson.build create mode 100644 lib/librte_port/meson.build create mode 100644 lib/librte_table/meson.build
lib/librte_pipeline/meson.build new file +35 -0
@@ -0,0 +1,35 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +version = 3 +sources = files('rte_pipeline.c') +headers = files('rte_pipeline.h') +deps += ['port', 'table']
lib/librte_port/meson.build new file +58 -0
58 lines not on this page · raw message
lib/librte_table/meson.build new file +52 -0
53 lines not on this page · raw message
lib/meson.build +5 -1
@@ -47,12 +47,16 @@ libs = ['ring', 'mempool', 'mbuf', 'net', 'ether', # core 'efd', 'eventdev', 'gro', 'ip_frag', 'jobstats', 'latencystats', 'lpm', 'meter', 'pdump', 'reorder', 'sched', 'timer'] -# pipeline, port, table, acl # todo +# acl - todo if host_machine.system() == 'linux' libs += ['kni', 'power', 'vhost'] endif +# add pkt framework libs which use other libs from above, including optional +# ones for linux +libs += ['port', 'table', 'pipeline'] + foreach l:libs version = 1 sources = []
Signature · 1 line
2.13.4
RFC v2 36/40 acl: add acl library to meson build
In reply to Bruce Richardson--- lib/librte_acl/meson.build | 60 ++++++++++++++++++++++++++++++++++++++++++++++ lib/meson.build | 18 ++++++++------ 2 files changed, 71 insertions(+), 7 deletions(-) create mode 100644 lib/librte_acl/meson.build
lib/librte_acl/meson.build new file +60 -0
@@ -0,0 +1,60 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +version = 2 +sources = files('acl_bld.c', 'acl_gen.c', 'acl_run_scalar.c', + 'rte_acl.c', 'tb_mem.c') +headers = files('rte_acl.h', 'rte_acl_osdep.h') +deps += ['eal'] + +if arch_subdir == 'x86' + sources += files('acl_run_sse.c') + + # compile AVX2 version if either: + # a. we have AVX supported in minimum instruction set baseline + # b. it's not minimum instruction set, but supported by compiler + # + # in former case, just add avx2 C file to files list + # in latter case, compile c file to static lib, using correct compiler + # flags, and then have the .o file from static lib linked into main lib. + if dpdk_conf.has('RTE_MACHINE_CPUFLAG_AVX2') + sources += files('acl_run_avx2.c') + cflags += '-DCC_AVX2_SUPPORT' + elif cc.has_argument('-mavx2') + avx2_tmplib = static_library('avx2_tmp', + 'acl_run_avx2.c', + dependencies: rte_eal, + c_args: '-mavx2') + objs += avx2_tmplib.extract_objects('acl_run_avx2.c') + cflags += '-DCC_AVX2_SUPPORT' + endif + +endif
lib/meson.build +11 -7
@@ -39,28 +39,30 @@ subdir('librte_compat') # sometimes skip deps that would be implied by others, e.g. if mempool is # given as a dep, no need to mention ring. This is especially true for the # core libs which are widely reused, so their deps are kept to a minimum. -libs = ['ring', 'mempool', 'mbuf', 'net', 'ether', # core +libraries = ['ring', 'mempool', 'mbuf', 'net', 'ether', # core 'metrics', # bitrate/latency stats depends on this 'hash', # efd depends on this 'kvargs', # cryptodev depends on this - 'bitratestats', 'cfgfile', 'cmdline', 'cryptodev', 'distributor', - 'efd', 'eventdev', 'gro', 'ip_frag', 'jobstats', + 'acl', 'bitratestats', 'cfgfile', 'cmdline', 'cryptodev', + 'distributor', 'efd', 'eventdev', 'gro', 'ip_frag', 'jobstats', 'latencystats', 'lpm', 'meter', 'pdump', 'reorder', 'sched', 'timer'] -# acl - todo if host_machine.system() == 'linux' - libs += ['kni', 'power', 'vhost'] + libraries += ['kni', 'power', 'vhost'] endif # add pkt framework libs which use other libs from above, including optional # ones for linux -libs += ['port', 'table', 'pipeline'] +libraries += ['port', 'table', 'pipeline'] -foreach l:libs +foreach l:libraries version = 1 sources = [] headers = [] + cflags = [] + objs = [] # other object files to link against, used e.g. for instruction- + # optimized versions of code # use "deps" for internal DPDK dependencies, and "ext_deps" for # external package/library requirements deps = []
@@ -85,6 +87,8 @@ foreach l:libs endif lib = library(libname, sources, + objects: objs, + c_args: cflags, dependencies: dep_objs, include_directories: include_directories(dir_name), link_args: '-Wl,--version-script=' + version_map,
Signature · 1 line
2.13.4
RFC v2 37/40 build: add ark and avp PMDs to build
In reply to Bruce Richardson--- drivers/net/ark/meson.build | 44 ++++++++++++++++++++++++++++++++++++++++++++ drivers/net/avp/meson.build | 36 ++++++++++++++++++++++++++++++++++++ drivers/net/meson.build | 2 +- 3 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 drivers/net/ark/meson.build create mode 100644 drivers/net/avp/meson.build
drivers/net/ark/meson.build new file +44 -0
@@ -0,0 +1,44 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +sources = files('ark_ddm.c', + 'ark_ethdev.c', + 'ark_ethdev_rx.c', + 'ark_ethdev_tx.c', + 'ark_mpu.c', + 'ark_pktchkr.c', + 'ark_pktdir.c', + 'ark_pktgen.c', + 'ark_rqp.c', + 'ark_udm.c') +if host_machine.system() == 'linux' + ext_deps += cc.find_library('dl') +endif
drivers/net/avp/meson.build new file +36 -0
@@ -0,0 +1,36 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +if host_machine.system() != 'linux' + build = false +endif +sources = files('avp_ethdev.c') +install_headers('rte_avp_common.h', 'rte_avp_fifo.h')
drivers/net/meson.build +1 -1
@@ -29,7 +29,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -net_drivers = ['i40e', 'ixgbe'] +net_drivers = ['ark', 'avp', 'i40e', 'ixgbe'] # af_packet only works on linux if host_machine.system() == 'linux'
Signature · 1 line
2.13.4
RFC v2 38/40 build: fix static library builds with base code
In reply to Bruce Richardsonfor static library builds, we miss the base code, as the base code .a file is not included in the overall driver .a file. Instead mark the objects in the base code lib to be included in the overall library.
--- drivers/crypto/meson.build | 6 +++--- drivers/mempool/meson.build | 4 ++-- drivers/net/i40e/base/meson.build | 1 + drivers/net/i40e/meson.build | 2 +- drivers/net/ixgbe/base/meson.build | 1 + drivers/net/ixgbe/meson.build | 2 +- drivers/net/meson.build | 4 ++-- 7 files changed, 11 insertions(+), 9 deletions(-)
drivers/crypto/meson.build +3 -3
@@ -42,14 +42,14 @@ foreach drv:crypto_drivers # set up empty variables used for build version = 1 sources = [] - libs = [] + objs = [] cflags = [] includes = [include_directories(drv)] # dependency managment. External deps managed using dependency # objects, internal deps managed by name of lib ext_deps = [] # set up standard deps. Drivers can append/override as necessary - deps = ['eal', 'mbuf', 'cryptodev', 'mempool', 'kvargs'] + deps = ['mbuf', 'cryptodev', 'kvargs'] # pull in driver directory which should assign to each of the above subdir(drv)
@@ -82,9 +82,9 @@ foreach drv:crypto_drivers meson.current_source_dir(), drv) lib = library(drv_name, sources, + objects: objs, include_directories: includes, dependencies: dep_objs, - link_with: libs, c_args: cflags, link_args: '-Wl,--version-script=' + version_map, link_depends: version_map,
drivers/mempool/meson.build +2 -2
@@ -37,7 +37,7 @@ foreach drv:mempool_drivers # set up empty variables used for build version = 1 sources = [] - libs = [] + objs = [] cflags = [] includes = [include_directories(drv)] # dependency managment. External deps managed using dependency
@@ -77,9 +77,9 @@ foreach drv:mempool_drivers meson.current_source_dir(), drv) lib = library(drv_name, sources, + objects: objs, include_directories: includes, dependencies: dep_objs, - link_with: libs, c_args: cflags, link_args: '-Wl,--version-script=' + version_map, link_depends: version_map,
drivers/net/i40e/base/meson.build +1 -0
@@ -53,3 +53,4 @@ endforeach base_lib = static_library('i40e_base', sources, dependencies: rte_eal, c_args: c_args) +base_objs = base_lib.extract_all_objects()
drivers/net/i40e/meson.build +1 -1
@@ -35,7 +35,7 @@ cflags = ['-DPF_DRIVER', '-DX722_A0_SUPPORT'] subdir('base') -libs = [base_lib] +objs = [base_objs] sources = files( 'i40e_ethdev.c',
drivers/net/ixgbe/base/meson.build +1 -0
@@ -57,3 +57,4 @@ endforeach base_lib = static_library('ixgbe_base', sources, dependencies: rte_eal, c_args: c_args) +base_objs = base_lib.extract_all_objects()
drivers/net/ixgbe/meson.build +1 -1
@@ -32,7 +32,7 @@ cflags = ['-DRTE_LIBRTE_IXGBE_BYPASS'] subdir('base') -libs = [base_lib] +objs = [base_objs] sources = files( 'ixgbe_82599_bypass.c',
drivers/net/meson.build +2 -2
@@ -49,7 +49,7 @@ foreach drv:net_drivers # set up empty variables used for build version = 1 sources = [] - libs = [] + objs = [] cflags = [] includes = [include_directories(drv)] # dependency managment. External deps managed using dependency
@@ -90,9 +90,9 @@ foreach drv:net_drivers meson.current_source_dir(), drv) lib = library(drv_name, sources, + objects: objs, include_directories: includes, dependencies: dep_objs, - link_with: libs, c_args: cflags, link_args: '-Wl,--version-script=' + version_map, link_depends: version_map,
Signature · 1 line
2.13.4
RFC v2 39/40 build: fix driver dependencies for static builds
In reply to Bruce RichardsonFor static builds we need to better track the dependencies of drivers, because, unlike with shared libs, the static libs don't track them themselves. Because of this we have a new global list of external dependencies which is used for creating the pkg-config file. We also move the logic for what dependencies a driver has, and if those deps are met, from the higher level build file to the drivers themselves.
--- drivers/crypto/meson.build | 115 ++++++++++--------- drivers/crypto/openssl/meson.build | 7 +- drivers/crypto/qat/meson.build | 7 +- drivers/mempool/meson.build | 110 +++++++++--------- drivers/net/af_packet/meson.build | 3 + drivers/net/ark/meson.build | 1 + drivers/net/meson.build | 123 ++++++++++----------- drivers/net/pcap/meson.build | 11 +- lib/librte_eal/bsdapp/eal/meson.build | 3 +- lib/librte_eal/common/include/arch/x86/meson.build | 1 + lib/librte_eal/linuxapp/eal/meson.build | 3 +- meson.build | 4 +- 12 files changed, 211 insertions(+), 177 deletions(-)
drivers/crypto/meson.build +60 -55
@@ -29,75 +29,80 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -crypto_drivers = ['null'] - -libcrypto_dep = dependency('libcrypto', required: false) -if libcrypto_dep.found() - crypto_drivers += ['qat', 'openssl'] -endif - -foreach drv:crypto_drivers - dpdk_conf.set('RTE_LIBRTE_@0@_PMD'.format(drv.to_upper()),1) +drivers = ['null', 'qat', 'openssl'] +std_deps = ['cryptodev'] # cryptodev pulls in all other needed deps +foreach drv:drivers # set up empty variables used for build + build = true # set to false to disable, e.g. missing deps version = 1 sources = [] objs = [] cflags = [] includes = [include_directories(drv)] - # dependency managment. External deps managed using dependency - # objects, internal deps managed by name of lib + # set up internal deps. Drivers can append/override as necessary + deps = std_deps + # ext_deps: Stores external library dependency got + # using dependency() or cc.find_library(). For most cases, we + # probably also need to specify the "-l" flags in + # pkgconfig_extra_libs variable too, so that it can be reflected + # in the pkgconfig output for static builds ext_deps = [] - # set up standard deps. Drivers can append/override as necessary - deps = ['mbuf', 'cryptodev', 'kvargs'] + pkgconfig_extra_libs = [] # pull in driver directory which should assign to each of the above subdir(drv) - # get dependency objs from strings - dep_objs = ext_deps - foreach d:deps - dep_objs += [get_variable('dep_rte_' + d)] + dep_objs - endforeach - - # generate pmdinfo sources - pmdinfogen_srcs = run_command('grep', '--files-with-matches', - 'RTE_PMD_REGISTER_.*(.*)', sources).stdout().strip().split() - foreach src: pmdinfogen_srcs - out_filename = '@[email protected]'.format(src.split('/')[-1]) - tmp_lib = static_library('tmp_@0@'.format(src.underscorify()), - src, include_directories: includes, - dependencies: dep_objs, - c_args: cflags) - sources += custom_target(out_filename, - command: [pmdinfo, tmp_lib.full_path(), - '@OUTPUT@', pmdinfogen], - output: out_filename, - depends: [pmdinfogen, tmp_lib]) - endforeach + if build + dpdk_conf.set('RTE_LIBRTE_@0@_PMD'.format(drv.to_upper()),1) - # now build the driver itself, and add to the drivers list - drv_name = 'rte_pmd_@0@'.format(drv) - version_map = '@0@/@1@/rte_pmd_@1@_version.map'.format( - meson.current_source_dir(), drv) - lib = library(drv_name, - sources, - objects: objs, - include_directories: includes, - dependencies: dep_objs, - c_args: cflags, - link_args: '-Wl,--version-script=' + version_map, - link_depends: version_map, - version: '@[email protected]'.format(version), - install: true, - install_dir: driver_install_path) + # get dependency objs from strings + dep_objs = [] + foreach d:deps + dep_objs += [get_variable('dep_rte_' + d)] + dep_objs + endforeach + dep_objs += ext_deps + dpdk_extra_ldflags += pkgconfig_extra_libs - dpdk_drivers += lib + # generate pmdinfo sources + pmdinfogen_srcs = run_command('grep', '--files-with-matches', + 'RTE_PMD_REGISTER_.*(.*)', sources).stdout().strip().split() + foreach src: pmdinfogen_srcs + out_filename = '@[email protected]'.format(src.split('/')[-1]) + tmp_lib = static_library('tmp_@0@'.format(src.underscorify()), + src, include_directories: includes, + dependencies: dep_objs, + c_args: cflags) + sources += custom_target(out_filename, + command: [pmdinfo, tmp_lib.full_path(), + '@OUTPUT@', pmdinfogen], + output: out_filename, + depends: [pmdinfogen, tmp_lib]) + endforeach - # create a dependency object and add it to the global dictionary so - # testpmd or other built-in apps can find it if necessary - set_variable('dep_rte_pmd_@0@'.format(drv), - declare_dependency(link_with: lib, + # now build the driver itself, and add to the drivers list + drv_name = 'rte_pmd_@0@'.format(drv) + version_map = '@0@/@1@/rte_pmd_@1@_version.map'.format( + meson.current_source_dir(), drv) + lib = library(drv_name, + sources, + objects: objs, include_directories: includes, - dependencies: dep_objs)) + dependencies: dep_objs, + c_args: cflags, + link_args: '-Wl,--version-script=' + version_map, + link_depends: version_map, + version: '@[email protected]'.format(version), + install: true, + install_dir: driver_install_path) + + dpdk_drivers += lib + + # create a dependency object and add it to the global dictionary so + # testpmd or other built-in apps can find it if necessary + set_variable('dep_rte_pmd_@0@'.format(drv), + declare_dependency(link_with: lib, + include_directories: includes, + dependencies: dep_objs)) + endif # build endforeach
drivers/crypto/openssl/meson.build +6 -1
@@ -29,5 +29,10 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +dep = dependency('libcrypto', required: false) +if not dep.found() + build = false +endif sources = files('rte_openssl_pmd.c', 'rte_openssl_pmd_ops.c') -ext_deps += libcrypto_dep +ext_deps += dep +pkgconfig_extra_libs += '-lcrypto'
drivers/crypto/qat/meson.build +6 -1
@@ -29,8 +29,13 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +dep = dependency('libcrypto', required: false) +if not dep.found() + build = false +endif sources = files('qat_crypto.c', 'qat_qp.c', 'qat_adf/qat_algs_build_desc.c', 'rte_qat_cryptodev.c') includes += include_directories('qat_adf') -ext_deps += libcrypto_dep +ext_deps += dep +pkgconfig_extra_libs += '-lcrypto'
drivers/mempool/meson.build +60 -50
130 lines not on this page · raw message
drivers/net/af_packet/meson.build +3 -0
@@ -29,4 +29,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +if host_machine.system() != 'linux' + build = false +endif sources = files('rte_eth_af_packet.c')
drivers/net/ark/meson.build +1 -0
@@ -41,4 +41,5 @@ sources = files('ark_ddm.c', 'ark_udm.c') if host_machine.system() == 'linux' ext_deps += cc.find_library('dl') + pkgconfig_extra_libs += '-ldl' endif
drivers/net/meson.build +60 -63
143 lines not on this page · raw message
drivers/net/pcap/meson.build +7 -4
@@ -29,10 +29,13 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -sources = files('rte_eth_pcap.c') - -if pcap_dep.found() +pcap_dep = dependency('pcap', required: false) +if pcap_dep.found() == true ext_deps += pcap_dep -else +elif find_program('pcap-config', required: false).found() == true ext_deps += cc.find_library('pcap') +else + build = false endif +sources = files('rte_eth_pcap.c') +pkgconfig_extra_libs += '-lpcap'
lib/librte_eal/bsdapp/eal/meson.build +2 -1
@@ -58,7 +58,8 @@ eal_lib = library('rte_eal', sources, eal_common_sources, eal_common_arch_source install: true ) -dpdk_libraries += [eal_lib, '-pthread', eal_extra_link_arg] +dpdk_libraries += eal_lib +dpdk_extra_ldflags += ['-pthread', eal_extra_link_arg] rte_eal = declare_dependency(link_with: eal_lib, include_directories: eal_inc,
lib/librte_eal/common/include/arch/x86/meson.build +1 -0
@@ -41,6 +41,7 @@ install_headers( 'rte_io.h', 'rte_memcpy.h', 'rte_prefetch.h', + 'rte_pause.h', 'rte_rtm.h', 'rte_rwlock.h', 'rte_spinlock.h',
lib/librte_eal/linuxapp/eal/meson.build +2 -1
@@ -63,7 +63,8 @@ eal_lib = library('rte_eal', sources, eal_common_sources, eal_common_arch_source install: true ) -dpdk_libraries += [eal_lib, '-pthread', eal_extra_link_arg] +dpdk_libraries += eal_lib +dpdk_extra_ldflags += ['-pthread', eal_extra_link_arg] rte_eal = declare_dependency(link_with: eal_lib, include_directories: eal_inc,
meson.build +3 -1
@@ -41,6 +41,7 @@ cc = meson.get_compiler('c') dpdk_conf = configuration_data() dpdk_libraries = [] dpdk_drivers = [] +dpdk_extra_ldflags = [] # for static libs, treat the drivers as regular libraries, otherwise # for shared libs, put them in a driver folder
@@ -74,7 +75,8 @@ configure_file(output: build_cfg, # for static builds, include the drivers as libs, and also any # other dependent libs that DPDK needs to link against if get_option('default_library') == 'static' - dpdk_libraries = dpdk_drivers + dpdk_libraries + dpdk_drivers = ['-Wl,--whole-archive'] + dpdk_drivers + ['-Wl,--no-whole-archive'] + dpdk_libraries = dpdk_drivers + dpdk_libraries + dpdk_extra_ldflags endif pkg = import('pkgconfig')
Signature · 1 line
2.13.4
RFC v2 40/40 examples: allow basic sample app build using pkg-config
In reply to Bruce Richardson--- examples/helloworld/Makefile | 13 +++++++++++++ examples/l2fwd/Makefile | 13 +++++++++++++ 2 files changed, 26 insertions(+)
examples/helloworld/Makefile +13 -0
@@ -29,6 +29,17 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +ifeq ($(shell pkg-config --exists DPDK || echo 1),) +# we have pkg-config install DPDK + +CFLAGS += $(shell pkg-config --cflags DPDK) +LDFLAGS += $(shell pkg-config --libs DPDK) + +helloworld: main.o + $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) + +else # legacy build system + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif
@@ -48,3 +59,5 @@ CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) include $(RTE_SDK)/mk/rte.extapp.mk + +endif
examples/l2fwd/Makefile +13 -0
@@ -29,6 +29,17 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +ifeq ($(shell pkg-config --exists DPDK || echo 1),) +# we have pkg-config install DPDK + +CFLAGS += $(shell pkg-config --cflags DPDK) +LDFLAGS += $(shell pkg-config --libs DPDK) + +l2fwd: main.o + $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) + +else # legacy build system + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif
@@ -48,3 +59,5 @@ CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) include $(RTE_SDK)/mk/rte.extapp.mk + +endif
Signature · 1 line
2.13.4
Quoted 68 lines · Bruce Richardson
Following on from previous RFC [http://dpdk.org/dev/patchwork/patch/2
5104/]
here is a second draft implementation for building DPDK with meson and
ninja. While still not building all of DPDK, and needing patch cleanup so
that patches don't overwrite previous work, it is more complete in many
ways than the previous version and includes:* dynamic build configuration e.g. building pcap driver only if pcap is
found, only buildaf_packetif the target is linux, and only building QAT
and openssl crypto drivers if libcrypto is found
* support for pmdinfo inside the PMDs(for shared builds) and binaries (for
static builds)
* generalized/standardized way of building libs and drivers, though the
drivers code still needs generalization at the driver, rather than driver-class level.
* support for having a pkgconfig file for DPDK on install, and helloworld
and l2fwd can be built using the pkgconfig info (via make, not ninja)
* support for library versions
* an implementation for FreeBSD as well as Linux
* all libraries are included in the build, as well as a number of NIC,
crypto, and mempool drivers
* theigb_uiokernel module is build via the kernelKbuildsystem as part
of a meson/ninja DPDK buildthere is still plenty to do on this, but please review and test it out.
I've kept the patches split so that the evolution of the work is a bit
clearer than having it all send in a monolithic patch. All feedback welcome. I recommend one uses the latest meson release for this, though the
minimum version supported should be v0.4.I've tested static and dynamic builds with clang and gcc on Fedora 26, and
done test builds on FreeBSD 11 with clang too. Build with other compilers
and on other OS's may have issues, so YMMV.To do a basic build, using gcc and with shared libs, in a folder called "gcc-build":
user@host:dpdk$ meson gcc-build .... user@host:dpdk$ cd gcc-build user@host:gcc-build$ ninja user@host:gcc-build$ sudo ninja installTo do a build with clang, using static libs:
user@host:dpdk$ CC=clang meson --default_library=static clang- build .... user@host:dpdk$ cd clang-build user@host:clang-build$ ninja user@host:clang-build$ sudo ninja install
Quoted 2 lines
Other options can be adjusted by running "mesonconf" in the build directory, i.e. gcc-build or clang-build in the examples above.
Hi Bruce,
This is great, thank you!
I'll try to give this set a run in the Debian context as soon as I have time.
It's also great to see a pkg-config file!
I haven't gone through the diff yet, but do you think it would be possible, now or later on, to add the option to install architecture- specific headers in a different directory than the arch-independent ones?
This is in the context of multi-arch: on Debian and Ubuntu there's a lot of effort to make sure libraries built on different architectures are co-installable. Which means either the files must be identical, or in arch-specific paths (eg: /usr/include/x86_64-linux-gnu/ and /usr/lib/x86_64-linux-gnu/).
Signature · 2 lines
Kind regards, Luca Boccassi
Quoted 72 lines · Luca Boccassi
Quoted 68 lines · Bruce Richardson
Following on from previous RFC [http://dpdk.org/dev/patchwork/patch/2
5104/]
here is a second draft implementation for building DPDK with meson and
ninja. While still not building all of DPDK, and needing patch cleanup so
that patches don't overwrite previous work, it is more complete in many
ways than the previous version and includes:* dynamic build configuration e.g. building pcap driver only if pcap is
found, only buildaf_packetif the target is linux, and only building QAT
and openssl crypto drivers if libcrypto is found
* support for pmdinfo inside the PMDs(for shared builds) and binaries (for
static builds)
* generalized/standardized way of building libs and drivers, though the
drivers code still needs generalization at the driver, rather than driver-class level.
* support for having a pkgconfig file for DPDK on install, and helloworld
and l2fwd can be built using the pkgconfig info (via make, not ninja)
* support for library versions
* an implementation for FreeBSD as well as Linux
* all libraries are included in the build, as well as a number of NIC,
crypto, and mempool drivers
* theigb_uiokernel module is build via the kernelKbuildsystem as part
of a meson/ninja DPDK buildthere is still plenty to do on this, but please review and test it out.
I've kept the patches split so that the evolution of the work is a bit
clearer than having it all send in a monolithic patch. All feedback welcome. I recommend one uses the latest meson release for this, though the
minimum version supported should be v0.4.I've tested static and dynamic builds with clang and gcc on Fedora 26, and
done test builds on FreeBSD 11 with clang too. Build with other compilers
and on other OS's may have issues, so YMMV.To do a basic build, using gcc and with shared libs, in a folder called "gcc-build":
user@host:dpdk$ meson gcc-build .... user@host:dpdk$ cd gcc-build user@host:gcc-build$ ninja user@host:gcc-build$ sudo ninja installTo do a build with clang, using static libs:
user@host:dpdk$ CC=clang meson --default_library=static clang- build .... user@host:dpdk$ cd clang-build user@host:clang-build$ ninja user@host:clang-build$ sudo ninja installQuoted 2 lines
Other options can be adjusted by running "mesonconf" in the build directory, i.e. gcc-build or clang-build in the examples above.
Quoted 7 lines
Hi Bruce,
This is great, thank you!
I'll try to give this set a run in the Debian context as soon as I have time.
Please do, thanks. Let me know any issues you hit, or further suggestions for improvement. Please also check the reproducible build aspects, as I may have let some absolute paths sneek in some places inadvertently, while getting the more awkward stuff (like pmdinfo) ported over.
Quoted 2 lines
It's also great to see a pkg-config file!
I'm not sure what others think, but I believe we need to move away from any requirement for external apps, or even our examples, to have a particular way of being built. Instead, everything should be done through the pkg-config, where possible.
Quoted 5 lines
I haven't gone through the diff yet, but do you think it would be possible, now or later on, to add the option to install architecture- specific headers in a different directory than the arch-independent ones?
I'm sure it's possible, it's just a matter of how awkward it would be. :-)
Quoted 9 lines
This is in the context of multi-arch: on Debian and Ubuntu there's a lot of effort to make sure libraries built on different architectures are co-installable. Which means either the files must be identical, or in arch-specific paths (eg:
/usr/include/x86_64-linux-gnu/and/usr/lib/x86_64-linux-gnu/).Signature · 2 lines
Kind regards, Luca Boccassi
Hi Bruce,
Quoted 6 lines · Bruce Richardson
Following on from previous RFC [http://dpdk.org/dev/patchwork/patch/25104/]
here is a second draft implementation for building DPDK with meson and ninja. While still not building all of DPDK, and needing patch cleanup so that patches don't overwrite previous work, it is more complete in many ways than the previous version and includes:
Quoted 16 lines
* dynamic build configuration e.g. building pcap driver only if pcap is found, only build
af_packetif the target is linux, and only building QAT and openssl crypto drivers if libcrypto is found
* support for pmdinfo inside the PMDs(for shared builds) and binaries (for static builds)
* generalized/standardized way of building libs and drivers, though the drivers code still needs generalization at the driver, rather than driver-class level.
* support for having a pkgconfig file for DPDK on install, and helloworld and l2fwd can be built using the pkgconfig info (via make, not ninja)
* support for library versions
* an implementation for FreeBSD as well as Linux
* all libraries are included in the build, as well as a number of NIC, crypto, and mempool drivers
* theigb_uiokernel module is build via the kernelKbuildsystem as part of a meson/ninja DPDK build
This is really great to see. I do have one suggestion.
Would it be possible to version the libraries built by the build-system following the same version of the DPDK release?
For instance, in DPDK 17.08 we currently have:
# objdump -p librte_pmd_ixgbe.so.1 |grep SONAME SONAME librte_pmd_ixgbe.so.1
Would it make sense to instead have librte_pmd_ixgbe.so.17.08
I think it would help to facilitate the installation of multiple DPDK library versions on the same system.
For example, we could have the following scenario:
1) OpenVSwithc linked with version 17.02 of DPDK
2) VPP linked with version 17.08 of DPDK
3) DPDK 18.xx installed in the system for any cutting-edge application prototyping.
Is this something which could be incorporated as part of this work?
Quoted 10 lines
there is still plenty to do on this, but please review and test it out. I've kept the patches split so that the evolution of the work is a bit clearer than having it all send in a monolithic patch. All feedback welcome. I recommend one uses the latest meson release for this, though the minimum version supported should be v0.4.
I've tested static and dynamic builds with clang and gcc on Fedora 26, and done test builds on FreeBSD 11 with clang too. Build with other compilers and on other OS's may have issues, so YMMV.
I'll give it a try on openSUSE and let you know of any issues I might face.
Cheers,
Marco
Quoted 228 lines
To do a basic build, using gcc and with shared libs, in a folder called "gcc- build":
user@host:dpdk$ meson gcc-build .... user@host:dpdk$ cd gcc-build user@host:gcc-build$ ninja user@host:gcc-build$ sudo ninja installTo do a build with clang, using static libs:
user@host:dpdk$ CC=clang meson --default_library=static clang-build .... user@host:dpdk$ cd clang-build user@host:clang-build$ ninja user@host:clang-build$ sudo ninja installOther options can be adjusted by running "mesonconf" in the build directory, i.e. gcc-build or clang-build in the examples above.
Bruce Richardson (40):
build: initial hooks for using meson with DPDK
build: create pkg-config file for DPDK
build: build linuxapp EAL with meson and ninja
build: add EAL support under BSD
build: add core libraries to meson build system
build: add i40e driver to meson build
build: add pmdinfogen to build
build: generate list of sources for pmdinfogen
build: build i40e driver, including pmdinfo
build: install usertools scripts
build: simplify generation ofpmd.cfiles
build: generalize net driver build to higher level
build: remove hard-coded enablement of vector driver
build: add ixgbe driver to build
build: set up standard deps for drivers
build: addaf_packetdriver to build
build: add pcap PMD support
build: add symbol version map file support to libs
build: build libraries in a loop for brevity
build: version library .so files
eal: add version information to meson build
build: add mempool drivers to build
build: add gro library to meson build
build: tweak naming of pmd dependencies
build: track driver include directories properly
metrics: add metrics lib to meson build
build: track dependencies recursively
testpmd: compile testpmd with meson and ninjacrypto/null: rename the version file to standardcrypto/qat: remove dependency on ether library
build: add cryptodev and some crypto drivers to build
igb_uio: addigb_uioto meson build
ip_frag: rename version file to standard name
build: add most remaining libraries to meson build
build: add packet framework libs to meson build
acl: add acl library to meson build
build: add ark and avp PMDs to build
build: fix static library builds with base code
build: fix driver dependencies for static builds
examples: allow basic sample app build using pkg-configapp/meson.build | 32 ++++++ app/test-pmd/meson.build | 74 +++++++++++++ buildtools/gen-pmdinfo-cfile.sh | 41 ++++++++ buildtools/meson.build | 34 ++++++ buildtools/pmdinfogen/meson.build | 43 ++++++++ config/meson.build | 69 +++++++++++++ config/rte_config.h | 114
+++++++++++++++++++++
config/x86/meson.build | 70 +++++++++++++ drivers/crypto/meson.build | 108 +++++++++++++++++++ drivers/crypto/null/Makefile | 2 +- drivers/crypto/null/meson.build | 32 ++++++ ...crypto_version.map => rte_pmd_null_version.map} | 0 drivers/crypto/openssl/meson.build | 38 +++++++ drivers/crypto/qat/meson.build | 41 ++++++++ drivers/crypto/qat/qat_crypto.c | 1 - drivers/mempool/meson.build | 108 +++++++++++++++++++ drivers/mempool/ring/meson.build | 32 ++++++ drivers/mempool/stack/meson.build | 32 ++++++ drivers/meson.build | 34 ++++++ drivers/net/af_packet/meson.build | 35 +++++++ drivers/net/ark/meson.build | 45 ++++++++ drivers/net/avp/meson.build | 34 ++++++ drivers/net/i40e/base/meson.build | 56 ++++++++++ drivers/net/i40e/meson.build | 61 +++++++++++ drivers/net/ixgbe/base/meson.build | 60 +++++++++++ drivers/net/ixgbe/meson.build | 58 +++++++++++ drivers/net/meson.build | 108 +++++++++++++++++++ drivers/net/pcap/meson.build | 41 ++++++++ examples/helloworld/Makefile | 13 +++ examples/l2fwd/Makefile | 13 +++ lib/librte_acl/meson.build | 60 +++++++++++ lib/librte_bitratestats/meson.build | 34 ++++++ lib/librte_cfgfile/meson.build | 35 +++++++ lib/librte_cmdline/meson.build | 57 +++++++++++ lib/librte_compat/meson.build | 36 +++++++ lib/librte_cryptodev/meson.build | 40 ++++++++ lib/librte_distributor/meson.build | 39 +++++++ lib/librte_eal/bsdapp/eal/meson.build | 67 ++++++++++++ lib/librte_eal/bsdapp/meson.build | 32 ++++++ lib/librte_eal/common/arch/meson.build | 33 ++++++ lib/librte_eal/common/arch/x86/meson.build | 32 ++++++ lib/librte_eal/common/include/arch/meson.build | 33 ++++++lib/librte_eal/common/include/arch/x86/meson.build| 48 +++++++++ lib/librte_eal/common/include/meson.build | 71 +++++++++++++ lib/librte_eal/common/meson.build | 71 +++++++++++++ lib/librte_eal/linuxapp/eal/meson.build | 72 +++++++++++++ lib/librte_eal/linuxapp/igb_uio/Kbuild | 1 + lib/librte_eal/linuxapp/igb_uio/meson.build | 47 +++++++++ lib/librte_eal/linuxapp/meson.build | 42 ++++++++ lib/librte_eal/meson.build | 44 ++++++++ lib/librte_efd/meson.build | 34 ++++++ lib/librte_ether/meson.build | 46 +++++++++ lib/librte_eventdev/meson.build | 36 +++++++ lib/librte_gro/meson.build | 34 ++++++ lib/librte_hash/meson.build | 46 +++++++++ lib/librte_ip_frag/Makefile | 2 +- lib/librte_ip_frag/meson.build | 39 +++++++ ..._ipfrag_version.map => rte_ip_frag_version.map} | 0 lib/librte_jobstats/meson.build | 34 ++++++ lib/librte_kni/meson.build | 35 +++++++ lib/librte_kvargs/meson.build | 35 +++++++ lib/librte_latencystats/meson.build | 34 ++++++ lib/librte_lpm/meson.build | 35 +++++++ lib/librte_mbuf/meson.build | 36 +++++++ lib/librte_mempool/meson.build | 35 +++++++ lib/librte_meter/meson.build | 34 ++++++ lib/librte_metrics/meson.build | 34 ++++++ lib/librte_net/meson.build | 46 +++++++++ lib/librte_pdump/meson.build | 34 ++++++ lib/librte_pipeline/meson.build | 35 +++++++ lib/librte_port/meson.build | 58 +++++++++++ lib/librte_power/meson.build | 35 +++++++ lib/librte_reorder/meson.build | 34 ++++++ lib/librte_ring/meson.build | 34 ++++++lib/librte_sched/meson.build | 36 +++++++ lib/librte_table/meson.build | 52 ++++++++++ lib/librte_timer/meson.build | 34 ++++++ lib/librte_vhost/meson.build | 36 +++++++lib/meson.build | 105 +++++++++++++++++++ meson.build | 88 ++++++++++++++++ meson_options.txt | 8 ++ usertools/meson.build | 32 ++++++
82 files changed, 3536 insertions(+), 3 deletions(-)create mode 100644 app/meson.build
create mode 100644 app/test-pmd/meson.build
create mode 100755buildtools/gen-pmdinfo-cfile.sh
create mode 100644 buildtools/meson.build
create mode 100644 buildtools/pmdinfogen/meson.build
create mode 100644 config/meson.build
create mode 100644config/rte_config.h
create mode 100644 config/x86/meson.build
create mode 100644drivers/crypto/meson.build
create mode 100644drivers/crypto/null/meson.build
renamedrivers/crypto/null/{rte_pmd_null_crypto_version.map=> rte_pmd_null_version.map} (100%)
create mode 100644drivers/crypto/openssl/meson.build
create mode 100644drivers/crypto/qat/meson.build
create mode 100644drivers/mempool/meson.build
create mode 100644drivers/mempool/ring/meson.build
create mode 100644drivers/mempool/stack/meson.build
create mode 100644drivers/meson.build
create mode 100644drivers/net/af_packet/meson.build
create mode 100644drivers/net/ark/meson.build
create mode 100644drivers/net/avp/meson.build
create mode 100644drivers/net/i40e/base/meson.build
create mode 100644drivers/net/i40e/meson.build
create mode 100644drivers/net/ixgbe/base/meson.build
create mode 100644drivers/net/ixgbe/meson.build
create mode 100644drivers/net/meson.build
create mode 100644drivers/net/pcap/meson.build
create mode 100644lib/librte_acl/meson.build
create mode 100644lib/librte_bitratestats/meson.build
create mode 100644lib/librte_cfgfile/meson.build
create mode 100644lib/librte_cmdline/meson.build
create mode 100644lib/librte_compat/meson.build
create mode 100644lib/librte_cryptodev/meson.build
create mode 100644lib/librte_distributor/meson.build
create mode 100644lib/librte_eal/bsdapp/eal/meson.build
create mode 100644lib/librte_eal/bsdapp/meson.build
create mode 100644lib/librte_eal/common/arch/meson.build
create mode 100644lib/librte_eal/common/arch/x86/meson.buildcreate mode 100644lib/librte_eal/common/include/arch/meson.buildcreate mode 100644lib/librte_eal/common/include/arch/x86/meson.buildcreate mode 100644lib/librte_eal/common/include/meson.buildcreate mode 100644lib/librte_eal/common/meson.build
create mode 100644lib/librte_eal/linuxapp/eal/meson.buildcreate mode 100644lib/librte_eal/linuxapp/igb_uio/Kbuild
create mode 100644lib/librte_eal/linuxapp/igb_uio/meson.buildcreate mode 100644lib/librte_eal/linuxapp/meson.build
create mode 100644lib/librte_eal/meson.build
create mode 100644lib/librte_efd/meson.build
create mode 100644lib/librte_ether/meson.build
create mode 100644lib/librte_eventdev/meson.build
create mode 100644lib/librte_gro/meson.build
create mode 100644lib/librte_hash/meson.build
create mode 100644lib/librte_ip_frag/meson.build
renamelib/librte_ip_frag/{rte_ipfrag_version.map=> rte_ip_frag_version.map} (100%)
create mode 100644lib/librte_jobstats/meson.build
create mode 100644lib/librte_kni/meson.build
create mode 100644lib/librte_kvargs/meson.build
create mode 100644lib/librte_latencystats/meson.build
create mode 100644lib/librte_lpm/meson.build
create mode 100644lib/librte_mbuf/meson.build
create mode 100644lib/librte_mempool/meson.build
create mode 100644lib/librte_meter/meson.build
create mode 100644lib/librte_metrics/meson.build
create mode 100644lib/librte_net/meson.build
create mode 100644lib/librte_pdump/meson.build
create mode 100644lib/librte_pipeline/meson.build
create mode 100644lib/librte_port/meson.build
create mode 100644lib/librte_power/meson.build
create mode 100644lib/librte_reorder/meson.build
create mode 100644lib/librte_ring/meson.build
create mode 100644lib/librte_sched/meson.build
create mode 100644lib/librte_table/meson.build
create mode 100644lib/librte_timer/meson.build
create mode 100644lib/librte_vhost/meson.build
create mode 100644lib/meson.build
create mode 100644 meson.build
create mode 100644 meson_options.txt
create mode 100644 usertools/meson.build
Quoted 56 lines · Marco Varlese
Hi Bruce,
Quoted 27 lines · Bruce Richardson
Following on from previous RFC [http://dpdk.org/dev/patchwork/patch
/25104/]
here is a second draft implementation for building DPDK with meson and
ninja. While still not building all of DPDK, and needing patch cleanup so
that patches don't overwrite previous work, it is more complete in many
ways than the previous version and includes:* dynamic build configuration e.g. building pcap driver only if pcap is
found, only buildaf_packetif the target is linux, and only building QAT
and openssl crypto drivers if libcrypto is found
* support for pmdinfo inside the PMDs(for shared builds) and binaries (for
static builds)
* generalized/standardized way of building libs and drivers, though the
drivers code still needs generalization at the driver, rather than
driver-class level.
* support for having a pkgconfig file for DPDK on install, and helloworld
and l2fwd can be built using the pkgconfig info (via make, not ninja)Quoted 8 lines
* support for library versions
* an implementation for FreeBSD as well as Linux
* all libraries are included in the build, as well as a number of NIC,
crypto, and mempool drivers
* theigb_uiokernel module is build via the kernelKbuildsystem as part
of a meson/ninja DPDK buildThis is really great to see. I do have one suggestion. Would it be possible to version the libraries built by the build- system
following the same version of the DPDK release?For instance, in DPDK 17.08 we currently have:
# objdump -p librte_pmd_ixgbe.so.1 |grep SONAME SONAME librte_pmd_ixgbe.so.1Would it make sense to instead have librte_pmd_ixgbe.so.17.08
I think it would help to facilitate the installation of multiple DPDK library
versions on the same system.For example, we could have the following scenario:
Quoted 7 lines
1) OpenVSwithc linked with version 17.02 of DPDK
2) VPP linked with version 17.08 of DPDK
3) DPDK 18.xx installed in the system for any cutting-edge application
prototyping.Is this something which could be incorporated as part of this work?
Christian sent a patch a while ago, which was merged, to enable this in the current build system, it's the CONFIG_RTE_MAJOR_ABI option, we use it in Debian and Ubuntu for the reasons you mentioned.
And if it's not been translated yet, I agree it's an important one.
Signature · 2 lines
Kind regards, Luca Boccassi
Hi Luca,
Quoted 65 lines · Luca Boccassi
Quoted 64 lines · Marco Varlese
Hi Bruce,
Quoted 28 lines · Bruce Richardson
Following on from previous RFC [http://dpdk.org/dev/patchwork/patch
/25104/]
here is a second draft implementation for building DPDK with meson and
ninja. While still not building all of DPDK, and needing patch cleanup so
that patches don't overwrite previous work, it is more complete in many
ways than the previous version and includes:* dynamic build configuration e.g. building pcap driver only if pcap is
found, only buildaf_packetif the target is linux, and only building QAT
and openssl crypto drivers if libcrypto is found
* support for pmdinfo inside the PMDs(for shared builds) and binaries (for
static builds)
* generalized/standardized way of building libs and drivers, though the
drivers code still needs generalization at the driver, rather than
driver-class level.
* support for having a pkgconfig file for DPDK on install, and helloworld
and l2fwd can be built using the pkgconfig info (via make, not ninja)Quoted 8 lines
* support for library versions
* an implementation for FreeBSD as well as Linux
* all libraries are included in the build, as well as a number of NIC,
crypto, and mempool drivers
* theigb_uiokernel module is build via the kernelKbuildsystem as part
of a meson/ninja DPDK buildThis is really great to see. I do have one suggestion. Would it be possible to version the libraries built by the build- system
following the same version of the DPDK release?For instance, in DPDK 17.08 we currently have:
# objdump -p librte_pmd_ixgbe.so.1 |grep SONAME SONAME librte_pmd_ixgbe.so.1Would it make sense to instead have librte_pmd_ixgbe.so.17.08
I think it would help to facilitate the installation of multiple DPDK library
versions on the same system.For example, we could have the following scenario:
1) OpenVSwithc linked with version 17.02 of DPDK
2) VPP linked with version 17.08 of DPDK
3) DPDK 18.xx installed in the system for any cutting-edge application
prototyping.
Quoted 5 lines
Quoted 1 line
Is this something which could be incorporated as part of this work?
Christian sent a patch a while ago, which was merged, to enable this in the current build system, it's the
CONFIG_RTE_MAJOR_ABIoption, we use it in Debian and Ubuntu for the reasons you mentioned.
Thanks for your input, very much appreciated.
I'll give it a try right away.
Quoted 281 lines
And if it's not been translated yet, I agree it's an important one.
Quoted 277 lines
Quoted 11 lines
there is still plenty to do on this, but please review and test it out.
I've kept the patches split so that the evolution of the work is a bit
clearer than having it all send in a monolithic patch. All feedback welcome. I recommend one uses the latest meson release for this, though the
minimum version supported should be v0.4.Quoted 5 lines
I've tested static and dynamic builds with clang and gcc on Fedora 26, and
done test builds on FreeBSD 11 with clang too. Build with other compilers
and on other OS's may have issues, so YMMV.I'll give it a try on openSUSE and let you know of any issues I might face.
Cheers,
MarcoQuoted 253 lines
To do a basic build, using gcc and with shared libs, in a folder called "gcc-
build":user@host:dpdk$ meson gcc-build .... user@host:dpdk$ cd gcc-build user@host:gcc-build$ ninja user@host:gcc-build$ sudo ninja installTo do a build with clang, using static libs:
user@host:dpdk$ CC=clang meson --default_library=static clang- build .... user@host:dpdk$ cd clang-build user@host:clang-build$ ninja user@host:clang-build$ sudo ninja installOther options can be adjusted by running "mesonconf" in the build directory, i.e. gcc-build or clang-build in the examples above.
Bruce Richardson (40):
build: initial hooks for using meson with DPDK
build: create pkg-config file for DPDK
build: build linuxapp EAL with meson and ninja
build: add EAL support under BSD
build: add core libraries to meson build system
build: add i40e driver to meson build
build: add pmdinfogen to build
build: generate list of sources for pmdinfogen
build: build i40e driver, including pmdinfo
build: install usertools scripts
build: simplify generation ofpmd.cfiles
build: generalize net driver build to higher level
build: remove hard-coded enablement of vector driver
build: add ixgbe driver to build
build: set up standard deps for drivers
build: addaf_packetdriver to build
build: add pcap PMD support
build: add symbol version map file support to libs
build: build libraries in a loop for brevity
build: version library .so files
eal: add version information to meson build
build: add mempool drivers to build
build: add gro library to meson build
build: tweak naming of pmd dependencies
build: track driver include directories properly
metrics: add metrics lib to meson build
build: track dependencies recursively
testpmd: compile testpmd with meson and ninjacrypto/null: rename the version file to standardcrypto/qat: remove dependency on ether library
build: add cryptodev and some crypto drivers to build
igb_uio: addigb_uioto meson build
ip_frag: rename version file to standard name
build: add most remaining libraries to meson build
build: add packet framework libs to meson build
acl: add acl library to meson build
build: add ark and avp PMDs to build
build: fix static library builds with base code
build: fix driver dependencies for static builds
examples: allow basic sample app build using pkg-configapp/meson.build | 32 ++++++ app/test-pmd/meson.build | 74
+++++++++++++
buildtools/gen-pmdinfo-cfile.sh | 41 ++++++++ buildtools/meson.build | 34 ++++++ buildtools/pmdinfogen/meson.build | 43 ++++++++ config/meson.build | 69
+++++++++++++
config/rte_config.h | 114
+++++++++++++++++++++
config/x86/meson.build | 70
+++++++++++++
drivers/crypto/meson.build | 108
+++++++++++++++++++
drivers/crypto/null/Makefile | 2 +- drivers/crypto/null/meson.build | 32 ++++++ ...crypto_version.map => rte_pmd_null_version.map} | 0 drivers/crypto/openssl/meson.build | 38 +++++++ drivers/crypto/qat/meson.build | 41 ++++++++ drivers/crypto/qat/qat_crypto.c | 1 - drivers/mempool/meson.build | 108
+++++++++++++++++++
drivers/mempool/ring/meson.build | 32 ++++++ drivers/mempool/stack/meson.build | 32 ++++++ drivers/meson.build | 34 ++++++ drivers/net/af_packet/meson.build | 35 +++++++ drivers/net/ark/meson.build | 45 ++++++++ drivers/net/avp/meson.build | 34 ++++++ drivers/net/i40e/base/meson.build | 56
++++++++++
drivers/net/i40e/meson.build | 61
+++++++++++
drivers/net/ixgbe/base/meson.build | 60
+++++++++++
drivers/net/ixgbe/meson.build | 58
+++++++++++
drivers/net/meson.build | 108
+++++++++++++++++++
drivers/net/pcap/meson.build | 41 ++++++++ examples/helloworld/Makefile | 13 +++ examples/l2fwd/Makefile | 13 +++ lib/librte_acl/meson.build | 60
+++++++++++
lib/librte_bitratestats/meson.build | 34 ++++++ lib/librte_cfgfile/meson.build | 35 +++++++ lib/librte_cmdline/meson.build | 57
+++++++++++
lib/librte_compat/meson.build | 36 +++++++ lib/librte_cryptodev/meson.build | 40 ++++++++ lib/librte_distributor/meson.build | 39 +++++++ lib/librte_eal/bsdapp/eal/meson.build | 67
++++++++++++
lib/librte_eal/bsdapp/meson.build | 32 ++++++ lib/librte_eal/common/arch/meson.build | 33 ++++++ lib/librte_eal/common/arch/x86/meson.build | 32 ++++++ lib/librte_eal/common/include/arch/meson.build | 33 ++++++lib/librte_eal/common/include/arch/x86/meson.build| 48 +++++++++ lib/librte_eal/common/include/meson.build | 71
+++++++++++++
lib/librte_eal/common/meson.build | 71
+++++++++++++
lib/librte_eal/linuxapp/eal/meson.build | 72
+++++++++++++
lib/librte_eal/linuxapp/igb_uio/Kbuild | 1 + lib/librte_eal/linuxapp/igb_uio/meson.build | 47 +++++++++ lib/librte_eal/linuxapp/meson.build | 42 ++++++++ lib/librte_eal/meson.build | 44 ++++++++ lib/librte_efd/meson.build | 34 ++++++ lib/librte_ether/meson.build | 46 +++++++++ lib/librte_eventdev/meson.build | 36 +++++++ lib/librte_gro/meson.build | 34 ++++++ lib/librte_hash/meson.build | 46 +++++++++ lib/librte_ip_frag/Makefile | 2 +- lib/librte_ip_frag/meson.build | 39 +++++++ ..._ipfrag_version.map => rte_ip_frag_version.map} | 0 lib/librte_jobstats/meson.build | 34 ++++++ lib/librte_kni/meson.build | 35 +++++++ lib/librte_kvargs/meson.build | 35 +++++++ lib/librte_latencystats/meson.build | 34 ++++++ lib/librte_lpm/meson.build | 35 +++++++ lib/librte_mbuf/meson.build | 36 +++++++ lib/librte_mempool/meson.build | 35 +++++++ lib/librte_meter/meson.build | 34 ++++++ lib/librte_metrics/meson.build | 34 ++++++ lib/librte_net/meson.build | 46 +++++++++ lib/librte_pdump/meson.build | 34 ++++++ lib/librte_pipeline/meson.build | 35 +++++++ lib/librte_port/meson.build | 58
+++++++++++
lib/librte_power/meson.build | 35 +++++++ lib/librte_reorder/meson.build | 34 ++++++ lib/librte_ring/meson.build | 34 ++++++ lib/librte_sched/meson.build | 36 +++++++ lib/librte_table/meson.build | 52
++++++++++
lib/librte_timer/meson.build | 34 ++++++ lib/librte_vhost/meson.build | 36 +++++++ lib/meson.build | 105
+++++++++++++++++++
meson.build | 88
++++++++++++++++
meson_options.txt | 8 ++ usertools/meson.build | 32 ++++++82 files changed, 3536 insertions(+), 3 deletions(-)create mode 100644 app/meson.build
create mode 100644 app/test-pmd/meson.build
create mode 100755buildtools/gen-pmdinfo-cfile.shcreate mode 100644 buildtools/meson.build
create mode 100644 buildtools/pmdinfogen/meson.build create mode 100644 config/meson.build
create mode 100644config/rte_config.h
create mode 100644 config/x86/meson.build
create mode 100644drivers/crypto/meson.build
create mode 100644drivers/crypto/null/meson.buildrenamedrivers/crypto/null/{rte_pmd_null_crypto_version.map=> rte_pmd_null_version.map} (100%)
create mode 100644drivers/crypto/openssl/meson.buildcreate mode 100644drivers/crypto/qat/meson.buildcreate mode 100644drivers/mempool/meson.build
create mode 100644drivers/mempool/ring/meson.buildcreate mode 100644drivers/mempool/stack/meson.buildcreate mode 100644drivers/meson.build
create mode 100644drivers/net/af_packet/meson.buildcreate mode 100644drivers/net/ark/meson.build
create mode 100644drivers/net/avp/meson.build
create mode 100644drivers/net/i40e/base/meson.buildcreate mode 100644drivers/net/i40e/meson.build
create mode 100644drivers/net/ixgbe/base/meson.buildcreate mode 100644drivers/net/ixgbe/meson.buildcreate mode 100644drivers/net/meson.build
create mode 100644drivers/net/pcap/meson.build
create mode 100644lib/librte_acl/meson.build
create mode 100644lib/librte_bitratestats/meson.buildcreate mode 100644lib/librte_cfgfile/meson.buildcreate mode 100644lib/librte_cmdline/meson.buildcreate mode 100644lib/librte_compat/meson.buildcreate mode 100644lib/librte_cryptodev/meson.buildcreate mode 100644lib/librte_distributor/meson.buildcreate mode 100644lib/librte_eal/bsdapp/eal/meson.buildcreate mode 100644lib/librte_eal/bsdapp/meson.buildcreate mode 100644lib/librte_eal/common/arch/meson.buildcreate mode 100644lib/librte_eal/common/arch/x86/meson.buildcreate mode 100644lib/librte_eal/common/include/arch/meson.buildcreate mode 100644lib/librte_eal/common/include/arch/x86/meson.buildcreate mode 100644lib/librte_eal/common/include/meson.buildcreate mode 100644lib/librte_eal/common/meson.buildcreate mode 100644lib/librte_eal/linuxapp/eal/meson.buildcreate mode 100644lib/librte_eal/linuxapp/igb_uio/Kbuildcreate mode 100644lib/librte_eal/linuxapp/igb_uio/meson.buildcreate mode 100644lib/librte_eal/linuxapp/meson.buildcreate mode 100644lib/librte_eal/meson.build
create mode 100644lib/librte_efd/meson.build
create mode 100644lib/librte_ether/meson.build
create mode 100644lib/librte_eventdev/meson.buildcreate mode 100644lib/librte_gro/meson.build
create mode 100644lib/librte_hash/meson.build
create mode 100644lib/librte_ip_frag/meson.buildrenamelib/librte_ip_frag/{rte_ipfrag_version.map=> rte_ip_frag_version.map}
(100%)
create mode 100644lib/librte_jobstats/meson.buildcreate mode 100644lib/librte_kni/meson.build
create mode 100644lib/librte_kvargs/meson.buildcreate mode 100644lib/librte_latencystats/meson.buildcreate mode 100644lib/librte_lpm/meson.build
create mode 100644lib/librte_mbuf/meson.build
create mode 100644lib/librte_mempool/meson.buildcreate mode 100644lib/librte_meter/meson.build
create mode 100644lib/librte_metrics/meson.buildcreate mode 100644lib/librte_net/meson.build
create mode 100644lib/librte_pdump/meson.build
create mode 100644lib/librte_pipeline/meson.buildcreate mode 100644lib/librte_port/meson.build
create mode 100644lib/librte_power/meson.build
create mode 100644lib/librte_reorder/meson.buildcreate mode 100644lib/librte_ring/meson.build
create mode 100644lib/librte_sched/meson.build
create mode 100644lib/librte_table/meson.build
create mode 100644lib/librte_timer/meson.build
create mode 100644lib/librte_vhost/meson.build
create mode 100644lib/meson.build
create mode 100644 meson.build
create mode 100644 meson_options.txt
create mode 100644 usertools/meson.build
Quoted 63 lines · Luca Boccassi
Quoted 62 lines · Marco Varlese
Hi Bruce,
Quoted 27 lines · Bruce Richardson
Following on from previous RFC [http://dpdk.org/dev/patchwork/patch
/25104/]
here is a second draft implementation for building DPDK with meson and
ninja. While still not building all of DPDK, and needing patch cleanup so
that patches don't overwrite previous work, it is more complete in many
ways than the previous version and includes:* dynamic build configuration e.g. building pcap driver only if pcap is
found, only buildaf_packetif the target is linux, and only building QAT
and openssl crypto drivers if libcrypto is found
* support for pmdinfo inside the PMDs(for shared builds) and binaries (for
static builds)
* generalized/standardized way of building libs and drivers, though the
drivers code still needs generalization at the driver, rather than
driver-class level.
* support for having a pkgconfig file for DPDK on install, and helloworld
and l2fwd can be built using the pkgconfig info (via make, not ninja)Quoted 8 lines
* support for library versions
* an implementation for FreeBSD as well as Linux
* all libraries are included in the build, as well as a number of NIC,
crypto, and mempool drivers
* theigb_uiokernel module is build via the kernelKbuildsystem as part
of a meson/ninja DPDK buildThis is really great to see. I do have one suggestion. Would it be possible to version the libraries built by the build- system
following the same version of the DPDK release?For instance, in DPDK 17.08 we currently have:
# objdump -p librte_pmd_ixgbe.so.1 |grep SONAME SONAME librte_pmd_ixgbe.so.1Would it make sense to instead have librte_pmd_ixgbe.so.17.08
I think it would help to facilitate the installation of multiple DPDK library
versions on the same system.For example, we could have the following scenario:
1) OpenVSwithc linked with version 17.02 of DPDK
2) VPP linked with version 17.08 of DPDK
3) DPDK 18.xx installed in the system for any cutting-edge application
prototyping.
Quoted 8 lines
Quoted 1 line
Is this something which could be incorporated as part of this work?
Christian sent a patch a while ago, which was merged, to enable this in the current build system, it's the
CONFIG_RTE_MAJOR_ABIoption, we use it in Debian and Ubuntu for the reasons you mentioned.And if it's not been translated yet, I agree it's an important one.
No, it's not translated yet - mainly for the reasons that I had forgotten it existed, and that there is a lot yet unported.
General question: should this be the default or not? It looks to me that it should probably be, but what do others think?
/Bruce
Quoted 73 lines · Bruce Richardson
Quoted 72 lines · Luca Boccassi
Quoted 58 lines · Marco Varlese
Hi Bruce,
Quoted 28 lines · Bruce Richardson
Following on from previous RFC [http://dpdk.org/dev/patchwork/patch
/25104/]
here is a second draft implementation for building DPDK with meson and
ninja. While still not building all of DPDK, and needing patch cleanup so
that patches don't overwrite previous work, it is more complete in many
ways than the previous version and includes:* dynamic build configuration e.g. building pcap driver only if pcap is
found, only buildaf_packetif the target is linux, and only building QAT
and openssl crypto drivers if libcrypto is found
* support for pmdinfo inside the PMDs(for shared builds) and binaries (for
static builds)
* generalized/standardized way of building libs and drivers, though the
drivers code still needs generalization at the driver, rather than
driver-class level.
* support for having a pkgconfig file for DPDK on install, and helloworld
and l2fwd can be built using the pkgconfig info (via make, not ninja)Quoted 8 lines
* support for library versions
* an implementation for FreeBSD as well as Linux
* all libraries are included in the build, as well as a number of NIC,
crypto, and mempool drivers
* theigb_uiokernel module is build via the kernelKbuildsystem as part
of a meson/ninja DPDK buildThis is really great to see. I do have one suggestion. Would it be possible to version the libraries built by the build- system
following the same version of the DPDK release?For instance, in DPDK 17.08 we currently have:
# objdump -p librte_pmd_ixgbe.so.1 |grep SONAME SONAME librte_pmd_ixgbe.so.1Would it make sense to instead have librte_pmd_ixgbe.so.17.08
I think it would help to facilitate the installation of multiple DPDK library
versions on the same system.For example, we could have the following scenario:
Quoted 7 lines
1) OpenVSwithc linked with version 17.02 of DPDK
2) VPP linked with version 17.08 of DPDK
3) DPDK 18.xx installed in the system for any cutting-edge application
prototyping.Is this something which could be incorporated as part of this work?
Christian sent a patch a while ago, which was merged, to enable this in the current build system, it's the
CONFIG_RTE_MAJOR_ABIoption, we use it in Debian and Ubuntu for the reasons you mentioned.
Quoted 7 lines
Quoted 2 lines
And if it's not been translated yet, I agree it's an important one.
No, it's not translated yet - mainly for the reasons that I had forgotten it existed, and that there is a lot yet unported.
General question: should this be the default or not? It looks to me that it should probably be, but what do others think?
I do think it should be the default too.
Quoted 3 lines
/Bruce
Quoted 78 lines · Marco Varlese
Quoted 77 lines · Bruce Richardson
Quoted 75 lines · Luca Boccassi
Quoted 60 lines · Marco Varlese
Hi Bruce,
Quoted 29 lines · Bruce Richardson
Following on from previous RFC [http://dpdk.org/dev/patchwork/patch
/25104/]
here is a second draft implementation for building DPDK with meson and
ninja. While still not building all of DPDK, and needing patch cleanup so
that patches don't overwrite previous work, it is more complete in many
ways than the previous version and includes:* dynamic build configuration e.g. building pcap driver only if pcap is
found, only buildaf_packetif the target is linux, and only building QAT
and openssl crypto drivers if libcrypto is found
* support for pmdinfo inside the PMDs(for shared builds) and binaries (for
static builds)
* generalized/standardized way of building libs and drivers, though the
drivers code still needs generalization at the driver, rather than
driver-class level.
* support for having a pkgconfig file for DPDK on install, and helloworld
and l2fwd can be built using the pkgconfig info (via make, not ninja)Quoted 8 lines
* support for library versions
* an implementation for FreeBSD as well as Linux
* all libraries are included in the build, as well as a number of NIC,
crypto, and mempool drivers
* theigb_uiokernel module is build via the kernelKbuildsystem as part
of a meson/ninja DPDK buildThis is really great to see. I do have one suggestion. Would it be possible to version the libraries built by the build- system
following the same version of the DPDK release?For instance, in DPDK 17.08 we currently have:
# objdump -p librte_pmd_ixgbe.so.1 |grep SONAME SONAME librte_pmd_ixgbe.so.1Would it make sense to instead have librte_pmd_ixgbe.so.17.08
I think it would help to facilitate the installation of multiple DPDK library
versions on the same system.For example, we could have the following scenario:
Quoted 7 lines
1) OpenVSwithc linked with version 17.02 of DPDK
2) VPP linked with version 17.08 of DPDK
3) DPDK 18.xx installed in the system for any cutting-edge application
prototyping.Is this something which could be incorporated as part of this work?
Christian sent a patch a while ago, which was merged, to enable this in the current build system, it's the
CONFIG_RTE_MAJOR_ABIoption, we use it in Debian and Ubuntu for the reasons you mentioned.
Quoted 8 lines
Quoted 7 lines
Quoted 2 lines
And if it's not been translated yet, I agree it's an important one.
No, it's not translated yet - mainly for the reasons that I had forgotten it existed, and that there is a lot yet unported.
General question: should this be the default or not? It looks to me that it should probably be, but what do others think?
I do think it should be the default too.
And - since you're at it - it would be a good idea to add the versioning to the built executables (e.g. test_pmd) similarly to what other software (e.g. gcc) do to make sure you can also have cohexistance of executables. Otherwise, dpdk executables would be overwritten with subsequent installations. Does it make sense?
Quoted 6 lines
Quoted 5 lines
/Bruce
Quoted 88 lines · Bruce Richardson
Quoted 74 lines · Luca Boccassi
Quoted 64 lines · Marco Varlese
Hi Bruce,
Quoted 34 lines · Bruce Richardson
Following on from previous RFC [http://dpdk.org/dev/patchwork/p
atch
/25104/]
here is a second draft implementation for building DPDK with meson
and
ninja. While still not building all of DPDK, and needing patch cleanup so
that patches don't overwrite previous work, it is more complete in
many
ways than the previous version and includes:* dynamic build configuration e.g. building pcap driver only if pcap is
found, only buildaf_packetif the target is linux, and only building QAT
and openssl crypto drivers if libcrypto is found
* support for pmdinfo inside the PMDs(for shared builds) and binaries (for
static builds)
* generalized/standardized way of building libs and drivers, though
the
drivers code still needs generalization at the driver, rather than
driver-class level.
* support for having a pkgconfig file for DPDK on install, and helloworld
and l2fwd can be built using the pkgconfig info (via make, not
ninja)
* support for library versions
* an implementation for FreeBSD as well as LinuxQuoted 8 lines
* all libraries are included in the build, as well as a number of
NIC,
crypto, and mempool drivers
* theigb_uiokernel module is build via the kernelKbuildsystem
as part
of a meson/ninja DPDK buildThis is really great to see. I do have one suggestion. Would it be possible to version the libraries built by the build- system
following the same version of the DPDK release?For instance, in DPDK 17.08 we currently have:
# objdump -p librte_pmd_ixgbe.so.1 |grep SONAME SONAME librte_pmd_ixgbe.so.1Would it make sense to instead have librte_pmd_ixgbe.so.17.08
I think it would help to facilitate the installation of multiple DPDK
library
versions on the same system.For example, we could have the following scenario:
Quoted 8 lines
1) OpenVSwithc linked with version 17.02 of DPDK
2) VPP linked with version 17.08 of DPDK
3) DPDK 18.xx installed in the system for any cutting-edge application
prototyping.Is this something which could be incorporated as part of this work?
Quoted 8 lines
Christian sent a patch a while ago, which was merged, to enable this in
the current build system, it's theCONFIG_RTE_MAJOR_ABIoption, we use
it in Debian and Ubuntu for the reasons you mentioned.And if it's not been translated yet, I agree it's an important one.
No, it's not translated yet - mainly for the reasons that I had forgotten
it existed, and that there is a lot yet unported.
Quoted 5 lines
General question: should this be the default or not? It looks to me that
it should probably be, but what do others think?/Bruce
Well, to maintain backward compatibility, you might not want to have it on by default - it's the equivalent of declaring all ABIs compatibility broken on all releases, some users might not like that.
For us distro maintainers it's very easy to enable.
But I don't have a strong opinion either way - just thinking about consequences for others.
Signature · 2 lines
Kind regards, Luca Boccassi