2017-12-18 15:56:25 +00:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
2019-04-02 03:54:53 +00:00
|
|
|
# Copyright(c) 2017-2019 Intel Corporation
|
2017-11-17 19:37:54 +00:00
|
|
|
|
2017-10-17 12:43:57 +00:00
|
|
|
|
|
|
|
# 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.
|
2019-02-06 11:01:30 +00:00
|
|
|
libraries = [
|
2018-10-22 13:15:30 +00:00
|
|
|
'kvargs', # eal depends on kvargs
|
2020-04-30 16:01:34 +00:00
|
|
|
'telemetry', # basic info querying
|
2019-02-26 17:46:34 +00:00
|
|
|
'eal', # everything depends on eal
|
2020-04-22 03:30:03 +00:00
|
|
|
'ring',
|
|
|
|
'rcu', # rcu depends on ring
|
|
|
|
'mempool', 'mbuf', 'net', 'meter', 'ethdev', 'pci', # core
|
2019-07-05 17:16:20 +00:00
|
|
|
'cmdline',
|
2017-10-17 12:43:57 +00:00
|
|
|
'metrics', # bitrate/latency stats depends on this
|
|
|
|
'hash', # efd depends on this
|
2018-04-04 21:51:09 +00:00
|
|
|
'timer', # eventdev depends on this
|
2017-10-17 12:43:57 +00:00
|
|
|
'acl', 'bbdev', 'bitratestats', 'cfgfile',
|
2018-10-22 13:15:30 +00:00
|
|
|
'compressdev', 'cryptodev',
|
2017-10-17 12:43:57 +00:00
|
|
|
'distributor', 'efd', 'eventdev',
|
|
|
|
'gro', 'gso', 'ip_frag', 'jobstats',
|
|
|
|
'kni', 'latencystats', 'lpm', 'member',
|
regexdev: introduce API
As RegEx usage become more used by DPDK applications, for example:
* Next Generation Firewalls (NGFW)
* Deep Packet and Flow Inspection (DPI)
* Intrusion Prevention Systems (IPS)
* DDoS Mitigation
* Network Monitoring
* Data Loss Prevention (DLP)
* Smart NICs
* Grammar based content processing
* URL, spam and adware filtering
* Advanced auditing and policing of user/application security policies
* Financial data mining - parsing of streamed financial feeds
* Application recognition.
* Dmemory introspection.
* Natural Language Processing (NLP)
* Sentiment Analysis.
* Big data database acceleration.
* Computational storage.
Number of PMD providers started to work on HW implementation,
along side with SW implementations.
This lib adds the support for those kind of devices.
The RegEx Device API is composed of two parts:
- The application-oriented RegEx API that includes functions to setup
a RegEx device (configure it, setup its queue pairs and start it),
update the rule database and so on.
- The driver-oriented RegEx API that exports a function allowing
a RegEx poll Mode Driver (PMD) to simultaneously register itself as
a RegEx device driver.
RegEx device components and definitions:
+-----------------+
| |
| o---------+ rte_regexdev_[en|de]queue_burst()
| PCRE based o------+ | |
| RegEx pattern | | | +--------+ |
| matching engine o------+--+--o | | +------+
| | | | | queue |<==o===>|Core 0|
| o----+ | | | pair 0 | | |
| | | | | +--------+ +------+
+-----------------+ | | |
^ | | | +--------+
| | | | | | +------+
| | +--+--o queue |<======>|Core 1|
Rule|Database | | | pair 1 | | |
+------+----------+ | | +--------+ +------+
| Group 0 | | |
| +-------------+ | | | +--------+ +------+
| | Rules 0..n | | | | | | |Core 2|
| +-------------+ | | +--o queue |<======>| |
| Group 1 | | | pair 2 | +------+
| +-------------+ | | +--------+
| | Rules 0..n | | |
| +-------------+ | | +--------+
| Group 2 | | | | +------+
| +-------------+ | | | queue |<======>|Core n|
| | Rules 0..n | | +-------o pair n | | |
| +-------------+ | +--------+ +------+
| Group n |
| +-------------+ |<-------rte_regexdev_rule_db_update()
| | | |<-------rte_regexdev_rule_db_compile_activate()
| | Rules 0..n | |<-------rte_regexdev_rule_db_import()
| +-------------+ |------->rte_regexdev_rule_db_export()
+-----------------+
RegEx: A regular expression is a concise and flexible means for matching
strings of text, such as particular characters, words, or patterns of
characters. A common abbreviation for this is â~@~\RegExâ~@~].
RegEx device: A hardware or software-based implementation of RegEx
device API for PCRE based pattern matching syntax and semantics.
PCRE RegEx syntax and semantics specification:
http://regexkit.sourceforge.net/Documentation/pcre/pcrepattern.html
RegEx queue pair: Each RegEx device should have one or more queue pair to
transmit a burst of pattern matching request and receive a burst of
receive the pattern matching response. The pattern matching
request/response embedded in *rte_regex_ops* structure.
Rule: A pattern matching rule expressed in PCRE RegEx syntax along with
Match ID and Group ID to identify the rule upon the match.
Rule database: The RegEx device accepts regular expressions and converts
them into a compiled rule database that can then be used to scan data.
Compilation allows the device to analyze the given pattern(s) and
pre-determine how to scan for these patterns in an optimized fashion that
would be far too expensive to compute at run-time. A rule database
contains a set of rules that compiled in device specific binary form.
Match ID or Rule ID: A unique identifier provided at the time of rule
creation for the application to identify the rule upon match.
Group ID: Group of rules can be grouped under one group ID to enable
rule isolation and effective pattern matching. A unique group identifier
provided at the time of rule creation for the application to identify
the rule upon match.
Scan: A pattern matching request through *enqueue* API.
It may possible that a given RegEx device may not support all the
features
of PCRE. The application may probe unsupported features through
struct rte_regexdev_info::pcre_unsup_flags
By default, all the functions of the RegEx Device API exported by a PMD
are lock-free functions which assume to not be invoked in parallel on
different logical cores to work on the same target object. For instance,
the dequeue function of a PMD cannot be invoked in parallel on two logical
cores to operates on same RegEx queue pair. Of course, this function
can be invoked in parallel by different logical core on different queue
pair. It is the responsibility of the upper level application to
enforce this rule.
In all functions of the RegEx API, the RegEx device is
designated by an integer >= 0 named the device identifier *dev_id*
At the RegEx driver level, RegEx devices are represented by a generic
data structure of type *rte_regexdev*.
RegEx devices are dynamically registered during the PCI/SoC device
probing phase performed at EAL initialization time.
When a RegEx device is being probed, a *rte_regexdev* structure and
a new device identifier are allocated for that device. Then, the
regexdev_init() function supplied by the RegEx driver matching the
probed device is invoked to properly initialize the device.
The role of the device init function consists of resetting the hardware
or software RegEx driver implementations.
If the device init operation is successful, the correspondence between
the device identifier assigned to the new device and its associated
*rte_regexdev* structure is effectively registered.
Otherwise, both the *rte_regexdev* structure and the device identifier
are freed.
The functions exported by the application RegEx API to setup a device
designated by its device identifier must be invoked in the following
order:
- rte_regexdev_configure()
- rte_regexdev_queue_pair_setup()
- rte_regexdev_start()
Then, the application can invoke, in any order, the functions
exported by the RegEx API to enqueue pattern matching job, dequeue
pattern matching response, get the stats, update the rule database,
get/set device attributes and so on
If the application wants to change the configuration (i.e. call
rte_regexdev_configure() or rte_regexdev_queue_pair_setup()), it must
call rte_regexdev_stop() first to stop the device and then do the
reconfiguration before calling rte_regexdev_start() again. The enqueue and
dequeue functions should not be invoked when the device is stopped.
Finally, an application can close a RegEx device by invoking the
rte_regexdev_close() function.
Each function of the application RegEx API invokes a specific function
of the PMD that controls the target device designated by its device
identifier.
For this purpose, all device-specific functions of a RegEx driver are
supplied through a set of pointers contained in a generic structure of
type *regexdev_ops*.
The address of the *regexdev_ops* structure is stored in the
*rte_regexdev* structure by the device init function of the RegEx driver,
which is invoked during the PCI/SoC device probing phase, as explained
earlier.
In other words, each function of the RegEx API simply retrieves the
*rte_regexdev* structure associated with the device identifier and
performs an indirect invocation of the corresponding driver function
supplied in the *regexdev_ops* structure of the *rte_regexdev*
structure.
For performance reasons, the address of the fast-path functions of the
RegEx driver is not contained in the *regexdev_ops* structure.
Instead, they are directly stored at the beginning of the *rte_regexdev*
structure to avoid an extra indirect memory access during their
invocation.
RTE RegEx device drivers do not use interrupts for enqueue or dequeue
operation. Instead, RegEx drivers export Poll-Mode enqueue and dequeue
functions to applications.
The *enqueue* operation submits a burst of RegEx pattern matching
request to the RegEx device and the *dequeue* operation gets a burst of
pattern matching response for the ones submitted through *enqueue*
operation.
Typical application utilisation of the RegEx device API will follow the
following programming flow.
- rte_regexdev_configure()
- rte_regexdev_queue_pair_setup()
- rte_regexdev_rule_db_update() Needs to invoke if precompiled rule
database not
provided in rte_regexdev_config::rule_db for rte_regexdev_configure()
and/or application needs to update rule database.
- rte_regexdev_rule_db_compile_activate() Needs to invoke if
rte_regexdev_rule_db_update function was used.
- Create or reuse exiting mempool for *rte_regex_ops* objects.
- rte_regexdev_start()
- rte_regexdev_enqueue_burst()
- rte_regexdev_dequeue_burst()
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Ori Kam <orika@mellanox.com>
2020-07-06 17:36:46 +00:00
|
|
|
'power', 'pdump', 'rawdev', 'regexdev',
|
2020-04-22 03:30:03 +00:00
|
|
|
'rib', 'reorder', 'sched', 'security', 'stack', 'vhost',
|
2019-06-24 13:39:58 +00:00
|
|
|
# ipsec lib depends on net, crypto and security
|
2019-01-10 21:06:28 +00:00
|
|
|
'ipsec',
|
2019-11-01 15:21:38 +00:00
|
|
|
#fib lib depends on rib
|
|
|
|
'fib',
|
2017-10-17 12:43:57 +00:00
|
|
|
# add pkt framework libs which use other libs from above
|
|
|
|
'port', 'table', 'pipeline',
|
|
|
|
# flow_classify lib depends on pkt framework table lib
|
2020-04-30 16:01:23 +00:00
|
|
|
'flow_classify', 'bpf', 'graph', 'node']
|
2017-10-17 12:43:57 +00:00
|
|
|
|
2019-04-09 10:55:36 +00:00
|
|
|
if is_windows
|
2020-06-29 12:37:35 +00:00
|
|
|
libraries = [
|
2020-06-21 12:06:19 +00:00
|
|
|
'kvargs',
|
2020-08-11 06:24:23 +00:00
|
|
|
'telemetry',
|
2020-06-21 12:06:19 +00:00
|
|
|
'eal',
|
|
|
|
'ring',
|
2020-10-21 22:50:03 +00:00
|
|
|
'rcu',
|
2020-08-11 06:24:24 +00:00
|
|
|
'mempool', 'mbuf', 'net', 'meter', 'ethdev', 'pci',
|
2020-09-28 21:50:51 +00:00
|
|
|
'cmdline',
|
2020-10-01 15:30:59 +00:00
|
|
|
'hash',
|
2021-01-05 02:35:22 +00:00
|
|
|
'cfgfile',
|
2020-06-29 12:37:35 +00:00
|
|
|
] # only supported libraries for windows
|
2019-04-02 03:54:58 +00:00
|
|
|
endif
|
|
|
|
|
2020-04-25 10:56:16 +00:00
|
|
|
default_cflags = machine_args
|
|
|
|
default_cflags += ['-DALLOW_EXPERIMENTAL_API']
|
|
|
|
default_cflags += ['-DALLOW_INTERNAL_API']
|
|
|
|
|
2018-07-19 14:22:06 +00:00
|
|
|
if cc.has_argument('-Wno-format-truncation')
|
|
|
|
default_cflags += '-Wno-format-truncation'
|
|
|
|
endif
|
2018-08-29 16:19:20 +00:00
|
|
|
|
|
|
|
enabled_libs = [] # used to print summary at the end
|
2018-10-04 10:20:33 +00:00
|
|
|
|
2017-10-17 12:43:57 +00:00
|
|
|
foreach l:libraries
|
|
|
|
build = true
|
2019-06-05 20:22:39 +00:00
|
|
|
reason = '<unknown reason>' # set if build == false to explain why
|
2017-10-17 12:43:57 +00:00
|
|
|
name = l
|
2019-10-07 15:45:50 +00:00
|
|
|
use_function_versioning = false
|
2017-10-17 12:43:57 +00:00
|
|
|
sources = []
|
|
|
|
headers = []
|
2021-01-29 16:48:21 +00:00
|
|
|
indirect_headers = [] # public headers not directly included by apps
|
2021-03-12 22:20:06 +00:00
|
|
|
driver_sdk_headers = [] # public headers included by drivers
|
build: remove library special cases
The EAL and compat libraries were special-cases in the library build
process, the former because of it's complexity, and the latter because
it only consists of a single header file.
By reworking the EAL meson.build files, we can eliminate the need for it to
be a special case, by having it build up and return the list of sources,
headers, and objects and return those to the higher level build file. This
should also simplify the building of EAL, as we can eliminate a number of
meson.build files that would no longer be needed, and have fewer, but
larger meson.build files (9 now vs 14 previous) - thereby making the logic
easier to follow and items easier to find.
Once done, we can pull eal into the main library loop, with some
modifications to support it. Compat can also be pulled it once we add in a
check to handle the case of an empty sources list.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2017-11-03 14:47:43 +00:00
|
|
|
includes = []
|
2018-07-19 14:22:06 +00:00
|
|
|
cflags = default_cflags
|
build: remove library special cases
The EAL and compat libraries were special-cases in the library build
process, the former because of it's complexity, and the latter because
it only consists of a single header file.
By reworking the EAL meson.build files, we can eliminate the need for it to
be a special case, by having it build up and return the list of sources,
headers, and objects and return those to the higher level build file. This
should also simplify the building of EAL, as we can eliminate a number of
meson.build files that would no longer be needed, and have fewer, but
larger meson.build files (9 now vs 14 previous) - thereby making the logic
easier to follow and items easier to find.
Once done, we can pull eal into the main library loop, with some
modifications to support it. Compat can also be pulled it once we add in a
check to handle the case of an empty sources list.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2017-11-03 14:47:43 +00:00
|
|
|
objs = [] # other object files to link against, used e.g. for
|
|
|
|
# instruction-set optimized versions of code
|
|
|
|
|
2017-10-17 12:43:57 +00:00
|
|
|
# use "deps" for internal DPDK dependencies, and "ext_deps" for
|
|
|
|
# external package/library requirements
|
|
|
|
ext_deps = []
|
2018-07-19 14:37:02 +00:00
|
|
|
deps = []
|
|
|
|
# eal is standard dependency once built
|
2020-10-15 15:05:54 +00:00
|
|
|
if dpdk_conf.has('RTE_LIB_EAL')
|
2018-07-19 14:37:02 +00:00
|
|
|
deps += ['eal']
|
2018-07-11 21:44:54 +00:00
|
|
|
endif
|
2017-10-17 12:43:57 +00:00
|
|
|
|
|
|
|
dir_name = 'librte_' + l
|
|
|
|
subdir(dir_name)
|
|
|
|
|
2019-09-25 14:55:30 +00:00
|
|
|
if build
|
|
|
|
shared_deps = ext_deps
|
|
|
|
static_deps = ext_deps
|
|
|
|
foreach d:deps
|
|
|
|
if not is_variable('shared_rte_' + d)
|
|
|
|
error('Missing internal dependency "@0@" for @1@ [@2@]'
|
|
|
|
.format(d, name, 'lib/' + dir_name))
|
|
|
|
endif
|
|
|
|
shared_deps += [get_variable('shared_rte_' + d)]
|
|
|
|
static_deps += [get_variable('static_rte_' + d)]
|
|
|
|
endforeach
|
|
|
|
endif
|
|
|
|
|
2019-06-05 20:22:39 +00:00
|
|
|
if not build
|
|
|
|
dpdk_libs_disabled += name
|
|
|
|
set_variable(name.underscorify() + '_disable_reason', reason)
|
|
|
|
else
|
2018-08-29 16:19:20 +00:00
|
|
|
enabled_libs += name
|
2020-12-09 17:14:20 +00:00
|
|
|
dpdk_conf.set('RTE_LIB_' + name.to_upper(), 1)
|
2017-10-17 12:43:57 +00:00
|
|
|
install_headers(headers)
|
2021-01-29 16:48:21 +00:00
|
|
|
install_headers(indirect_headers)
|
2021-03-12 22:20:06 +00:00
|
|
|
if get_option('enable_driver_sdk')
|
|
|
|
install_headers(driver_sdk_headers)
|
|
|
|
endif
|
2021-01-29 16:48:21 +00:00
|
|
|
dpdk_chkinc_headers += headers
|
2017-10-17 12:43:57 +00:00
|
|
|
|
build: remove library special cases
The EAL and compat libraries were special-cases in the library build
process, the former because of it's complexity, and the latter because
it only consists of a single header file.
By reworking the EAL meson.build files, we can eliminate the need for it to
be a special case, by having it build up and return the list of sources,
headers, and objects and return those to the higher level build file. This
should also simplify the building of EAL, as we can eliminate a number of
meson.build files that would no longer be needed, and have fewer, but
larger meson.build files (9 now vs 14 previous) - thereby making the logic
easier to follow and items easier to find.
Once done, we can pull eal into the main library loop, with some
modifications to support it. Compat can also be pulled it once we add in a
check to handle the case of an empty sources list.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2017-11-03 14:47:43 +00:00
|
|
|
libname = 'rte_' + name
|
|
|
|
includes += include_directories(dir_name)
|
2017-10-17 12:43:57 +00:00
|
|
|
|
build: remove library special cases
The EAL and compat libraries were special-cases in the library build
process, the former because of it's complexity, and the latter because
it only consists of a single header file.
By reworking the EAL meson.build files, we can eliminate the need for it to
be a special case, by having it build up and return the list of sources,
headers, and objects and return those to the higher level build file. This
should also simplify the building of EAL, as we can eliminate a number of
meson.build files that would no longer be needed, and have fewer, but
larger meson.build files (9 now vs 14 previous) - thereby making the logic
easier to follow and items easier to find.
Once done, we can pull eal into the main library loop, with some
modifications to support it. Compat can also be pulled it once we add in a
check to handle the case of an empty sources list.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2017-11-03 14:47:43 +00:00
|
|
|
if sources.length() == 0
|
|
|
|
# if no C files, just set a dependency on header path
|
2017-11-03 17:27:32 +00:00
|
|
|
shared_dep = declare_dependency(include_directories: includes)
|
|
|
|
static_dep = shared_dep
|
2017-08-31 10:36:43 +00:00
|
|
|
else
|
2020-07-06 11:32:39 +00:00
|
|
|
if is_windows and use_function_versioning
|
|
|
|
message('@0@: Function versioning is not supported by Windows.'
|
|
|
|
.format(name))
|
|
|
|
endif
|
2017-08-31 10:36:43 +00:00
|
|
|
|
2019-10-07 15:45:50 +00:00
|
|
|
if use_function_versioning
|
|
|
|
cflags += '-DRTE_USE_FUNCTION_VERSIONING'
|
|
|
|
endif
|
2017-10-17 12:43:57 +00:00
|
|
|
|
2017-11-03 17:27:32 +00:00
|
|
|
# first build static lib
|
|
|
|
static_lib = static_library(libname,
|
|
|
|
sources,
|
|
|
|
objects: objs,
|
|
|
|
c_args: cflags,
|
|
|
|
dependencies: static_deps,
|
|
|
|
include_directories: includes,
|
|
|
|
install: true)
|
2020-06-30 14:14:27 +00:00
|
|
|
static_dep = declare_dependency(
|
2017-11-03 17:27:32 +00:00
|
|
|
include_directories: includes,
|
|
|
|
dependencies: static_deps)
|
|
|
|
|
2020-07-06 11:32:39 +00:00
|
|
|
if not use_function_versioning or is_windows
|
2019-10-07 15:45:50 +00:00
|
|
|
# use pre-build objects to build shared lib
|
|
|
|
sources = []
|
|
|
|
objs += static_lib.extract_all_objects(recursive: false)
|
|
|
|
else
|
|
|
|
# for compat we need to rebuild with
|
|
|
|
# RTE_BUILD_SHARED_LIB defined
|
|
|
|
cflags += '-DRTE_BUILD_SHARED_LIB'
|
|
|
|
endif
|
2020-10-15 15:05:51 +00:00
|
|
|
version_map = '@0@/@1@/version.map'.format(
|
|
|
|
meson.current_source_dir(), dir_name)
|
2019-04-02 03:54:53 +00:00
|
|
|
implib = dir_name + '.dll.a'
|
2019-04-12 08:29:00 +00:00
|
|
|
|
2020-06-29 12:37:41 +00:00
|
|
|
def_file = custom_target(libname + '_def',
|
|
|
|
command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
|
2019-04-12 08:29:00 +00:00
|
|
|
input: version_map,
|
2020-06-29 12:37:41 +00:00
|
|
|
output: '@0@_exports.def'.format(libname))
|
|
|
|
|
|
|
|
mingw_map = custom_target(libname + '_mingw',
|
|
|
|
command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
|
|
|
|
input: version_map,
|
|
|
|
output: '@0@_mingw.map'.format(libname))
|
2020-02-27 04:25:34 +00:00
|
|
|
|
|
|
|
if is_ms_linker
|
2020-10-31 06:44:55 +00:00
|
|
|
lk_args = ['-Wl,/def:' + def_file.full_path()]
|
|
|
|
if meson.version().version_compare('<0.54.0')
|
|
|
|
lk_args += ['-Wl,/implib:lib\\' + implib]
|
|
|
|
endif
|
2019-04-02 03:54:53 +00:00
|
|
|
else
|
2020-06-29 12:37:41 +00:00
|
|
|
if is_windows
|
|
|
|
lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
|
|
|
|
else
|
|
|
|
lk_args = ['-Wl,--version-script=' + version_map]
|
|
|
|
endif
|
2020-02-27 04:25:34 +00:00
|
|
|
endif
|
|
|
|
|
2020-06-29 12:37:41 +00:00
|
|
|
lk_deps = [version_map, def_file, mingw_map]
|
2020-02-27 04:25:34 +00:00
|
|
|
if not is_windows
|
2019-10-08 14:36:27 +00:00
|
|
|
# on unix systems check the output of the
|
2020-04-25 10:56:17 +00:00
|
|
|
# check-symbols.sh script, using it as a
|
2019-10-08 14:36:27 +00:00
|
|
|
# dependency of the .so build
|
2020-04-25 10:56:17 +00:00
|
|
|
lk_deps += custom_target(name + '.sym_chk',
|
|
|
|
command: [check_symbols,
|
2019-10-08 14:36:27 +00:00
|
|
|
version_map, '@INPUT@'],
|
|
|
|
capture: true,
|
|
|
|
input: static_lib,
|
2020-04-25 10:56:17 +00:00
|
|
|
output: name + '.sym_chk')
|
2019-04-02 03:54:53 +00:00
|
|
|
endif
|
2019-04-12 08:29:00 +00:00
|
|
|
|
2017-11-03 17:27:32 +00:00
|
|
|
shared_lib = shared_library(libname,
|
build: remove library special cases
The EAL and compat libraries were special-cases in the library build
process, the former because of it's complexity, and the latter because
it only consists of a single header file.
By reworking the EAL meson.build files, we can eliminate the need for it to
be a special case, by having it build up and return the list of sources,
headers, and objects and return those to the higher level build file. This
should also simplify the building of EAL, as we can eliminate a number of
meson.build files that would no longer be needed, and have fewer, but
larger meson.build files (9 now vs 14 previous) - thereby making the logic
easier to follow and items easier to find.
Once done, we can pull eal into the main library loop, with some
modifications to support it. Compat can also be pulled it once we add in a
check to handle the case of an empty sources list.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2017-11-03 14:47:43 +00:00
|
|
|
sources,
|
|
|
|
objects: objs,
|
|
|
|
c_args: cflags,
|
2017-11-03 17:27:32 +00:00
|
|
|
dependencies: shared_deps,
|
build: remove library special cases
The EAL and compat libraries were special-cases in the library build
process, the former because of it's complexity, and the latter because
it only consists of a single header file.
By reworking the EAL meson.build files, we can eliminate the need for it to
be a special case, by having it build up and return the list of sources,
headers, and objects and return those to the higher level build file. This
should also simplify the building of EAL, as we can eliminate a number of
meson.build files that would no longer be needed, and have fewer, but
larger meson.build files (9 now vs 14 previous) - thereby making the logic
easier to follow and items easier to find.
Once done, we can pull eal into the main library loop, with some
modifications to support it. Compat can also be pulled it once we add in a
check to handle the case of an empty sources list.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2017-11-03 14:47:43 +00:00
|
|
|
include_directories: includes,
|
2019-04-02 03:54:53 +00:00
|
|
|
link_args: lk_args,
|
2019-10-08 14:36:27 +00:00
|
|
|
link_depends: lk_deps,
|
2020-06-26 08:16:36 +00:00
|
|
|
version: abi_version,
|
build: remove library special cases
The EAL and compat libraries were special-cases in the library build
process, the former because of it's complexity, and the latter because
it only consists of a single header file.
By reworking the EAL meson.build files, we can eliminate the need for it to
be a special case, by having it build up and return the list of sources,
headers, and objects and return those to the higher level build file. This
should also simplify the building of EAL, as we can eliminate a number of
meson.build files that would no longer be needed, and have fewer, but
larger meson.build files (9 now vs 14 previous) - thereby making the logic
easier to follow and items easier to find.
Once done, we can pull eal into the main library loop, with some
modifications to support it. Compat can also be pulled it once we add in a
check to handle the case of an empty sources list.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2017-11-03 14:47:43 +00:00
|
|
|
soversion: so_version,
|
|
|
|
install: true)
|
2017-11-03 17:27:32 +00:00
|
|
|
shared_dep = declare_dependency(link_with: shared_lib,
|
build: remove library special cases
The EAL and compat libraries were special-cases in the library build
process, the former because of it's complexity, and the latter because
it only consists of a single header file.
By reworking the EAL meson.build files, we can eliminate the need for it to
be a special case, by having it build up and return the list of sources,
headers, and objects and return those to the higher level build file. This
should also simplify the building of EAL, as we can eliminate a number of
meson.build files that would no longer be needed, and have fewer, but
larger meson.build files (9 now vs 14 previous) - thereby making the logic
easier to follow and items easier to find.
Once done, we can pull eal into the main library loop, with some
modifications to support it. Compat can also be pulled it once we add in a
check to handle the case of an empty sources list.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2017-11-03 14:47:43 +00:00
|
|
|
include_directories: includes,
|
2017-11-03 17:27:32 +00:00
|
|
|
dependencies: shared_deps)
|
build: remove library special cases
The EAL and compat libraries were special-cases in the library build
process, the former because of it's complexity, and the latter because
it only consists of a single header file.
By reworking the EAL meson.build files, we can eliminate the need for it to
be a special case, by having it build up and return the list of sources,
headers, and objects and return those to the higher level build file. This
should also simplify the building of EAL, as we can eliminate a number of
meson.build files that would no longer be needed, and have fewer, but
larger meson.build files (9 now vs 14 previous) - thereby making the logic
easier to follow and items easier to find.
Once done, we can pull eal into the main library loop, with some
modifications to support it. Compat can also be pulled it once we add in a
check to handle the case of an empty sources list.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2017-11-03 14:47:43 +00:00
|
|
|
|
2017-11-03 17:27:32 +00:00
|
|
|
dpdk_libraries = [shared_lib] + dpdk_libraries
|
2018-10-27 09:17:50 +00:00
|
|
|
dpdk_static_libraries = [static_lib] + dpdk_static_libraries
|
build: remove library special cases
The EAL and compat libraries were special-cases in the library build
process, the former because of it's complexity, and the latter because
it only consists of a single header file.
By reworking the EAL meson.build files, we can eliminate the need for it to
be a special case, by having it build up and return the list of sources,
headers, and objects and return those to the higher level build file. This
should also simplify the building of EAL, as we can eliminate a number of
meson.build files that would no longer be needed, and have fewer, but
larger meson.build files (9 now vs 14 previous) - thereby making the logic
easier to follow and items easier to find.
Once done, we can pull eal into the main library loop, with some
modifications to support it. Compat can also be pulled it once we add in a
check to handle the case of an empty sources list.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2017-11-03 14:47:43 +00:00
|
|
|
endif # sources.length() > 0
|
|
|
|
|
2019-09-19 15:07:55 +00:00
|
|
|
set_variable('shared_rte_' + name, shared_dep)
|
|
|
|
set_variable('static_rte_' + name, static_dep)
|
|
|
|
message('lib/@0@: Defining dependency "@1@"'.format(
|
|
|
|
dir_name, name))
|
build: remove library special cases
The EAL and compat libraries were special-cases in the library build
process, the former because of it's complexity, and the latter because
it only consists of a single header file.
By reworking the EAL meson.build files, we can eliminate the need for it to
be a special case, by having it build up and return the list of sources,
headers, and objects and return those to the higher level build file. This
should also simplify the building of EAL, as we can eliminate a number of
meson.build files that would no longer be needed, and have fewer, but
larger meson.build files (9 now vs 14 previous) - thereby making the logic
easier to follow and items easier to find.
Once done, we can pull eal into the main library loop, with some
modifications to support it. Compat can also be pulled it once we add in a
check to handle the case of an empty sources list.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2017-11-03 14:47:43 +00:00
|
|
|
endif # if build
|
2017-10-17 12:43:57 +00:00
|
|
|
endforeach
|