build DPDK libs and some drivers with meson/ninja
Subsystems (4)
cover build DPDK libs and some drivers with meson/ninja
Following on from the two previous RFCs [1] [2], here is a cleaned up patchset to serve as a start-point for getting all of DPDK building with meson and ninja.
What's covered:
* Basic infrastructure for feature detection and DPDK compilation
* Building of all DPDK libraries - as either static or shared
* Compilation of igb_uio driver for Linux
* Building a number of mempool, crypto and net drivers.
* Installation of compiled libraries and headers
* Installation of usertools scripts
* Compilation of testpmd as dpdk-testpmd and install of same
* Generation and installation of pkgconfig file for DPDK
* Contributors guide document addition describing how to add build scripts
What's not implemented:
* Just about everything else :-), including
* Support for non-x86 architectures, including cross-compilation
* Lots of PMDs
* Support for building and running the unit tests
Some key differences from RFC2:
* Removed duplication between the different driver meson files by moving the build logic up one level to the driver/meson.build file.
* Added a build option to allow versioning the libraries using the DPDK version number, rather than individual .so versions.
* Made EAL a default dependency for libs, to simplify meson.build files for a number of them.
* Made the build variables used for libraries and drivers more consistent.
* Moved responsibility for determining if a given driver or library should be built to the driver/library's own build file, giving a single place where all details about that component are placed, and saving having lots of environment detection logic in higher-level build files.
* Begun adding in developer documentation to make it easier for driver authors/maintainers to contribute.
Meson 0.41 and ninja are needed, and ideally meson 0.42 is recommended. Ninja is available in most distributions, and meson - if an updated version is not available on your distro of choice - can be easily got using
"pip3 install meson"
To build and install then use:
meson build # use default compiler and shared libs cd build
ninja
sudo ninja install
Thereafter to use DPDK in other build systems one can use:
pkg-config --cflags DPDK pkt-config --libs DPDK
to query the needed DPDK build parameters.
Once reviewed and tested a bit, I hope to apply this set - or a new revision of it - to the build-next tree, to serve as a baseline for others to use and to add the missing functionality to.
Regards,
/Bruce
[1] http://dpdk.org/ml/archives/dev/2017-June/067429.html
[2] http://dpdk.org/ml/archives/dev/2017-August/072818.html
Bruce Richardson (17):
build: add initial infrastructure for meson & ninja builds
eal: add eal library to meson build
igb_uio: add igb_uio kmod to meson build
build: add DPDK libraries to build
build: add buildtools to meson build
build: add infrastructure for building PMDs drivers/mempool: add SW mempool drivers to meson build drivers/crypto: add crypto drv class and null PMD to meson crypto/openssl: add driver to meson build crypto/qat: add driver to meson build drivers/net: add net driver support to meson build drivers/net: add set of vdev PMDs to build drivers/net: add drivers for Intel NICs to meson build app/test-pmd: add test-pmd to meson build
usertools: add usertools installation to meson build
build: add option to version libs using DPDK version
doc: add documentation on how to add new components to DPDK
app/meson.build | 32 +++ app/test-pmd/meson.build | 73 +++++++ buildtools/gen-pmdinfo-cfile.sh | 41 ++++ buildtools/meson.build | 34 ++++ buildtools/pmdinfogen/meson.build | 43 +++++ config/meson.build | 69 +++++++ config/rte_config.h | 121 ++++++++++++ config/x86/meson.build | 70 +++++++ doc/guides/contributing/coding_style.rst | 214 +++++++++++++++++++++ drivers/crypto/meson.build | 35 ++++ drivers/crypto/null/meson.build | 33 ++++ drivers/crypto/openssl/meson.build | 38 ++++ drivers/crypto/qat/meson.build | 41 ++++ drivers/mempool/meson.build | 35 ++++ drivers/mempool/ring/meson.build | 32 +++ drivers/mempool/stack/meson.build | 32 +++ drivers/meson.build | 128 ++++++++++++ drivers/net/af_packet/meson.build | 35 ++++ drivers/net/e1000/base/meson.build | 65 +++++++ drivers/net/e1000/meson.build | 44 +++++ drivers/net/fm10k/base/meson.build | 55 ++++++ drivers/net/fm10k/meson.build | 44 +++++ drivers/net/i40e/base/meson.build | 56 ++++++ drivers/net/i40e/meson.build | 60 ++++++ drivers/net/ixgbe/base/meson.build | 60 ++++++ drivers/net/ixgbe/meson.build | 58 ++++++ drivers/net/meson.build | 36 ++++ drivers/net/null/meson.build | 32 +++ drivers/net/pcap/meson.build | 41 ++++ drivers/net/ring/meson.build | 33 ++++ lib/librte_acl/meson.build | 59 ++++++ lib/librte_bitratestats/meson.build | 34 ++++ lib/librte_cfgfile/meson.build | 34 ++++ lib/librte_cmdline/meson.build | 55 ++++++ 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 | 45 +++++ lib/librte_eventdev/meson.build | 36 ++++ lib/librte_gro/meson.build | 34 ++++ lib/librte_hash/meson.build | 45 +++++ lib/librte_ip_frag/meson.build | 39 ++++ lib/librte_jobstats/meson.build | 33 ++++ lib/librte_kni/meson.build | 38 ++++ lib/librte_kvargs/meson.build | 34 ++++ 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 | 33 ++++ lib/librte_metrics/meson.build | 33 ++++ lib/librte_net/meson.build | 45 +++++ lib/librte_pdump/meson.build | 34 ++++ lib/librte_pipeline/meson.build | 35 ++++ lib/librte_port/meson.build | 58 ++++++ lib/librte_power/meson.build | 37 ++++ lib/librte_reorder/meson.build | 34 ++++ lib/librte_ring/meson.build | 33 ++++ lib/librte_sched/meson.build | 36 ++++ lib/librte_table/meson.build | 52 +++++ lib/librte_timer/meson.build | 33 ++++ lib/librte_vhost/meson.build | 39 ++++ lib/meson.build | 105 ++++++++++ meson.build | 88 +++++++++ meson_options.txt | 9 + usertools/meson.build | 32 +++ 80 files changed, 3794 insertions(+) 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 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/e1000/base/meson.build create mode 100644 drivers/net/e1000/meson.build create mode 100644 drivers/net/fm10k/base/meson.build create mode 100644 drivers/net/fm10k/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/null/meson.build create mode 100644 drivers/net/pcap/meson.build create mode 100644 drivers/net/ring/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 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.build
Signature · 1 line
2.13.5
PATCH 1/17 build: add initial infrastructure for meson & ninja builds
To build with meson and ninja, we need some initial infrastructure in place. The build files for meson always need to be called "meson.build", and options get placed in meson_options.txt
This commit adds a top-level meson.build file, which sets up the global variables for tracking drivers, libraries, etc., and then includes other build files, before finishing by writing the global build configuration header file and a DPDK pkgconfig file at the end, using some of those same globals.
Quoted 1 line
From the top level build file, the only include file thus far is for the
config folder, which does some other setup of global configuration parameters, including pulling in architecture specific parameters from an architectural subdirectory. A number of configuration build options are provided for the project to tune a number of global variables which will be used later e.g. max numa nodes, max cores, etc. These settings all make their way to the global build config header "rte_build_config.h". There is also a file "rte_config.h", which includes "rte_build_config.h", and this file is meant to hold other build-time values which are present in our current static build configuration but are not normally meant for user-configuration. Ideally, over time, the values placed here should be moved to the individual libraries or drivers which want those values.
--- config/meson.build | 69 +++++++++++++++++++++++++++++++++++++++++ config/rte_config.h | 50 ++++++++++++++++++++++++++++++ config/x86/meson.build | 70 ++++++++++++++++++++++++++++++++++++++++++ meson.build | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++ meson_options.txt | 6 ++++ 5 files changed, 278 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 +69 -0
@@ -0,0 +1,69 @@ +# 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') +# 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') + +# 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') + 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 new file +50 -0
50 lines not on this page · raw message
config/x86/meson.build new file +70 -0
70 lines not on this page · raw message
meson.build new file +83 -0
83 lines not on this page · raw message
meson_options.txt new file +6 -0
@@ -0,0 +1,6 @@ +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.5
Re: [PATCH 01/17] build: add initial infrastructure for meson & ninja builds
Quoted 29 lines
From: dev [mailto:[email protected]] On Behalf Of Bruce Richardson
Sent: Friday, September 1, 2017 11:04 AM
To: [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: [dpdk-dev] [PATCH 01/17] build: add initial infrastructure for meson & ninja buildsTo build with meson and ninja, we need some initial infrastructure in place. The build files for meson always need to be called "meson.build", and options get placed in meson_options.txt
This commit adds a top-level meson.build file, which sets up the global variables for tracking drivers, libraries, etc., and then includes other build files, before finishing by writing the global build configuration header file and a DPDK pkgconfig file at the end, using some of those same globals.
From the top level build file, the only include file thus far is for the config folder, which does some other setup of global configuration parameters, including pulling in architecture specific parameters from an architectural subdirectory. A number of configuration build options are provided for the project to tune a number of global variables which will be used later e.g. max numa nodes, max cores, etc. These settings all make their way to the global build config header "
rte_build_config.h". There is also a file "rte_config.h", which includes "rte_build_config.h", and this file is meant to hold other build-time values which are present in our current static build configuration but are not normally meant for user-configuration. Ideally, over time, the values placed here should be moved to the individual libraries or drivers which want those values.
Quoted 1 line
Signed-off-by Bruce Richardson <[email protected]>
Comments inline below;
<snip>
Quoted 1 line
config/meson.build +0
-0
<snip>
config/meson.build line 51
Quoted 10 lines
config/meson.build +10
-0+# 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
I can't fault the code here, or Meson, just noting that the disabling of these warnings causes prints on GCC 4.8.5 and GCC 5.4.0, GCC 7 only prints on -Wno-address-of-packed-member. Clang handles it correctly - and no out-of-the-ordinary prints occur. No code changes required here.
config/rte_config.h line 5
Quoted 11 lines
config/rte_config.h new file +5
-0@@ -0,0 +1,50 @@ +/* +* BSD LICENSE +* +* Copyright(c) 2016 Intel Corporation. All rights reserved. +* All rights reserved.
2017 for license year
<snip>
Re: [PATCH 01/17] build: add initial infrastructure for meson & ninja builds
Quoted 37 lines · Harry
Quoted 29 lines
From: dev [mailto:[email protected]] On Behalf Of Bruce Richardson
Sent: Friday, September 1, 2017 11:04 AM
To: [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: [dpdk-dev] [PATCH 01/17] build: add initial infrastructure for meson & ninja buildsTo build with meson and ninja, we need some initial infrastructure in place. The build files for meson always need to be called "meson.build", and options get placed in meson_options.txt
This commit adds a top-level meson.build file, which sets up the global variables for tracking drivers, libraries, etc., and then includes other build files, before finishing by writing the global build configuration header file and a DPDK pkgconfig file at the end, using some of those same globals.
From the top level build file, the only include file thus far is for the config folder, which does some other setup of global configuration parameters, including pulling in architecture specific parameters from an architectural subdirectory. A number of configuration build options are provided for the project to tune a number of global variables which will be used later e.g. max numa nodes, max cores, etc. These settings all make their way to the global build config header "
rte_build_config.h". There is also a file "rte_config.h", which includes "rte_build_config.h", and this file is meant to hold other build-time values which are present in our current static build configuration but are not normally meant for user-configuration. Ideally, over time, the values placed here should be moved to the individual libraries or drivers which want those values.Quoted 1 line
Signed-off-by Bruce Richardson <[email protected]>Comments inline below;
<snip>
Quoted 1 line
config/meson.build +0
-0<snip>
Quoted 13 lines
config/meson.build line 51
Quoted 10 lines
config/meson.build +10
-0+# 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 +endforeachI can't fault the code here, or Meson, just noting that the disabling of these warnings causes prints on GCC 4.8.5 and GCC 5.4.0, GCC 7 only prints on -Wno-address-of-packed-member. Clang handles it correctly - and no out-of-the-ordinary prints occur. No code changes required here.
Strange. Just tested with gcc 4.8.5 and gcc 5.4, and everything worked as expected, no errors or warnings.
Quoted 14 lines
config/rte_config.h line 5
Quoted 12 lines
config/rte_config.h new file +5
-0@@ -0,0 +1,50 @@ +/* +* BSD LICENSE +* +* Copyright(c) 2016 Intel Corporation. All rights reserved. +* All rights reserved. 2017 for license year
Good catch, will fix in V2.
Quoted 4 lines
<snip>
Reviewed-by Harry van Haaren <[email protected]>
Re: [PATCH 01/17] build: add initial infrastructure for meson & ninja builds
Quoted 53 lines · Bruce Richardson
Quoted 39 lines · Harry
Quoted 31 lines
From: dev [mailto:[email protected]] On Behalf Of Bruce Richardson Sent: Friday, September 1, 2017 11:04 AM To:
[email protected] Cc: Richardson, Bruce <[email protected]>
Subject: [dpdk-dev] [PATCH 01/17] build: add initial infrastructure for meson & ninja buildsTo build with meson and ninja, we need some initial infrastructure in place. The build files for meson always need to be called "meson.build", and options get placed in meson_options.txt
This commit adds a top-level meson.build file, which sets up the global variables for tracking drivers, libraries, etc., and then includes other build files, before finishing by writing the global build configuration header file and a DPDK pkgconfig file at the end, using some of those same globals.
From the top level build file, the only include file thus far is for the config folder, which does some other setup of global configuration parameters, including pulling in architecture specific parameters from an architectural subdirectory. A number of configuration build options are provided for the project to tune a number of global variables which will be used later e.g. max numa nodes, max cores, etc. These settings all make their way to the global build config header "
rte_build_config.h". There is also a file "rte_config.h", which includes "rte_build_config.h", and this file is meant to hold other build-time values which are present in our current static build configuration but are not normally meant for user-configuration. Ideally, over time, the values placed here should be moved to the individual libraries or drivers which want those values.Quoted 1 line
Signed-off-by Bruce Richardson <[email protected]>Comments inline below;
<snip>
Quoted 1 line
config/meson.build +0
-0<snip>
Quoted 12 lines
config/meson.build
Quoted 5 lines
+# disable any unwanted warnings +unwanted_warnings = [ +
'-Wno-address-of-packed-member', + '-Wno-format-truncation'
+] +foreach arg:unwanted_warnings+ ifcc.has_argument(arg)config/meson.build +2
-0+ add_project_arguments(arg, language: 'c') + endif +endforeachI can't fault the code here, or Meson, just noting that the disabling of these warnings causes prints on GCC 4.8.5 and GCC 5.4.0, GCC 7 only prints on -Wno-address-of-packed-member. Clang handles it correctly - and no out-of-the-ordinary prints occur. No code changes required here.
Quoted 3 lines
Strange. Just tested with gcc 4.8.5 and gcc 5.4, and everything worked as expected, no errors or warnings.
Dug into the invalid flag warnings a bit more and found a number of items in the root cause.
First is that gcc only complains about invalid -Wno-* parameters in the case where there is another error or warning being printed. This explains why the warnings are only seen for some files, rather than others.
Second is that, because of this meson, is not correctly identifying the relevant flags as unsupported by the compiler. I'm looking to upstream to meson a fix for this.
Third is that there are more warnings that need to be disabled for some files when compiled with gcc 5.4. So long as there are no other problems with the code, gcc will never print the errors about the invalid warning disable flags.
So, for V2 of this, I hope to fix point 3.
/Bruce
Re: [PATCH 01/17] build: add initial infrastructure for meson & ninja builds
Quoted 72 lines · Bruce Richardson
Quoted 54 lines · Bruce Richardson
Quoted 40 lines · Harry
Quoted 32 lines
From: dev [mailto:[email protected]] On Behalf Of Bruce Richardson Sent: Friday, September 1, 2017 11:04 AM To:
[email protected] Cc: Richardson, Bruce <[email protected]>
Subject: [dpdk-dev] [PATCH 01/17] build: add initial infrastructure for meson & ninja buildsTo build with meson and ninja, we need some initial infrastructure in place. The build files for meson always need to be called "meson.build", and options get placed in meson_options.txt
This commit adds a top-level meson.build file, which sets up the global variables for tracking drivers, libraries, etc., and then includes other build files, before finishing by writing the global build configuration header file and a DPDK pkgconfig file at the end, using some of those same globals.
From the top level build file, the only include file thus far is for the config folder, which does some other setup of global configuration parameters, including pulling in architecture specific parameters from an architectural subdirectory. A number of configuration build options are provided for the project to tune a number of global variables which will be used later e.g. max numa nodes, max cores, etc. These settings all make their way to the global build config header "
rte_build_config.h". There is also a file "rte_config.h", which includes "rte_build_config.h", and this file is meant to hold other build-time values which are present in our current static build configuration but are not normally meant for user-configuration. Ideally, over time, the values placed here should be moved to the individual libraries or drivers which want those values.Quoted 1 line
Signed-off-by Bruce Richardson <[email protected]>Comments inline below;
<snip>
Quoted 1 line
config/meson.build +0
-0<snip>
Quoted 12 lines
Quoted 5 lines
+# disable any unwanted warnings +unwanted_warnings = [ +
'-Wno-address-of-packed-member', + '-Wno-format-truncation'
+] +foreach arg:unwanted_warnings+ ifcc.has_argument(arg)config/meson.build +1
-0+ add_project_arguments(arg, language: 'c') +endif +endforeach
I can't fault the code here, or Meson, just noting that the disabling of these warnings causes prints on GCC 4.8.5 and GCC 5.4.0, GCC 7 only prints on -Wno-address-of-packed-member. Clang handles it correctly - and no out-of-the-ordinary prints occur. No code changes required here.
Quoted 3 lines
Strange. Just tested with gcc 4.8.5 and gcc 5.4, and everything worked as expected, no errors or warnings.
Dug into the invalid flag warnings a bit more and found a number of items in the root cause.
First is that gcc only complains about invalid -Wno-* parameters in the case where there is another error or warning being printed. This explains why the warnings are only seen for some files, rather than others. Second is that, because of this meson, is not correctly identifying the relevant flags as unsupported by the compiler. I'm looking to upstream to meson a fix for this. Third is that there are more warnings that need to be disabled for some files when compiled with gcc 5.4. So long as there are no other problems with the code, gcc will never print the errors about the invalid warning disable flags.
Quoted 2 lines
So, for V2 of this, I hope to fix point 3.
[Hopefully] Final update here. It appears that this is an issue that only appears on Ubuntu, as I can't reproduce it on Fedora with any of a number of gcc version when I turn on -Wunused-result flag. I believe that this may be due to extra hardening in the standard headers that is done on Ubuntu to mark the functions as requiring the extra checking. To fix these, rather than disable the warnings - something that may hide other problems, I've sent two small patches [1] [2] to add return value checks to the code as applicable.
/Bruce
[1] http://dpdk.org/dev/patchwork/patch/28457/
[2] http://dpdk.org/dev/patchwork/patch/28458/
Re: [dpdk-dev, 01/17] build: add initial infrastructure for meson & ninja builds
In reply to Bruce RichardsonQuoted 23 lines · Bruce Richardson
To build with meson and ninja, we need some initial infrastructure in place. The build files for meson always need to be called "meson.build", and options get placed in meson_options.txt
This commit adds a top-level meson.build file, which sets up the global variables for tracking drivers, libraries, etc., and then includes other build files, before finishing by writing the global build configuration header file and a DPDK pkgconfig file at the end, using some of those same globals.
Quoted 1 line
From the top level build file, the only include file thus far is for the
config folder, which does some other setup of global configuration parameters, including pulling in architecture specific parameters from an architectural subdirectory. A number of configuration build options are provided for the project to tune a number of global variables which will be used later e.g. max numa nodes, max cores, etc. These settings all make their way to the global build config header "
rte_build_config.h". There is also a file "rte_config.h", which includes "rte_build_config.h", and this file is meant to hold other build-time values which are present in our current static build configuration but are not normally meant for user-configuration. Ideally, over time, the values placed here should be moved to the individual libraries or drivers which want those values.
Quoted 2 lines
Signed-off-by Bruce Richardson <[email protected]>Reviewed-by Harry van Haaren <[email protected]>
I feel like I need to underscore my previous concern here. While I'm not opposed per-se to a new build system, I am very concerned about the burden that switching places on downstream consumers, in particular distributions (since I represent one of them). Moving to a new build system with new tools means those tools need to be packaged, tested and shipped, which is a significant work effort. While it might be a net gain long term, its something you need to keep in mind when making these changes.
I know you've said that we will be keepting the existing build system, I just need to be sure everyone understands just how important that is.
Though perhaps the time frame for keeping the current build system as priarmy is less concerning, as feature parity is even more critical. That is to say, the new build system must be able to produce the same configurations that the current build system does. Without it I don't think anyone will be able to use it consistently, and that will leave a great number of users in a very poor position. I think getting a little closer to parity with the current system is warranted. I'd suggest as a gating factor:
1) Building on all supported arches
2) Cross building on all supported arches
3) Proper identification of targeted machine (i.e. equivalent of the machine component of the current build system)
Specific notes inline
Quoted 44 lines
--- config/meson.build | 69 +++++++++++++++++++++++++++++++++++++++++ config/rte_config.h | 50 ++++++++++++++++++++++++++++++ config/x86/meson.build | 70 ++++++++++++++++++++++++++++++++++++++++++ meson.build | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++ meson_options.txt | 6 ++++ 5 files changed, 278 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.txtconfig/meson.build new file +25
-0@@ -0,0 +1,69 @@ +# 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
config/meson.build line 35
Quoted 10 lines
config/meson.build new file +10
-0+# 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')
So, in the current build system, arch defined the process architecture, while 'machine' defined the specific processor family (nhm, ivb, etc). This seems like you are merging those two concepts together. While that seems reasonable, is that going to be workable with non-x86 architectures?
Have you considered using the cross-script option in meson to define a per arch build file? That I think would eliminate some of this top level parsing of arch options
Quoted 14 lines
config/meson.build new file +14
-0+# 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') + +# 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')
config/meson.build line 59
Quoted 10 lines
config/meson.build new file +10
-0+ endif +endforeach + +compile_time_cpuflags = [] +if host_machine.cpu_family().startswith('x86') + arch_subdir = 'x86' + subdir(arch_subdir) +endif +dpdk_conf.set('RTE_COMPILE_TIME_CPUFLAGS', ','.join(compile_time_cpuflags)) +
Likewise, I think if you use the --cross-script approach, this logic gets eliminated in favor of a file pointer from the command line
<snip>
Quoted 6 lines
config/meson.build new file +6
-0+ +# set up some global vars for compiler, platform, configuration, etc. +cc = meson.get_compiler('c') +dpdk_conf = configuration_data() +dpdk_libraries = [] +dpdk_drivers = []
config/meson.build
Quoted 10 lines
config/meson.build new file +10
-0+dpdk_extra_ldflags = [] + +# for static libs, treat the drivers as regular libraries, otherwise +# for shared libs, put them in a driver folder +if get_option('default_library') == 'static' + driver_install_path = get_option('libdir') +else + driver_install_path = '@0@/dpdk/drivers'.format(get_option('prefix')) +endif +
So, I like this, as it appears to default to shared library builds, which is great. Unfortunately, it doesn't seem to work for me when using this command:
meson -Ddefault_library=static -Dlibdir=./build/lib . build
If I do that and then run ninja in my build directory, I still get DSO's not static libraries. I am assuming that I'm doing something subtly wrong in my build, but I can't seem to see what it is.
On the other hand, if static builds don't work yet, thats going to be an issue.
<snip>
config/meson.build
Quoted 10 lines
config/meson.build new file +10
-0+# configure the build, and make sure configs here and in config folder are +# 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') +subdir('config') + +# TODO build libs and drivers + +# TODO build binaries and installable tools +
This seems outdated, but I think you remove it in a later patch
Neil
Re: [dpdk-dev, 01/17] build: add initial infrastructure for meson & ninja builds
Quoted 49 lines · Neil Horman
Quoted 23 lines · Bruce Richardson
To build with meson and ninja, we need some initial infrastructure in place. The build files for meson always need to be called "meson.build", and options get placed in meson_options.txt
This commit adds a top-level meson.build file, which sets up the global variables for tracking drivers, libraries, etc., and then includes other build files, before finishing by writing the global build configuration header file and a DPDK pkgconfig file at the end, using some of those same globals.
Quoted 1 line
From the top level build file, the only include file thus far is for the
config folder, which does some other setup of global configuration parameters, including pulling in architecture specific parameters from an architectural subdirectory. A number of configuration build options are provided for the project to tune a number of global variables which will be used later e.g. max numa nodes, max cores, etc. These settings all make their way to the global build config header "
rte_build_config.h". There is also a file "rte_config.h", which includes "rte_build_config.h", and this file is meant to hold other build-time values which are present in our current static build configuration but are not normally meant for user-configuration. Ideally, over time, the values placed here should be moved to the individual libraries or drivers which want those values.Quoted 2 lines
Signed-off-by Bruce Richardson <[email protected]>Reviewed-by Harry van Haaren <[email protected]>I feel like I need to underscore my previous concern here. While I'm not opposed per-se to a new build system, I am very concerned about the burden that switching places on downstream consumers, in particular distributions (since I represent one of them). Moving to a new build system with new tools means those tools need to be packaged, tested and shipped, which is a significant work effort. While it might be a net gain long term, its something you need to keep in mind when making these changes.
I know you've said that we will be keepting the existing build system, I just need to be sure everyone understands just how important that is.
Though perhaps the time frame for keeping the current build system as priarmy is less concerning, as feature parity is even more critical. That is to say, the new build system must be able to produce the same configurations that the current build system does. Without it I don't think anyone will be able to use it consistently, and that will leave a great number of users in a very poor position. I think getting a little closer to parity with the current system is warranted. I'd suggest as a gating factor:
Quoted 4 lines
1) Building on all supported arches
2) Cross building on all supported arches
3) Proper identification of targeted machine (i.e. equivalent of the machine component of the current build system)
I think your concerns are important and we have to keep the current build system even after the new build system is at parity with the current one. We most likely will have to keep the current build system around for a while like year or more as it will be hard for all distros to convert and add the needed tools to build with DPDK. The problem will be making sure changes in one are reflected in the other build system.
The new build system has a lot of advantages and Bruce is doing a good job, but we need to open it up into a project for more to contribute, which I assume is the goal here.
Quoted 115 lines
Specific notes inline
Quoted 44 lines
---
config/meson.build | 69 +++++++++++++++++++++++++++++++++++++++++ config/rte_config.h | 50 ++++++++++++++++++++++++++++++ config/x86/meson.build | 70 ++++++++++++++++++++++++++++++++++++++++++ meson.build | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++ meson_options.txt | 6 ++++ 5 files changed, 278 insertions(+)create mode 100644 config/meson.build
create mode 100644config/rte_config.h
create mode 100644 config/x86/meson.build
create mode 100644 meson.build
create mode 100644 meson_options.txtconfig/meson.build new file +25
-0@@ -0,0 +1,69 @@ +# 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 NOTconfig/meson.build line 35
Quoted 10 lines
config/meson.build new file +10
-0+# 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')So, in the current build system, arch defined the process architecture, while 'machine' defined the specific processor family (nhm, ivb, etc). This seems like you are merging those two concepts together. While that seems reasonable, is that going to be workable with non-x86 architectures?
Have you considered using the cross-script option in meson to define a per arch build file? That I think would eliminate some of this top level parsing of arch options
Quoted 14 lines
config/meson.build new file +14
-0+# 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') + +# 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')config/meson.build line 59
Quoted 10 lines
config/meson.build new file +10
-0+ endif +endforeach + +compile_time_cpuflags = [] +if host_machine.cpu_family().startswith('x86') + arch_subdir = 'x86' + subdir(arch_subdir) +endif +dpdk_conf.set('RTE_COMPILE_TIME_CPUFLAGS', ','.join(compile_time_cpuflags)) +Likewise, I think if you use the --cross-script approach, this logic gets eliminated in favor of a file pointer from the command line
<snip>
Quoted 6 lines
config/meson.build new file +6
-0+ +# set up some global vars for compiler, platform, configuration, etc. +cc = meson.get_compiler('c') +dpdk_conf = configuration_data() +dpdk_libraries = [] +dpdk_drivers = []config/meson.build
Quoted 10 lines
config/meson.build new file +10
-0+dpdk_extra_ldflags = [] + +# for static libs, treat the drivers as regular libraries, otherwise +# for shared libs, put them in a driver folder +if get_option('default_library') == 'static' + driver_install_path = get_option('libdir') +else + driver_install_path = '@0@/dpdk/drivers'.format(get_option('prefix')) +endif +So, I like this, as it appears to default to shared library builds, which is great. Unfortunately, it doesn't seem to work for me when using this command:
Quoted 1 line
meson -Ddefault_library=static -Dlibdir=./build/lib . build
In a previous version of the build system I just edited the meson_option.txt file can changed it to static and that worked. The command line should work, but have not tried that option.
Quoted 21 lines
If I do that and then run ninja in my build directory, I still get DSO's not static libraries. I am assuming that I'm doing something subtly wrong in my build, but I can't seem to see what it is.
On the other hand, if static builds don't work yet, thats going to be an issue.
<snip>
config/meson.build
Quoted 10 lines
config/meson.build new file +10
-0+# configure the build, and make sure configs here and in config folder are +# 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') +subdir('config') + +# TODO build libs and drivers + +# TODO build binaries and installable tools +This seems outdated, but I think you remove it in a later patch
Quoted 1 line
Neil
Regards,
Keith
Re: [dpdk-dev, 01/17] build: add initial infrastructure for meson & ninja builds
Quoted 49 lines · Keith
Quoted 49 lines · Neil Horman
Quoted 23 lines · Bruce Richardson
To build with meson and ninja, we need some initial infrastructure in place. The build files for meson always need to be called "meson.build", and options get placed in meson_options.txt
This commit adds a top-level meson.build file, which sets up the global variables for tracking drivers, libraries, etc., and then includes other build files, before finishing by writing the global build configuration header file and a DPDK pkgconfig file at the end, using some of those same globals.
Quoted 1 line
From the top level build file, the only include file thus far is for the
config folder, which does some other setup of global configuration parameters, including pulling in architecture specific parameters from an architectural subdirectory. A number of configuration build options are provided for the project to tune a number of global variables which will be used later e.g. max numa nodes, max cores, etc. These settings all make their way to the global build config header "
rte_build_config.h". There is also a file "rte_config.h", which includes "rte_build_config.h", and this file is meant to hold other build-time values which are present in our current static build configuration but are not normally meant for user-configuration. Ideally, over time, the values placed here should be moved to the individual libraries or drivers which want those values.Quoted 2 lines
Signed-off-by Bruce Richardson <[email protected]>Reviewed-by Harry van Haaren <[email protected]>I feel like I need to underscore my previous concern here. While I'm not opposed per-se to a new build system, I am very concerned about the burden that switching places on downstream consumers, in particular distributions (since I represent one of them). Moving to a new build system with new tools means those tools need to be packaged, tested and shipped, which is a significant work effort. While it might be a net gain long term, its something you need to keep in mind when making these changes.
I know you've said that we will be keepting the existing build system, I just need to be sure everyone understands just how important that is.
Though perhaps the time frame for keeping the current build system as priarmy is less concerning, as feature parity is even more critical. That is to say, the new build system must be able to produce the same configurations that the current build system does. Without it I don't think anyone will be able to use it consistently, and that will leave a great number of users in a very poor position. I think getting a little closer to parity with the current system is warranted. I'd suggest as a gating factor:
Quoted 9 lines
Quoted 4 lines
1) Building on all supported arches
2) Cross building on all supported arches
3) Proper identification of targeted machine (i.e. equivalent of the machine component of the current build system)I think your concerns are important and we have to keep the current build system even after the new build system is at parity with the current one. We most likely will have to keep the current build system around for a while like year or more as it will be hard for all distros to convert and add the needed tools to build with DPDK. The problem will be making sure changes in one are reflected in the other build system.
The new build system has a lot of advantages and Bruce is doing a good job, but we need to open it up into a project for more to contribute, which I assume is the goal here.
No argument, Bruce is doing a fine job here, and while I don't really agree with the choice of tools, I have to admit its fast and somewhat slick. But I do feel strongly about being very careful with how we procede in its introduction.
Neil
Re: [dpdk-dev, 01/17] build: add initial infrastructure for meson & ninja builds
In reply to Neil HormanQuoted 27 lines · Neil Horman
Quoted 23 lines · Bruce Richardson
To build with meson and ninja, we need some initial infrastructure in place. The build files for meson always need to be called "meson.build", and options get placed in meson_options.txt
This commit adds a top-level meson.build file, which sets up the global variables for tracking drivers, libraries, etc., and then includes other build files, before finishing by writing the global build configuration header file and a DPDK pkgconfig file at the end, using some of those same globals.
Quoted 1 line
From the top level build file, the only include file thus far is for the
config folder, which does some other setup of global configuration parameters, including pulling in architecture specific parameters from an architectural subdirectory. A number of configuration build options are provided for the project to tune a number of global variables which will be used later e.g. max numa nodes, max cores, etc. These settings all make their way to the global build config header "
rte_build_config.h". There is also a file "rte_config.h", which includes "rte_build_config.h", and this file is meant to hold other build-time values which are present in our current static build configuration but are not normally meant for user-configuration. Ideally, over time, the values placed here should be moved to the individual libraries or drivers which want those values.Quoted 2 lines
Signed-off-by Bruce Richardson <[email protected]>Reviewed-by Harry van Haaren <[email protected]>
Quoted 8 lines
I feel like I need to underscore my previous concern here. While I'm not opposed per-se to a new build system, I am very concerned about the burden that switching places on downstream consumers, in particular distributions (since I represent one of them). Moving to a new build system with new tools means those tools need to be packaged, tested and shipped, which is a significant work effort. While it might be a net gain long term, its something you need to keep in mind when making these changes.
Understood. If there is anything we/I can do to make this transition easier, please flag it for consideration.
Quoted 4 lines
I know you've said that we will be keepting the existing build system, I just need to be sure everyone understands just how important that is.
What is your feeling here, in terms of timescale. After any new system reaches feature parity, how long would you estimate that we would need to support the existing makefile system before it would be safe to deprecate it? Should we start a deprecation plan, or is it best just to commit to support both until we get all - or almost all - downstream consumers switched over? While I wouldn't push for deprecating the old system any time soon, and I wouldn't consider maintaining the two unduly burdensome, it's not something we want to do in the long term.
Quoted 8 lines
Though perhaps the time frame for keeping the current build system as priarmy is less concerning, as feature parity is even more critical. That is to say, the new build system must be able to produce the same configurations that the current build system does. Without it I don't think anyone will be able to use it consistently, and that will leave a great number of users in a very poor position. I think getting a little closer to parity with the current system is warranted. I'd suggest as a gating factor:
Quoted 5 lines
1) Building on all supported arches
2) Cross building on all supported arches
3) Proper identification of targeted machine (i.e. equivalent of the machine component of the current build system)
The question there is gating factor for what? Presumably not for merging into the staging tree. But for merging into the main tree for releases? I'd push back a little on that, as the new system does not interfere in any way with the old, and by keeping it in a staging tree until it reaches full feature parity will make the job considerably harder. For example, it means that anyone submitting a new driver or library has to submit the code and makefiles in one set and the meson patches in a separate one for a separate build tree. It also makes it less likely that people will try out the new system and find the issues with it, and help fill in the gaps. While I can understand us not recommending the new build system until it reaches feature parity, I think there are a lot of benefits to be got by making it widely available, even if it's incomplete.
On a semi-related note, some folks here are chomping at the bit for it to get mainlined, as they want the improved build time for recompiles for speed up their development process. They can work off the posted patches, but it's more painful than having it locked in.
Quoted 52 lines
Specific notes inline
Quoted 50 lines
--- config/meson.build | 69 +++++++++++++++++++++++++++++++++++++++++ config/rte_config.h | 50 ++++++++++++++++++++++++++++++ config/x86/meson.build | 70 ++++++++++++++++++++++++++++++++++++++++++ meson.build | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++ meson_options.txt | 6 ++++ 5 files changed, 278 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.txtconfig/meson.build new file +31
-0@@ -0,0 +1,69 @@ +# 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. +
Quoted 9 lines
config/meson.build line 35
Quoted 4 lines
config/meson.build new file +4
-0+# 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')So, in the current build system, arch defined the process architecture, while 'machine' defined the specific processor family (nhm, ivb, etc). This seems like you are merging those two concepts together. While that seems reasonable, is that going to be workable with non-x86 architectures?
I'm not sure I am, but I'm not familiar enough with other architectures to be sure. I'd appreciate some feedback from those more familiar with ARM/PPC to help support the effort to be sure.
For now, in this set, the machine value is being used as now on IA, a tuning flag to be passed to the compiler. The actual architecture is pulled from host_machine.cpu_family() - which is the final target machine the case of a cross build.
Quoted 4 lines
Have you considered using the cross-script option in meson to define a per arch build file? That I think would eliminate some of this top level parsing of arch options
No, I haven't looked into that yet, but I will do so shortly. I'd still look to get this in as a starting baseline and then modify it as necessary.
Quoted 27 lines
Quoted 14 lines
config/meson.build new file +14
-0+# 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') + +# 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')config/meson.build line 59
Quoted 10 lines
config/meson.build new file +10
-0+ endif +endforeach + +compile_time_cpuflags = [] +if host_machine.cpu_family().startswith('x86') + arch_subdir = 'x86' + subdir(arch_subdir) +endif +dpdk_conf.set('RTE_COMPILE_TIME_CPUFLAGS', ','.join(compile_time_cpuflags)) +Likewise, I think if you use the --cross-script approach, this logic gets eliminated in favor of a file pointer from the command line
Quoted 2 lines
<snip>
I'd rather not force the use of a cross-script if not cross-compiling.
Quoted 20 lines
Quoted 7 lines
config/meson.build new file +6
-0+ +# set up some global vars for compiler, platform, configuration, etc. +cc = meson.get_compiler('c') +dpdk_conf = configuration_data() +dpdk_libraries = [] +dpdk_drivers = []config/meson.build
Quoted 10 lines
config/meson.build new file +10
-0+dpdk_extra_ldflags = [] + +# for static libs, treat the drivers as regular libraries, otherwise +# for shared libs, put them in a driver folder +if get_option('default_library') == 'static' + driver_install_path = get_option('libdir') +else + driver_install_path = '@0@/dpdk/drivers'.format(get_option('prefix')) +endif +So, I like this, as it appears to default to shared library builds, which is great. Unfortunately, it doesn't seem to work for me when using this command:
Quoted 2 lines
meson -Ddefault_library=static -Dlibdir=./build/lib . build
meson --default-library=static ...
Quoted 8 lines
If I do that and then run ninja in my build directory, I still get DSO's not static libraries. I am assuming that I'm doing something subtly wrong in my build, but I can't seem to see what it is.
On the other hand, if static builds don't work yet, thats going to be an issue.
<snip>
Quoted 12 lines
config/meson.build
Quoted 10 lines
config/meson.build new file +10
-0+# configure the build, and make sure configs here and in config folder are +# 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') +subdir('config') + +# TODO build libs and drivers + +# TODO build binaries and installable tools +This seems outdated, but I think you remove it in a later patch
Yep. I put them in as comment placeholders in the early patches to show where things would go in later ones to try and make the flow clearer i.e. they were deliberately put in, even though removed later.
Thanks for the feedback.
/Bruce
Re: [dpdk-dev, 01/17] build: add initial infrastructure for meson & ninja builds
Quoted 36 lines · Bruce Richardson
Quoted 27 lines · Neil Horman
Quoted 23 lines · Bruce Richardson
To build with meson and ninja, we need some initial infrastructure in place. The build files for meson always need to be called "meson.build", and options get placed in meson_options.txt
This commit adds a top-level meson.build file, which sets up the global variables for tracking drivers, libraries, etc., and then includes other build files, before finishing by writing the global build configuration header file and a DPDK pkgconfig file at the end, using some of those same globals.
Quoted 1 line
From the top level build file, the only include file thus far is for the
config folder, which does some other setup of global configuration parameters, including pulling in architecture specific parameters from an architectural subdirectory. A number of configuration build options are provided for the project to tune a number of global variables which will be used later e.g. max numa nodes, max cores, etc. These settings all make their way to the global build config header "
rte_build_config.h". There is also a file "rte_config.h", which includes "rte_build_config.h", and this file is meant to hold other build-time values which are present in our current static build configuration but are not normally meant for user-configuration. Ideally, over time, the values placed here should be moved to the individual libraries or drivers which want those values.Quoted 2 lines
Signed-off-by Bruce Richardson <[email protected]>Reviewed-by Harry van Haaren <[email protected]>Quoted 8 lines
I feel like I need to underscore my previous concern here. While I'm not opposed per-se to a new build system, I am very concerned about the burden that switching places on downstream consumers, in particular distributions (since I represent one of them). Moving to a new build system with new tools means those tools need to be packaged, tested and shipped, which is a significant work effort. While it might be a net gain long term, its something you need to keep in mind when making these changes.
Quoted 3 lines
Understood. If there is anything we/I can do to make this transition easier, please flag it for consideration.
Thank you, I appreciate that.
Quoted 4 lines
Quoted 4 lines
I know you've said that we will be keepting the existing build system, I just need to be sure everyone understands just how important that is.
Quoted 9 lines
What is your feeling here, in terms of timescale. After any new system reaches feature parity, how long would you estimate that we would need to support the existing makefile system before it would be safe to deprecate it? Should we start a deprecation plan, or is it best just to commit to support both until we get all - or almost all - downstream consumers switched over? While I wouldn't push for deprecating the old system any time soon, and I wouldn't consider maintaining the two unduly burdensome, it's not something we want to do in the long term.
I was hoping to avoid putting a specific time frame on it, but its a fair question to ask. I feel like any particular timetable is somewhat arbitrary. Keith suggested a year, which is likely as good as any in my mind. To put a bit more detail behind it, a RHEL release cycle is anywhere from 6 to 18 months, so a year fits well. If we assume starting a few weeks back when you first proposed this change, that its going to be merged, that gives us time to package the build components, build the new package using them, get it through a qa cycle and fix anything that pops up as a result. That way, when the switch is made, it can be done with an immediate deprecation of the old build system with a level of confidence that some of the more esoteric build targets/configs will likely work.
Quoted 13 lines
Quoted 8 lines
Though perhaps the time frame for keeping the current build system as priarmy is less concerning, as feature parity is even more critical. That is to say, the new build system must be able to produce the same configurations that the current build system does. Without it I don't think anyone will be able to use it consistently, and that will leave a great number of users in a very poor position. I think getting a little closer to parity with the current system is warranted. I'd suggest as a gating factor:
Quoted 5 lines
1) Building on all supported arches
2) Cross building on all supported arches
3) Proper identification of targeted machine (i.e. equivalent of the machine component of the current build system)
Quoted 13 lines
The question there is gating factor for what? Presumably not for merging into the staging tree. But for merging into the main tree for releases? I'd push back a little on that, as the new system does not interfere in any way with the old, and by keeping it in a staging tree until it reaches full feature parity will make the job considerably harder. For example, it means that anyone submitting a new driver or library has to submit the code and makefiles in one set and the meson patches in a separate one for a separate build tree. It also makes it less likely that people will try out the new system and find the issues with it, and help fill in the gaps. While I can understand us not recommending the new build system until it reaches feature parity, I think there are a lot of benefits to be got by making it widely available, even if it's incomplete.
Yes, sorry, the implied "what" here is gating its introduction to mainline. I have no problem with this going into a development or staging branch/tree, only with it getting merged to mainline and becoming the primary build system today. I get that it makes reaching feature parity harder, but to not do so relegates anyone that hasn't had a chance to test the new build system to second class citizen status (or at least potentially does so). To be a bit more specific, I can see how energized you might be to get this in place now because you've tested it on a wide array on intel hardware, but I'm guessing if it went in today, people at IBM and Linaro would have to drop active developement to start switching their build environments over to the new system lest they get left out in the cold. I think its more about balacing where the hardship lies here.
As I'm writing this, I wonder if a reasonable compromise couldn't involve the use of CI? That is to say, what if we integrated the build system now-ish, and stood up an official CI instance, that both:
1) built the dpdk in all style configuration, which mandated the use of the old build system (i.e. we implicitly mandate that the current build system stay working, and is not forgotten), and gate patch merges on that result.
2) add a test that any change to a meson file in mainline also include a change to the a Makefile
I'm just spitballing here, but I'm looking for ways to enforce the continued use of the current build system above and beyond a verbal promise to do so. The idea is to ensure that it stays operational and primary to the development of dpdk until build system parity is reached.
Quoted 6 lines
On a semi-related note, some folks here are chomping at the bit for it to get mainlined, as they want the improved build time for recompiles for speed up their development process. They can work off the posted patches, but it's more painful than having it locked in.
I'm sure they are, but they are just one segment of the community. While its faster for them, it also potentially causes anyone not on that platform a headache, because they have to figure out how to integrate the new system to their environment.
Quoted 163 lines
Quoted 52 lines
Specific notes inline
Quoted 50 lines
--- config/meson.build | 69 +++++++++++++++++++++++++++++++++++++++++ config/rte_config.h | 50 ++++++++++++++++++++++++++++++ config/x86/meson.build | 70 ++++++++++++++++++++++++++++++++++++++++++ meson.build | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++ meson_options.txt | 6 ++++ 5 files changed, 278 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.txtconfig/meson.build new file +31
-0@@ -0,0 +1,69 @@ +# 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. +Quoted 9 lines
config/meson.build line 35
Quoted 4 lines
config/meson.build new file +4
-0+# 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')So, in the current build system, arch defined the process architecture, while 'machine' defined the specific processor family (nhm, ivb, etc). This seems like you are merging those two concepts together. While that seems reasonable, is that going to be workable with non-x86 architectures?
I'm not sure I am, but I'm not familiar enough with other architectures to be sure. I'd appreciate some feedback from those more familiar with ARM/PPC to help support the effort to be sure.
For now, in this set, the machine value is being used as now on IA, a tuning flag to be passed to the compiler. The actual architecture is pulled from
host_machine.cpu_family()- which is the final target machine the case of a cross build.Quoted 4 lines
Have you considered using the cross-script option in meson to define a per arch build file? That I think would eliminate some of this top level parsing of arch options
No, I haven't looked into that yet, but I will do so shortly. I'd still look to get this in as a starting baseline and then modify it as necessary.
Quoted 27 lines
Quoted 14 lines
config/meson.build new file +14
-0+# 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') + +# 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')config/meson.build line 59
Quoted 10 lines
config/meson.build new file +10
-0+ endif +endforeach + +compile_time_cpuflags = [] +if host_machine.cpu_family().startswith('x86') + arch_subdir = 'x86' + subdir(arch_subdir) +endif +dpdk_conf.set('RTE_COMPILE_TIME_CPUFLAGS', ','.join(compile_time_cpuflags)) +Likewise, I think if you use the --cross-script approach, this logic gets eliminated in favor of a file pointer from the command line
Quoted 2 lines
<snip>
I'd rather not force the use of a cross-script if not cross-compiling.
Quoted 20 lines
Quoted 7 lines
config/meson.build new file +6
-0+ +# set up some global vars for compiler, platform, configuration, etc. +cc = meson.get_compiler('c') +dpdk_conf = configuration_data() +dpdk_libraries = [] +dpdk_drivers = []config/meson.build
Quoted 10 lines
config/meson.build new file +10
-0+dpdk_extra_ldflags = [] + +# for static libs, treat the drivers as regular libraries, otherwise +# for shared libs, put them in a driver folder +if get_option('default_library') == 'static' + driver_install_path = get_option('libdir') +else + driver_install_path = '@0@/dpdk/drivers'.format(get_option('prefix')) +endif +So, I like this, as it appears to default to shared library builds, which is great. Unfortunately, it doesn't seem to work for me when using this command:
Quoted 2 lines
meson -Ddefault_library=static -Dlibdir=./build/lib . build
meson --default-library=static ...
Quoted 8 lines
If I do that and then run ninja in my build directory, I still get DSO's not static libraries. I am assuming that I'm doing something subtly wrong in my build, but I can't seem to see what it is.
On the other hand, if static builds don't work yet, thats going to be an issue.
<snip>
Quoted 12 lines
config/meson.build
Quoted 10 lines
config/meson.build new file +10
-0+# configure the build, and make sure configs here and in config folder are +# 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') +subdir('config') + +# TODO build libs and drivers + +# TODO build binaries and installable tools +This seems outdated, but I think you remove it in a later patch
Yep. I put them in as comment placeholders in the early patches to show where things would go in later ones to try and make the flow clearer i.e. they were deliberately put in, even though removed later.
Thanks for the feedback.
/Bruce
Re: [dpdk-dev, 01/17] build: add initial infrastructure for meson & ninja builds
Quoted 113 lines · Neil Horman
Quoted 36 lines · Bruce Richardson
Quoted 27 lines · Neil Horman
Quoted 23 lines · Bruce Richardson
To build with meson and ninja, we need some initial infrastructure in place. The build files for meson always need to be called "meson.build", and options get placed in meson_options.txt
This commit adds a top-level meson.build file, which sets up the global variables for tracking drivers, libraries, etc., and then includes other build files, before finishing by writing the global build configuration header file and a DPDK pkgconfig file at the end, using some of those same globals.
Quoted 1 line
From the top level build file, the only include file thus far is for the
config folder, which does some other setup of global configuration parameters, including pulling in architecture specific parameters from an architectural subdirectory. A number of configuration build options are provided for the project to tune a number of global variables which will be used later e.g. max numa nodes, max cores, etc. These settings all make their way to the global build config header "
rte_build_config.h". There is also a file "rte_config.h", which includes "rte_build_config.h", and this file is meant to hold other build-time values which are present in our current static build configuration but are not normally meant for user-configuration. Ideally, over time, the values placed here should be moved to the individual libraries or drivers which want those values.Quoted 2 lines
Signed-off-by Bruce Richardson <[email protected]>Reviewed-by Harry van Haaren <[email protected]>Quoted 8 lines
I feel like I need to underscore my previous concern here. While I'm not opposed per-se to a new build system, I am very concerned about the burden that switching places on downstream consumers, in particular distributions (since I represent one of them). Moving to a new build system with new tools means those tools need to be packaged, tested and shipped, which is a significant work effort. While it might be a net gain long term, its something you need to keep in mind when making these changes.
Quoted 3 lines
Understood. If there is anything we/I can do to make this transition easier, please flag it for consideration.
Thank you, I appreciate that.
Quoted 4 lines
Quoted 4 lines
I know you've said that we will be keepting the existing build system, I just need to be sure everyone understands just how important that is.
Quoted 9 lines
What is your feeling here, in terms of timescale. After any new system reaches feature parity, how long would you estimate that we would need to support the existing makefile system before it would be safe to deprecate it? Should we start a deprecation plan, or is it best just to commit to support both until we get all - or almost all - downstream consumers switched over? While I wouldn't push for deprecating the old system any time soon, and I wouldn't consider maintaining the two unduly burdensome, it's not something we want to do in the long term.
I was hoping to avoid putting a specific time frame on it, but its a fair question to ask. I feel like any particular timetable is somewhat arbitrary. Keith suggested a year, which is likely as good as any in my mind. To put a bit more detail behind it, a RHEL release cycle is anywhere from 6 to 18 months, so a year fits well. If we assume starting a few weeks back when you first proposed this change, that its going to be merged, that gives us time to package the build components, build the new package using them, get it through a qa cycle and fix anything that pops up as a result. That way, when the switch is made, it can be done with an immediate deprecation of the old build system with a level of confidence that some of the more esoteric build targets/configs will likely work.
Quoted 13 lines
Quoted 8 lines
Though perhaps the time frame for keeping the current build system as priarmy is less concerning, as feature parity is even more critical. That is to say, the new build system must be able to produce the same configurations that the current build system does. Without it I don't think anyone will be able to use it consistently, and that will leave a great number of users in a very poor position. I think getting a little closer to parity with the current system is warranted. I'd suggest as a gating factor:
Quoted 5 lines
1) Building on all supported arches
2) Cross building on all supported arches
3) Proper identification of targeted machine (i.e. equivalent of the machine component of the current build system)Quoted 13 lines
The question there is gating factor for what? Presumably not for merging into the staging tree. But for merging into the main tree for releases? I'd push back a little on that, as the new system does not interfere in any way with the old, and by keeping it in a staging tree until it reaches full feature parity will make the job considerably harder. For example, it means that anyone submitting a new driver or library has to submit the code and makefiles in one set and the meson patches in a separate one for a separate build tree. It also makes it less likely that people will try out the new system and find the issues with it, and help fill in the gaps. While I can understand us not recommending the new build system until it reaches feature parity, I think there are a lot of benefits to be got by making it widely available, even if it's incomplete.
Yes, sorry, the implied "what" here is gating its introduction to mainline. I have no problem with this going into a development or staging branch/tree, only with it getting merged to mainline and becoming the primary build system today. I get that it makes reaching feature parity harder, but to not do so relegates anyone that hasn't had a chance to test the new build system to second class citizen status (or at least potentially does so). To be a bit more specific, I can see how energized you might be to get this in place now because you've tested it on a wide array on intel hardware, but I'm guessing if it went in today, people at IBM and Linaro would have to drop active developement to start switching their build environments over to the new system lest they get left out in the cold. I think its more about balacing where the hardship lies here.
As I'm writing this, I wonder if a reasonable compromise couldn't involve the use of CI? That is to say, what if we integrated the build system now-ish, and stood up an official CI instance, that both:
1) built the dpdk in all style configuration, which mandated the use of the old build system (i.e. we implicitly mandate that the current build system stay working, and is not forgotten), and gate patch merges on that result.
Quoted 8 lines
2) add a test that any change to a meson file in mainline also include a change to the a
MakefileI'm just spitballing here, but I'm looking for ways to enforce the continued use of the current build system above and beyond a verbal promise to do so. The idea is to ensure that it stays operational and primary to the development of dpdk until build system parity is reached.
Yes, that all makes sense, and I agree that the main issue is how to ensure/enforce the fact that the old build system stays as the main way to build DPDK, until such time as the new system reaches parity. A CI system like you describe would be the ideal case, and we have some parts of that, just not enough I think to satify our needs. On the other hand, while holding the new system in a staging tree till it reaches parity would definitely achieve that objective I think the cost of that is too high.
Right now patchwork reports results of "Intel-compilation". I'm not aware of any immediate plans to expand that - somebody please should if there are. There is also the planned DPDK lab, but I'm not sure of the schedule for that or if it will help in this instance.
For now, I'll prepare a slightly-updated V2 patchset, with a view to getting work started on the build-next tree. While that is going on, we can maybe continue to think about how to put in suitable guard-rails for ensuring old system compatibility for when it's pulled to mainline.
Thanks again for raising your concerns about this. It's easy for me to sometimes push too hard for something I'm enthusiastic about! :-) I do want this migration done properly, so if you have the bandwidth I'd appreciate any reviews or feedback you can give, as the work goes on.
Regards,
/Bruce
Re: [dpdk-dev, 01/17] build: add initial infrastructure for meson & ninja builds
+Thomas and Qian from our validation team, in case they have any insight on build CI.
Quoted 150 lines · Bruce Richardson
Quoted 113 lines · Neil Horman
Quoted 36 lines · Bruce Richardson
Quoted 27 lines · Neil Horman
Quoted 23 lines · Bruce Richardson
To build with meson and ninja, we need some initial infrastructure in place. The build files for meson always need to be called "meson.build", and options get placed in meson_options.txt
This commit adds a top-level meson.build file, which sets up the global variables for tracking drivers, libraries, etc., and then includes other build files, before finishing by writing the global build configuration header file and a DPDK pkgconfig file at the end, using some of those same globals.
Quoted 1 line
From the top level build file, the only include file thus far is for the
config folder, which does some other setup of global configuration parameters, including pulling in architecture specific parameters from an architectural subdirectory. A number of configuration build options are provided for the project to tune a number of global variables which will be used later e.g. max numa nodes, max cores, etc. These settings all make their way to the global build config header "
rte_build_config.h". There is also a file "rte_config.h", which includes "rte_build_config.h", and this file is meant to hold other build-time values which are present in our current static build configuration but are not normally meant for user-configuration. Ideally, over time, the values placed here should be moved to the individual libraries or drivers which want those values.Quoted 2 lines
Signed-off-by Bruce Richardson <[email protected]>Reviewed-by Harry van Haaren <[email protected]>Quoted 8 lines
I feel like I need to underscore my previous concern here. While I'm not opposed per-se to a new build system, I am very concerned about the burden that switching places on downstream consumers, in particular distributions (since I represent one of them). Moving to a new build system with new tools means those tools need to be packaged, tested and shipped, which is a significant work effort. While it might be a net gain long term, its something you need to keep in mind when making these changes.
Quoted 3 lines
Understood. If there is anything we/I can do to make this transition easier, please flag it for consideration.
Thank you, I appreciate that.
Quoted 4 lines
Quoted 4 lines
I know you've said that we will be keepting the existing build system, I just need to be sure everyone understands just how important that is.
Quoted 9 lines
What is your feeling here, in terms of timescale. After any new system reaches feature parity, how long would you estimate that we would need to support the existing makefile system before it would be safe to deprecate it? Should we start a deprecation plan, or is it best just to commit to support both until we get all - or almost all - downstream consumers switched over? While I wouldn't push for deprecating the old system any time soon, and I wouldn't consider maintaining the two unduly burdensome, it's not something we want to do in the long term.
I was hoping to avoid putting a specific time frame on it, but its a fair question to ask. I feel like any particular timetable is somewhat arbitrary. Keith suggested a year, which is likely as good as any in my mind. To put a bit more detail behind it, a RHEL release cycle is anywhere from 6 to 18 months, so a year fits well. If we assume starting a few weeks back when you first proposed this change, that its going to be merged, that gives us time to package the build components, build the new package using them, get it through a qa cycle and fix anything that pops up as a result. That way, when the switch is made, it can be done with an immediate deprecation of the old build system with a level of confidence that some of the more esoteric build targets/configs will likely work.
Quoted 13 lines
Quoted 8 lines
Though perhaps the time frame for keeping the current build system as priarmy is less concerning, as feature parity is even more critical. That is to say, the new build system must be able to produce the same configurations that the current build system does. Without it I don't think anyone will be able to use it consistently, and that will leave a great number of users in a very poor position. I think getting a little closer to parity with the current system is warranted. I'd suggest as a gating factor:
Quoted 5 lines
1) Building on all supported arches
2) Cross building on all supported arches
3) Proper identification of targeted machine (i.e. equivalent of the machine component of the current build system)Quoted 13 lines
The question there is gating factor for what? Presumably not for merging into the staging tree. But for merging into the main tree for releases? I'd push back a little on that, as the new system does not interfere in any way with the old, and by keeping it in a staging tree until it reaches full feature parity will make the job considerably harder. For example, it means that anyone submitting a new driver or library has to submit the code and makefiles in one set and the meson patches in a separate one for a separate build tree. It also makes it less likely that people will try out the new system and find the issues with it, and help fill in the gaps. While I can understand us not recommending the new build system until it reaches feature parity, I think there are a lot of benefits to be got by making it widely available, even if it's incomplete.
Yes, sorry, the implied "what" here is gating its introduction to mainline. I have no problem with this going into a development or staging branch/tree, only with it getting merged to mainline and becoming the primary build system today. I get that it makes reaching feature parity harder, but to not do so relegates anyone that hasn't had a chance to test the new build system to second class citizen status (or at least potentially does so). To be a bit more specific, I can see how energized you might be to get this in place now because you've tested it on a wide array on intel hardware, but I'm guessing if it went in today, people at IBM and Linaro would have to drop active developement to start switching their build environments over to the new system lest they get left out in the cold. I think its more about balacing where the hardship lies here.
As I'm writing this, I wonder if a reasonable compromise couldn't involve the use of CI? That is to say, what if we integrated the build system now-ish, and stood up an official CI instance, that both:
1) built the dpdk in all style configuration, which mandated the use of the old build system (i.e. we implicitly mandate that the current build system stay working, and is not forgotten), and gate patch merges on that result.Quoted 8 lines
2) add a test that any change to a meson file in mainline also include a change to the a
MakefileI'm just spitballing here, but I'm looking for ways to enforce the continued use of the current build system above and beyond a verbal promise to do so. The idea is to ensure that it stays operational and primary to the development of dpdk until build system parity is reached.
Yes, that all makes sense, and I agree that the main issue is how to ensure/enforce the fact that the old build system stays as the main way to build DPDK, until such time as the new system reaches parity. A CI system like you describe would be the ideal case, and we have some parts of that, just not enough I think to satify our needs. On the other hand, while holding the new system in a staging tree till it reaches parity would definitely achieve that objective I think the cost of that is too high.
Right now patchwork reports results of "Intel-compilation". I'm not aware of any immediate plans to expand that - somebody please should if there are. There is also the planned DPDK lab, but I'm not sure of the schedule for that or if it will help in this instance.
For now, I'll prepare a slightly-updated V2 patchset, with a view to getting work started on the build-next tree. While that is going on, we can maybe continue to think about how to put in suitable guard-rails for ensuring old system compatibility for when it's pulled to mainline.
Thanks again for raising your concerns about this. It's easy for me to sometimes push too hard for something I'm enthusiastic about! :-) I do want this migration done properly, so if you have the bandwidth I'd appreciate any reviews or feedback you can give, as the work goes on.
Regards,
/Bruce
Re: [PATCH 01/17] build: add initial infrastructure for meson & ninja builds
In reply to Bruce RichardsonQuoted 6 lines
From: dev [mailto:[email protected]] On Behalf Of Bruce Richardson
Sent: Friday, September 1, 2017 11:04 AM
To: [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: [dpdk-dev] [PATCH 01/17] build: add initial infrastructure for meson & ninja builds
<snip commit message etc>
Quoted 1 line
config/meson.build +0
-0
<snip>
Quoted 5 lines
config/meson.build +5
-0+# 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') +# some libs depend on maths lib
config/meson.build line 46
Quoted 10 lines
config/meson.build +10
-0+add_project_link_arguments('-lm', 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' +]
Feedback from usage while developing new features;
- Mis-matched integer sign comparison doesn't cause a warning
- And -Werror isn't set by default
Adding these as per below fixes things... but for cleanliness "unwanted warnings" should probably be renamed, we want more warnings! :D
# disable any unwanted warnings unwanted_warnings = [ '-Werror', '-Wno-address-of-packed-member', '-Wno-format-truncation', '-Wsign-compare', ]
The performance of Ninja is amazing for testing shared-object builds and version.map changes - feedback is instant. Makes light work of re-checking ABI/API stuff.
Quoted 6 lines
config/meson.build +6
-0+foreach arg: unwanted_warnings + if cc.has_argument(arg) + add_project_arguments(arg, language: 'c') + endif +endforeach +
Re: [PATCH 01/17] build: add initial infrastructure for meson & ninja builds
Quoted 32 lines
-----Original Message-----
From: Van Haaren, Harry
Sent: Friday, September 8, 2017 5:03 PM
To: Richardson, Bruce <[email protected]>; [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: RE: [dpdk-dev] [PATCH 01/17] build: add initial infrastructure for meson & ninja buildsQuoted 6 lines
From: dev [mailto:[email protected]] On Behalf Of Bruce Richardson
Sent: Friday, September 1, 2017 11:04 AM
To: [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: [dpdk-dev] [PATCH 01/17] build: add initial infrastructure for meson & ninja builds<snip commit message etc>
Quoted 1 line
config/meson.build +0
-0<snip>
Quoted 11 lines
config/meson.build +11
-0+# 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') # +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') + +# disable any unwanted warnings +unwanted_warnings = [
Quoted 9 lines
config/meson.build line 46
Quoted 3 lines
config/meson.build +3
-0+ '-Wno-address-of-packed-member', + '-Wno-format-truncation' +]Feedback from usage while developing new features;
- Mis-matched integer sign comparison doesn't cause a warning
- And -Werror isn't set by default
Will fix the former in V2.
For the latter, I already have a patch for it that approximates the behavior of the existing system - i.e. a "developer build" setting, which is "off" by default, except when you are building from a git checkout in which case it defaults to "on". However, I don't think I'll include that in V2, as having Werror when we are not reasonably sure we have fixed all warnings in the code for all supported compilers and distros is a bad idea IMHO.
Quoted 11 lines
Adding these as per below fixes things... but for cleanliness "unwanted warnings" should probably be renamed, we want more warnings! :D
# disable any unwanted warnings unwanted_warnings = [ '-Werror', '-Wno-address-of-packed-member', '-Wno-format-truncation', '-Wsign-compare', ]
Actually, I'd rather keep it as a list of warnings to disable for now. Enabling warnings should be handled differently, as we may only enable specific warnings depending on the build type being done.
/Bruce
Re: [PATCH 01/17] build: add initial infrastructure for meson & ninja builds
Quoted 55 lines · Bruce
Quoted 32 lines
-----Original Message-----
From: Van Haaren, Harry
Sent: Friday, September 8, 2017 5:03 PM
To: Richardson, Bruce <[email protected]>; [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: RE: [dpdk-dev] [PATCH 01/17] build: add initial infrastructure for meson & ninja buildsQuoted 6 lines
From: dev [mailto:[email protected]] On Behalf Of Bruce Richardson
Sent: Friday, September 1, 2017 11:04 AM
To: [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: [dpdk-dev] [PATCH 01/17] build: add initial infrastructure for meson & ninja builds<snip commit message etc>
Quoted 1 line
config/meson.build +0
-0<snip>
Quoted 11 lines
config/meson.build +11
-0+# 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') # +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') + +# disable any unwanted warnings +unwanted_warnings = [Quoted 9 lines
config/meson.build line 46
Quoted 3 lines
config/meson.build +3
-0+ '-Wno-address-of-packed-member', + '-Wno-format-truncation' +]Feedback from usage while developing new features;
- Mis-matched integer sign comparison doesn't cause a warning
- And -Werror isn't set by defaultWill fix the former in V2.
For the latter, I already have a patch for it that approximates the behavior of the existing system - i.e. a "developer build" setting, which is "off" by default, except when you are building from a git checkout in which case it defaults to "on". However, I don't think I'll include that in V2, as having Werror when we are not reasonably sure we have fixed all warnings in the code for all supported compilers and distros is a bad idea IMHO.Quoted 11 lines
Adding these as per below fixes things... but for cleanliness "unwanted warnings" should probably be renamed, we want more warnings! :D
# disable any unwanted warnings unwanted_warnings = [ '-Werror', '-Wno-address-of-packed-member', '-Wno-format-truncation', '-Wsign-compare', ]
Quoted 2 lines
Actually, I'd rather keep it as a list of warnings to disable for now. Enabling warnings should be handled differently, as we may only enable specific warnings depending on the build type being done.
On second-thoughts, for V2 I will do as you suggest and add in the extra warnings '-Wsign-compare' and '-Wcast-qual', to the existing warnings list. It simplifies the code and we can just split them out later if we want them only for certain build targets. For now, I don't think that is needed, so I'll keep it simple.
/Bruce
PATCH 2/17 eal: add eal library to meson build
In reply to Bruce RichardsonSupport building the EAL with meson and ninja. This involves a number of different meson.build files for iterating through all the different subdirectories in the EAL. The library itself will be compiled on build but the header files are only copied from their initial location once "ninja install" is run. Instead, we use meson dependency tracking to ensure that other libraries which use the EAL headers can find them in their original locations.
Note: this does not include building kernel modules on either BSD or Linux
--- config/rte_config.h | 11 ++++ 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/meson.build | 32 ++++++++++ lib/librte_eal/meson.build | 44 +++++++++++++ lib/meson.build | 32 ++++++++++ meson.build | 3 +- 14 files changed, 580 insertions(+), 1 deletion(-) 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/meson.build create mode 100644 lib/librte_eal/meson.build create mode 100644 lib/meson.build
config/rte_config.h +11 -0
@@ -47,4 +47,15 @@#include <rte_build_config.h> +/****** library defines ********/ + +/* 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_ */
lib/librte_eal/bsdapp/eal/meson.build new file +67 -0
67 lines not on this page · raw message
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/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 +48 -0
48 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 +72 -0
72 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 +44 -0
44 lines not on this page · raw message
lib/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('librte_eal')
meson.build +2 -1
@@ -57,7 +57,8 @@ endif global_inc = include_directories('.', 'config') subdir('config') -# TODO build libs and drivers +# build libs and (TODO) drivers +subdir('lib') # TODO build binaries and installable tools
Signature · 1 line
2.13.5
Re: [PATCH 02/17] eal: add eal library to meson build
Quoted 14 lines
From: dev [mailto:[email protected]] On Behalf Of Bruce Richardson
Sent: Friday, September 1, 2017 11:04 AM
To: [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: [dpdk-dev] [PATCH 02/17] eal: add eal library to meson buildSupport building the EAL with meson and ninja. This involves a number of different meson.build files for iterating through all the different subdirectories in the EAL. The library itself will be compiled on build but the header files are only copied from their initial location once "ninja install" is run. Instead, we use meson dependency tracking to ensure that other libraries which use the EAL headers can find them in their original locations.
Quoted 3 lines
Note: this does not include building kernel modules on either BSD or Linux
Signed-off-by Bruce Richardson <[email protected]>
Re: [dpdk-dev, 02/17] eal: add eal library to meson build
In reply to Bruce RichardsonQuoted 106 lines · Bruce Richardson
Support building the EAL with meson and ninja. This involves a number of different meson.build files for iterating through all the different subdirectories in the EAL. The library itself will be compiled on build but the header files are only copied from their initial location once "ninja install" is run. Instead, we use meson dependency tracking to ensure that other libraries which use the EAL headers can find them in their original locations.
Note: this does not include building kernel modules on either BSD or Linux
Signed-off-by Bruce Richardson <[email protected]>Reviewed-by Harry van Haaren <[email protected]>--- config/rte_config.h | 11 ++++ 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/meson.build | 32 ++++++++++ lib/librte_eal/meson.build | 44 +++++++++++++ lib/meson.build | 32 ++++++++++ meson.build | 3 +- 14 files changed, 580 insertions(+), 1 deletion(-) 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/meson.build create mode 100644 lib/librte_eal/meson.build create mode 100644 lib/meson.buildconfig/rte_config.h +11
-0@@ -47,4 +47,15 @@#include <rte_build_config.h> +/****** library defines ********/ + +/* 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_ */ lib/librte_eal/bsdapp/eal/meson.build new file +39
-0@@ -0,0 +1,67 @@ +# 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') +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',
lib/librte_eal/bsdapp/eal/meson.build line 49
Quoted 10 lines
lib/librte_eal/bsdapp/eal/meson.build new file +10
-0+ 'eal_thread.c', + 'eal_timer.c', + 'eal.c', + 'eal_memory.c', + 'eal_pci.c', +] + +eal_extra_link_arg = '-lexecinfo' + +version_map = join_paths(meson.current_source_dir(), 'rte_eal_version.map')
Odd quesion, only for my own education. Does the version map get treated as a dependency here? That is to say, if I update it, does the assocated library get rebuilt? The current build system missed this, and it would be nice if it got included in the new one.
lib/librte_eal/bsdapp/eal/meson.build line 60
Quoted 11 lines
lib/librte_eal/bsdapp/eal/meson.build new file +11
-0+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_depends: version_map, + link_args: [eal_extra_link_arg, + '-Wl,--version-script=' + version_map], + install: true +) +
Neil
Re: [dpdk-dev, 02/17] eal: add eal library to meson build
Quoted 113 lines · Neil Horman
Quoted 112 lines · Bruce Richardson
Support building the EAL with meson and ninja. This involves a number of different meson.build files for iterating through all the different subdirectories in the EAL. The library itself will be compiled on build but the header files are only copied from their initial location once "ninja install" is run. Instead, we use meson dependency tracking to ensure that other libraries which use the EAL headers can find them in their original locations.
Note: this does not include building kernel modules on either BSD or Linux
Signed-off-by Bruce Richardson <[email protected]>Reviewed-by Harry van Haaren <[email protected]>--- config/rte_config.h | 11 ++++ 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/meson.build | 32 ++++++++++ lib/librte_eal/meson.build | 44 +++++++++++++ lib/meson.build | 32 ++++++++++ meson.build | 3 +- 14 files changed, 580 insertions(+), 1 deletion(-) 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/meson.build create mode 100644 lib/librte_eal/meson.build create mode 100644 lib/meson.buildconfig/rte_config.h +11
-0@@ -47,4 +47,15 @@#include <rte_build_config.h> +/****** library defines ********/ + +/* 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_ */ lib/librte_eal/bsdapp/eal/meson.build new file +45
-0@@ -0,0 +1,67 @@ +# 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') +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', +]
Quoted 9 lines
lib/librte_eal/bsdapp/eal/meson.build line 49
Quoted 4 lines
lib/librte_eal/bsdapp/eal/meson.build new file +4
-0+ +eal_extra_link_arg = '-lexecinfo' + +version_map = join_paths(meson.current_source_dir(), 'rte_eal_version.map')Odd quesion, only for my own education. Does the version map get treated as a dependency here? That is to say, if I update it, does the assocated library get rebuilt? The current build system missed this, and it would be nice if it got included in the new one.
That should be the case, as it explicitly called out as link dependency in the library call below.
Quoted 15 lines
lib/librte_eal/bsdapp/eal/meson.build line 60
Quoted 11 lines
lib/librte_eal/bsdapp/eal/meson.build new file +11
-0+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_depends: version_map, + link_args: [eal_extra_link_arg, + '-Wl,--version-script=' + version_map], + install: true +) +Neil
PATCH 3/17 igb_uio: add igb_uio kmod to meson build
In reply to Bruce RichardsonSupport building igb_uio using meson and ninja. For this, we still use the kernel's kbuild system, by calling out to make, since it's safer and easier than trying to reproduce that in meson. A list of suitable file dependencies is given so that we have a reasonable chance of a rebuild when necessary.
--- 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 | 2 ++ 4 files changed, 60 insertions(+) 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 +2 -0
@@ -4,3 +4,5 @@ option('max_numa_nodes', type: 'string', value: '4', description: 'maximum numbe 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') +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.5
Re: [PATCH 03/17] igb_uio: add igb_uio kmod to meson build
Quoted 89 lines · Bruce Richardson
Support building
igb_uiousing meson and ninja. For this, we still use the
kernel's kbuild system, by calling out to make, since it's safer and easier
than trying to reproduce that in meson. A list of suitable file dependencies is given so that we have a reasonable chance of a rebuild when
necessary.Signed-off-by Bruce Richardson <[email protected]>---
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 | 2 ++4 files changed, 60 insertions(+)create mode 100644
lib/librte_eal/linuxapp/igb_uio/Kbuildcreate mode 100644lib/librte_eal/linuxapp/igb_uio/meson.buildlib/librte_eal/linuxapp/igb_uio/Kbuild new file +1
-0@@ -0,0 +1 @@ +obj-m := igb_uio.olib/librte_eal/linuxapp/igb_uio/meson.build new file +6
-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 orwithout
+# modification, are permitted provided that the following conditionslib/librte_eal/linuxapp/igb_uio/meson.build new file +3
-0+# are met: +# +# * Redistributions of source code must retain the abovecopyright
+# 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 inlib/librte_eal/linuxapp/igb_uio/meson.build new file +4
-0+# 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 productsderived
+# from this software without specific prior written permission.lib/librte_eal/linuxapp/igb_uio/meson.build new file +2
-0+# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ANDCONTRIBUTORS
+# "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,lib/librte_eal/linuxapp/igb_uio/meson.build new file +2
-0+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OFUSE,
+# 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.lib/librte_eal/linuxapp/igb_uio/meson.build new file +6
-0+ +mkfile = custom_target('igb_uio_makefile', + output: 'Makefile', + command: ['touch', '@OUTPUT@']) + +custom_target('igb_uio',
lib/librte_eal/linuxapp/igb_uio/meson.build line 46
Quoted 10 lines
lib/librte_eal/linuxapp/igb_uio/meson.build new file +10
-0+ input: ['igb_uio.c', 'Kbuild'], + output: 'igb_uio.ko', + command: ['make', '-C', kernel_dir, + 'M=' + meson.current_build_dir(), + 'src=' + meson.current_source_dir(), + 'EXTRA_CFLAGS=-I' + meson.current_source_dir() + + '/../../common/include', + 'modules'], + depends: mkfile, + depend_files: [join_paths(kernel_dir, 'Kconfig')],
Can this be made optional somehow?
There's no build/Kconfig on Debian:
$ ls /lib/modules/4.9.0-3-amd64/build arch include Makefile Module.symvers scripts
But the build works fine without that depend_files line.
Quoted 38 lines
lib/librte_eal/linuxapp/igb_uio/meson.build new file +1
-0+ build_by_default: true)lib/librte_eal/linuxapp/meson.build +0
-0@@ -30,3 +30,13 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCHDAMAGE.
subdir('eal')lib/librte_eal/linuxapp/meson.build +5
-0+ +if get_option('enable_kmods') + kernel_dir = get_option('kernel_dir') + if kernel_dir == '' + kernel_version = run_command('uname', '-r').stdout().strip()
lib/librte_eal/linuxapp/meson.build +1
-0+ kernel_dir = '/lib/modules/' + kernel_version +'/build'
lib/librte_eal/linuxapp/meson.build +4
-0+ endif + + subdir('igb_uio') +endifmeson_options.txt +0
-0@@ -4,3 +4,5 @@ option('max_numa_nodes', type: 'string', value: '4',description: 'maximum numbe
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') +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 · 2 lines
Kind regards, Luca Boccassi
Re: [PATCH 03/17] igb_uio: add igb_uio kmod to meson build
Quoted 103 lines · Luca Boccassi
Quoted 89 lines · Bruce Richardson
Support building
igb_uiousing meson and ninja. For this, we still use the
kernel's kbuild system, by calling out to make, since it's safer and easier
than trying to reproduce that in meson. A list of suitable file dependencies is given so that we have a reasonable chance of a rebuild when
necessary.Signed-off-by Bruce Richardson <[email protected]>---
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 | 2 ++4 files changed, 60 insertions(+)create mode 100644
lib/librte_eal/linuxapp/igb_uio/Kbuildcreate mode 100644lib/librte_eal/linuxapp/igb_uio/meson.buildlib/librte_eal/linuxapp/igb_uio/Kbuild new file +1
-0@@ -0,0 +1 @@ +obj-m := igb_uio.olib/librte_eal/linuxapp/igb_uio/meson.build new file +6
-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 orwithout
+# modification, are permitted provided that the following conditionslib/librte_eal/linuxapp/igb_uio/meson.build new file +3
-0+# are met: +# +# * Redistributions of source code must retain the abovecopyright
+# 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 inlib/librte_eal/linuxapp/igb_uio/meson.build new file +4
-0+# 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 productsderived
+# from this software without specific prior written permission.lib/librte_eal/linuxapp/igb_uio/meson.build new file +2
-0+# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ANDCONTRIBUTORS
+# "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,lib/librte_eal/linuxapp/igb_uio/meson.build new file +2
-0+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OFUSE,
+# 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.lib/librte_eal/linuxapp/igb_uio/meson.build new file +6
-0+ +mkfile = custom_target('igb_uio_makefile', + output: 'Makefile', + command: ['touch', '@OUTPUT@']) + +custom_target('igb_uio',lib/librte_eal/linuxapp/igb_uio/meson.build line 46
Quoted 10 lines
lib/librte_eal/linuxapp/igb_uio/meson.build new file +10
-0+ input: ['igb_uio.c', 'Kbuild'], + output: 'igb_uio.ko', + command: ['make', '-C', kernel_dir, + 'M=' + meson.current_build_dir(), + 'src=' + meson.current_source_dir(), + 'EXTRA_CFLAGS=-I' + meson.current_source_dir() + + '/../../common/include', + 'modules'], + depends: mkfile, + depend_files: [join_paths(kernel_dir, 'Kconfig')],Can this be made optional somehow?
Quoted 7 lines
There's no build/Kconfig on Debian:
$ ls /lib/modules/4.9.0-3-amd64/build arch include Makefile Module.symvers scriptsBut the build works fine without that
depend_filesline.
Yep, definitely can be removed. I was just looking for some way to give meson the smarts to know when the kmod needed to be recompiled, and it seemed a likely candidate to watch for changes.
/Bruce
Re: [PATCH 03/17] igb_uio: add igb_uio kmod to meson build
Quoted 123 lines · Bruce Richardson
Quoted 114 lines · Luca Boccassi
Quoted 100 lines · Bruce Richardson
Support building
igb_uiousing meson and ninja. For this, we still
use the
kernel's kbuild system, by calling out to make, since it's safer and
easier
than trying to reproduce that in meson. A list of suitable file dependencies is given so that we have a reasonable chance of a rebuild when
necessary.Signed-off-by Bruce Richardson <[email protected]>---
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 | 2 ++4 files changed, 60 insertions(+)create mode 100644
lib/librte_eal/linuxapp/igb_uio/Kbuildcreate mode 100644lib/librte_eal/linuxapp/igb_uio/meson.buildlib/librte_eal/linuxapp/igb_uio/Kbuild new file +1
-0@@ -0,0 +1 @@ +obj-m := igb_uio.olib/librte_eal/linuxapp/igb_uio/meson.build new file +6
-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 orwithout
+# modification, are permitted provided that the following conditionslib/librte_eal/linuxapp/igb_uio/meson.build new file +3
-0+# are met: +# +# * Redistributions of source code must retain the abovecopyright
+# 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 thelib/librte_eal/linuxapp/igb_uio/meson.build new file +2
-0+# distribution. +# * Neither the name of Intel Corporation nor the names ofits
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.lib/librte_eal/linuxapp/igb_uio/meson.build new file +2
-0+# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ANDCONTRIBUTORS
+# "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.lib/librte_eal/linuxapp/igb_uio/meson.build new file +6
-0+ +mkfile = custom_target('igb_uio_makefile', + output: 'Makefile', + command: ['touch', '@OUTPUT@']) + +custom_target('igb_uio',lib/librte_eal/linuxapp/igb_uio/meson.build line 46
Quoted 10 lines
lib/librte_eal/linuxapp/igb_uio/meson.build new file +10
-0+ input: ['igb_uio.c', 'Kbuild'], + output: 'igb_uio.ko', + command: ['make', '-C', kernel_dir, + 'M=' + meson.current_build_dir(), + 'src=' + meson.current_source_dir(), + 'EXTRA_CFLAGS=-I' + meson.current_source_dir() + + '/../../common/include', + 'modules'], + depends: mkfile, + depend_files: [join_paths(kernel_dir, 'Kconfig')],Can this be made optional somehow?
Quoted 7 lines
There's no build/Kconfig on Debian:
$ ls /lib/modules/4.9.0-3-amd64/build arch include Makefile Module.symvers scriptsBut the build works fine without that
depend_filesline.
Quoted 7 lines
Yep, definitely can be removed. I was just looking for some way to give
meson the smarts to know when the kmod needed to be recompiled, and it
seemed a likely candidate to watch for changes./Bruce
Thanks. This is the content of build/ and the parent directory in Debian, in case you want to try and find some common ground:
$ ls -la /lib/modules/4.9.0-3-amd64/ total 4120 drwxr-xr-x 4 root root 4096 Aug 15 11:13 . drwxr-xr-x 4 root root 4096 Aug 25 17:55 .. lrwxrwxrwx 1 root root 36 May 2 16:21 build -> /usr/src/linux- headers-4.9.0-3-amd64 drwxr-xr-x 12 root root 4096 May 17 18:58 kernel -rw-r--r-- 1 root root 1009588 Aug 15 11:13 modules.alias -rw-r--r-- 1 root root 968576 Aug 15 11:13 modules.alias.bin -rw-r--r-- 1 root root 4018 Aug 6 05:24 modules.builtin -rw-r--r-- 1 root root 5327 Aug 15 11:13 modules.builtin.bin -rw-r--r-- 1 root root 400037 Aug 15 11:13 modules.dep -rw-r--r-- 1 root root 551081 Aug 15 11:13 modules.dep.bin -rw-r--r-- 1 root root 402 Aug 15 11:13 modules.devname -rw-r--r-- 1 root root 133512 Aug 6 05:24 modules.order -rw-r--r-- 1 root root 523 Aug 15 11:13 modules.softdep -rw-r--r-- 1 root root 495231 Aug 15 11:13 modules.symbols -rw-r--r-- 1 root root 610575 Aug 15 11:13 modules.symbols.bin lrwxrwxrwx 1 root root 37 May 2 16:21 source -> /usr/src/linux- headers-4.9.0-3-common drwxr-xr-x 3 root root 4096 May 17 18:58 updates
$ ls -la /lib/modules/4.9.0-3-amd64/build/ total 1460 drwxr-xr-x 4 root root 4096 Aug 7 10:27 . drwxr-xr-x 9 root root 4096 Aug 25 17:55 .. drwxr-xr-x 3 root root 4096 May 17 18:58 arch -rw-r--r-- 1 root root 186386 Aug 6 05:24 .config drwxr-xr-x 4 root root 4096 May 17 18:58 include -rw-r--r-- 1 root root 242 Aug 6 05:24 .kernelvariables -rw-r--r-- 1 root root 304 Aug 6 05:24 Makefile -rw-r--r-- 1 root root 1278637 Aug 6 05:24 Module.symvers lrwxrwxrwx 1 root root 34 May 2 16:21 scripts -> ../../lib/linux- kbuild-4.9/scripts
Signature · 2 lines
Kind regards, Luca Boccassi
Re: [PATCH 03/17] igb_uio: add igb_uio kmod to meson build
In reply to Bruce RichardsonQuoted 6 lines
From: dev [mailto:[email protected]] On Behalf Of Bruce Richardson
Sent: Friday, September 1, 2017 11:04 AM
To: [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: [dpdk-dev] [PATCH 03/17]igb_uio: addigb_uiokmod to meson build
Quoted 7 lines
Support building
igb_uiousing meson and ninja. For this, we still use the kernel's kbuild system, by calling out to make, since it's safer and easier than trying to reproduce that in meson. A list of suitable file dependencies is given so that we have a reasonable chance of a rebuild when necessary.Signed-off-by Bruce Richardson <[email protected]>
PATCH 4/17 build: add DPDK libraries to build
In reply to Bruce RichardsonAdd non-EAL libraries to DPDK build. The compat lib is a special case, along with the previously-added EAL, but all other libs can be build using the same set of commands, where the individual meson.build files only need to specify their dependencies, source files, header files and ABI versions.
--- config/rte_config.h | 36 ++++++++++++++++++++ lib/librte_acl/meson.build | 59 ++++++++++++++++++++++++++++++++ lib/librte_bitratestats/meson.build | 34 +++++++++++++++++++ lib/librte_cfgfile/meson.build | 34 +++++++++++++++++++ lib/librte_cmdline/meson.build | 55 ++++++++++++++++++++++++++++++ lib/librte_compat/meson.build | 36 ++++++++++++++++++++ lib/librte_cryptodev/meson.build | 40 ++++++++++++++++++++++ lib/librte_distributor/meson.build | 39 +++++++++++++++++++++ lib/librte_efd/meson.build | 34 +++++++++++++++++++ lib/librte_ether/meson.build | 45 +++++++++++++++++++++++++ lib/librte_eventdev/meson.build | 36 ++++++++++++++++++++ lib/librte_gro/meson.build | 34 +++++++++++++++++++ lib/librte_hash/meson.build | 45 +++++++++++++++++++++++++ lib/librte_ip_frag/meson.build | 39 +++++++++++++++++++++ lib/librte_jobstats/meson.build | 33 ++++++++++++++++++ lib/librte_kni/meson.build | 38 +++++++++++++++++++++ lib/librte_kvargs/meson.build | 34 +++++++++++++++++++ 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 | 33 ++++++++++++++++++ lib/librte_metrics/meson.build | 33 ++++++++++++++++++ lib/librte_net/meson.build | 45 +++++++++++++++++++++++++ lib/librte_pdump/meson.build | 34 +++++++++++++++++++ lib/librte_pipeline/meson.build | 35 +++++++++++++++++++ lib/librte_port/meson.build | 58 ++++++++++++++++++++++++++++++++ lib/librte_power/meson.build | 37 ++++++++++++++++++++ lib/librte_reorder/meson.build | 34 +++++++++++++++++++ lib/librte_ring/meson.build | 33 ++++++++++++++++++ lib/librte_sched/meson.build | 36 ++++++++++++++++++++ lib/librte_table/meson.build | 52 ++++++++++++++++++++++++++++ lib/librte_timer/meson.build | 33 ++++++++++++++++++ lib/librte_vhost/meson.build | 39 +++++++++++++++++++++ lib/meson.build | 67 +++++++++++++++++++++++++++++++++++++ 35 files changed, 1380 insertions(+) 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_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 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
config/rte_config.h +36 -0
@@ -58,4 +58,40 @@#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 + +/* 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 +#endif /* _RTE_CONFIG_H_ */
lib/librte_acl/meson.build new file +59 -0
59 lines not on this page · raw message
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 += ['ethdev', 'metrics']
lib/librte_cfgfile/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. + +version = 2 +sources = files('rte_cfgfile.c') +headers = files('rte_cfgfile.h')
lib/librte_cmdline/meson.build new file +55 -0
55 lines not on this page · raw message
lib/librte_compat/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. + + +install_headers('rte_compat.h') + +set_variable('dep_rte_compat', + declare_dependency(include_directories: include_directories('.')))
lib/librte_cryptodev/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. + +version = 3 +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 += ['kvargs', 'mbuf']
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 += ['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 += ['ring', 'hash']
lib/librte_ether/meson.build new file +45 -0
45 lines not on this page · raw message
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 += ['ring']
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 += ['ethdev']
lib/librte_hash/meson.build new file +45 -0
45 lines not on this page · raw message
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 += ['ethdev', 'hash']
lib/librte_jobstats/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_jobstats.c') +headers = files('rte_jobstats.h')
lib/librte_kni/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. + +if host_machine.system() != 'linux' + build = false +endif +version = 2 +sources = files('rte_kni.c') +headers = files('rte_kni.h') +deps += ['ethdev']
lib/librte_kvargs/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. + +version = 1 +sources = files('rte_kvargs.c') +headers = files('rte_kvargs.h')
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 += ['metrics', 'ethdev']
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 += ['compat']
lib/librte_mbuf/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 = 3 +sources = files('rte_mbuf.c', 'rte_mbuf_ptype.c') +headers = files('rte_mbuf.h', 'rte_mbuf_ptype.h') +deps += ['mempool'] +
lib/librte_mempool/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_mempool.c', 'rte_mempool_ops.c') +headers = files('rte_mempool.h') +deps += ['ring']
lib/librte_meter/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_meter.c') +headers = files('rte_meter.h')
lib/librte_metrics/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_metrics.c') +headers = files('rte_metrics.h')
lib/librte_net/meson.build new file +45 -0
45 lines not on this page · raw message
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 += ['ethdev']
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_power/meson.build new file +37 -0
@@ -0,0 +1,37 @@ +# 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('rte_power.c', 'rte_power_acpi_cpufreq.c', + 'rte_power_kvm_vm.c', 'guest_channel.c') +headers = files('rte_power.h')
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 += ['mbuf']
lib/librte_ring/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_ring.c') +headers = files('rte_ring.h')
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_table/meson.build new file +52 -0
52 lines not on this page · raw message
lib/librte_timer/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_timer.c') +headers = files('rte_timer.h')
lib/librte_vhost/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. + +if host_machine.system() != 'linux' + build = false +endif +version = 4 +sources = files('fd_man.c', 'socket.c', 'vhost.c', 'vhost_user.c', + 'virtio_net.c') +headers = files('rte_vhost.h') +deps += ['ethdev']
lib/meson.build +67 -0
71 lines not on this page · raw message
Signature · 1 line
2.13.5
Re: [PATCH 04/17] build: add DPDK libraries to build
Quoted 6 lines
From: dev [mailto:[email protected]] On Behalf Of Bruce Richardson
Sent: Friday, September 1, 2017 11:04 AM
To: [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: [dpdk-dev] [PATCH 04/17] build: add DPDK libraries to build
Quoted 6 lines
Add non-EAL libraries to DPDK build. The compat lib is a special case, along with the previously-added EAL, but all other libs can be build using the same set of commands, where the individual meson.build files only need to specify their dependencies, source files, header files and ABI versions.
Signed-off-by Bruce Richardson <[email protected]>
<snip>
In librte_acl/meson.build:
Quoted 18 lines
lib/librte_acl/meson.build new file +18
-0+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') + +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'
lib/librte_acl/meson.build line 59
Quoted 10 lines
lib/librte_acl/meson.build new file +10
-0+ 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
In future this could be split out to some sort of AVX helper, to avoid it becoming copy/paste prone to detect AVX features from libraries.
<huge snip of almost all libraries meson.build files>
Quoted 26 lines
lib/meson.build +19
-0@@ -29,4 +29,71 @@ # (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, and compat, just a header subdir('librte_eal') +subdir('librte_compat') + +# process all libraries equally, as far as possible +# "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. +libraries = ['ring', 'mempool', 'mbuf', 'net', 'ether', # core + 'metrics', # bitrate/latency stats depends on this + 'hash', # efd depends on this + 'kvargs', # cryptodev depends on this + 'acl', 'bitratestats', 'cfgfile', 'cmdline', 'cryptodev', + 'distributor', 'efd', 'eventdev', 'gro', 'ip_frag', 'jobstats', + 'kni', 'latencystats', 'lpm', 'meter', 'power', 'pdump', + 'reorder', 'sched', 'timer', 'vhost', + # add pkt framework libs which use other libs from above + 'port', 'table', 'pipeline']
lib/meson.build line 61
Quoted 10 lines
lib/meson.build +10
-0+ +foreach l:libraries + build = true + name = l + version = 1 + sources = [] + headers = [] + cflags = [] + objs = [] # other object files to link against, used e.g. for instruction- + # optimized versions of code
Nitpick: comment above could be moved to be before the objs[] line, consistent like below. I'll send a patch once this stuff is in next-build :D
Quoted 39 lines
lib/meson.build +38
-1+ # use "deps" for internal DPDK dependencies, and "ext_deps" for + # external package/library requirements + deps = ['eal'] + ext_deps = [] + + dir_name = 'librte_' + l + subdir(dir_name) + + if build + dpdk_conf.set('RTE_LIBRTE_' + name.to_upper(), 1) + install_headers(headers) + + dep_objs = ext_deps + foreach d:deps + dep_objs += [get_variable('dep_rte_' + d)] + endforeach + + version_map = '@0@/@1@/rte_@2@_version.map'.format( + meson.current_source_dir(), dir_name, name) + libname = 'rte_' + name + 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, + link_depends: version_map, + version: '@[email protected]'.format(version), + install: true) + dep = declare_dependency(link_with: lib, + include_directories: include_directories(dir_name), + dependencies: dep_objs) + set_variable('dep_' + libname, dep) + + dpdk_libraries = [lib] + dpdk_libraries + endif +endforeach --
Quoted 1 line
2.13.5
Re: [PATCH 04/17] build: add DPDK libraries to build
Quoted 40 lines · Harry
Quoted 6 lines
From: dev [mailto:[email protected]] On Behalf Of Bruce Richardson
Sent: Friday, September 1, 2017 11:04 AM
To: [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: [dpdk-dev] [PATCH 04/17] build: add DPDK libraries to buildQuoted 6 lines
Add non-EAL libraries to DPDK build. The compat lib is a special case, along with the previously-added EAL, but all other libs can be build using the same set of commands, where the individual meson.build files only need to specify their dependencies, source files, header files and ABI versions.
Signed-off-by Bruce Richardson <[email protected]><snip>
In librte_acl/meson.build:
Quoted 23 lines
lib/librte_acl/meson.build new file +23
-0+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') + +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')
Quoted 9 lines
lib/librte_acl/meson.build line 59
Quoted 5 lines
lib/librte_acl/meson.build new file +5
-0+ objs += avx2_tmplib.extract_objects('acl_run_avx2.c') + cflags += '-DCC_AVX2_SUPPORT' + endif + +endifIn future this could be split out to some sort of AVX helper, to avoid it becoming copy/paste prone to detect AVX features from libraries.
We can indeed look at that in future, using native meson support I hope, from the SIMD module: http://mesonbuild.com/Simd-module.html
Right now, though, I think this is the only place we need this, so it's not an issue.
/Bruce
PATCH 5/17 build: add buildtools to meson build
In reply to Bruce RichardsonAdd the buildtools folder, and more specifically the pmdinfogen binary to the meson and ninja build. This will be needed for building the PMDs in the driver folder later, as the pmd info output from the tool needs to be included in those libs.
--- buildtools/gen-pmdinfo-cfile.sh | 41 +++++++++++++++++++++++++++++++++++++ buildtools/meson.build | 34 +++++++++++++++++++++++++++++++ buildtools/pmdinfogen/meson.build | 43 +++++++++++++++++++++++++++++++++++++++ meson.build | 1 + 4 files changed, 119 insertions(+) create mode 100755 buildtools/gen-pmdinfo-cfile.sh create mode 100644 buildtools/meson.build create mode 100644 buildtools/pmdinfogen/meson.build
buildtools/gen-pmdinfo-cfile.sh new file +41 -0
@@ -0,0 +1,41 @@ +#! /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. + + +arfile=$1 +output=$2 +pmdinfogen=$3 + +tmp_o=${output%.c.pmd.c}.tmp.o + +ar p $arfile > $tmp_o && \ + $pmdinfogen $tmp_o $output
buildtools/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. + +subdir('pmdinfogen') + +pmdinfo = find_program('gen-pmdinfo-cfile.sh')
buildtools/pmdinfogen/meson.build new file +43 -0
43 lines not on this page · raw message
meson.build +1 -0
@@ -59,6 +59,7 @@ subdir('config') # build libs and (TODO) drivers subdir('lib') +subdir('buildtools') # TODO build binaries and installable tools
Signature · 1 line
2.13.5
Re: [PATCH 05/17] build: add buildtools to meson build
Quoted 12 lines
From: dev [mailto:[email protected]] On Behalf Of Bruce Richardson
Sent: Friday, September 1, 2017 11:04 AM
To: [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: [dpdk-dev] [PATCH 05/17] build: add buildtools to meson buildAdd the buildtools folder, and more specifically the pmdinfogen binary to the meson and ninja build. This will be needed for building the PMDs in the driver folder later, as the pmd info output from the tool needs to be included in those libs.
Signed-off-by Bruce Richardson <[email protected]>
<snip>
buildtools/pmdinfogen/meson.build line 38
Quoted 7 lines
buildtools/pmdinfogen/meson.build new file +7
-0+error_cflags = ['-Wno-maybe-uninitialized'] +cflags = [] +foreach arg: error_cflags + if cc.has_argument(arg) + cflags += arg + endif +endforeach
Removing the '-Wno-maybe-uninitialized' still compiles fine here with Clang. GCC prints a warning... this could probably be fixed in "pmdinfogen.c" in future, but this should not be done in the build-next branch, but patched in mainline and then updated in the meson build.
Quoted 18 lines
buildtools/pmdinfogen/meson.build new file +5
-0+ +pmdinfogen = executable('pmdinfogen', + 'pmdinfogen.c', + include_directories: eal_inc, + c_args: cflags)meson.build +1
-1@@ -59,6 +59,7 @@ subdir('config') # build libs and (TODO) drivers subdir('lib') +subdir('buildtools') # TODO build binaries and installable tools --
Quoted 1 line
2.13.5
PATCH 6/17 build: add infrastructure for building PMDs
In reply to Bruce RichardsonAdd in the top-level drivers meson.build file to start adding in building of PMDs. Since all PMDs are built in pretty much the same way, the logic for building each PMD, including extracting the pmdinfo, is included in the top level build file. This means that each individual driver class only needs to specify its default dependencies and a few naming conventions, and each driver only needs to specify it's source files, headers, etc.
--- drivers/meson.build | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++ meson.build | 3 +- 2 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 drivers/meson.build
drivers/meson.build new file +121 -0
@@ -0,0 +1,121 @@ +# 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. + +driver_classes = [] + +foreach class:driver_classes + drivers = [] + std_deps = [] + config_flag_fmt = '' # format string used to set the value in dpdk_conf + driver_name_fmt = '' # format string for driver name, used to name + # the library, the dependency and to find the + # version file for linking + + subdir(class) + + foreach drv:drivers + drv_path = join_paths(class, drv) + + # 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_path)] + # 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 = [] + pkgconfig_extra_libs = [] + + # pull in driver directory which should assign to each of the above + subdir(drv_path) + + if build + dpdk_conf.set(config_flag_fmt.format(drv.to_upper()),1) + + # get dependency objs from strings + dep_objs = [] + foreach d:deps + dep_objs += [get_variable('dep_rte_' + d)] + endforeach + dep_objs += ext_deps + dpdk_extra_ldflags += pkgconfig_extra_libs + + # 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 = driver_name_fmt.format(drv) + version_map = '@0@/@1@/@2@_version.map'.format( + meson.current_source_dir(), + drv_path, drv_name) + 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) + + 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_@0@'.format(drv_name), + declare_dependency(link_with: lib, + include_directories: includes, + dependencies: dep_objs)) + endif # build + endforeach +endforeach
meson.build +2 -1
@@ -57,9 +57,10 @@ endif global_inc = include_directories('.', 'config') subdir('config') -# build libs and (TODO) drivers +# build libs and drivers subdir('lib') subdir('buildtools') +subdir('drivers') # TODO build binaries and installable tools
Signature · 1 line
2.13.5
Re: [PATCH 06/17] build: add infrastructure for building PMDs
Quoted 6 lines
From: dev [mailto:[email protected]] On Behalf Of Bruce Richardson
Sent: Friday, September 1, 2017 11:04 AM
To: [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: [dpdk-dev] [PATCH 06/17] build: add infrastructure for building PMDs
Quoted 8 lines
Add in the top-level drivers meson.build file to start adding in building of PMDs. Since all PMDs are built in pretty much the same way, the logic for building each PMD, including extracting the pmdinfo, is included in the top level build file. This means that each individual driver class only needs to specify its default dependencies and a few naming conventions, and each driver only needs to specify it's source files, headers, etc.
Signed-off-by Bruce Richardson <[email protected]>
PATCH 7/17 drivers/mempool: add SW mempool drivers to meson build
In reply to Bruce RichardsonWith build infrastructure in place, add in mempool drivers to the build.
--- drivers/mempool/meson.build | 35 +++++++++++++++++++++++++++++++++++ drivers/mempool/ring/meson.build | 32 ++++++++++++++++++++++++++++++++ drivers/mempool/stack/meson.build | 32 ++++++++++++++++++++++++++++++++ drivers/meson.build | 2 +- 4 files changed, 100 insertions(+), 1 deletion(-) 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 +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. + +drivers = ['ring', 'stack'] +std_deps = ['mempool'] +config_flag_fmt = 'RTE_LIBRTE_@0@_MEMPOOL' +driver_name_fmt = 'rte_mempool_@0@'
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 -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. -driver_classes = [] +driver_classes = ['mempool'] foreach class:driver_classes drivers = []
Signature · 1 line
2.13.5
Re: [PATCH 07/17] drivers/mempool: add SW mempool drivers to meson build
Quoted 9 lines
From: dev [mailto:[email protected]] On Behalf Of Bruce Richardson
Sent: Friday, September 1, 2017 11:04 AM
To: [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: [dpdk-dev] [PATCH 07/17]drivers/mempool: add SW mempool drivers to meson buildWith build infrastructure in place, add in mempool drivers to the build.
Signed-off-by Bruce Richardson <[email protected]>
Re: [PATCH 07/17] drivers/mempool: add SW mempool drivers to meson build
In reply to Bruce RichardsonQuoted 9 lines
From: dev [mailto:[email protected]] On Behalf Of Bruce Richardson
Sent: Friday, September 1, 2017 11:04 AM
To: [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: [dpdk-dev] [PATCH 07/17]drivers/mempool: add SW mempool drivers to meson buildWith build infrastructure in place, add in mempool drivers to the build.
Signed-off-by Bruce Richardson <[email protected]>
PATCH 8/17 drivers/crypto: add crypto drv class and null PMD to meson
In reply to Bruce RichardsonAdd in a crypto driver class, and implement compiling the null crypto instance.
--- drivers/crypto/meson.build | 35 +++++++++++++++++++++++++++++++++++ drivers/crypto/null/meson.build | 33 +++++++++++++++++++++++++++++++++ drivers/meson.build | 13 +++++++------ 3 files changed, 75 insertions(+), 6 deletions(-) create mode 100644 drivers/crypto/meson.build create mode 100644 drivers/crypto/null/meson.build
drivers/crypto/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. + +drivers = ['null'] +std_deps = ['cryptodev'] # cryptodev pulls in all other needed deps +config_flag_fmt = 'RTE_LIBRTE_@0@_PMD' +driver_name_fmt = 'rte_pmd_@0@'
drivers/crypto/null/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. + +name = 'null_crypto' +sources = files('null_crypto_pmd.c', 'null_crypto_pmd_ops.c')
drivers/meson.build +7 -6
@@ -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. -driver_classes = ['mempool'] +driver_classes = ['crypto', 'mempool'] foreach class:driver_classes drivers = []
@@ -46,6 +46,7 @@ foreach class:driver_classes # set up empty variables used for build build = true # set to false to disable, e.g. missing deps + name = drv version = 1 sources = [] objs = []
@@ -65,7 +66,7 @@ foreach class:driver_classes subdir(drv_path) if build - dpdk_conf.set(config_flag_fmt.format(drv.to_upper()),1) + dpdk_conf.set(config_flag_fmt.format(name.to_upper()),1) # get dependency objs from strings dep_objs = []
@@ -92,11 +93,11 @@ foreach class:driver_classes endforeach # now build the driver itself, and add to the drivers list - drv_name = driver_name_fmt.format(drv) + lib_name = driver_name_fmt.format(name) version_map = '@0@/@1@/@2@_version.map'.format( meson.current_source_dir(), - drv_path, drv_name) - lib = library(drv_name, + drv_path, lib_name) + lib = library(lib_name, sources, objects: objs, include_directories: includes,
@@ -112,7 +113,7 @@ foreach class:driver_classes # 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_@0@'.format(drv_name), + set_variable('dep_@0@'.format(lib_name), declare_dependency(link_with: lib, include_directories: includes, dependencies: dep_objs))
Signature · 1 line
2.13.5
Re: [PATCH 08/17] drivers/crypto: add crypto drv class and null PMD to meson
Quoted 10 lines
From: dev [mailto:[email protected]] On Behalf Of Bruce Richardson
Sent: Friday, September 1, 2017 11:04 AM
To: [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: [dpdk-dev] [PATCH 08/17]drivers/crypto: add crypto drv class and null PMD to mesonAdd in a crypto driver class, and implement compiling the null crypto instance.
Signed-off-by Bruce Richardson <[email protected]>
PATCH 9/17 crypto/openssl: add driver to meson build
In reply to Bruce Richardson--- drivers/crypto/meson.build | 2 +- drivers/crypto/openssl/meson.build | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 drivers/crypto/openssl/meson.build
drivers/crypto/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. -drivers = ['null'] +drivers = ['null', 'openssl'] std_deps = ['cryptodev'] # cryptodev pulls in all other needed deps config_flag_fmt = 'RTE_LIBRTE_@0@_PMD' driver_name_fmt = 'rte_pmd_@0@'
drivers/crypto/openssl/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. + +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 += dep +pkgconfig_extra_libs += '-lcrypto'
Signature · 1 line
2.13.5
Re: [PATCH 09/17] crypto/openssl: add driver to meson build
Quoted 7 lines
From: dev [mailto:[email protected]] On Behalf Of Bruce Richardson
Sent: Friday, September 1, 2017 11:04 AM
To: [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: [dpdk-dev] [PATCH 09/17]crypto/openssl: add driver to meson buildSigned-off-by Bruce Richardson <[email protected]>
Re: [PATCH 09/17] crypto/openssl: add driver to meson build
In reply to Bruce RichardsonQuoted 7 lines
From: dev [mailto:[email protected]] On Behalf Of Bruce Richardson
Sent: Friday, September 1, 2017 11:04 AM
To: [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: [dpdk-dev] [PATCH 09/17]crypto/openssl: add driver to meson buildSigned-off-by Bruce Richardson <[email protected]>
PATCH 10/17 crypto/qat: add driver to meson build
In reply to Bruce Richardson--- config/rte_config.h | 8 ++++++++ drivers/crypto/meson.build | 2 +- drivers/crypto/qat/meson.build | 41 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 drivers/crypto/qat/meson.build
config/rte_config.h +8 -0
@@ -94,4 +94,12 @@#define RTE_SCHED_PORT_N_GRINDERS 8#undef RTE_SCHED_VECTOR +/****** driver defines ********/ + +/* +* 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 +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. -drivers = ['null', 'openssl'] +drivers = ['qat', 'null', 'openssl'] std_deps = ['cryptodev'] # cryptodev pulls in all other needed deps config_flag_fmt = 'RTE_LIBRTE_@0@_PMD' driver_name_fmt = 'rte_pmd_@0@'
drivers/crypto/qat/meson.build new file +41 -0
41 lines not on this page · raw message
Signature · 1 line
2.13.5
Re: [PATCH 10/17] crypto/qat: add driver to meson build
Quoted 7 lines
From: dev [mailto:[email protected]] On Behalf Of Bruce Richardson
Sent: Friday, September 1, 2017 11:04 AM
To: [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: [dpdk-dev] [PATCH 10/17]crypto/qat: add driver to meson buildSigned-off-by Bruce Richardson <[email protected]>
PATCH 11/17 drivers/net: add net driver support to meson build
In reply to Bruce Richardson--- drivers/meson.build | 2 +- drivers/net/meson.build | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 drivers/net/meson.build
drivers/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. -driver_classes = ['crypto', 'mempool'] +driver_classes = ['crypto', 'mempool', 'net'] foreach class:driver_classes drivers = []
drivers/net/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. + +drivers = [] +std_deps = ['ethdev', 'kvargs'] # 'ethdev' also pulls in mbuf, net, eal etc +config_flag_fmt = 'RTE_LIBRTE_@0@_PMD' +driver_name_fmt = 'rte_pmd_@0@'
Signature · 1 line
2.13.5
Re: [PATCH 11/17] drivers/net: add net driver support to meson build
Quoted 7 lines
From: dev [mailto:[email protected]] On Behalf Of Bruce Richardson
Sent: Friday, September 1, 2017 11:04 AM
To: [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: [dpdk-dev] [PATCH 11/17]drivers/net: add net driver support to meson buildSigned-off-by Bruce Richardson <[email protected]>
PATCH 12/17 drivers/net: add set of vdev PMDs to build
In reply to Bruce RichardsonAdd the af_packet, null, pcap and ring PMDs to the meson build.
--- config/rte_config.h | 4 ++++ drivers/net/af_packet/meson.build | 35 +++++++++++++++++++++++++++++++++ drivers/net/meson.build | 2 +- drivers/net/null/meson.build | 32 ++++++++++++++++++++++++++++++ drivers/net/pcap/meson.build | 41 +++++++++++++++++++++++++++++++++++++++ drivers/net/ring/meson.build | 33 +++++++++++++++++++++++++++++++ 6 files changed, 146 insertions(+), 1 deletion(-) create mode 100644 drivers/net/af_packet/meson.build create mode 100644 drivers/net/null/meson.build create mode 100644 drivers/net/pcap/meson.build create mode 100644 drivers/net/ring/meson.build
config/rte_config.h +4 -0
@@ -102,4 +102,8 @@*/ #define RTE_QAT_PMD_MAX_NB_SESSIONS 2048 +/* Ring net PMD settings */ +#define RTE_PMD_RING_MAX_RX_RINGS 16 +#define RTE_PMD_RING_MAX_TX_RINGS 16 +#endif /* _RTE_CONFIG_H_ */
drivers/net/af_packet/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. + +if host_machine.system() != 'linux' + build = false +endif +sources = files('rte_eth_af_packet.c')
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. -drivers = [] +drivers = ['af_packet', 'null', 'pcap', 'ring'] std_deps = ['ethdev', 'kvargs'] # 'ethdev' also pulls in mbuf, net, eal etc config_flag_fmt = 'RTE_LIBRTE_@0@_PMD' driver_name_fmt = 'rte_pmd_@0@'
drivers/net/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('rte_eth_null.c')
drivers/net/pcap/meson.build new file +41 -0
41 lines not on this page · raw message
drivers/net/ring/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_eth_ring.c') +install_headers('rte_eth_ring.h')
Signature · 1 line
2.13.5
Re: [PATCH 12/17] drivers/net: add set of vdev PMDs to build
Quoted 9 lines
From: dev [mailto:[email protected]] On Behalf Of Bruce Richardson
Sent: Friday, September 1, 2017 11:04 AM
To: [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: [dpdk-dev] [PATCH 12/17]drivers/net: add set of vdev PMDs to buildAdd the
af_packet, null, pcap and ring PMDs to the meson build.Signed-off-by Bruce Richardson <[email protected]>
PATCH 13/17 drivers/net: add drivers for Intel NICs to meson build
In reply to Bruce RichardsonAdd the e1000, fm10k, i40e and ixgbe drivers to the meson & ninja build.
--- config/rte_config.h | 12 +++++++ drivers/net/e1000/base/meson.build | 65 ++++++++++++++++++++++++++++++++++++++ drivers/net/e1000/meson.build | 44 ++++++++++++++++++++++++++ drivers/net/fm10k/base/meson.build | 55 ++++++++++++++++++++++++++++++++ drivers/net/fm10k/meson.build | 44 ++++++++++++++++++++++++++ drivers/net/i40e/base/meson.build | 56 ++++++++++++++++++++++++++++++++ drivers/net/i40e/meson.build | 60 +++++++++++++++++++++++++++++++++++ drivers/net/ixgbe/base/meson.build | 60 +++++++++++++++++++++++++++++++++++ drivers/net/ixgbe/meson.build | 58 ++++++++++++++++++++++++++++++++++ drivers/net/meson.build | 3 +- 10 files changed, 456 insertions(+), 1 deletion(-) create mode 100644 drivers/net/e1000/base/meson.build create mode 100644 drivers/net/e1000/meson.build create mode 100644 drivers/net/fm10k/base/meson.build create mode 100644 drivers/net/fm10k/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
config/rte_config.h +12 -0
@@ -102,6 +102,18 @@*/ #define RTE_QAT_PMD_MAX_NB_SESSIONS 2048 +/* fm10k defines */ +#define RTE_LIBRTE_FM10K_RX_OLFLAGS_ENABLE 1 + +/* i40e defines */ +#define RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC 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 +/* Ring net PMD settings */ #define RTE_PMD_RING_MAX_RX_RINGS 16#define RTE_PMD_RING_MAX_TX_RINGS 16
drivers/net/e1000/base/meson.build new file +65 -0
65 lines not on this page · raw message
drivers/net/e1000/meson.build new file +44 -0
44 lines not on this page · raw message
drivers/net/fm10k/base/meson.build new file +55 -0
55 lines not on this page · raw message
drivers/net/fm10k/meson.build new file +44 -0
44 lines not on this page · raw message
drivers/net/i40e/base/meson.build new file +56 -0
56 lines not on this page · raw message
drivers/net/i40e/meson.build new file +60 -0
60 lines not on this page · raw message
drivers/net/ixgbe/base/meson.build new file +60 -0
60 lines not on this page · raw message
drivers/net/ixgbe/meson.build new file +58 -0
58 lines not on this page · raw message
drivers/net/meson.build +2 -1
@@ -29,7 +29,8 @@ # (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 = ['af_packet', 'null', 'pcap', 'ring'] +drivers = ['af_packet', 'e1000', 'fm10k', 'i40e', 'ixgbe', + 'null', 'pcap', 'ring'] std_deps = ['ethdev', 'kvargs'] # 'ethdev' also pulls in mbuf, net, eal etc config_flag_fmt = 'RTE_LIBRTE_@0@_PMD' driver_name_fmt = 'rte_pmd_@0@'
Signature · 1 line
2.13.5
PATCH 14/17 app/test-pmd: add test-pmd to meson build
In reply to Bruce Richardson--- app/meson.build | 32 +++++++++++++++++++++ app/test-pmd/meson.build | 74 ++++++++++++++++++++++++++++++++++++++++++++++++ meson.build | 3 +- 3 files changed, 108 insertions(+), 1 deletion(-) 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 +74 -0
74 lines not on this page · raw message
meson.build +2 -1
@@ -62,7 +62,8 @@ subdir('lib') subdir('buildtools') subdir('drivers') -# TODO build binaries and installable tools +# build binaries and (TODO) installable tools +subdir('app') # write the build config build_cfg = 'rte_build_config.h'
Signature · 1 line
2.13.5
Re: [PATCH 14/17] app/test-pmd: add test-pmd to meson build
Quoted 7 lines
From: dev [mailto:[email protected]] On Behalf Of Bruce Richardson
Sent: Friday, September 1, 2017 11:04 AM
To: [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: [dpdk-dev] [PATCH 14/17] app/test-pmd: add test-pmd to meson buildSigned-off-by Bruce Richardson <[email protected]>
PATCH 15/17 usertools: add usertools installation to meson build
In reply to Bruce RichardsonHave the "usertools" scripts installed when doing a DPDK install using ninja. They will be copies to $prefix/bin, generally /usr/local/bin, alongside testpmd.
--- meson.build | 3 ++- usertools/meson.build | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 usertools/meson.build
meson.build +2 -1
@@ -62,7 +62,8 @@ subdir('lib') subdir('buildtools') subdir('drivers') -# build binaries and (TODO) installable tools +# build binaries and installable tools +subdir('usertools') subdir('app') # write the build config
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.5
Re: [PATCH 15/17] usertools: add usertools installation to meson build
Quoted 11 lines
From: dev [mailto:[email protected]] On Behalf Of Bruce Richardson
Sent: Friday, September 1, 2017 11:04 AM
To: [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: [dpdk-dev] [PATCH 15/17] usertools: add usertools installation to meson buildHave the "usertools" scripts installed when doing a DPDK install using ninja. They will be copies to $prefix/bin, generally
/usr/local/bin, alongside testpmd.Signed-off-by Bruce Richardson <[email protected]>
PATCH 16/17 build: add option to version libs using DPDK version
In reply to Bruce RichardsonNormally, each library has it's own version number based on the ABI. Add an option to have all libs just use the DPDK version number as the .so version.
--- drivers/meson.build | 8 +++++++- lib/meson.build | 8 +++++++- meson_options.txt | 1 + 3 files changed, 15 insertions(+), 2 deletions(-)
drivers/meson.build +7 -1
@@ -92,6 +92,12 @@ foreach class:driver_classes depends: [pmdinfogen, tmp_lib]) endforeach + if get_option('per_library_versions') + so_version = '@[email protected]'.format(version) + else + so_version = meson.project_version() + endif + # now build the driver itself, and add to the drivers list lib_name = driver_name_fmt.format(name) version_map = '@0@/@1@/@2@_version.map'.format(
@@ -105,7 +111,7 @@ foreach class:driver_classes c_args: cflags, link_args: '-Wl,--version-script=' + version_map, link_depends: version_map, - version: '@[email protected]'.format(version), + version: so_version, install: true, install_dir: driver_install_path)
lib/meson.build +7 -1
@@ -76,6 +76,12 @@ foreach l:libraries dep_objs += [get_variable('dep_rte_' + d)] endforeach + if get_option('per_library_versions') + so_version = '@[email protected]'.format(version) + else + so_version = meson.project_version() + endif + version_map = '@0@/@1@/rte_@2@_version.map'.format( meson.current_source_dir(), dir_name, name) libname = 'rte_' + name
@@ -87,7 +93,7 @@ foreach l:libraries include_directories: include_directories(dir_name), link_args: '-Wl,--version-script=' + version_map, link_depends: version_map, - version: '@[email protected]'.format(version), + version: so_version, install: true) dep = declare_dependency(link_with: lib, include_directories: include_directories(dir_name),
meson_options.txt +1 -0
@@ -6,3 +6,4 @@ 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') 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') +option('per_library_versions', type: 'boolean', value: true, description: 'true: each lib gets its own version number, false: DPDK version used for each lib')
Signature · 1 line
2.13.5
Re: [dpdk-dev, 16/17] build: add option to version libs using DPDK version
Quoted 16 lines · Bruce Richardson
Normally, each library has it's own version number based on the ABI. Add an option to have all libs just use the DPDK version number as the .so version.
Signed-off-by Bruce Richardson <[email protected]>--- drivers/meson.build | 8 +++++++- lib/meson.build | 8 +++++++- meson_options.txt | 1 + 3 files changed, 15 insertions(+), 2 deletions(-)drivers/meson.build +0
-0
drivers/meson.build foreach class:driver_classes · line 100
Quoted 9 lines
drivers/meson.build +6
-0@@ -92,6 +92,12 @@ foreach class:driver_classes depends: [pmdinfogen, tmp_lib]) endforeach + if get_option('per_library_versions') + so_version = '@[email protected]'.format(version) + else + so_version = meson.project_version() + endif +
I'm not sure this is a good idea. If we default to using the defined project version number, we commit to, by default incrementing the library version number on each release, even if the ABI hasn't changed, which means that the purpose of versioning (creating compatibility between library releases), is rendered useless.
Neil
Re: [dpdk-dev, 16/17] build: add option to version libs using DPDK version
Quoted 15 lines · Neil Horman
Quoted 14 lines · Bruce Richardson
Normally, each library has it's own version number based on the ABI. Add an option to have all libs just use the DPDK version number as the .so version.
Signed-off-by Bruce Richardson <[email protected]> ---
drivers/meson.build| 8 +++++++-lib/meson.build| 8 +++++++-
meson_options.txt | 1 + 3 files changed, 15 insertions(+), 2
deletions(-)drivers/meson.build index renamed from drivers/meson.build +0
-0
d7a614f83..76d610a5b100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -92,6 +92,12 @@ foreach class:driver_classes depends: [pmdinfogen,tmp_lib]) endforeach
Quoted 10 lines
Quoted 3 lines
drivers/meson.build index renamed from drivers/meson.build +1
-0+ if get_option('per_library_versions') +
so_version= '@[email protected]'.format(version) + else +so_version=meson.project_version()+ endif +I'm not sure this is a good idea. If we default to using the defined project version number, we commit to, by default incrementing the library version number on each release, even if the ABI hasn't changed, which means that the purpose of versioning (creating compatibility between library releases), is rendered useless.
Yes, I agree on the compatibility, so the default for this option is to have individual .so versions, as right now. This option itself was added at the request of some distros [1][2], who wanted to just use a single version number across all DPDK.
/Bruce
[1] http://dpdk.org/ml/archives/dev/2017-August/072969.html
[2] http://dpdk.org/ml/archives/dev/2017-August/072976.html
PATCH 17/17 doc: add documentation on how to add new components to DPDK
In reply to Bruce RichardsonAdd to the contributors guide details on how to add libraries and drivers and integrate them with the DPDK build system(s).
--- doc/guides/contributing/coding_style.rst | 214 +++++++++++++++++++++++++++++++ 1 file changed, 214 insertions(+)
doc/guides/contributing/coding_style.rst +214 -0
@@ -702,3 +702,217 @@ All Python code should work with Python 2.7+ and 3.2+ and be compliant with `PEP8 (Style Guide for Python Code) <https://www.python.org/dev/peps/pep-0008/>`_. The ``pep8`` tool can be used for testing compliance with the guidelines. + +Integrating with the Build System +--------------------------------- + +DPDK supports being built in two different ways: + +* using ``make`` - or more specifically "GNU make", i.e. ``gmake`` on FreeBSD +* using the tools ``meson`` and ``ninja`` + +Any new library or driver to be integrated into DPDK should support being +built with both systems. While building using ``make`` is a legacy approach, and +most build-system enhancements are being done using ``meson`` and ``ninja`` +there are no plans at this time to deprecate the legacy ``make`` build system. + +Therefore all new component additions should include both a ``Makefile`` and a +``meson.build`` file, and should be added to the component lists in both the +``Makefile`` and ``meson.build`` files in the relevant top-level directory: +either ``lib`` directory or a ``driver`` subdirectory. + +Makefile Contents +~~~~~~~~~~~~~~~~~ + +The ``Makefile`` for the component should be of the following format, where +``<name>`` corresponds to the name of the library in question, e.g. hash, +lpm, etc. For drivers, the same format of Makefile is used. + +.. code-block:: makefile + + # pull in basic DPDK definitions, including whether library is to be + # built or not + include $(RTE_SDK)/mk/rte.vars.mk + + # library name + LIB = librte_<name>.a + + # any library cflags needed. Generally add "-O3 $(WERROR_FLAGS)" + CFLAGS += -O3 + CFLAGS += $(WERROR_FLAGS) + + # the symbol version information for the library, and .so version + EXPORT_MAP := rte_<name>_version.map + LIBABIVER := 1 + + # all source filenames are stored in SRCS-y + SRCS-$(CONFIG_RTE_LIBRTE_<NAME>) += rte_<name>.c + + # install includes + SYMLINK-$(CONFIG_RTE_LIBRTE_<NAME>)-include += rte_<name>.h + + # pull in rules to build the library + include $(RTE_SDK)/mk/rte.lib.mk + +Meson Build File Contents - Libraries +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``meson.build`` file for a new DPDK library should be of the following basic +format. + +.. code-block:: python + + sources = files('file1.c', ...) + headers = files('file1.c', ...) + + +The will build based on a number of conventions and assumptions within the DPDK +itself, for example, that the library name is the same as the directory name in +which the files are stored. + +For a library ``meson.build`` file, there are number of variables which can be +set, some mandatory, others optional. The mandatory fields are: + +sources + **Default Value = []**. + This variable should list out the files to be compiled up to create the + library. Files must be specified using the meson ``files()`` function. + + +The optional fields are: + +build + **Default Value = true.** + Used to optionally compile a library, based on its dependencies or + environment. A simple example of use would be: + +.. code-block:: python + + if host_machine.system() != 'linux' + build = false + endif + + +cflags + **Default Value = []**. + Used to specify any additional cflags that need to be passed to compile + the sources in the library. + +deps + **Default Value = ['eal']**. + Used to list the internal library dependencies of the library. It should + be assigned to using ``+=`` rather than overwriting using ``=``. The + dependencies should be specified as strings, each one giving the name of + a DPDK library, without the ``librte_`` prefix. Dependencies are handled + recursively, so specifying e.g. ``mempool``, will automatically also + make the library depend upon the mempool library's dependencies too - + ``ring`` and ``eal``. For libraries that only depend upon EAL, this + variable may be omitted from the ``meson.build`` file. For example: + +.. code-block:: python + + deps += ['ethdev'] + + +ext_deps + **Default Value = []**. + Used to specify external dependencies of this library. They should be + returned as dependency objects, as returned from the meson + ``dependency()`` or ``find_library()`` functions. Before returning + these, they should be checked to ensure the dependencies have been + found, and, if not, the ``build`` variable should be set to ``false``. + For example: + +.. code-block:: python + + my_dep = dependency('libX', required: 'false') + if my_dep.found() + ext_deps += my_dep + else + build = false + endif + + +headers + **Default Value = []**. + Used to return the list of header files for the library that should be + installed to $PREFIX/include when ``ninja install`` is run. As with + source files, these should be specified using the meson ``files()`` + function. + +name + **Default Value = library name derived from the directory name**. + If a library's .so or .a file differs from that given in the directory + name, the name should be specified using this variable. In practice, + since the convention is that for a library called ``librte_xyz.so``, the + sources are stored in a directory ``lib/librte_xyz``, this value should + never be needed for new libraries. + +.. note:: + + The name value also provides the name used to find the function version + map file, as part of the build process, so if the directory name and + library names differ, the ``version.map`` file should be named + consistently with the library, not the directory + +objs + **Default Value = []**. + This variable can be used to pass to the library build some pre-built + objects that were compiled up as part of another target given in the + included library ``meson.build`` file. + +version + **Default Value = 1**. + Specifies the ABI version of the library, and is used as the major + version number of the resulting ``.so`` library. + +Meson Build File Contents - Drivers +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +For drivers, the values are largely the same as for libraries. The variables +supported are: + +build + As above. + +cflags + As above. + +deps + As above. + +ext_deps + As above. + +includes + **Default Value = <driver directory>** Some drivers include a base + directory for additional source files and headers, so we have this + variable to allow the headers from that base directory to be found when + compiling driver sources. Should be appended to using ``+=`` rather than + overwritten using ``=``. The values appended should be meson include + objects got using the ``include_directories()`` function. For example: + +.. code-block:: python + + includes += include_directories('base') + +name + As above, though note that each driver class can define it's own naming + scheme for the resulting ``.so`` files. + +objs + As above, generally used for the contents of the ``base`` directory. + +pkgconfig_extra_libs + **Default Value = []** + This variable is used to pass additional library link flags through to + the DPDK pkgconfig file generated, for example, to track any additional + libraries that may need to be linked into the build - especially when + using static libraries. Anything added here will be appended to the end + of the ``pkgconfig --libs`` output. + +sources [mandatory] + As above + +version + As above
Signature · 1 line
2.13.5
Quoted 4 lines · Bruce Richardson
Following on from the two previous RFCs [1] [2], here is a cleaned up patchset to serve as a start-point for getting all of DPDK building with meson and ninja.
Just for reference, I've test-compiled this on, Fedora 26 with clang and gcc for both static and shared builds, and similarly on FreeBSD 10 for clang and gcc with static and shared builds. Some basic compile testing also done on BSD 11.
/Bruce
v2 cover build DPDK libs and some drivers with meson/ninja
In reply to Bruce RichardsonV2 changes:
* fixed copyright notices, updated 2016 to 2017
* removed dependency on kconfig file in kernel build tree
* marked pmdinfogen as a "native" binary, in preparation for future cross- compilation work
* added in additional warning flags for compatibility with existing system
-----
Following on from the two previous RFCs [1] [2], here is a cleaned up patchset to serve as a start-point for getting all of DPDK building with meson and ninja.
What's covered:
* Basic infrastructure for feature detection and DPDK compilation
* Building of all DPDK libraries - as either static or shared
* Compilation of igb_uio driver for Linux
* Building a number of mempool, crypto and net drivers.
* Installation of compiled libraries and headers
* Installation of usertools scripts
* Compilation of testpmd as dpdk-testpmd and install of same
* Generation and installation of pkgconfig file for DPDK
* Contributors guide document addition describing how to add build scripts
What's not implemented:
* Just about everything else :-), including
* Support for non-x86 architectures, including cross-compilation
* Lots of PMDs
* Support for building and running the unit tests
Some key differences from RFC2:
* Removed duplication between the different driver meson files by moving the build logic up one level to the driver/meson.build file.
* Added a build option to allow versioning the libraries using the DPDK version number, rather than individual .so versions.
* Made EAL a default dependency for libs, to simplify meson.build files for a number of them.
* Made the build variables used for libraries and drivers more consistent.
* Moved responsibility for determining if a given driver or library should be built to the driver/library's own build file, giving a single place where all details about that component are placed, and saving having lots of environment detection logic in higher-level build files.
* Begun adding in developer documentation to make it easier for driver authors/maintainers to contribute.
Meson 0.41 and ninja are needed, and ideally meson 0.42 is recommended. Ninja is available in most distributions, and meson - if an updated version is not available on your distro of choice - can be easily got using
"pip3 install meson"
To build and install then use:
meson build # use default compiler and shared libs cd build
ninja
sudo ninja install
Thereafter to use DPDK in other build systems one can use:
pkg-config --cflags DPDK pkt-config --libs DPDK
to query the needed DPDK build parameters.
Once reviewed and tested a bit, I hope to apply this set - or a new revision of it - to the build-next tree, to serve as a baseline for others to use and to add the missing functionality to.
Regards,
/Bruce
[1] http://dpdk.org/ml/archives/dev/2017-June/067429.html
[2] http://dpdk.org/ml/archives/dev/2017-August/072818.html
Bruce Richardson (17):
build: add initial infrastructure for meson & ninja builds
eal: add eal library to meson build
igb_uio: add igb_uio kmod to meson build
build: add DPDK libraries to build
build: add buildtools to meson build
build: add infrastructure for building PMDs drivers/mempool: add SW mempool drivers to meson build drivers/crypto: add crypto drv class and null PMD to meson crypto/openssl: add driver to meson build crypto/qat: add driver to meson build drivers/net: add net driver support to meson build drivers/net: add set of vdev PMDs to build drivers/net: add drivers for Intel NICs to meson build app/test-pmd: add test-pmd to meson build
usertools: add usertools installation to meson build
build: add option to version libs using DPDK version
doc: add documentation on how to add new components to DPDK
app/meson.build | 32 +++ app/test-pmd/meson.build | 74 +++++++ buildtools/gen-pmdinfo-cfile.sh | 41 ++++ buildtools/meson.build | 34 ++++ buildtools/pmdinfogen/meson.build | 36 ++++ config/meson.build | 71 +++++++ config/rte_config.h | 121 ++++++++++++ config/x86/meson.build | 70 +++++++ doc/guides/contributing/coding_style.rst | 214 +++++++++++++++++++++ drivers/crypto/meson.build | 35 ++++ drivers/crypto/null/meson.build | 33 ++++ drivers/crypto/openssl/meson.build | 38 ++++ drivers/crypto/qat/meson.build | 41 ++++ drivers/mempool/meson.build | 35 ++++ drivers/mempool/ring/meson.build | 32 +++ drivers/mempool/stack/meson.build | 32 +++ drivers/meson.build | 128 ++++++++++++ drivers/net/af_packet/meson.build | 35 ++++ drivers/net/e1000/base/meson.build | 65 +++++++ drivers/net/e1000/meson.build | 44 +++++ drivers/net/fm10k/base/meson.build | 55 ++++++ drivers/net/fm10k/meson.build | 44 +++++ drivers/net/i40e/base/meson.build | 56 ++++++ drivers/net/i40e/meson.build | 60 ++++++ drivers/net/ixgbe/base/meson.build | 60 ++++++ drivers/net/ixgbe/meson.build | 58 ++++++ drivers/net/meson.build | 36 ++++ drivers/net/null/meson.build | 32 +++ drivers/net/pcap/meson.build | 41 ++++ drivers/net/ring/meson.build | 33 ++++ lib/librte_acl/meson.build | 59 ++++++ lib/librte_bitratestats/meson.build | 34 ++++ lib/librte_cfgfile/meson.build | 34 ++++ lib/librte_cmdline/meson.build | 55 ++++++ 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 | 46 +++++ lib/librte_eal/linuxapp/meson.build | 42 ++++ lib/librte_eal/meson.build | 44 +++++ lib/librte_efd/meson.build | 34 ++++ lib/librte_ether/meson.build | 45 +++++ lib/librte_eventdev/meson.build | 36 ++++ lib/librte_gro/meson.build | 34 ++++ lib/librte_hash/meson.build | 45 +++++ lib/librte_ip_frag/meson.build | 39 ++++ lib/librte_jobstats/meson.build | 33 ++++ lib/librte_kni/meson.build | 38 ++++ lib/librte_kvargs/meson.build | 34 ++++ lib/librte_latencystats/meson.build | 34 ++++ lib/librte_lpm/meson.build | 35 ++++ lib/librte_mbuf/meson.build | 35 ++++ lib/librte_mempool/meson.build | 35 ++++ lib/librte_meter/meson.build | 33 ++++ lib/librte_metrics/meson.build | 33 ++++ lib/librte_net/meson.build | 45 +++++ lib/librte_pdump/meson.build | 34 ++++ lib/librte_pipeline/meson.build | 35 ++++ lib/librte_port/meson.build | 58 ++++++ lib/librte_power/meson.build | 37 ++++ lib/librte_reorder/meson.build | 34 ++++ lib/librte_ring/meson.build | 33 ++++ lib/librte_sched/meson.build | 36 ++++ lib/librte_table/meson.build | 52 +++++ lib/librte_timer/meson.build | 33 ++++ lib/librte_vhost/meson.build | 39 ++++ lib/meson.build | 105 ++++++++++ meson.build | 88 +++++++++ meson_options.txt | 9 + usertools/meson.build | 32 +++ 80 files changed, 3788 insertions(+) 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 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/e1000/base/meson.build create mode 100644 drivers/net/e1000/meson.build create mode 100644 drivers/net/fm10k/base/meson.build create mode 100644 drivers/net/fm10k/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/null/meson.build create mode 100644 drivers/net/pcap/meson.build create mode 100644 drivers/net/ring/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 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.build
Signature · 1 line
2.13.5
PATCH v2 1/17 build: add initial infrastructure for meson & ninja builds
To build with meson and ninja, we need some initial infrastructure in place. The build files for meson always need to be called "meson.build", and options get placed in meson_options.txt
This commit adds a top-level meson.build file, which sets up the global variables for tracking drivers, libraries, etc., and then includes other build files, before finishing by writing the global build configuration header file and a DPDK pkgconfig file at the end, using some of those same globals.
Quoted 1 line
From the top level build file, the only include file thus far is for the
config folder, which does some other setup of global configuration parameters, including pulling in architecture specific parameters from an architectural subdirectory. A number of configuration build options are provided for the project to tune a number of global variables which will be used later e.g. max numa nodes, max cores, etc. These settings all make their way to the global build config header "rte_build_config.h". There is also a file "rte_config.h", which includes "rte_build_config.h", and this file is meant to hold other build-time values which are present in our current static build configuration but are not normally meant for user-configuration. Ideally, over time, the values placed here should be moved to the individual libraries or drivers which want those values.
--- config/meson.build | 71 ++++++++++++++++++++++++++++++++++++++++++ config/rte_config.h | 50 ++++++++++++++++++++++++++++++ config/x86/meson.build | 70 ++++++++++++++++++++++++++++++++++++++++++ meson.build | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++ meson_options.txt | 6 ++++ 5 files changed, 280 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 +71 -0
@@ -0,0 +1,71 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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') +# 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') + +# enable extra warnings and disable any unwanted warnings +warning_flags = [ + '-Wsign-compare', + '-Wcast-qual', + '-Wno-address-of-packed-member', + '-Wno-format-truncation' +] +foreach arg: warning_flags + if cc.has_argument(arg) + add_project_arguments(arg, language: 'c') + endif +endforeach + +compile_time_cpuflags = [] +if host_machine.cpu_family().startswith('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 new file +50 -0
50 lines not on this page · raw message
config/x86/meson.build new file +70 -0
70 lines not on this page · raw message
meson.build new file +83 -0
83 lines not on this page · raw message
meson_options.txt new file +6 -0
@@ -0,0 +1,6 @@ +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.5
PATCH v2 2/17 eal: add eal library to meson build
In reply to Bruce RichardsonSupport building the EAL with meson and ninja. This involves a number of different meson.build files for iterating through all the different subdirectories in the EAL. The library itself will be compiled on build but the header files are only copied from their initial location once "ninja install" is run. Instead, we use meson dependency tracking to ensure that other libraries which use the EAL headers can find them in their original locations.
Note: this does not include building kernel modules on either BSD or Linux
--- config/rte_config.h | 11 ++++ 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/meson.build | 32 ++++++++++ lib/librte_eal/meson.build | 44 +++++++++++++ lib/meson.build | 32 ++++++++++ meson.build | 3 +- 14 files changed, 580 insertions(+), 1 deletion(-) 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/meson.build create mode 100644 lib/librte_eal/meson.build create mode 100644 lib/meson.build
config/rte_config.h +11 -0
@@ -47,4 +47,15 @@#include <rte_build_config.h> +/****** library defines ********/ + +/* 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_ */
lib/librte_eal/bsdapp/eal/meson.build new file +67 -0
67 lines not on this page · raw message
lib/librte_eal/bsdapp/meson.build new file +32 -0
@@ -0,0 +1,32 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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/common/arch/meson.build new file +33 -0
@@ -0,0 +1,33 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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. +# +# 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. +# +# 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 +48 -0
48 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 +72 -0
72 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. +# +# 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 +44 -0
44 lines not on this page · raw message
lib/meson.build new file +32 -0
@@ -0,0 +1,32 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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('librte_eal')
meson.build +2 -1
@@ -57,7 +57,8 @@ endif global_inc = include_directories('.', 'config') subdir('config') -# TODO build libs and drivers +# build libs and (TODO) drivers +subdir('lib') # TODO build binaries and installable tools
Signature · 1 line
2.13.5
PATCH v2 3/17 igb_uio: add igb_uio kmod to meson build
In reply to Bruce RichardsonSupport building igb_uio using meson and ninja. For this, we still use the kernel's kbuild system, by calling out to make, since it's safer and easier than trying to reproduce that in meson. A list of suitable file dependencies is given so that we have a reasonable chance of a rebuild when necessary.
--- lib/librte_eal/linuxapp/igb_uio/Kbuild | 1 + lib/librte_eal/linuxapp/igb_uio/meson.build | 46 +++++++++++++++++++++++++++++ lib/librte_eal/linuxapp/meson.build | 10 +++++++ meson_options.txt | 2 ++ 4 files changed, 59 insertions(+) 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 +46 -0
46 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 +2 -0
@@ -4,3 +4,5 @@ option('max_numa_nodes', type: 'string', value: '4', description: 'maximum numbe 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') +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.5
PATCH v2 4/17 build: add DPDK libraries to build
In reply to Bruce RichardsonAdd non-EAL libraries to DPDK build. The compat lib is a special case, along with the previously-added EAL, but all other libs can be build using the same set of commands, where the individual meson.build files only need to specify their dependencies, source files, header files and ABI versions.
--- config/rte_config.h | 36 ++++++++++++++++++++ lib/librte_acl/meson.build | 59 ++++++++++++++++++++++++++++++++ lib/librte_bitratestats/meson.build | 34 +++++++++++++++++++ lib/librte_cfgfile/meson.build | 34 +++++++++++++++++++ lib/librte_cmdline/meson.build | 55 ++++++++++++++++++++++++++++++ lib/librte_compat/meson.build | 36 ++++++++++++++++++++ lib/librte_cryptodev/meson.build | 40 ++++++++++++++++++++++ lib/librte_distributor/meson.build | 39 +++++++++++++++++++++ lib/librte_efd/meson.build | 34 +++++++++++++++++++ lib/librte_ether/meson.build | 45 +++++++++++++++++++++++++ lib/librte_eventdev/meson.build | 36 ++++++++++++++++++++ lib/librte_gro/meson.build | 34 +++++++++++++++++++ lib/librte_hash/meson.build | 45 +++++++++++++++++++++++++ lib/librte_ip_frag/meson.build | 39 +++++++++++++++++++++ lib/librte_jobstats/meson.build | 33 ++++++++++++++++++ lib/librte_kni/meson.build | 38 +++++++++++++++++++++ lib/librte_kvargs/meson.build | 34 +++++++++++++++++++ lib/librte_latencystats/meson.build | 34 +++++++++++++++++++ lib/librte_lpm/meson.build | 35 +++++++++++++++++++ lib/librte_mbuf/meson.build | 35 +++++++++++++++++++ lib/librte_mempool/meson.build | 35 +++++++++++++++++++ lib/librte_meter/meson.build | 33 ++++++++++++++++++ lib/librte_metrics/meson.build | 33 ++++++++++++++++++ lib/librte_net/meson.build | 45 +++++++++++++++++++++++++ lib/librte_pdump/meson.build | 34 +++++++++++++++++++ lib/librte_pipeline/meson.build | 35 +++++++++++++++++++ lib/librte_port/meson.build | 58 ++++++++++++++++++++++++++++++++ lib/librte_power/meson.build | 37 ++++++++++++++++++++ lib/librte_reorder/meson.build | 34 +++++++++++++++++++ lib/librte_ring/meson.build | 33 ++++++++++++++++++ lib/librte_sched/meson.build | 36 ++++++++++++++++++++ lib/librte_table/meson.build | 52 ++++++++++++++++++++++++++++ lib/librte_timer/meson.build | 33 ++++++++++++++++++ lib/librte_vhost/meson.build | 39 +++++++++++++++++++++ lib/meson.build | 67 +++++++++++++++++++++++++++++++++++++ 35 files changed, 1379 insertions(+) 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_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 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
config/rte_config.h +36 -0
@@ -58,4 +58,40 @@#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 + +/* 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 +#endif /* _RTE_CONFIG_H_ */
lib/librte_acl/meson.build new file +59 -0
59 lines not on this page · raw message
lib/librte_bitratestats/meson.build new file +34 -0
@@ -0,0 +1,34 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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 += ['ethdev', 'metrics']
lib/librte_cfgfile/meson.build new file +34 -0
@@ -0,0 +1,34 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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')
lib/librte_cmdline/meson.build new file +55 -0
55 lines not on this page · raw message
lib/librte_compat/meson.build new file +36 -0
@@ -0,0 +1,36 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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') + +set_variable('dep_rte_compat', + declare_dependency(include_directories: include_directories('.')))
lib/librte_cryptodev/meson.build new file +40 -0
@@ -0,0 +1,40 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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_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 += ['kvargs', 'mbuf']
lib/librte_distributor/meson.build new file +39 -0
@@ -0,0 +1,39 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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 += ['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. +# +# 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 += ['ring', 'hash']
lib/librte_ether/meson.build new file +45 -0
45 lines not on this page · raw message
lib/librte_eventdev/meson.build new file +36 -0
@@ -0,0 +1,36 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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 += ['ring']
lib/librte_gro/meson.build new file +34 -0
@@ -0,0 +1,34 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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 += ['ethdev']
lib/librte_hash/meson.build new file +45 -0
45 lines not on this page · raw message
lib/librte_ip_frag/meson.build new file +39 -0
@@ -0,0 +1,39 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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 += ['ethdev', 'hash']
lib/librte_jobstats/meson.build new file +33 -0
@@ -0,0 +1,33 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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')
lib/librte_kni/meson.build new file +38 -0
@@ -0,0 +1,38 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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 +version = 2 +sources = files('rte_kni.c') +headers = files('rte_kni.h') +deps += ['ethdev']
lib/librte_kvargs/meson.build new file +34 -0
@@ -0,0 +1,34 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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 = 1 +sources = files('rte_kvargs.c') +headers = files('rte_kvargs.h')
lib/librte_latencystats/meson.build new file +34 -0
@@ -0,0 +1,34 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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 += ['metrics', 'ethdev']
lib/librte_lpm/meson.build new file +35 -0
@@ -0,0 +1,35 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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 += ['compat']
lib/librte_mbuf/meson.build new file +35 -0
@@ -0,0 +1,35 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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_mbuf.c', 'rte_mbuf_ptype.c') +headers = files('rte_mbuf.h', 'rte_mbuf_ptype.h') +deps += ['mempool']
lib/librte_mempool/meson.build new file +35 -0
@@ -0,0 +1,35 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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_mempool.c', 'rte_mempool_ops.c') +headers = files('rte_mempool.h') +deps += ['ring']
lib/librte_meter/meson.build new file +33 -0
@@ -0,0 +1,33 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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')
lib/librte_metrics/meson.build new file +33 -0
@@ -0,0 +1,33 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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')
lib/librte_net/meson.build new file +45 -0
45 lines not on this page · raw message
lib/librte_pdump/meson.build new file +34 -0
@@ -0,0 +1,34 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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 += ['ethdev']
lib/librte_pipeline/meson.build new file +35 -0
@@ -0,0 +1,35 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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_power/meson.build new file +37 -0
@@ -0,0 +1,37 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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('rte_power.c', 'rte_power_acpi_cpufreq.c', + 'rte_power_kvm_vm.c', 'guest_channel.c') +headers = files('rte_power.h')
lib/librte_reorder/meson.build new file +34 -0
@@ -0,0 +1,34 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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 += ['mbuf']
lib/librte_ring/meson.build new file +33 -0
@@ -0,0 +1,33 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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_ring.c') +headers = files('rte_ring.h')
lib/librte_sched/meson.build new file +36 -0
@@ -0,0 +1,36 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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_table/meson.build new file +52 -0
52 lines not on this page · raw message
lib/librte_timer/meson.build new file +33 -0
@@ -0,0 +1,33 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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')
lib/librte_vhost/meson.build new file +39 -0
@@ -0,0 +1,39 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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 +version = 4 +sources = files('fd_man.c', 'socket.c', 'vhost.c', 'vhost_user.c', + 'virtio_net.c') +headers = files('rte_vhost.h') +deps += ['ethdev']
lib/meson.build +67 -0
71 lines not on this page · raw message
Signature · 1 line
2.13.5
PATCH v2 5/17 build: add buildtools to meson build
In reply to Bruce RichardsonAdd the buildtools folder, and more specifically the pmdinfogen binary to the meson and ninja build. This will be needed for building the PMDs in the driver folder later, as the pmd info output from the tool needs to be included in those libs.
--- buildtools/gen-pmdinfo-cfile.sh | 41 +++++++++++++++++++++++++++++++++++++++ buildtools/meson.build | 34 ++++++++++++++++++++++++++++++++ buildtools/pmdinfogen/meson.build | 36 ++++++++++++++++++++++++++++++++++ meson.build | 1 + 4 files changed, 112 insertions(+) create mode 100755 buildtools/gen-pmdinfo-cfile.sh create mode 100644 buildtools/meson.build create mode 100644 buildtools/pmdinfogen/meson.build
buildtools/gen-pmdinfo-cfile.sh new file +41 -0
@@ -0,0 +1,41 @@ +#! /bin/sh +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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. + + +arfile=$1 +output=$2 +pmdinfogen=$3 + +tmp_o=${output%.c.pmd.c}.tmp.o + +ar p $arfile > $tmp_o && \ + $pmdinfogen $tmp_o $output
buildtools/meson.build new file +34 -0
@@ -0,0 +1,34 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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') + +pmdinfo = find_program('gen-pmdinfo-cfile.sh')
buildtools/pmdinfogen/meson.build new file +36 -0
@@ -0,0 +1,36 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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. + +pmdinfogen = executable('pmdinfogen', + 'pmdinfogen.c', + include_directories: eal_inc, + native: true, + c_args: cflags)
meson.build +1 -0
@@ -59,6 +59,7 @@ subdir('config') # build libs and (TODO) drivers subdir('lib') +subdir('buildtools') # TODO build binaries and installable tools
Signature · 1 line
2.13.5
PATCH v2 6/17 build: add infrastructure for building PMDs
In reply to Bruce RichardsonAdd in the top-level drivers meson.build file to start adding in building of PMDs. Since all PMDs are built in pretty much the same way, the logic for building each PMD, including extracting the pmdinfo, is included in the top level build file. This means that each individual driver class only needs to specify its default dependencies and a few naming conventions, and each driver only needs to specify it's source files, headers, etc.
--- drivers/meson.build | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++ meson.build | 3 +- 2 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 drivers/meson.build
drivers/meson.build new file +121 -0
@@ -0,0 +1,121 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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. + +driver_classes = [] + +foreach class:driver_classes + drivers = [] + std_deps = [] + config_flag_fmt = '' # format string used to set the value in dpdk_conf + driver_name_fmt = '' # format string for driver name, used to name + # the library, the dependency and to find the + # version file for linking + + subdir(class) + + foreach drv:drivers + drv_path = join_paths(class, drv) + + # 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_path)] + # 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 = [] + pkgconfig_extra_libs = [] + + # pull in driver directory which should assign to each of the above + subdir(drv_path) + + if build + dpdk_conf.set(config_flag_fmt.format(drv.to_upper()),1) + + # get dependency objs from strings + dep_objs = [] + foreach d:deps + dep_objs += [get_variable('dep_rte_' + d)] + endforeach + dep_objs += ext_deps + dpdk_extra_ldflags += pkgconfig_extra_libs + + # 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 = driver_name_fmt.format(drv) + version_map = '@0@/@1@/@2@_version.map'.format( + meson.current_source_dir(), + drv_path, drv_name) + 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) + + 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_@0@'.format(drv_name), + declare_dependency(link_with: lib, + include_directories: includes, + dependencies: dep_objs)) + endif # build + endforeach +endforeach
meson.build +2 -1
@@ -57,9 +57,10 @@ endif global_inc = include_directories('.', 'config') subdir('config') -# build libs and (TODO) drivers +# build libs and drivers subdir('lib') subdir('buildtools') +subdir('drivers') # TODO build binaries and installable tools
Signature · 1 line
2.13.5
PATCH v2 7/17 drivers/mempool: add SW mempool drivers to meson build
In reply to Bruce RichardsonWith build infrastructure in place, add in mempool drivers to the build.
--- drivers/mempool/meson.build | 35 +++++++++++++++++++++++++++++++++++ drivers/mempool/ring/meson.build | 32 ++++++++++++++++++++++++++++++++ drivers/mempool/stack/meson.build | 32 ++++++++++++++++++++++++++++++++ drivers/meson.build | 2 +- 4 files changed, 100 insertions(+), 1 deletion(-) 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 +35 -0
@@ -0,0 +1,35 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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. + +drivers = ['ring', 'stack'] +std_deps = ['mempool'] +config_flag_fmt = 'RTE_LIBRTE_@0@_MEMPOOL' +driver_name_fmt = 'rte_mempool_@0@'
drivers/mempool/ring/meson.build new file +32 -0
@@ -0,0 +1,32 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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. +# +# 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 -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. -driver_classes = [] +driver_classes = ['mempool'] foreach class:driver_classes drivers = []
Signature · 1 line
2.13.5
PATCH v2 8/17 drivers/crypto: add crypto drv class and null PMD to meson
In reply to Bruce RichardsonAdd in a crypto driver class, and implement compiling the null crypto instance.
--- drivers/crypto/meson.build | 35 +++++++++++++++++++++++++++++++++++ drivers/crypto/null/meson.build | 33 +++++++++++++++++++++++++++++++++ drivers/meson.build | 13 +++++++------ 3 files changed, 75 insertions(+), 6 deletions(-) create mode 100644 drivers/crypto/meson.build create mode 100644 drivers/crypto/null/meson.build
drivers/crypto/meson.build new file +35 -0
@@ -0,0 +1,35 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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. + +drivers = ['null'] +std_deps = ['cryptodev'] # cryptodev pulls in all other needed deps +config_flag_fmt = 'RTE_LIBRTE_@0@_PMD' +driver_name_fmt = 'rte_pmd_@0@'
drivers/crypto/null/meson.build new file +33 -0
@@ -0,0 +1,33 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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. + +name = 'null_crypto' +sources = files('null_crypto_pmd.c', 'null_crypto_pmd_ops.c')
drivers/meson.build +7 -6
@@ -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. -driver_classes = ['mempool'] +driver_classes = ['crypto', 'mempool'] foreach class:driver_classes drivers = []
@@ -46,6 +46,7 @@ foreach class:driver_classes # set up empty variables used for build build = true # set to false to disable, e.g. missing deps + name = drv version = 1 sources = [] objs = []
@@ -65,7 +66,7 @@ foreach class:driver_classes subdir(drv_path) if build - dpdk_conf.set(config_flag_fmt.format(drv.to_upper()),1) + dpdk_conf.set(config_flag_fmt.format(name.to_upper()),1) # get dependency objs from strings dep_objs = []
@@ -92,11 +93,11 @@ foreach class:driver_classes endforeach # now build the driver itself, and add to the drivers list - drv_name = driver_name_fmt.format(drv) + lib_name = driver_name_fmt.format(name) version_map = '@0@/@1@/@2@_version.map'.format( meson.current_source_dir(), - drv_path, drv_name) - lib = library(drv_name, + drv_path, lib_name) + lib = library(lib_name, sources, objects: objs, include_directories: includes,
@@ -112,7 +113,7 @@ foreach class:driver_classes # 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_@0@'.format(drv_name), + set_variable('dep_@0@'.format(lib_name), declare_dependency(link_with: lib, include_directories: includes, dependencies: dep_objs))
Signature · 1 line
2.13.5
PATCH v2 9/17 crypto/openssl: add driver to meson build
In reply to Bruce Richardson--- drivers/crypto/meson.build | 2 +- drivers/crypto/openssl/meson.build | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 drivers/crypto/openssl/meson.build
drivers/crypto/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. -drivers = ['null'] +drivers = ['null', 'openssl'] std_deps = ['cryptodev'] # cryptodev pulls in all other needed deps config_flag_fmt = 'RTE_LIBRTE_@0@_PMD' driver_name_fmt = 'rte_pmd_@0@'
drivers/crypto/openssl/meson.build new file +38 -0
@@ -0,0 +1,38 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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. + +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 += dep +pkgconfig_extra_libs += '-lcrypto'
Signature · 1 line
2.13.5
PATCH v2 10/17 crypto/qat: add driver to meson build
In reply to Bruce Richardson--- config/rte_config.h | 8 ++++++++ drivers/crypto/meson.build | 2 +- drivers/crypto/qat/meson.build | 41 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 drivers/crypto/qat/meson.build
config/rte_config.h +8 -0
@@ -94,4 +94,12 @@#define RTE_SCHED_PORT_N_GRINDERS 8#undef RTE_SCHED_VECTOR +/****** driver defines ********/ + +/* +* 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 +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. -drivers = ['null', 'openssl'] +drivers = ['qat', 'null', 'openssl'] std_deps = ['cryptodev'] # cryptodev pulls in all other needed deps config_flag_fmt = 'RTE_LIBRTE_@0@_PMD' driver_name_fmt = 'rte_pmd_@0@'
drivers/crypto/qat/meson.build new file +41 -0
41 lines not on this page · raw message
Signature · 1 line
2.13.5
PATCH v2 11/17 drivers/net: add net driver support to meson build
In reply to Bruce Richardson--- drivers/meson.build | 2 +- drivers/net/meson.build | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 drivers/net/meson.build
drivers/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. -driver_classes = ['crypto', 'mempool'] +driver_classes = ['crypto', 'mempool', 'net'] foreach class:driver_classes drivers = []
drivers/net/meson.build new file +35 -0
@@ -0,0 +1,35 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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. + +drivers = [] +std_deps = ['ethdev', 'kvargs'] # 'ethdev' also pulls in mbuf, net, eal etc +config_flag_fmt = 'RTE_LIBRTE_@0@_PMD' +driver_name_fmt = 'rte_pmd_@0@'
Signature · 1 line
2.13.5
PATCH v2 12/17 drivers/net: add set of vdev PMDs to build
In reply to Bruce RichardsonAdd the af_packet, null, pcap and ring PMDs to the meson build.
--- config/rte_config.h | 4 ++++ drivers/net/af_packet/meson.build | 35 +++++++++++++++++++++++++++++++++ drivers/net/meson.build | 2 +- drivers/net/null/meson.build | 32 ++++++++++++++++++++++++++++++ drivers/net/pcap/meson.build | 41 +++++++++++++++++++++++++++++++++++++++ drivers/net/ring/meson.build | 33 +++++++++++++++++++++++++++++++ 6 files changed, 146 insertions(+), 1 deletion(-) create mode 100644 drivers/net/af_packet/meson.build create mode 100644 drivers/net/null/meson.build create mode 100644 drivers/net/pcap/meson.build create mode 100644 drivers/net/ring/meson.build
config/rte_config.h +4 -0
@@ -102,4 +102,8 @@*/ #define RTE_QAT_PMD_MAX_NB_SESSIONS 2048 +/* Ring net PMD settings */ +#define RTE_PMD_RING_MAX_RX_RINGS 16 +#define RTE_PMD_RING_MAX_TX_RINGS 16 +#endif /* _RTE_CONFIG_H_ */
drivers/net/af_packet/meson.build new file +35 -0
@@ -0,0 +1,35 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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('rte_eth_af_packet.c')
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. -drivers = [] +drivers = ['af_packet', 'null', 'pcap', 'ring'] std_deps = ['ethdev', 'kvargs'] # 'ethdev' also pulls in mbuf, net, eal etc config_flag_fmt = 'RTE_LIBRTE_@0@_PMD' driver_name_fmt = 'rte_pmd_@0@'
drivers/net/null/meson.build new file +32 -0
@@ -0,0 +1,32 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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_null.c')
drivers/net/pcap/meson.build new file +41 -0
41 lines not on this page · raw message
drivers/net/ring/meson.build new file +33 -0
@@ -0,0 +1,33 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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_ring.c') +install_headers('rte_eth_ring.h')
Signature · 1 line
2.13.5
PATCH v2 13/17 drivers/net: add drivers for Intel NICs to meson build
In reply to Bruce RichardsonAdd the e1000, fm10k, i40e and ixgbe drivers to the meson & ninja build.
--- config/rte_config.h | 12 +++++++ drivers/net/e1000/base/meson.build | 65 ++++++++++++++++++++++++++++++++++++++ drivers/net/e1000/meson.build | 44 ++++++++++++++++++++++++++ drivers/net/fm10k/base/meson.build | 55 ++++++++++++++++++++++++++++++++ drivers/net/fm10k/meson.build | 44 ++++++++++++++++++++++++++ drivers/net/i40e/base/meson.build | 56 ++++++++++++++++++++++++++++++++ drivers/net/i40e/meson.build | 60 +++++++++++++++++++++++++++++++++++ drivers/net/ixgbe/base/meson.build | 60 +++++++++++++++++++++++++++++++++++ drivers/net/ixgbe/meson.build | 58 ++++++++++++++++++++++++++++++++++ drivers/net/meson.build | 3 +- 10 files changed, 456 insertions(+), 1 deletion(-) create mode 100644 drivers/net/e1000/base/meson.build create mode 100644 drivers/net/e1000/meson.build create mode 100644 drivers/net/fm10k/base/meson.build create mode 100644 drivers/net/fm10k/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
config/rte_config.h +12 -0
@@ -102,6 +102,18 @@*/ #define RTE_QAT_PMD_MAX_NB_SESSIONS 2048 +/* fm10k defines */ +#define RTE_LIBRTE_FM10K_RX_OLFLAGS_ENABLE 1 + +/* i40e defines */ +#define RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC 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 +/* Ring net PMD settings */ #define RTE_PMD_RING_MAX_RX_RINGS 16#define RTE_PMD_RING_MAX_TX_RINGS 16
drivers/net/e1000/base/meson.build new file +65 -0
65 lines not on this page · raw message
drivers/net/e1000/meson.build new file +44 -0
44 lines not on this page · raw message
drivers/net/fm10k/base/meson.build new file +55 -0
55 lines not on this page · raw message
drivers/net/fm10k/meson.build new file +44 -0
44 lines not on this page · raw message
drivers/net/i40e/base/meson.build new file +56 -0
56 lines not on this page · raw message
drivers/net/i40e/meson.build new file +60 -0
60 lines not on this page · raw message
drivers/net/ixgbe/base/meson.build new file +60 -0
60 lines not on this page · raw message
drivers/net/ixgbe/meson.build new file +58 -0
58 lines not on this page · raw message
drivers/net/meson.build +2 -1
@@ -29,7 +29,8 @@ # (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 = ['af_packet', 'null', 'pcap', 'ring'] +drivers = ['af_packet', 'e1000', 'fm10k', 'i40e', 'ixgbe', + 'null', 'pcap', 'ring'] std_deps = ['ethdev', 'kvargs'] # 'ethdev' also pulls in mbuf, net, eal etc config_flag_fmt = 'RTE_LIBRTE_@0@_PMD' driver_name_fmt = 'rte_pmd_@0@'
Signature · 1 line
2.13.5
PATCH v2 14/17 app/test-pmd: add test-pmd to meson build
In reply to Bruce Richardson--- app/meson.build | 32 +++++++++++++++++++++ app/test-pmd/meson.build | 74 ++++++++++++++++++++++++++++++++++++++++++++++++ meson.build | 3 +- 3 files changed, 108 insertions(+), 1 deletion(-) 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. +# +# 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 +74 -0
74 lines not on this page · raw message
meson.build +2 -1
@@ -62,7 +62,8 @@ subdir('lib') subdir('buildtools') subdir('drivers') -# TODO build binaries and installable tools +# build binaries and (TODO) installable tools +subdir('app') # write the build config build_cfg = 'rte_build_config.h'
Signature · 1 line
2.13.5
PATCH v2 15/17 usertools: add usertools installation to meson build
In reply to Bruce RichardsonHave the "usertools" scripts installed when doing a DPDK install using ninja. They will be copies to $prefix/bin, generally /usr/local/bin, alongside testpmd.
--- meson.build | 3 ++- usertools/meson.build | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 usertools/meson.build
meson.build +2 -1
@@ -62,7 +62,8 @@ subdir('lib') subdir('buildtools') subdir('drivers') -# build binaries and (TODO) installable tools +# build binaries and installable tools +subdir('usertools') subdir('app') # write the build config
usertools/meson.build new file +32 -0
@@ -0,0 +1,32 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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.5
PATCH v2 16/17 build: add option to version libs using DPDK version
In reply to Bruce RichardsonNormally, each library has it's own version number based on the ABI. Add an option to have all libs just use the DPDK version number as the .so version.
--- drivers/meson.build | 8 +++++++- lib/meson.build | 8 +++++++- meson_options.txt | 1 + 3 files changed, 15 insertions(+), 2 deletions(-)
drivers/meson.build +7 -1
@@ -92,6 +92,12 @@ foreach class:driver_classes depends: [pmdinfogen, tmp_lib]) endforeach + if get_option('per_library_versions') + so_version = '@[email protected]'.format(version) + else + so_version = meson.project_version() + endif + # now build the driver itself, and add to the drivers list lib_name = driver_name_fmt.format(name) version_map = '@0@/@1@/@2@_version.map'.format(
@@ -105,7 +111,7 @@ foreach class:driver_classes c_args: cflags, link_args: '-Wl,--version-script=' + version_map, link_depends: version_map, - version: '@[email protected]'.format(version), + version: so_version, install: true, install_dir: driver_install_path)
lib/meson.build +7 -1
@@ -76,6 +76,12 @@ foreach l:libraries dep_objs += [get_variable('dep_rte_' + d)] endforeach + if get_option('per_library_versions') + so_version = '@[email protected]'.format(version) + else + so_version = meson.project_version() + endif + version_map = '@0@/@1@/rte_@2@_version.map'.format( meson.current_source_dir(), dir_name, name) libname = 'rte_' + name
@@ -87,7 +93,7 @@ foreach l:libraries include_directories: include_directories(dir_name), link_args: '-Wl,--version-script=' + version_map, link_depends: version_map, - version: '@[email protected]'.format(version), + version: so_version, install: true) dep = declare_dependency(link_with: lib, include_directories: include_directories(dir_name),
meson_options.txt +1 -0
@@ -6,3 +6,4 @@ 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') 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') +option('per_library_versions', type: 'boolean', value: true, description: 'true: each lib gets its own version number, false: DPDK version used for each lib')
Signature · 1 line
2.13.5
Re: [PATCH v2 16/17] build: add option to version libs using DPDK version
Quoted 80 lines · Bruce Richardson
Normally, each library has it's own version number based on the ABI. Add an option to have all libs just use the DPDK version number as the
.so version.Signed-off-by Bruce Richardson <[email protected]>Reviewed-by Harry van Haaren <[email protected]>---
drivers/meson.build | 8 +++++++-
lib/meson.build | 8 +++++++-
meson_options.txt | 1 +3 files changed, 15 insertions(+), 2 deletions(-)drivers/meson.build +0
-0@@ -92,6 +92,12 @@ foreach class:driver_classesdepends:
[pmdinfogen,tmp_lib])
endforeachdrivers/meson.build +6
-0+ if get_option('per_library_versions') + so_version = '@[email protected]'.format(version) + else + so_version = meson.project_version() + endif +# now build the driver itself, and add to the drivers list lib_name = driver_name_fmt.format(name) version_map = '@0@/@1@/@2@_version.map'.form at(drivers/meson.build +0
-0@@ -105,7 +111,7 @@ foreach class:driver_classes c_args: cflags,
link_args: '-Wl,--version-script=' +version_map,
link_depends:version_map,drivers/meson.build +1
-1- version: '@[email protected]'.format(version), + version: so_version,install: true,
install_dir:driver_install_path)lib/meson.build +0
-0@@ -76,6 +76,12 @@ foreach l:libraries
dep_objs+= [get_variable('dep_rte_' + d)] endforeachlib/meson.build +6
-0+ if get_option('per_library_versions') + so_version = '@[email protected]'.format(version) + else + so_version = meson.project_version() + endif +
version_map= '@0@/@1@/rte_@2@_version.map'.format(meson.current_source_dir(),dir_name, name)
libname = 'rte_' + namelib/meson.build +0
-0@@ -87,7 +93,7 @@ foreach l:libraries
include_directories:include_directories(dir_name),
link_args: '-Wl,--version-script=' +version_map,
link_depends:version_map,lib/meson.build +1
-1- version: '@[email protected]'.format(version), + version: so_version,install: true) dep = declare_dependency(link_with: lib,
include_directories:include_directories(dir_name),meson_options.txt +0
-0@@ -6,3 +6,4 @@ option('allow_invalid_socket_id', type: 'boolean', value: false,description: 'allow out-of-range NUMA socket id\'s for
Quoted 8 lines
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') +option('per_library_versions', type: 'boolean', value: true,
description: 'true: each lib gets its own version number, false: DPDK version used for each lib')
Hi Bruce,
First of all thanks for implementing this option, and sorry for the delay.
A couple of minor things:
1) The project version has 3 digits, but the ABI version should have 2
- eg: should be 17.08 but right now it's 17.08.0 - given point releases will be ABI compatible so they must not change the ABI version. In the packaging code we use cut to chop it off:
DPDK_ABI := $(shell echo $(DEB_VERSION_UPSTREAM) | cut -d '.' -f1-2)
Not sure how to achieve the same in a Meson script though (can it shell out? or are there string manipulation built-ins?), sorry - just starting to look at it.
Right now the rte_config option allows the user to completely override the version - I'm fine with having a single boolean provided this change is applied, it simplifies packaging a bit, but if it's easier for you to just accepted a version instead of a boolean it's fine as well, as you prefer
2) When the option is true, it should not generate a symlink with the ABI "revision", as the first digit is really not the revision, so it does not make much sense. Worse, it will stop 2 versions being co- installable (which was the whole point :-) ), as, eg, 17.02, 17.05 and 17.08 will all ship a libfoo.so.17 symlink. I can fix it in the packaging, but I don't think it should be generated upstream at all when this option is enabled.
IOW, the following is the current result:
$ ls -l debian/librte-ethdev17.08/usr/lib/x86_64-linux-gnu/ total 72 lrwxrwxrwx 1 lboccass lboccass 24 Sep 13 11:50 librte_ethdev.so.17 -> librte_ethdev.so.17.08.0 -rw-r--r-- 1 lboccass lboccass 71672 Sep 13 11:50 librte_ethdev.so.17.08.0
The expected result would be to create a single file "librte_ethdev.so.17.08" instead.
Signature · 2 lines
Kind regards, Luca Boccassi
Re: [PATCH v2 16/17] build: add option to version libs using DPDK version
Quoted 102 lines · Luca Boccassi
Quoted 80 lines · Bruce Richardson
Normally, each library has it's own version number based on the ABI. Add an option to have all libs just use the DPDK version number as the
.so version.Signed-off-by Bruce Richardson <[email protected]>Reviewed-by Harry van Haaren <[email protected]>---
drivers/meson.build | 8 +++++++-
lib/meson.build | 8 +++++++-
meson_options.txt | 1 +3 files changed, 15 insertions(+), 2 deletions(-)drivers/meson.build +0
-0@@ -92,6 +92,12 @@ foreach class:driver_classesdepends:
[pmdinfogen,tmp_lib])
endforeachdrivers/meson.build +6
-0+ if get_option('per_library_versions') + so_version = '@[email protected]'.format(version) + else + so_version = meson.project_version() + endif +# now build the driver itself, and add to the drivers list lib_name = driver_name_fmt.format(name) version_map = '@0@/@1@/@2@_version.map'.form at(drivers/meson.build +0
-0@@ -105,7 +111,7 @@ foreach class:driver_classes c_args: cflags,
link_args: '-Wl,--version-script=' +version_map,
link_depends:version_map,drivers/meson.build +1
-1- version: '@[email protected]'.format(version), + version: so_version,install: true,
install_dir:driver_install_path)lib/meson.build +0
-0@@ -76,6 +76,12 @@ foreach l:libraries
dep_objs+= [get_variable('dep_rte_' + d)] endforeachlib/meson.build +6
-0+ if get_option('per_library_versions') + so_version = '@[email protected]'.format(version) + else + so_version = meson.project_version() + endif +
version_map= '@0@/@1@/rte_@2@_version.map'.format(meson.current_source_dir(),dir_name, name)
libname = 'rte_' + namelib/meson.build +0
-0@@ -87,7 +93,7 @@ foreach l:libraries
include_directories:include_directories(dir_name),
link_args: '-Wl,--version-script=' +version_map,
link_depends:version_map,lib/meson.build +1
-1- version: '@[email protected]'.format(version), + version: so_version,install: true) dep = declare_dependency(link_with: lib,
include_directories:include_directories(dir_name),meson_options.txt +0
-0@@ -6,3 +6,4 @@ option('allow_invalid_socket_id', type: 'boolean', value: false,description: 'allow out-of-range NUMA socket id\'s for
Quoted 8 lines
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') +option('per_library_versions', type: 'boolean', value: true,
description: 'true: each lib gets its own version number, false: DPDK version used for each lib')Hi Bruce,
First of all thanks for implementing this option, and sorry for the delay.
A couple of minor things:
1) The project version has 3 digits, but the ABI version should have 2
- eg: should be 17.08 but right now it's 17.08.0 - given point releases will be ABI compatible so they must not change the ABI version. In the packaging code we use cut to chop it off:
Quoted 6 lines
DPDK_ABI:= $(shell echo $(DEB_VERSION_UPSTREAM) | cut -d '.' -f1-2)Not sure how to achieve the same in a Meson script though (can it shell out? or are there string manipulation built-ins?), sorry - just starting to look at it.
That should be easy enough to do. It's 3-digits because I'm just pulling the project version unmodified from the initial project definition. I'd say I can manage to strip off one digit as part of the build.
Quoted 5 lines
Right now the
rte_configoption allows the user to completely override the version - I'm fine with having a single boolean provided this change is applied, it simplifies packaging a bit, but if it's easier for you to just accepted a version instead of a boolean it's fine as well, as you prefer
If there is a case where we might want to provide a particular version, I'm happy to edit the option, but if not I'll keep it as-is, because it will ensure all users of the option get the exact same behaviour, and means I only have two possibilities to test.
Quoted 8 lines
2) When the option is true, it should not generate a symlink with the ABI "revision", as the first digit is really not the revision, so it does not make much sense. Worse, it will stop 2 versions being co- installable (which was the whole point :-) ), as, eg, 17.02, 17.05 and 17.08 will all ship a libfoo.so.17 symlink. I can fix it in the packaging, but I don't think it should be generated upstream at all when this option is enabled.
Not exactly sure how to fix this, but I think it may work by using soversion as well as version in the library() calls.
Quoted 10 lines
IOW, the following is the current result:
$ ls -l debian/librte-ethdev17.08/usr/lib/x86_64-linux-gnu/ total 72 lrwxrwxrwx 1 lboccass lboccass 24 Sep 13 11:50 librte_ethdev.so.17 -> librte_ethdev.so.17.08.0 -rw-r--r-- 1 lboccass lboccass 71672 Sep 13 11:50 librte_ethdev.so.17.08.0The expected result would be to create a single file "librte_ethdev.so.17.08" instead.
Let me see what I can do :-)
/Bruce
Re: [PATCH v2 16/17] build: add option to version libs using DPDK version
Quoted 147 lines · Bruce Richardson
Quoted 122 lines · Luca Boccassi
Quoted 97 lines · Bruce Richardson
Normally, each library has it's own version number based on the ABI.
Add an option to have all libs just use the DPDK version number as
the
.so version.Signed-off-by Bruce Richardson <[email protected]>Reviewed-by Harry van Haaren <[email protected]>---
drivers/meson.build | 8 +++++++-
lib/meson.build | 8 +++++++-
meson_options.txt | 1 +3 files changed, 15 insertions(+), 2 deletions(-)drivers/meson.build +0
-0@@ -92,6 +92,12 @@ foreach class:driver_classesdepends:
[pmdinfogen,tmp_lib])
endforeachdrivers/meson.build +2
-0+ if get_option('per_library_versions') + so_version = '@[email protected]'.format(version)
drivers/meson.build +2
-0+ else + so_version =
meson.project_version()drivers/meson.build +2
-0+ endif +# now build the driver itself, and add to the drivers list lib_name = driver_name_fmt.format(name) version_map = '@0@/@1@/@2@_version.map'. form at(drivers/meson.build +0
-0@@ -105,7 +111,7 @@ foreach class:driver_classes c_args: cflags,
link_args: '-Wl,--version- script=' +version_map,
link_depends:version_map,drivers/meson.build +0
-1- version: '@[email protected]'.format(version),
drivers/meson.build +1
-0+ version: so_version,install: true,
install_dir:driver_install_path)lib/meson.build +0
-0@@ -76,6 +76,12 @@ foreach l:libraries
dep_objs+= [get_variable('dep_rte_' + d)]
endforeachlib/meson.build +6
-0+ if get_option('per_library_versions') + so_version = '@[email protected]'.format(version) + else + so_version = meson.project_version() + endif +
version_map= '@0@/@1@/rte_@2@_version.map'.form at(
meson.current_source_dir(),dir_name, name)
libname = 'rte_' + namelib/meson.build +0
-0@@ -87,7 +93,7 @@ foreach l:libraries
include_directories:include_directories(dir_name),
link_args: '-Wl,--version- script=' +version_map,
link_depends:version_map,lib/meson.build +0
-1- version: '@[email protected]'.format(version),
lib/meson.build +1
-0+ version: so_version,install: true) dep = declare_dependency(link_with: lib,
include_directories:include_directories(dir_name),meson_options.txt +0
-0@@ -6,3 +6,4 @@ 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') option('enable_kmods', type: 'boolean', value: true, description:
Quoted 8 lines
'build kernel modules')
option('kernel_dir', type: 'string', value: '', description:
'path
to the kernel for building kernel modules') +option('per_library_versions', type: 'boolean', value: true,
description: 'true: each lib gets its own version number, false:
DPDK
version used for each lib')Hi Bruce,
First of all thanks for implementing this option, and sorry for the delay.
A couple of minor things:
1) The project version has 3 digits, but the ABI version should have 2
- eg: should be 17.08 but right now it's 17.08.0 - given point releases
will be ABI compatible so they must not change the ABI version. In the
packaging code we use cut to chop it off:Quoted 8 lines
DPDK_ABI:= $(shell echo $(DEB_VERSION_UPSTREAM) | cut -d '.' -f1-
2)Not sure how to achieve the same in a Meson script though (can it shell
out? or are there string manipulation built-ins?), sorry - just starting to look at it.That should be easy enough to do. It's 3-digits because I'm just pulling
the project version unmodified from the initial project definition. I'd
say I can manage to strip off one digit as part of the build.Quoted 8 lines
Right now the
rte_configoption allows the user to completely override
the version - I'm fine with having a single boolean provided this change is applied, it simplifies packaging a bit, but if it's easier
for you to just accepted a version instead of a boolean it's fine as
well, as you prefer
Quoted 6 lines
If there is a case where we might want to provide a particular version,
I'm happy to edit the option, but if not I'll keep it as-is, because it
will ensure all users of the option get the exact same behaviour, and means I only have two possibilities to test.
I agree, it looks fine as it is right now - I'm not aware of any other use case at the moment.
Quoted 25 lines
Quoted 11 lines
2) When the option is true, it should not generate a symlink with the
ABI "revision", as the first digit is really not the revision, so it
does not make much sense. Worse, it will stop 2 versions being co- installable (which was the whole point :-) ), as, eg, 17.02, 17.05 and
17.08 will all ship a libfoo.so.17 symlink. I can fix it in the packaging, but I don't think it should be generated upstream at all when this option is enabled.Not exactly sure how to fix this, but I think it may work by using soversion as well as version in the
library()calls.Quoted 10 lines
IOW, the following is the current result:
$ ls -l debian/librte-ethdev17.08/usr/lib/x86_64-linux-gnu/ total 72 lrwxrwxrwx 1 lboccass lboccass 24 Sep 13 11:50 librte_ethdev.so.17 -> librte_ethdev.so.17.08.0 -rw-r--r-- 1 lboccass lboccass 71672 Sep 13 11:50 librte_ethdev.so.17.08.0
Quoted 7 lines
Quoted 3 lines
The expected result would be to create a single file "librte_ethdev.so.17.08" instead.
Let me see what I can do :-)
/Bruce
Now it works as expected, thanks!
Signature · 2 lines
Kind regards, Luca Boccassi
PATCH v2 17/17 doc: add documentation on how to add new components to DPDK
In reply to Bruce RichardsonAdd to the contributors guide details on how to add libraries and drivers and integrate them with the DPDK build system(s).
--- doc/guides/contributing/coding_style.rst | 214 +++++++++++++++++++++++++++++++ 1 file changed, 214 insertions(+)
doc/guides/contributing/coding_style.rst +214 -0
@@ -702,3 +702,217 @@ All Python code should work with Python 2.7+ and 3.2+ and be compliant with `PEP8 (Style Guide for Python Code) <https://www.python.org/dev/peps/pep-0008/>`_. The ``pep8`` tool can be used for testing compliance with the guidelines. + +Integrating with the Build System +--------------------------------- + +DPDK supports being built in two different ways: + +* using ``make`` - or more specifically "GNU make", i.e. ``gmake`` on FreeBSD +* using the tools ``meson`` and ``ninja`` + +Any new library or driver to be integrated into DPDK should support being +built with both systems. While building using ``make`` is a legacy approach, and +most build-system enhancements are being done using ``meson`` and ``ninja`` +there are no plans at this time to deprecate the legacy ``make`` build system. + +Therefore all new component additions should include both a ``Makefile`` and a +``meson.build`` file, and should be added to the component lists in both the +``Makefile`` and ``meson.build`` files in the relevant top-level directory: +either ``lib`` directory or a ``driver`` subdirectory. + +Makefile Contents +~~~~~~~~~~~~~~~~~ + +The ``Makefile`` for the component should be of the following format, where +``<name>`` corresponds to the name of the library in question, e.g. hash, +lpm, etc. For drivers, the same format of Makefile is used. + +.. code-block:: makefile + + # pull in basic DPDK definitions, including whether library is to be + # built or not + include $(RTE_SDK)/mk/rte.vars.mk + + # library name + LIB = librte_<name>.a + + # any library cflags needed. Generally add "-O3 $(WERROR_FLAGS)" + CFLAGS += -O3 + CFLAGS += $(WERROR_FLAGS) + + # the symbol version information for the library, and .so version + EXPORT_MAP := rte_<name>_version.map + LIBABIVER := 1 + + # all source filenames are stored in SRCS-y + SRCS-$(CONFIG_RTE_LIBRTE_<NAME>) += rte_<name>.c + + # install includes + SYMLINK-$(CONFIG_RTE_LIBRTE_<NAME>)-include += rte_<name>.h + + # pull in rules to build the library + include $(RTE_SDK)/mk/rte.lib.mk + +Meson Build File Contents - Libraries +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``meson.build`` file for a new DPDK library should be of the following basic +format. + +.. code-block:: python + + sources = files('file1.c', ...) + headers = files('file1.c', ...) + + +The will build based on a number of conventions and assumptions within the DPDK +itself, for example, that the library name is the same as the directory name in +which the files are stored. + +For a library ``meson.build`` file, there are number of variables which can be +set, some mandatory, others optional. The mandatory fields are: + +sources + **Default Value = []**. + This variable should list out the files to be compiled up to create the + library. Files must be specified using the meson ``files()`` function. + + +The optional fields are: + +build + **Default Value = true.** + Used to optionally compile a library, based on its dependencies or + environment. A simple example of use would be: + +.. code-block:: python + + if host_machine.system() != 'linux' + build = false + endif + + +cflags + **Default Value = []**. + Used to specify any additional cflags that need to be passed to compile + the sources in the library. + +deps + **Default Value = ['eal']**. + Used to list the internal library dependencies of the library. It should + be assigned to using ``+=`` rather than overwriting using ``=``. The + dependencies should be specified as strings, each one giving the name of + a DPDK library, without the ``librte_`` prefix. Dependencies are handled + recursively, so specifying e.g. ``mempool``, will automatically also + make the library depend upon the mempool library's dependencies too - + ``ring`` and ``eal``. For libraries that only depend upon EAL, this + variable may be omitted from the ``meson.build`` file. For example: + +.. code-block:: python + + deps += ['ethdev'] + + +ext_deps + **Default Value = []**. + Used to specify external dependencies of this library. They should be + returned as dependency objects, as returned from the meson + ``dependency()`` or ``find_library()`` functions. Before returning + these, they should be checked to ensure the dependencies have been + found, and, if not, the ``build`` variable should be set to ``false``. + For example: + +.. code-block:: python + + my_dep = dependency('libX', required: 'false') + if my_dep.found() + ext_deps += my_dep + else + build = false + endif + + +headers + **Default Value = []**. + Used to return the list of header files for the library that should be + installed to $PREFIX/include when ``ninja install`` is run. As with + source files, these should be specified using the meson ``files()`` + function. + +name + **Default Value = library name derived from the directory name**. + If a library's .so or .a file differs from that given in the directory + name, the name should be specified using this variable. In practice, + since the convention is that for a library called ``librte_xyz.so``, the + sources are stored in a directory ``lib/librte_xyz``, this value should + never be needed for new libraries. + +.. note:: + + The name value also provides the name used to find the function version + map file, as part of the build process, so if the directory name and + library names differ, the ``version.map`` file should be named + consistently with the library, not the directory + +objs + **Default Value = []**. + This variable can be used to pass to the library build some pre-built + objects that were compiled up as part of another target given in the + included library ``meson.build`` file. + +version + **Default Value = 1**. + Specifies the ABI version of the library, and is used as the major + version number of the resulting ``.so`` library. + +Meson Build File Contents - Drivers +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +For drivers, the values are largely the same as for libraries. The variables +supported are: + +build + As above. + +cflags + As above. + +deps + As above. + +ext_deps + As above. + +includes + **Default Value = <driver directory>** Some drivers include a base + directory for additional source files and headers, so we have this + variable to allow the headers from that base directory to be found when + compiling driver sources. Should be appended to using ``+=`` rather than + overwritten using ``=``. The values appended should be meson include + objects got using the ``include_directories()`` function. For example: + +.. code-block:: python + + includes += include_directories('base') + +name + As above, though note that each driver class can define it's own naming + scheme for the resulting ``.so`` files. + +objs + As above, generally used for the contents of the ``base`` directory. + +pkgconfig_extra_libs + **Default Value = []** + This variable is used to pass additional library link flags through to + the DPDK pkgconfig file generated, for example, to track any additional + libraries that may need to be linked into the build - especially when + using static libraries. Anything added here will be appended to the end + of the ``pkgconfig --libs`` output. + +sources [mandatory] + As above + +version + As above
Signature · 1 line
2.13.5
Quoted 12 lines · Bruce Richardson
V2 changes:
* fixed copyright notices, updated 2016 to 2017
* removed dependency on kconfig file in kernel build tree
* marked pmdinfogen as a "native" binary, in preparation for future cross- compilation work
* added in additional warning flags for compatibility with existing system ——
Quoted 3 lines
Once reviewed and tested a bit, I hope to apply this set - or a new revision of it - to the build-next tree, to serve as a baseline for others to use and to add the missing functionality to.
I would really like to see these patches in a build-next tree as it is much easier to work with and help with changes then patches on the master.
When can we have a build-next tree created?
Quoted 3 lines
Regards,
/Bruce
Regards,
Keith
Quoted 12 lines · Keith
Quoted 10 lines · Bruce Richardson
V2 changes:
* fixed copyright notices, updated 2016 to 2017
* removed dependency on kconfig file in kernel build tree
* marked pmdinfogen as a "native" binary, in preparation for future cross- compilation work
* added in additional warning flags for compatibility with existing system ——
Quoted 8 lines
Quoted 3 lines
Once reviewed and tested a bit, I hope to apply this set - or a new revision of it - to the build-next tree, to serve as a baseline for others to use and to add the missing functionality to.
I would really like to see these patches in a build-next tree as it is much easier to work with and help with changes then patches on the master.
When can we have a build-next tree created?
Tree already exists. I'm just waiting on a bit more review and ideally an ack before I apply this set there.
http://dpdk.org/browse/draft/dpdk-next-build/
/Bruce
Quoted 20 lines · Bruce
Quoted 16 lines · Keith
Quoted 15 lines · Bruce Richardson
V2 changes:
* fixed copyright notices, updated 2016 to 2017
* removed dependency on kconfig file in kernel build tree
* marked pmdinfogen as a "native" binary, in preparation for future cross- compilation work
* added in additional warning flags for compatibility with existing system ——Once reviewed and tested a bit, I hope to apply this set - or a new revision of it - to the build-next tree, to serve as a baseline for others to use and to add the missing functionality to.
Quoted 6 lines
Quoted 4 lines
I would really like to see these patches in a build-next tree as it is much easier to work with and help with changes then patches on the master.
When can we have a build-next tree created?
Tree already exists. I'm just waiting on a bit more review and ideally an ack before I apply this set there.
Not sure what you are waiting for as an ack is not going to make much of a difference IMO :-)
Quoted 4 lines
http://dpdk.org/browse/draft/dpdk-next-build/
/Bruce
Regards,
Keith
Wiles, Keith
Acked-byQuoted 23 lines · Keith
Quoted 21 lines · Bruce
Quoted 16 lines · Keith
Quoted 15 lines · Bruce Richardson
V2 changes:
* fixed copyright notices, updated 2016 to 2017
* removed dependency on kconfig file in kernel build tree
* marked pmdinfogen as a "native" binary, in preparation for future cross- compilation work
* added in additional warning flags for compatibility with existing system ——Once reviewed and tested a bit, I hope to apply this set - or a new revision of it - to the build-next tree, to serve as a baseline for others to use and to add the missing functionality to.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
I would really like to see these patches in a build-next tree as it is much easier to work with and help with changes then patches on the master.
When can we have a build-next tree created?
Tree already exists. I'm just waiting on a bit more review and ideally an ack before I apply this set there.
Not sure what you are waiting for as an ack is not going to make much of a difference IMO :-)
I pulled down the dpdk-next-build tree and applied the patches, things work and build, but a number of compiler warns pop up. I think we can ack this one and I know a number of things need to be fixed.
So I am going to ack this patch set for the dpdk-next-build tree.
Quoted 8 lines
Quoted 5 lines
http://dpdk.org/browse/draft/dpdk-next-build/
/Bruce
Regards,
Keith
Regards,
Keith
Quoted 30 lines · Keith
Quoted 30 lines · Keith
Quoted 27 lines · Bruce
Quoted 12 lines · Keith
Quoted 10 lines · Bruce Richardson
V2 changes:
* fixed copyright notices, updated 2016 to 2017
* removed dependency on kconfig file in kernel build tree
* marked pmdinfogen as a "native" binary, in preparation for future cross- compilation work
* added in additional warning flags for compatibility with existing system ——Quoted 8 lines
Quoted 3 lines
Once reviewed and tested a bit, I hope to apply this set - or a new revision of it - to the build-next tree, to serve as a baseline for others to use and to add the missing functionality to.
I would really like to see these patches in a build-next tree as it is much easier to work with and help with changes then patches on the master.
When can we have a build-next tree created?
Tree already exists. I'm just waiting on a bit more review and ideally an ack before I apply this set there.
Quoted 8 lines
Quoted 1 line
Not sure what you are waiting for as an ack is not going to make much of a difference IMO :-)
I pulled down the dpdk-next-build tree and applied the patches, things work and build, but a number of compiler warns pop up. I think we can ack this one and I know a number of things need to be fixed.
So I am going to ack this patch set for the dpdk-next-build tree.
Acked-by Keith Wiles <[email protected]>
Yep, compiler warnings should hopefully be fixed by these patches which I submitted for inclusion in the main tree.
http://dpdk.org/dev/patchwork/patch/28457/
http://dpdk.org/dev/patchwork/patch/28458/
Regards,
/Bruce
Quoted 20 lines · Keith
Quoted 20 lines · Bruce
Quoted 16 lines · Keith
Quoted 15 lines · Bruce Richardson
V2 changes:
* fixed copyright notices, updated 2016 to 2017
* removed dependency on kconfig file in kernel build tree
* marked pmdinfogen as a "native" binary, in preparation for future cross- compilation work
* added in additional warning flags for compatibility with existing system ——Once reviewed and tested a bit, I hope to apply this set - or a new revision of it - to the build-next tree, to serve as a baseline for others to use and to add the missing functionality to.
Quoted 9 lines
Quoted 6 lines
Quoted 4 lines
I would really like to see these patches in a build-next tree as it is much easier to work with and help with changes then patches on the master.
When can we have a build-next tree created?
Tree already exists. I'm just waiting on a bit more review and ideally an ack before I apply this set there.
Not sure what you are waiting for as an ack is not going to make much of a difference IMO :-)
Why would an ACK not make any difference? Are you suggesting that using this is a forgone conclusion?
Neil
Quoted 8 lines
Quoted 4 lines
http://dpdk.org/browse/draft/dpdk-next-build/
/Bruce
Regards,
Keith
Quoted 28 lines · Neil Horman
Quoted 24 lines · Keith
Quoted 24 lines · Bruce
Quoted 20 lines · Keith
Quoted 12 lines · Bruce Richardson
V2 changes:
* fixed copyright notices, updated 2016 to 2017
* removed dependency on kconfig file in kernel build tree
* marked pmdinfogen as a "native" binary, in preparation for future cross- compilation work
* added in additional warning flags for compatibility with existing system ——Quoted 3 lines
Once reviewed and tested a bit, I hope to apply this set - or a new revision of it - to the build-next tree, to serve as a baseline for others to use and to add the missing functionality to.
I would really like to see these patches in a build-next tree as it is much easier to work with and help with changes then patches on the master.
When can we have a build-next tree created?
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Tree already exists. I'm just waiting on a bit more review and ideally an ack before I apply this set there.
Not sure what you are waiting for as an ack is not going to make much of a difference IMO :-)
Why would an ACK not make any difference? Are you suggesting that using this is a forgone conclusion?
No, moving this patch to the dpdk-next-build repo is all I am saying. The patch and ack here is not for the master repo only the next-build repo and a pull request from the next-build repo still needs to be approved at some point for the master.
Quoted 10 lines
Neil
Quoted 7 lines
Quoted 4 lines
http://dpdk.org/browse/draft/dpdk-next-build/
/Bruce
Regards,
Keith
Regards,
Keith
v3 cover build DPDK libs and some drivers with meson/ninja
In reply to Bruce RichardsonV3 changes:
* used two-digit version numbers when globally versioning libs+drivers
* removed symlinks with single-digit version numbers in same case
* moved driver install location from $prefix/dpdk to $prefix/share/dpdk
V2 changes:
* fixed copyright notices, updated 2016 to 2017
* removed dependency on kconfig file in kernel build tree
* marked pmdinfogen as a "native" binary, in preparation for future cross- compilation work
* added in additional warning flags for compatibility with existing system
---
Following on from the two previous RFCs [1] [2], here is a cleaned up patchset to serve as a start-point for getting all of DPDK building with meson and ninja.
What's covered:
* Basic infrastructure for feature detection and DPDK compilation
* Building of all DPDK libraries - as either static or shared
* Compilation of igb_uio driver for Linux
* Building a number of mempool, crypto and net drivers.
* Installation of compiled libraries and headers
* Installation of usertools scripts
* Compilation of testpmd as dpdk-testpmd and install of same
* Generation and installation of pkgconfig file for DPDK
* Contributors guide document addition describing how to add build scripts
What's not implemented:
* Just about everything else :-), including
* Support for non-x86 architectures, including cross-compilation
* Lots of PMDs
* Support for building and running the unit tests
Some key differences from RFC2:
* Removed duplication between the different driver meson files by moving the build logic up one level to the driver/meson.build file.
* Added a build option to allow versioning the libraries using the DPDK version number, rather than individual .so versions.
* Made EAL a default dependency for libs, to simplify meson.build files for a number of them.
* Made the build variables used for libraries and drivers more consistent.
* Moved responsibility for determining if a given driver or library should be built to the driver/library's own build file, giving a single place where all details about that component are placed, and saving having lots of environment detection logic in higher-level build files.
* Begun adding in developer documentation to make it easier for driver authors/maintainers to contribute.
Meson 0.41 and ninja are needed, and ideally meson 0.42 is recommended. Ninja is available in most distributions, and meson - if an updated version is not available on your distro of choice - can be easily got using
"pip3 install meson"
To build and install then use:
meson build # use default compiler and shared libs cd build
ninja
sudo ninja install
Thereafter to use DPDK in other build systems one can use:
pkg-config --cflags DPDK pkt-config --libs DPDK
to query the needed DPDK build parameters.
Once reviewed and tested a bit, I hope to apply this set - or a new revision of it - to the build-next tree, to serve as a baseline for others to use and to add the missing functionality to.
Regards,
/Bruce
[1] http://dpdk.org/ml/archives/dev/2017-June/067429.html
[2] http://dpdk.org/ml/archives/dev/2017-August/072818.html
Bruce Richardson (17):
build: add initial infrastructure for meson & ninja builds
eal: add eal library to meson build
igb_uio: add igb_uio kmod to meson build
build: add DPDK libraries to build
build: add buildtools to meson build
build: add infrastructure for building PMDs drivers/mempool: add SW mempool drivers to meson build drivers/crypto: add crypto drv class and null PMD to meson crypto/openssl: add driver to meson build crypto/qat: add driver to meson build drivers/net: add net driver support to meson build drivers/net: add set of vdev PMDs to build drivers/net: add drivers for Intel NICs to meson build app/test-pmd: add test-pmd to meson build
usertools: add usertools installation to meson build
build: add option to version libs using DPDK version
doc: add documentation on how to add new components to DPDK
app/meson.build | 32 +++ app/test-pmd/meson.build | 74 +++++++ buildtools/gen-pmdinfo-cfile.sh | 41 ++++ buildtools/meson.build | 34 ++++ buildtools/pmdinfogen/meson.build | 36 ++++ config/meson.build | 72 +++++++ config/rte_config.h | 121 ++++++++++++ config/x86/meson.build | 70 +++++++ doc/guides/contributing/coding_style.rst | 214 +++++++++++++++++++++ drivers/crypto/meson.build | 35 ++++ drivers/crypto/null/meson.build | 33 ++++ drivers/crypto/openssl/meson.build | 38 ++++ drivers/crypto/qat/meson.build | 41 ++++ drivers/mempool/meson.build | 35 ++++ drivers/mempool/ring/meson.build | 32 +++ drivers/mempool/stack/meson.build | 32 +++ drivers/meson.build | 133 +++++++++++++ drivers/net/af_packet/meson.build | 35 ++++ drivers/net/e1000/base/meson.build | 65 +++++++ drivers/net/e1000/meson.build | 44 +++++ drivers/net/fm10k/base/meson.build | 55 ++++++ drivers/net/fm10k/meson.build | 44 +++++ drivers/net/i40e/base/meson.build | 56 ++++++ drivers/net/i40e/meson.build | 60 ++++++ drivers/net/ixgbe/base/meson.build | 60 ++++++ drivers/net/ixgbe/meson.build | 58 ++++++ drivers/net/meson.build | 36 ++++ drivers/net/null/meson.build | 32 +++ drivers/net/pcap/meson.build | 41 ++++ drivers/net/ring/meson.build | 33 ++++ lib/librte_acl/meson.build | 59 ++++++ lib/librte_bitratestats/meson.build | 34 ++++ lib/librte_cfgfile/meson.build | 34 ++++ lib/librte_cmdline/meson.build | 55 ++++++ 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 | 77 ++++++++ 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 | 82 ++++++++ lib/librte_eal/linuxapp/igb_uio/Kbuild | 1 + lib/librte_eal/linuxapp/igb_uio/meson.build | 46 +++++ lib/librte_eal/linuxapp/meson.build | 42 ++++ lib/librte_eal/meson.build | 44 +++++ lib/librte_efd/meson.build | 34 ++++ lib/librte_ether/meson.build | 45 +++++ lib/librte_eventdev/meson.build | 36 ++++ lib/librte_gro/meson.build | 34 ++++ lib/librte_hash/meson.build | 45 +++++ lib/librte_ip_frag/meson.build | 39 ++++ lib/librte_jobstats/meson.build | 33 ++++ lib/librte_kni/meson.build | 38 ++++ lib/librte_kvargs/meson.build | 34 ++++ lib/librte_latencystats/meson.build | 34 ++++ lib/librte_lpm/meson.build | 35 ++++ lib/librte_mbuf/meson.build | 35 ++++ lib/librte_mempool/meson.build | 35 ++++ lib/librte_meter/meson.build | 33 ++++ lib/librte_metrics/meson.build | 33 ++++ lib/librte_net/meson.build | 45 +++++ lib/librte_pdump/meson.build | 34 ++++ lib/librte_pipeline/meson.build | 35 ++++ lib/librte_port/meson.build | 58 ++++++ lib/librte_power/meson.build | 37 ++++ lib/librte_reorder/meson.build | 34 ++++ lib/librte_ring/meson.build | 33 ++++ lib/librte_sched/meson.build | 36 ++++ lib/librte_table/meson.build | 52 +++++ lib/librte_timer/meson.build | 33 ++++ lib/librte_vhost/meson.build | 39 ++++ lib/meson.build | 109 +++++++++++ meson.build | 88 +++++++++ meson_options.txt | 9 + usertools/meson.build | 32 +++ 80 files changed, 3818 insertions(+) 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 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/e1000/base/meson.build create mode 100644 drivers/net/e1000/meson.build create mode 100644 drivers/net/fm10k/base/meson.build create mode 100644 drivers/net/fm10k/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/null/meson.build create mode 100644 drivers/net/pcap/meson.build create mode 100644 drivers/net/ring/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 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.build
Signature · 1 line
2.13.5
PATCH v3 1/17 build: add initial infrastructure for meson & ninja builds
To build with meson and ninja, we need some initial infrastructure in place. The build files for meson always need to be called "meson.build", and options get placed in meson_options.txt
This commit adds a top-level meson.build file, which sets up the global variables for tracking drivers, libraries, etc., and then includes other build files, before finishing by writing the global build configuration header file and a DPDK pkgconfig file at the end, using some of those same globals.
Quoted 1 line
From the top level build file, the only include file thus far is for the
config folder, which does some other setup of global configuration parameters, including pulling in architecture specific parameters from an architectural subdirectory. A number of configuration build options are provided for the project to tune a number of global variables which will be used later e.g. max numa nodes, max cores, etc. These settings all make their way to the global build config header "rte_build_config.h". There is also a file "rte_config.h", which includes "rte_build_config.h", and this file is meant to hold other build-time values which are present in our current static build configuration but are not normally meant for user-configuration. Ideally, over time, the values placed here should be moved to the individual libraries or drivers which want those values.
--- config/meson.build | 72 +++++++++++++++++++++++++++++++++++++++++++ config/rte_config.h | 50 ++++++++++++++++++++++++++++++ config/x86/meson.build | 70 ++++++++++++++++++++++++++++++++++++++++++ meson.build | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++ meson_options.txt | 6 ++++ 5 files changed, 281 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 +72 -0
@@ -0,0 +1,72 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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') +# 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') + +# enable extra warnings and disable any unwanted warnings +warning_flags = [ + '-Wsign-compare', + '-Wcast-qual', + '-Wno-address-of-packed-member', + '-Wno-format-truncation' +] +foreach arg: warning_flags + if cc.has_argument(arg) + add_project_arguments(arg, language: 'c') + endif +endforeach + +compile_time_cpuflags = [] +if host_machine.cpu_family().startswith('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', join_paths( + get_option('prefix'), 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 new file +50 -0
50 lines not on this page · raw message
config/x86/meson.build new file +70 -0
70 lines not on this page · raw message
meson.build new file +83 -0
83 lines not on this page · raw message
meson_options.txt new file +6 -0
@@ -0,0 +1,6 @@ +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.5
Re: [PATCH v3 01/17] build: add initial infrastructure for meson & ninja builds
On 09/13/2017 04:12 PM, Bruce Richardson wrote:
[...]
meson.build line 52
Quoted 8 lines
meson.build new file +8
-0+ +# for static libs, treat the drivers as regular libraries, otherwise +# for shared libs, put them in a driver folder +if get_option('default_library') == 'static' + driver_install_path = get_option('libdir') +else + driver_install_path = join_paths(get_option('datadir'), 'dpdk/drivers') +endif
This is against hier, since:
"This directory contains subdirectories with specific application data, that can be shared among different architectures of the same OS." (from man 7 hier)
Please consider to use a subdirectory of libdir like the actual dpdk instead.
Re: [PATCH v3 01/17] build: add initial infrastructure for meson & ninja builds
Quoted 16 lines · Timothy M. Redaelli
On 09/13/2017 04:12 PM, Bruce Richardson wrote:
[...]meson.build line 52
Quoted 8 lines
meson.build new file +8
-0+ +# for static libs, treat the drivers as regular libraries, otherwise +# for shared libs, put them in a driver folder +if get_option('default_library') == 'static' + driver_install_path = get_option('libdir') +else + driver_install_path = join_paths(get_option('datadir'), 'dpdk/drivers') +endifThis is against hier, since:
"This directory contains subdirectories with specific application data, that can be shared among different architectures of the same OS." (from man 7 hier)
Quoted 2 lines
Please consider to use a subdirectory of libdir like the actual dpdk instead.
Sure. Using "$libdir/dpdk/drivers" work well, or is there a better choice?
Re: [PATCH v3 01/17] build: add initial infrastructure for meson & ninja builds
Quoted 17 lines · Bruce Richardson
Quoted 4 lines · Timothy M. Redaelli
On 09/13/2017 04:12 PM, Bruce Richardson wrote:
[...]Review
Quoted 2 lines
(quoted diff) +2
-0+ +# for static libs, treat the drivers as regular libraries,otherwise
Quoted 5 lines
meson.build
Quoted 5 lines
meson.build new file +5
-0+# for shared libs, put them in a driver folder +if get_option('default_library') == 'static' + driver_install_path = get_option('libdir') +else + driver_install_path = join_paths(get_option('datadir'),'dpdk/drivers')
Quoted 4 lines
Quoted 1 line
+endif
This is against hier, since:
"This directory contains subdirectories with specific applicationdata,
Quoted 8 lines
Quoted 5 lines
that can be shared among different architectures of the same OS." (from man 7 hier)
Please consider to use a subdirectory of libdir like the actual dpdk instead.
Sure. Using "$libdir/dpdk/drivers" work well, or is there a better choice?
Sounds good, thank you
PATCH v3 2/17 eal: add eal library to meson build
In reply to Bruce RichardsonSupport building the EAL with meson and ninja. This involves a number of different meson.build files for iterating through all the different subdirectories in the EAL. The library itself will be compiled on build but the header files are only copied from their initial location once "ninja install" is run. Instead, we use meson dependency tracking to ensure that other libraries which use the EAL headers can find them in their original locations.
Note: this does not include building kernel modules on either BSD or Linux
--- config/rte_config.h | 11 ++++ 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/meson.build | 32 ++++++++++ lib/librte_eal/meson.build | 44 +++++++++++++ lib/meson.build | 32 ++++++++++ meson.build | 3 +- 14 files changed, 580 insertions(+), 1 deletion(-) 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/meson.build create mode 100644 lib/librte_eal/meson.build create mode 100644 lib/meson.build
config/rte_config.h +11 -0
@@ -47,4 +47,15 @@#include <rte_build_config.h> +/****** library defines ********/ + +/* 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_ */
lib/librte_eal/bsdapp/eal/meson.build new file +67 -0
67 lines not on this page · raw message
lib/librte_eal/bsdapp/meson.build new file +32 -0
@@ -0,0 +1,32 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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/common/arch/meson.build new file +33 -0
@@ -0,0 +1,33 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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. +# +# 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. +# +# 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 +48 -0
48 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 +72 -0
72 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. +# +# 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 +44 -0
44 lines not on this page · raw message
lib/meson.build new file +32 -0
@@ -0,0 +1,32 @@ +# BSD LICENSE +# +# Copyright(c) 2017 Intel Corporation. +# 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('librte_eal')
meson.build +2 -1
@@ -57,7 +57,8 @@ endif global_inc = include_directories('.', 'config') subdir('config') -# TODO build libs and drivers +# build libs and (TODO) drivers +subdir('lib') # TODO build binaries and installable tools
Signature · 1 line
2.13.5
PATCH v3 3/17 igb_uio: add igb_uio kmod to meson build
In reply to Bruce RichardsonSupport building igb_uio using meson and ninja. For this, we still use the kernel's kbuild system, by calling out to make, since it's safer and easier than trying to reproduce that in meson. A list of suitable file dependencies is given so that we have a reasonable chance of a rebuild when necessary.
--- lib/librte_eal/linuxapp/igb_uio/Kbuild | 1 + lib/librte_eal/linuxapp/igb_uio/meson.build | 46 +++++++++++++++++++++++++++++ lib/librte_eal/linuxapp/meson.build | 10 +++++++ meson_options.txt | 2 ++ 4 files changed, 59 insertions(+) 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 +46 -0
46 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 +2 -0
@@ -4,3 +4,5 @@ option('max_numa_nodes', type: 'string', value: '4', description: 'maximum numbe 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') +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.5