Commit Graph

28 Commits

Author SHA1 Message Date
Stephen Hemminger
cbb44143be app/dumpcap: add new packet capture application
This is a new packet capture application to replace existing pdump.
The new application works like Wireshark dumpcap program and supports
the pdump API features.

It is not complete yet some features such as filtering are not implemented.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-10-22 22:40:58 +02:00
Jie Zhou
634b731044 app/testpmd: build on Windows
- Disable unsupported apps on Windows
- Enable building of testpmd on Windows

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
2021-07-02 19:03:03 +02:00
Bruce Richardson
23bd8128d6 app: reduce indentation in build files
As with the lib and drivers directories, we can use "continue" keyword to
reduce the indentation level of the majority of the foreach block. At the
same time, we can also replace tab indentation with spaces.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2021-04-21 14:04:09 +02:00
Thomas Monjalon
1cd512b2f5 build: detect execinfo library on Linux
The library execinfo and its header file can be installed on Alpine Linux
where the backtrace feature is not part of musl libc:
	apk add libexecinfo-dev

As a consequence, this library should not be restricted to BSD only.

At the same time, the library and header are detected once and added
globally to be linked with any application, internal or external.

Fixes: 9065b1fac6 ("build: fix dependency on execinfo for BSD meson builds")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
2021-03-23 08:41:05 +01:00
Bruce Richardson
64fd212430 app: fix build with extra include paths
The "includes" variable in the app/meson.build file was ignored when
building the executable, meaning that apps couldn't pass additional
include paths directly back. Fix this to align with drivers and libs.

Fixes: fa036e70d7 ("app: generalize meson build")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2021-01-21 10:27:47 +01:00
Dmitry Kozlyuk
da042bcfc6 build: fix linker flags on Windows
The --export-dynamic linker option is only applicable to ELF.
On Windows, where COFF is used, it causes warnings:

    x86_64-w64-mingw32-ld: warning: --export-dynamic is not supported
    for PE+ targets, did you mean --export-all-symbols? (MinGW)

    LINK : warning LNK4044: unrecognized option '/-export-dynamic';
    ignored (clang)

Don't add --export-dynamic on Windows anywhere.

Fixes: b031e13d7f ("build: fix plugin load on static build")
Cc: stable@dpdk.org

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
2021-01-13 22:13:37 +01:00
Olivier Matz
b031e13d7f build: fix plugin load on static build
When dpdk is compiled as static libraries, it is not possible
to load a plugin from an application. We get the following error:

  EAL: librte_pmd_xxxx.so: undefined symbol: per_lcore__rte_errno

This happens because the dpdk symbols are not exported. Add them to the
dynamic symbol table by using '-Wl,--export-dynamic'. This option was
previously present when compiled with Makefiles, it was introduced in
commit f9a08f6502 ("eal: add support for shared object drivers")

Also add it to the pkg-config file.

Fixes: 16ade738fd ("app/testpmd: build with meson")
Fixes: 89f0711f9d ("examples: build some samples with meson")
Cc: stable@dpdk.org

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
2021-01-05 23:01:36 +01:00
Yuval Avnery
de06137cb2 app/regex: add RegEx test application
Following the new RegEx class.
There is a need to create a dedicated test application in order to
validate this class and PMD.

Unlike net device this application loads data from a file.

This commit introduces the new RegEx test app.

The basic app flow:
1. Configure the RegEx device to use one queue, and set the rule
   database, using precompiled file.
2. Allocate mbufs based on the requested number of jobs, each job will
i  get one mbuf.
3. Enqueue as much as possible jobs.
4. Dequeue jobs.
5. if the number of dequeue jobs < requested number of jobs job to step

Signed-off-by: Ori Kam <orika@mellanox.com>
Signed-off-by: Yuval Avnery <yuvalav@mellanox.com>
2020-07-30 09:13: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
Wisam Jaddo
3344cf2e30 app/flow-perf: add flow performance skeleton
Add flow performance application skeleton.

Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Xiaoyu Min <jackmin@mellanox.com>
2020-06-29 15:47:36 +02:00
Pavan Nikhilesh
acec04c4b2 build: disable experimental API check internally
Remove setting ALLOW_EXPERIMENTAL_API individually for each Makefile and
meson.build. Instead, enable ALLOW_EXPERIMENTAL_API flag across app, lib
and drivers.
This changes reduces the clutter across the project while still
maintaining the functionality of ALLOW_EXPERIMENTAL_API i.e. warning
external applications about experimental API usage.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
2020-04-14 16:22:34 +02:00
Vladimir Medvedkin
dc38ae8d08 app/test-fib: add in default build
Build test-fib application.

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
2020-04-10 11:38:02 +02:00
Vladimir Medvedkin
908be0651a app/test-sad: add test application for IPsec SAD
Introduce new application to provide user to evaluate and perform
custom functional and performance tests for IPsec SAD implementation.

According to our measurements on SKX for 1M entries average lookup
cost is ~80 cycles, average add cost ~500 cycles.

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2019-10-23 16:57:06 +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
adf93ca564 build: increase readability via shortcut variables
Define variables for "is_linux", "is_freebsd" and "is_windows"
to make the code shorter for comparisons and more readable.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-04-17 18:09:52 +02:00
Anand Rawat
fa647c5722 build: add workarounds for Windows helloworld
Added meson workarounds to build helloworld on Windows.
Windows currently only supports kvargs and eal libraries.
This change restricts the build flow to supported libraries
only.

Signed-off-by: Anand Rawat <anand.rawat@intel.com>
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
Acked-by: Harini Ramakrishnan <harini.ramakrishnan@microsoft.com>
2019-04-03 01:21:31 +02: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
474572d2ae app/pipeline: move from test directory
Move to the app directory, and add to meson build.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-02-26 15:28:46 +01:00
Bruce Richardson
75795fabd2 app/acl: move from test directory
Move to "app" directory and enable with meson build.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2019-02-26 15:28:10 +01:00
Bruce Richardson
0c36081db2 app/cmdline: move from test directory
Move app to "app" directory and enable with meson build. For consistency of
naming, the subdirectory is also renamed from cmdline_test to test-cmdline.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-02-26 15:24:11 +01:00
Tomasz Jozwiak
e0b6287c03 app/compress-perf: add parser
Added parser part into compression perf. test.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Lee Daly <lee.daly@intel.com>
Acked-by: Shally Verma <shally.verma@caviumnetworks.com>
2018-12-19 11:19:10 +01: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
Anatoly Burakov
5d7b673d5f mk: build with _GNU_SOURCE defined by default
We use _GNU_SOURCE all over the place, but often times we miss
defining it, resulting in broken builds on musl. Rather than
fixing every library's and driver's and application's makefile,
fix it by simply defining _GNU_SOURCE by default for all
builds.

Remove all usages of _GNU_SOURCE in source files and makefiles,
and also fixup a couple of instances of using __USE_GNU instead
of _GNU_SOURCE.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-10-22 11:28:27 +02:00
Bruce Richardson
996ef11761 app: add all remaining apps to meson build
Add remaining subdirectories in the app folder to the meson build.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-03-12 16:29:27 +01:00
Bruce Richardson
fa036e70d7 app: generalize meson build
Since most apps are built in largely the same way, generalize the logic
into a foreach loop in app/meson.build file.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-03-12 16:29:27 +01:00
Pavan Nikhilesh
2ff67267b0 app/eventdev: build with meson
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
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
16ade738fd app/testpmd: build with meson
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Luca Boccassi <luca.boccassi@gmail.com>
2018-01-30 17:49:16 +01:00