Commit Graph

97 Commits

Author SHA1 Message Date
David Marchand
ecf7518017 build: list selected applications
With the addition of enable/disable_apps meson options, it is a bit
harder to figure out which application is built, and why.

Display the list of applications in the same way we do for drivers and
libraries.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Markus Theil <markus.theil@secunet.com>
2022-11-14 11:30:02 +01:00
Markus Theil
45d7cf91ba build: export include directories list
In order to perform things like LTO more easily in our DPDK applications,
we use DPDK as a meson subproject.
Export include directories list in order to be usable in this context.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-10-28 14:27:48 +02:00
Bruce Richardson
dfd5b25b57 build: introduce deprecated libraries
Add support for a list of deprecated libs to the lib/meson.build file.
This will be used to mark libraries that are planned to be removed from
DPDK. The first user of this will be KNI in a next patch.

Deprecated libraries should still be tested in the CI, so update our
build testing and CI scripts.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
2022-10-10 17:01:56 +02:00
Bruce Richardson
909ad7b80e build: increase minimum meson version to 0.53.2
This patchset bumps the minimum meson version from 0.49.2 to 0.53.2.
Ideally, the minimum version should be 0.53 without a point release, but
some DPDK builds (mingw) are broken with 0.53.0 due to issue[1], fixed
by commit[2] in 0.53.1. Therefore we use the latest point release from
0.53 branch i.e. 0.53.2.

Some new features of interest which can now be used in DPDK with this
new minimum meson version:

* can do header-file checks directly inside find_library calls, rather
  than needing a separate check.[v0.50].
* can pass multiple cross-files at the same time when cross-compiling
  [v0.51].
* "alias_target" function, to allow use to give better/shorter names
  for particular build objects [v0.52].
* auto-generation of clang-format [v0.50] and clang-tidy[v0.52] targets
  when those tools are present and config dotfiles are present.
  Similarly ctags and cscope are added as targets when those tools are
  present [v0.53]
* meson module for filesystem operations, so meson can now check for the
  presence of particular files or directories [v0.53].
* "summary" function to provide a configuration summary at the end of
  the meson run [v0.53].

Plus many other features. See [3] for full details of each version.

[1] https://github.com/mesonbuild/meson/issues/6442
[2] https://github.com/mesonbuild/meson/pull/6457/commits/8e7a7c36b579
[3] https://mesonbuild.com/Release-notes.html

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
2022-10-10 16:52:38 +02:00
Min Zhou
29631ee5c8 eal/loongarch: support LoongArch architecture
Add all necessary elements for DPDK to compile and run EAL on
LoongArch64 Soc.

This includes:

- EAL library implementation for LoongArch ISA.
- meson build structure for 'loongarch' architecture.
  RTE_ARCH_LOONGARCH define is added for architecture identification.
- xmm_t structure operation stubs as there is no vector support in
  the current version for LoongArch.

Compilation was tested on Debian and CentOS using loongarch64
cross-compile toolchain from x86 build hosts. Functions were tested
on Loongnix and Kylin which are two Linux distributions supported
LoongArch host based on Linux 4.19 maintained by Loongson
Corporation.

We also tested DPDK on LoongArch with some external applications,
including: Pktgen-DPDK, OVS, VPP.

The platform is currently marked as linux-only because there is no
other OS than Linux support LoongArch host currently.

The i40e PMD driver is disabled on LoongArch because of the absence
of vector support in the current version.

Similar to RISC-V, the compilation of following modules has been
disabled by this commit and will be re-enabled in later commits as
fixes are introduced:
net/ixgbe, net/memif, net/tap, example/l3fwd.

Signed-off-by: Min Zhou <zhoumin@loongson.cn>
2022-10-06 12:45:05 +02:00
Dmitry Kozlyuk
7ccd05e7b7 build: enable developer mode for all working trees
Developer mode was detected if `.git` was a directory.
Linked git working trees created by `git worktree add`
contain `.git` file instead of `.git` directory.
Developer mode was not detected for such directories.
Detect developer mode by the presence of `.git` path.

Fixes: bc46174338 ("build: enable a developer mode setting")
Cc: stable@dpdk.org

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-08-29 12:53:49 +02:00
Michal Mazurek
f22e705ebf eal/riscv: support RISC-V architecture
Add all necessary elements for DPDK to compile and run EAL on SiFive
Freedom U740 SoC which is based on SiFive U74-MC (ISA: rv64imafdc)
core complex.

This includes:

