Commit Graph

57 Commits

Author SHA1 Message Date
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
Thomas Monjalon
7637518249 version: 19.02-rc1
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-12-23 00:21:13 +01:00
Thomas Monjalon
37d800031d version: 19.02-rc0
Start version numbering for a new release cycle,
and introduce a template file for release notes.

The release notes comments are updated to mandate
a scope label for API and ABI changes.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2018-11-30 16:20:33 +00:00
Thomas Monjalon
0da7f445df version: 18.11.0
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-11-27 00:36:00 +01:00
Thomas Monjalon
6cff3183c2 version: 18.11-rc5
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-11-25 21:19:19 +01:00
Thomas Monjalon
d82e5db6f6 version: 18.11-rc4
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-11-19 01:40:54 +01:00
Thomas Monjalon
3e42b6ce06 version: 18.11-rc3
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-11-14 05:05:29 +01:00
Thomas Monjalon
c59b06294f version: 18.11-rc2
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-11-06 03:27:49 +01:00
Thomas Monjalon
bdbe62df10 version: 18.11-rc1
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-10-29 04:08:26 +01:00
Luca Boccassi
b63e5d4790 build: add option to override drivers install directory
Allow users and packagers to override the default dpdk/drivers
subdirectory where the PMDs get installed under $lib.

Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Timothy Redaelli <tredaelli@redhat.com>
2018-10-27 23:22:21 +02:00
Luca Boccassi
085766aa67 build: change default driver installation directory
As part of the effort of consolidating the DPDK installation bits and
pieces across distros, set the default directory of lib/ where PMDs get
installed to dpdk/pmds-XX.YY. It's necessary to have a versioned
subdirectory as multiple ABI revisions might be installed at the same
time, so having a fixed name will cause trouble with the autoload
feature.
Small refactor with parsing and saving the major version to a variable,
since it's now used in 3 different places.

Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Timothy Redaelli <tredaelli@redhat.com>
2018-10-27 23:22:12 +02:00
Kevin Laatz
57ae0ec626 build: add dependency on telemetry to apps with meson
This patch adds telemetry as a dependecy to all applications. Without these
changes, the --telemetry flag will not be recognised and applications will
fail to run if they want to enable telemetry.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-10-27 15:21:33 +02:00
Luca Boccassi
720b14db3a build: generate API documentation with meson
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-09-18 15:50:54 +02:00
Luca Boccassi
282628a231 build: use same version as make showversion in meson
make showversion will print 18.11.0-rc0 but Meson sets 18.11-rc0,
causing among other things a difference in the generated documentation.

Fixes: 76b9d9de5c ("version: 18.11-rc0")

Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-09-18 15:50:17 +02:00
Bruce Richardson
77a5e7cdb2 build: fix compatibility with meson 0.41 onwards
Versions of meson prior to 0.47 flattened the parameters to the
"set_variable" function, which meant that the function could not take
array variables as a parameter. Therefore, we need to disable driver
tracking for those older versions, in order to maintain compatibility
with the minimum supported 0.41 version, and also v0.45 shipped in
Ubuntu 18.04 release.

Fixes: 806c45dd48 ("build: add configuration summary at end of config")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Timothy Redaelli <tredaelli@redhat.com>
2018-09-18 15:18:52 +02:00
Bruce Richardson
806c45dd48 build: add configuration summary at end of config
After running meson to configure a DPDK build, it can be useful to know
what was automatically enabled or disabled. Therefore, print out by way of
summary a categorised list of libraries and drivers to be built.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2018-09-17 13:58:40 +02:00
Thomas Monjalon
76b9d9de5c version: 18.11-rc0
Start version numbering for a new release cycle,
and introduce a template file for release notes.