- EAL library implementation for rv64imafdc ISA.
- meson build structure for 'riscv' architecture. RTE_ARCH_RISCV define
  is added for architecture identification.
- xmm_t structure operation stubs as there is no vector support in the
  U74 core.

Compilation was tested on Ubuntu and Arch Linux using riscv64 toolchain.
Clang compilation currently not supported due to issues with missing
relocation relaxation.

Two rte_rdtsc() schemes are provided: stable low-resolution using rdtime
(default) and unstable high-resolution using rdcycle. User can override
the scheme by defining RTE_RISCV_RDTSC_USE_HPM=1 during compile time of
both DPDK and the application. The reasoning for this is as follows.
The RISC-V ISA mandates that clock read by rdtime has to be of constant
period and synchronized between all hardware threads within 1 tick
(chapter 10.1 in version 20191213 of RISC-V spec).
However this clock may not be of high-enough frequency for dataplane
uses. I.e. on HiFive Unmatched (FU740) it is 1MHz.
There is a high-resolution alternative in form of rdcycle which is
clocked at the core clock frequency. The drawbacks are that it may be
disabled during sleep (WFI), its frequency might change due to DVFS and
it is core-local and therefore cannot be used as a wall-clock. It can
however be used for micro-benchmarking user applications, similarly to
Aarch64's PMCCNTR PMU counter.

The platform is currently marked as linux-only because rte_cycles
implementation uses the timebase-frequency device-tree node read through
the proc file system. Such approach was chosen because Linux kernel
depends on the presence of this device-tree node.

The i40e PMD driver is disabled on RISC-V as the rv64gc ISA has no vector
operations.

The compilation of following modules has been disabled by this commit
and will be re-enabled in later commits as fixes are introduced:
net/ixgbe, net/memif, net/tap, example/l3fwd.

Sponsored-by: Frank Zhao <frank.zhao@starfivetech.com>
Sponsored-by: Sam Grove <sam.grove@sifive.com>
Signed-off-by: Michal Mazurek <maz@semihalf.com>
Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
2022-06-08 11:26:20 +02:00
Bruce Richardson
f93a605f2d build: add definitions for use as Meson subproject
To allow other projects to easily use DPDK as a subproject, add in the
necessary dependency definitions. Slightly different definitions are
necessary for static and shared builds, since for shared builds the
drivers should not be linked in, and the internal meson dependency
objects are more complete.

To use DPDK as a subproject fallback i.e. use installed DPDK if present,
otherwise the shipped one, the following meson statement can be used:

libdpdk = dependency('libdpdk', fallback: ['dpdk', 'dpdk_dep'])

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ben Magistro <koncept1@gmail.com>
Tested-by: Ben Magistro <koncept1@gmail.com>
2022-06-07 20:49:20 +02:00
David Marchand
592ab76f9f app/testpmd: register driver specific commands
Introduce a testpmd API so that drivers can register specific commands.

A driver can list some files to compile with testpmd, by setting them
in the testpmd_sources (driver local) meson variable.
drivers/meson.build then takes care of appending this to a global meson
variable, and adding the driver to testpmd dependency.

Note: testpmd.h is fixed to that it is self sufficient when being
included.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-05-31 17:09:12 +02:00
Bruce Richardson
e16b972b1a build: remove deprecated Meson functions
Starting in meson 0.56, the functions meson.source_root() and
meson.build_root() are deprecated and to be replaced by the [more
descriptive] functions: project_source_root()/global_source_root() and
project_build_root()/global_build_root(). Unfortunately, these new
replacement functions were only added in 0.56 release too, so to use
them we would need version checks for old/new functions to remove the
deprecation warnings.

However, the functions "current_build_dir()" and "current_source_dir()"
remain unaffected by all this, so we can bypass the versioning problem,
by saving off these values to "dpdk_source_root" and "dpdk_build_root"
in the top-level meson.build file

Bugzilla ID: 926
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
2022-02-02 18:46:53 +01:00
Bruce Richardson
d832326ae9 build: fix warning about using -Wextra flag
Each build, meson would issue a warning reporting that the
"warning_level" setting should be used in place of adding -Wextra
directly to our build commands. Testing with meson 0.61 shows that the
only difference for gcc and clang builds between warning levels 1 and
2 is the addition of -Wextra, so we can remove the warning by deleting
our explicit set of Wextra and changing the build defaults to
warning_level 2.