The release notes comments have a new block to suggest
the order of items, inspired by Ferruh's proposal.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: John McNamara <john.mcnamara@intel.com>
2018-08-13 12:42:46 +02:00
Thomas Monjalon
11a1f847d2 version: 18.08.0
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-08-09 23:11:26 +02:00
Thomas Monjalon
686a41ac97 version: 18.08-rc3
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-08-06 01:45:20 +02:00
Thomas Monjalon
23888166d9 version: 18.08-rc2
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-07-26 23:59:06 +02:00
Thomas Monjalon
c27dbc300e version: 18.08-rc1
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-07-16 01:17:18 +02:00
Thomas Monjalon
b259da7b24 version: 18.08-rc0
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-06-01 12:58:36 +02:00
Thomas Monjalon
a5dce55556 version: 18.05.0
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-05-30 22:55:57 +02:00
Thomas Monjalon
830410b265 version: 18.05-rc6
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-05-28 03:29:40 +02:00
Thomas Monjalon
c9db09ff0e version: 18.05-rc5
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-05-23 01:44:00 +02:00
Thomas Monjalon
08b7521c35 version: 18.05-rc4
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-05-15 22:38:39 +02:00
Ferruh Yigit
ff75dd7d65 version: 18.05-rc3
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-05-15 00:03:42 +01:00
Bruce Richardson
89200580ef kernel: fix cross-build of Linux modules with meson
When cross-compiling, if no kernel_dir was specified, then the kernel
modules were still being compiled for the build machine. Fix this by
only building modules on cross-compile when we have a kernel_dir value
set. Print out a message indicating why we are skipping kernel
compilation, and in case that the headers for kernel compile are not
found, print a warning instead of erroring out.

Fixes: a52f4574f7 ("igb_uio: build with meson")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2018-05-08 22:21:38 +02:00
Thomas Monjalon
7baac77594 version: 18.05-rc2
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-05-02 23:12:16 +02:00
Thomas Monjalon
fcde84b5f8 version: 18.05-rc1
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-04-28 00:26:04 +02:00
Hemant Agrawal
acaa9ee991 move kernel modules directories
This patch moves the kernel modules code from EAL to a common place.
 - Separate the kernel module code from user space code.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Tested-by: Bruce Richardson <bruce.richardson@intel.com>
2018-03-21 23:04:21 +01:00
Pavan Nikhilesh
200b88cbe0 build: detect micro-arch on ARM
Added support for detecting march and mcpu by reading midr_el1 register.
The implementer, primary part number values read can be used to figure
out the underlying arm cpu.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-01-30 21:59:00 +01:00
Harry van Haaren
b5dc795a8a test: build app with meson as dpdk-test
This patch enables the test/test app to be built. It also adds
the test binary to be a meson-test, which allows the meson test
infrastructure to be used to run tests.

Tests are listed using the same test binary, however each test
sets a different DPDK_TEST environment variable. The string contents
of this DPDK_TEST env var is entered in the command line interface.
As such, the familiar test names such as "ring_perf_autotest" etc
are valid tests to run using this meson test infrastructure.

Note that the tests are run serially, given that we cannot run
multiple primary processes at a time. As each test must initialize
EAL this takes some time depending on the number of hugepages.
In future, we could improve this to run multiple tests from one
EAL init, but it is out of scope for this patchset.

Finally, an option to build the tests is added to the meson build
options. When disabled, the unit test code in test/test is not
compiled. The default is set to 'true'. To disable, run:

$ meson configure -Dtests=false

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-01-30 21:58:59 +01:00
Bruce Richardson
b114af1603 build: remove architecture flag as default C flag
Any flags added to the project args are automatically added to all builds,
both native and cross-compiled. This is not what we want for the -march
flag as a valid -march for the cross-compile is not valid for pmdinfogen
which is a native-build tool.

Instead we store the march flag as a variable, and add it to the default
cflags for all libs, drivers, examples, etc. This will allow pmdinfogen to
compile successfully in a cross-compilation environment.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2018-01-30 21:58:59 +01:00
Bruce Richardson
6c9457c279 build: replace license text with SPDX tag
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Luca Boccassi <bluca@debian.org>
2018-01-30 21:58:59 +01:00
Bruce Richardson
ed4d43d73e build: symlink drivers to library directory
With the introduction of bus drivers, we now have a situation where
driver libraries will start to depend upon each other. Because of this,
the driver libs need to be discoverable by the dynamic loader.