Fixes: 524a0d5d66 ("build: enable extra warnings with meson")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2022-02-02 15:56:45 +01:00
Bruce Richardson
ecb904cc45 build: fix warnings when running external commands
Meson 0.61.1 is giving warnings that the calls to run_command do not
always explicitly specify if the result is to be checked or not, i.e.
there is a missing "check" parameter. This is because the default
behaviour without the parameter is due to change in the future.

We can fix these warnings by explicitly adding into each call whether
the result should be checked by meson or not. This patch therefore
adds in "check: false" to each run_command call where the result is
being checked by the DPDK meson.build code afterwards, and adds in
"check: true" to any calls where the result is currently unchecked.

Bugzilla ID: 921
Cc: stable@dpdk.org

Reported-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
2022-02-02 15:44:12 +01:00
Bruce Richardson
99a2dd955f lib: remove librte_ prefix from directory names
There is no reason for the DPDK libraries to all have 'librte_' prefix on
the directory names. This prefix makes the directory names longer and also
makes it awkward to add features referring to individual libraries in the
build - should the lib names be specified with or without the prefix.
Therefore, we can just remove the library prefix and use the library's
unique name as the directory name, i.e. 'eal' rather than 'librte_eal'

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2021-04-21 14:04:09 +02:00
Bruce Richardson
8dcb898c65 build: change indentation in infrastructure files
Switch from using tabs to 4 spaces for meson.build indentation, for the
basic infrastructure and tooling files, as well as doc and kernel
directories.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2021-04-21 14:04:09 +02:00
Gabriel Ganne
8c10530836 build: update minimum required Meson version
Bump Meson required version to 0.49.2 which is chosen so as
to be provided by both redhat-8 and debian-10.

Update documentation and travis setup script accordingly.

This fixes the following warning:
WARNING: Project targeting '>= 0.47.1' but tried to use feature introduced
         in '0.48.0': console arg in custom_target

'console' argument is used within kernel/linux/kni/meson.build

Signed-off-by: Gabriel Ganne <gabriel.ganne@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2021-04-16 18:51:51 +02:00
Bruce Richardson
bc46174338 build: enable a developer mode setting
To allow support for additional build checks and tests only really
relevant for developers, we add support for a developer mode option to
DPDK. The default, "auto", value for this enables developer mode if a
".git" folder is found at the root of the source tree - as was the case
with the previous "make" build system. There is also support for
explicitly enabling or disabling this option using "meson configure" if
so desired.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2021-04-09 19:07:25 +02:00
Bruce Richardson
5d20515e0c build: exclude meson files from examples installation
The meson.build files in each example directory is simply to support
building the example as part of the main SDK build, and these should not
be installed with the example's source code and makefile. The exclude of
"meson.build" only filters out the top-level examples/meson.build file,
not the file in each subdirectory.

To fix this, we can build up the list of files to exclude based off the
list of all examples. With this change "find examples/ -name meson.build"
returns no hits when run on an installed instance.

Fixes: e5b95003f1 ("examples: fix flattening directory layout on install")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2021-03-15 20:44:29 +01:00
Bruce Richardson
05050ac4ce build: add header includes check
To verify that all DPDK headers are ok for inclusion directly in a C file,
and are not missing any other pre-requisite headers, we can auto-generate
for each header an empty C file that includes that header. Compiling these
files will throw errors if any header has unmet dependencies.

For some libraries, there may be some header files which are not for direct
inclusion, but rather are to be included via other header files. To allow
later checking of these files for missing includes, we separate out the
indirect include files from the direct ones.

To ensure ongoing compliance, we enable this build test as part of the
default x86 build in "test-meson-builds.sh".

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2021-01-29 20:59:37 +01:00
Dmitry Kozlyuk
f0f93a7adf buildtools: use Python pmdinfogen
Use the same interpreter to run pmdinfogen as for other build scripts.
Adjust wrapper script accordingly and also don't suppress stderr from ar
and pmdinfogen. Add configure-time check for elftools Python module for
Unix hosts.

Add pyelftools to CI configuration and build requirements for Linux and
FreeBSD. Windows targets are not currently using pmdinfogen.

Suppress ABI warnings about generated PMD information strings.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Tested-by: Jie Zhou <jizh@microsoft.com>
2021-01-25 23:23:41 +01:00
Bruce Richardson
e5b95003f1 examples: fix flattening directory layout on install
By installing the examples one-by-one in a loop in the examples
meson.build file we effectively flattened out the structure of the examples
folder and omitted some common and shared subfolders that were never
directly built.  Instead, we can remove the loop and just have the whole
"examples" folder installed as-is in a single statement, preserving its
directory structure, and thereby fixing the build of a number of the
examples.

Fixes: 2daf565f91 ("examples: install as part of ninja install")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2020-11-12 19:33:06 +01:00
Bruce Richardson
68b1f1cda5 build: check AVX512 rather than binutils version
Rather than checking the binutils version number, which can lead to
unnecessary disabling of AVX512 if fixes have been backported to distro
versions, we can instead check the output of "as" from binutils to see if
it is correct.

The check in the script uses the minimal assembly reproduction code posted
to the public bug tracker for gcc/binutils for those issues [1]. If the
binutils bug is present, the instruction parameters - specifically the
displacement parameter - will be different in the disassembled output
compared to the input. Therefore the check involves assembling a single
instruction and disassembling it again, checking that the two match.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90028

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Harry van Haaren <harry.van.haaren@intel.com>
2020-07-05 21:32:40 +02:00
Thomas Monjalon
de321d5918 build: remove special handling for node library
The node library had a need of being linked as a whole
to make some constructors effective.
Now that all libraries are linked with --whole-archive,
there is no need to have this library separate.

Fixes: e2db26f766 ("build: always link whole DPDK static libraries")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Jerin Jacob <jerinj@marvell.com>
2020-07-05 10:52:11 +02:00
Bruce Richardson
11a47f9f1c build/pkg-config: move pkg-config file creation
Ahead of changes to rework the file, move the pkg-config file generation to
a new directory under buildtools. This allows the meson code to be
separated out from the main meson.build for simplicity, and also allows any
additional scripts for working with the pkg-config files to be placed there
too.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Sunil Pai G <sunil.pai.g@intel.com>
2020-07-01 19:30:52 +02:00
Bruce Richardson
607164e25c build: remove unnecessary variable
Since all libraries are explicitly linked as part of a build, we no longer
need to track ones that should be always included for linking against apps.

Previously telemetry was special-cased for linking as it was not directly
needed by the linker when linking the apps, since they never called into it
directly. This meant that it could be forgotten when specifying the app
dependencies, and so the telemetry support would not work. This
special-casing was never needed for make as it always linked in all
libraries, as meson does now.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Sunil Pai G <sunil.pai.g@intel.com>
2020-07-01 19:30:52 +02:00
Bruce Richardson
44dfb297af build: add arch-specific header path to global includes
The global include path, which is used by anything built before EAL,
points to the EAL header files so they utility macros etc. can be used
anywhere in DPDK. This path included the OS-specific EAL header files,
but not the architecture-specific ones. This patch moves the selection
of target architecture to the top-level meson.build file so that the
global include can reference that.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Keith Wiles <keith.wiles@intel.com>
2020-05-10 23:45:02 +02:00
Nithin Dabilpuram
13fcf8aff7 node: add logging and null node
Add log infra for node specific logging.
Also, add null rte_node that just ignores all the objects
directed to it.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
2020-05-05 23:37:43 +02:00
Thomas Monjalon
a083f8cc77 eal: move OS-specific sub-directories
Since the kernel modules are moved to kernel/ directory,
there is no need anymore for the sub-directory eal/ in
linux/, freebsd/ and windows/.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
2020-03-31 13:08:55 +02:00
Thomas Monjalon
9c1e0dc39a eal: move common header files
The EAL API (with doxygen documentation) is moved from
common/include/ to include/, which makes more clear that
it is the global API for all environments and architectures.

Note that the arch-specific and OS-specific include files are not
in this global include directory, but include/generic/ should
cover the doxygen documentation for them.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
2020-03-31 13:08:55 +02:00
Bruce Richardson
3eb485c644 build: fix Windows build
While most windows apps can handle both "\" and "/" as path separators,
"more" is treating the "/" as the start of a command-line flag in this
case, causing errors.

Fixes: cba806e07d ("build: change ABI versioning to global")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2019-11-25 15:07:02 +01:00
Bruce Richardson
8baad6f884 build: print list of disabled components
When configuring with meson we print out a list of enabled components, but
it is also useful to list out the disabled components and the reasons why.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-07-02 23:20:26 +02:00
Marcin Smoczynski
28188cee2a build: enable BSD features visibility for FreeBSD
When a component uses either XOPEN_SOURCE or POSIX_C_SOURCE macro
explicitly in its build recipe, it restricts visibility of a non POSIX
features subset, such as IANA protocol numbers (IPPROTO_* macros).
Non standard features are enabled by default for DPDK both for Linux
thanks to _GNU_SOURCE and for FreeBSD thanks to __BSD_VISIBLE. However
using XOPEN_SOURCE or POSIX_(C_)SOURCE in a component causes
__BSD_VISIBLE to be defined to 0 for FreeBSD, causing different feature
sets visibility for Linux and FreeBSD. It restricts from using IPPROTO
macros in public headers, such as rte_ip.h, despite the fact they are
already widely used in sources.