There are three options to fix this:
1. Force the user to put the $libdir/dpdk/drivers folder into their
	library path.
2. Move all libraries from drivers sub-directory to $libdir.
3. Symlink all libraries from the subfolder to the main library dir.

Option 1 is not great for usability or distro packaging, and option 2
means that we can't have EAL load all drivers from a known path
automatically (as it would error out on non-PMD libs), so option 3 was
chosen as the best fix. The only downside is that on a "ninja uninstall"
the symlinks are not removed, as they are unknown to meson/ninja.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2018-01-30 21:58:59 +01:00
Bruce Richardson
93b1f90ae1 build: change default library type to static
Now that we always build both static and shared libraries, the default
library type only applies to apps and examples. To avoid issues with
paths when doing actual development with DPDK, change the default app
build to static. This makes sure that testpmd, and any examples built as
part of a development build, are runnable without being installed.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2018-01-30 21:58:59 +01:00
Bruce Richardson
3e5c3d58e1 build: build as both static and shared libs
This patch changes the build process to group all .o files for a driver or
library into a static archive first, and then link the .o files together
into a shared library. This eliminates the need for separate static or
shared object builds when packaging, for instance.

The "default_library" configuration option now only affects the apps and
examples, which are either linked against the static or shared library
versions depending on the value of the option.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2018-01-30 21:58:59 +01:00
Bruce Richardson
89f0711f9d examples: build some samples with meson
Add support for having selected example apps built as part of a meson,
ninja build. By default none are built, and those to be built should be
named directly in the -Dexamples='' meson configuration argument.

This is useful for developers working on a feature who want to use a
suitable example, or examples, to test that feature, as they can compile
everything up in one go, and run the example without having to do a ninja
install first.

This commit adds examples which don't consist of multiple apps in
subdirectories to the meson build, so they can be built by default by
passing -Dexamples parameter to meson.

Not included are the following examples:
* ethtool
* multi-process
* netmap_compat
* performance-thread
* quota_watermark
* server_node_efd
* vm_power_manager

To test the apps added here, use the following command, merged to one line,
to add them to your meson build (command to be run inside the build
directory):

meson configure -Dexamples=bbdev_app,bond,cmdline,distributor,\
	eventdev_pipeline_sw_pmd, exception_path,helloworld,\
	ip_fragmentation,ip_pipeline,ip_reassembly, ipsec-secgw,\
	ipv4_multicast,kni,l2fwd-cat,l2fwd-crypto,l2fwd-jobstats,\
	l2fwd-keepalive,l2fwd,l3fwd-acl,l3fwd-power,l3fwd-vf,l3fwd,\
	link_status_interrupt,load_balancer,packet_ordering,ptpclient,\
	qos_meter,qos_sched,rxtx_callbacks,skeleton,tep_termination,\
	timer,vhost,vhost_scsi,vmdq,vmdq_dcb

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Luca Boccassi <bluca@debian.org>
2018-01-30 21:58:59 +01:00
Bruce Richardson
afdf7fd248 build: fix driver install path
To comply with the "hier" standard [Ref: man 7 hier], the driver .so files
should not be placed in $datadir. Therefore we install them in a
sub-directory of $libdir instead.

Fixes: a25a650be5 ("build: add infrastructure for meson and ninja builds")

Reported-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2018-01-30 21:51:45 +01:00
Luca Boccassi
d7939c5f87 build: add optional arch-specific headers install path
A subset of the dpdk headers are arch-dependent, but have common names
and thus cause a clash in a multiarch installation.
For example, rte_config.h is different for each target.

Add a "include_subdir_arch"  option to allow a user to specify a
subdirectory for arch independent headers to fix multiarch support.

Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-01-30 21:51:45 +01:00