Add __BSD_VISIBLE macro specified unconditionally for FreeBSD targets
which enforces feature sets visibility unification between Linux and
FreeBSD.

Add single -D_GNU_SOURCE to config/meson.build as a project argument
instead of adding separate directive for each project subtree.

This patch solves the problem of build breaks for [1] on FreeBSD [2]
following the discussion [3].

[1] https://mails.dpdk.org/archives/dev/2019-May/131885.html
[2] http://mails.dpdk.org/archives/test-report/2019-May/082263.html
[3] https://mails.dpdk.org/archives/dev/2019-May/132110.html

Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2019-06-26 16:50:33 +02:00
Bruce Richardson
4c773788e0 build: generate Windows exports file
Rather than having a separate version.map file for linux/BSD and an
exports definition file for windows for each library, generate the
latter from the former automatically at build time.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-06-05 19:49:28 +02:00
Bruce Richardson
85d7158edf examples: fix install with empty meson parameter
While the examples were being installed into the appropriate install path
when processing the examples/meson.build file, that file was only processed
if the "examples" meson parameter was non-empty. Since we now do more than
just build the examples, we need to unconditionally process the file.

Fixes: 2daf565f91 ("examples: install as part of ninja install")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-05-20 23:55:50 +02:00
Bruce Richardson
12784d9b6e build: add libbsd to pkg-config file if enabled
If libbsd is enabled in DPDK, the strlcpy and strlcat functions in
rte_string_fns.h redirect to the varients in libbsd, only using the
fallbacks if it is not enabled. Therefore, if libbsd is enabled, it needs
to be called out as a DPDK dependency in the pkgconfig file.

To ensure that we don't have undefined variables on non-Linux platforms, we
can remove the linux condition around the libbsd check - no harm comes in
looking for it on other OS, since it's an optional dependency.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-05-02 23:07:14 +02:00
Bruce Richardson
e09848337c build: fix ninja install on FreeBSD
The post-install script to symlink the PMDs from their own PMD directory to
the regular lib directory (so they would be found by ld at runtime) was
using the "-r" flag to ln to create relative symlinks. This flag is
unsupported by ln on FreeBSD causing the ninja install step to fail.

Reworking the script to take the relative driver path as parameter removes
the need for ln to calculate the relative path ensuring compatibility with
FreeBSD.

As part of the fix, we move the registration of the install script to the
config/meson.build file, from the top level one. This improves readability
as the script takes as parameters the variables set in that file.

Fixes: ed4d43d73e ("build: symlink drivers to library directory")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-05-02 23:07:04 +02:00
Anand Rawat
428eb983f5 eal: add OS specific header file
Added rte_os.h files to support OS specific functionality.
Updated build system to contain OS headers in the include
path.

Signed-off-by: Anand Rawat <anand.rawat@intel.com>
Reviewed-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Harini Ramakrishnan <harini.ramakrishnan@microsoft.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2019-04-03 01:11:56 +02:00
Ali Alnubani
b77c1d1c0a build: fix meson build in CI environments
This is to fix a build error with meson in GNU/Linux that is caused
by using the 'more' command to read the VERSION file. The error:

    config/meson.build:10:10: ERROR:  String
    '::::::::::::::\n<RTE_SDK_PATH>VERSION\n::::::::::::::\n19' cannot be
    converted to int

The command 'more' prints the file name before the actual
contents of the file when it's being run without a controlling terminal.
This could happen in CI environments.

Please refer to:
https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/tree/text-utils/more.c

Fixes: c04172b5f0 ("build: add single source of DPDK version number")
Fixes: d320fe56bd ("build: use version number from config file")

Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-04-01 18:54:17 +02:00
Bruce Richardson
664c59fac1 build: move meson version handling to config directory
To keep the top-level meson.build file as clean and clear as possible, we
move the version handling to the config/meson.build file, where the rest of
the build configuration is already being set up.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-03-27 09:43:35 +01:00
Bruce Richardson
c04172b5f0 build: add single source of DPDK version number
Add a new file VERSION to hold the current DPDK version number.
Have meson use this file for it's project version, and have make use
it for reporting out "showversion" and "showversionum".

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Reviewed-by: Rami Rosen <ramirose@gmail.com>
2019-03-27 09:43:23 +01:00
Andrius Sirvys
0ffbdd1d8d build: move variable for drivers to top level
If for debugging we disable the driver directory in the meson.build file,
we get an error because the variable "driver_classes" does not exist.
This is because driver_classes is only defined in the
drivers/meson.build file. Defining driver_classes in dpdk/meson.build file
will make it easier for compiling separate directories.

In the process, we rename driver_classes to dpdk_driver_classes for
consistency with the other variables.

Signed-off-by: Andrius Sirvys <andrius.sirvys@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2019-03-26 23:28:39 +01:00
Luca Boccassi
eded3f928c build: bump minimum Meson version to 0.47.1
Meson 0.47.1 fixed a bug that is difficult to work around, which causes
the linker flag of dependencies to be repeated dozens of times, which
causes issues especially when using the built-in dependency() API.
Bump the minimum version and remove obsolete version checks.

Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2019-02-27 12:12:27 +01:00
Bruce Richardson
a9de470cc7 test: move to app directory
Since all other apps have been moved to the "app" folder, the autotest app
remains alone in the test folder. Rather than having an entire top-level
folder for this, we can move it back to where it all started in early
versions of DPDK - the "app/" folder.

This move has a couple of advantages:
* This reduces clutter at the top level of the project, due to one less
  folder.
* It eliminates the separate build task necessary for building the
  autotests using make "make test-build" which means that developers are
  less likely to miss something in their own compilation tests
* It re-aligns the final location of the test binary in the app folder when
  building with make with it's location in the source tree.

For meson builds, the autotest app is different from the other apps in that
it needs a series of different test cases defined for it for use by "meson
test". Therefore, it does not get built as part of the main loop in the
app folder, but gets built separately at the end.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-02-26 15:29:27 +01:00
Bruce Richardson
b543d1a715 compat: merge compat library into EAL
Since compat library is only a single header, we can easily move it into
the EAL common headers instead of tracking it separately. The downside of
this is that it becomes a little more difficult to have any libs that are
built before EAL depend on it. Thankfully, this is not a major problem as
the only library which uses rte_compat.h and is built before EAL (kvargs)
already has the path to the compat.h header file explicitly called out as
an include path.

However, to ensure that we don't hit problems later with this, we can add
EAL common headers folder to the global include list in the meson build
which means that all common headers can be safely used by all libraries, no
matter what their build order.

As a side-effect, this patch also fixes an issue with building on BSD using
meson, due to compat lib no longer needing to be listed as a dependency.

Fixes: a8499f65a1 ("log: add missing experimental tag")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Tested-by: David Marchand <david.marchand@redhat.com>
Tested-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2019-02-25 16:03:31 +01:00
Thomas Monjalon
cae0d722d6 version: 19.05-rc0
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: John McNamara <john.mcnamara@intel.com>
2019-02-06 11:20:06 +01:00
Thomas Monjalon
8b937bae24 version: 19.02.0
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2019-02-01 15:25:17 +01:00
Thomas Monjalon
a2f9c0d417 version: 19.02-rc4
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2019-01-28 02:53:53 +01:00
Luca Boccassi
ccee5d18a4 build: mention -march in pkg-config description
Applications need to at least match DPDK's -march option to build
successfully due to some static inline functions in the public headers.

This might cause problems, especially in distributions, so add a note
in the pkg-config description.

Fixes: a25a650be5 ("build: add infrastructure for meson and ninja builds")
Cc: stable@dpdk.org

Signed-off-by: Luca Boccassi <bluca@debian.org>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2019-01-28 01:49:38 +01:00
Thomas Monjalon
84a1d4a873 version: 19.02-rc3
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2019-01-20 22:39:20 +01:00
Thomas Monjalon
05853e1784 version: 19.02-rc2
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2019-01-15 03:08:43 +01:00
Luca Boccassi
d358817671 build: use static deps for pkg-config libs.private
Dependencies of the RTE libraries were not being added to the
Requires.private field of the pc file since the variable used for
dynamic linking was passed to the related field of pkg.generate.
Use the static one so that dependencies are included.

Fixes: 57ae0ec626 ("build: add dependency on telemetry to apps with meson")
Cc: stable@dpdk.org

Signed-off-by: Luca Boccassi <bluca@debian.org>
2019-01-14 12:24:57 +01:00