Commit Graph

294 Commits

Author SHA1 Message Date
Bruce Richardson
b38480dc4e devtools: remove check-includes script
The check-includes script allowed checking header files in a given
directory to ensure that each header compiled alone without requiring
any other header inclusions.

With header checking now being done by the chkincs app in the build
system this script can be removed.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2021-01-29 20:59:37 +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
Ray Kinsella
78d3dd3e6f devtools: fix cryptodev ABI suppress rule
Update the ignore entry for crytodev to use named fields
instead of bit positions.
It is allowing changes between the last field (attached) in ABI 21.0,
and the end of the padded struct in ABI 21.

Fixes: 1c3ffb9559 ("cryptodev: add enqueue and dequeue callbacks")

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2021-01-26 14:07:24 +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
Abhinandan Gujjar
1c3ffb9559 cryptodev: add enqueue and dequeue callbacks
This patch adds APIs to add/remove callback functions on crypto
enqueue/dequeue burst. The callback function will be called for
each burst of crypto ops received/sent on a given crypto device
queue pair.

Signed-off-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2021-01-19 18:05:44 +01:00
Liang Ma
1fe3eef5e9 ethdev: add simple power management API
Add a simple API to allow getting the monitor conditions for
power-optimized monitoring of the Rx queues from the PMD, as well as
release notes information.

Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2021-01-19 00:00:04 +01:00
Thomas Monjalon
6a426d733e devtools: reduce ABI checks and static binaries
When testing compilation and checking ABI compatibility,
there is no real need of static binaries eating disks.

The static linkage of applications was already well tested,
though the static examples tested with meson were limited to "l3fwd" only.
The static build test with make is limited to "helloworld" example.

The ABI compatibility is checked on shared libraries,
and there is no need to test again on similar builds.
A new parameter is added to the function "build",
so the ABI check is enabled only for native gcc and clang shared builds,
32-bit, generic armv8 and ppc cross compilations.
In other words, it is disabled for some static builds and some Arm ones.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
2021-01-15 17:29:51 +01:00
Thomas Monjalon
0144eeafd1 devtools: adjust verbosity of ABI check
The scripts gen-abi.sh and check-abi.sh are updated
to print error messages to stderr so they are likely never ignored.

When called from test-meson-builds.sh, the standard messages on stdout
can be more quiet depending on the verbosity settings.
The beginning of the ABI check is announced in verbose mode.
The commands are printed in very verbose mode.
The check result details are available in verbose mode.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2021-01-13 00:04:33 +01:00
Tal Shnaiderman
e253c33dee common/mlx5: add Windows exports file
File drivers/common/mlx5/rte_common_mlx5_exports.def contains mlx5
Windows exported symbols under common/mlx5 directory (DLL file
name librte_common_mlx5*.dll). It is the equivalent of Linux map
file version.map but the list of symbols may be
different between the two operating systems.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Signed-off-by: Ophir Munk <ophirmu@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-01-08 16:03:07 +01:00
Ferruh Yigit
047d5c9c81 devtools: add acronyms in dictionary for commit checks
ICMP -> Internet Control Message Protocol
IPv4 -> Internet Protocol version 4
IPv6 -> Internet Protocol version 6

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-11-22 22:43:49 +01:00
Thomas Monjalon
996a8658ad devtools: rename build test verbosity variables
The verbosity was meant to be set with options -v and -vv,
or possibly with the environment variables TEST_MESON_BUILD_VERBOSE
and TEST_MESON_BUILD_VERY_VERBOSE.

It is decided to keep only the options -v and -vv,
so the variables are renamed with lower case, marking them as privates.

The handling of the verbosity level is also moved upper in the script,
closer to other initializations.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2020-11-20 16:06:08 +01:00
Stephen Hemminger
db27370b57 eal: replace blacklist/whitelist options
Replace -w / --pci-whitelist with -a / --allow options
and --pci-blacklist with --block.
The -b short option remains unchanged.

Allow the old options for now, but print a nag
warning since old options are deprecated.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2020-11-16 00:11:22 +01:00
David Marchand
cb2587644e devtools: fix directory filter in forbidden token check
checkpatches.sh current complains on a patch [1] adding
ALLOW_EXPERIMENTAL_API in an example while this check is for app, lib
and drivers directories:

Warning in examples/ethtool/ethtool-app/Makefile:
Using experimental build flag for in-tree compilation

The regexp on entering files concerned by this filter is incorrect.
In the [1] case, the file full name is matched against "app" rather than
"+++ b/app".

1: https://patchwork.dpdk.org/patch/83902/

Fixes: 7413e7f2ae ("devtools: alert on new calls to exit from libs")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
2020-11-13 09:35:04 +01:00
Bruce Richardson
e222b17f68 devtools: allow custom set of examples in build test
To test the installation process of DPDK using "ninja install"
test-meson-builds.sh builds a subset of the examples using "make". To allow
more flexibility for people testing, allow the set of examples chosen for
this make test to be overridden using variable "DPDK_BUILD_TEST_EXAMPLES"
in the environment.

Since a number of example apps link against drivers directly even for
shared builds, we need to ensure that LD_LIBRARY_PATH points to the main
DPDK lib folder so any dependencies of those drivers can be found e.g. that
the PCI/vdev bus driver .so is found. [All drivers are symlinked from
drivers dir back to lib dir on install, so only one dir rather than two is
needed in the path.]

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2020-11-12 16:37:39 +01:00
David Marchand
252e92eec4 devtools: fix x86-default build test install env
The x86-default environment was loaded after installing this target.
I did not see any problem with it, yet we should load corresponding
environment before installing a target.

Fixes: bd253daa77 ("devtools: fix test of ninja install")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
2020-11-12 16:37:39 +01:00
Thomas Monjalon
a7a9199af8 devtools: reduce build test verbosity
The default verbosity of test-meson-builds.sh is to be quiet.
In order to better apply the verbosity policy, some file descriptors
are open to redirect to stdout or /dev/null accordingly.

The target variable and meson/ninja commands are printed in verbose modes.
The installation commands are printed only in very verbose mode.
The examples build commands are printed only in very verbose mode.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2020-11-12 15:40:28 +01:00
Thomas Monjalon
a655cbd5be devtools: fix build test config inheritance from env
The variables DPDK_MESON_OPTIONS, PATH, PKG_CONFIG_PATH,
CPPFLAGS, CFLAGS and LDFLAGS can be customized in the config file
loaded by devtools/load-devel-config at each build.
The configuration can be adjusted per target thanks to the value set
in the DPDK_TARGET variable.

PKG_CONFIG_PATH is specific to each target, so it must be empty
before configuring each build from the file according to DPDK_TARGET.
Inheriting a default PKG_CONFIG_PATH for all targets does not make sense
and is prone to confusion.

DPDK_MESON_OPTIONS might take a global initial value from environment
to customize a build test from the shell. Example:
	DPDK_MESON_OPTIONS="b_lto=true"
Some target-specific options can be added in the configuration file:
	DPDK_MESON_OPTIONS="$DPDK_MESON_OPTIONS kernel_dir=$MYKERNEL"

Fixes: 2722367412 ("devtools: load target-specific compilation environment")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
2020-11-12 15:40:28 +01:00
Bruce Richardson
9b83106d87 devtools: test 32-bit build
It's reasonably common for patches to have issues when built on 32-bits, so
to prevent this, we can add a 32-bit build (if supported) to the
"test-meson-builds.sh" script. The tricky bit is using a valid
PKG_CONFIG_LIBDIR, so for now we use two common possibilities for where that
should point to in order to get a successful build.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2020-11-06 18:12:10 +01:00
Bruce Richardson
a8d0d473a0 build: replace use of old build macros
Use the newer macros defined by meson in all DPDK source code, to ensure
there are no errors when the old non-standard macros are removed.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Rosen Xu <rosen.xu@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2020-10-19 22:15:44 +02:00
Bruce Richardson
5bd4790174 devtools: load all drivers in null test
Rather than specifying specific drivers in the driver directory to load, we
can just pass in the whole driver directory to the "-d" EAL flag, causing
all drivers to load. This makes the load of driver independent of any
specific driver names.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2020-10-19 22:14:54 +02:00
David Marchand
2941600108 devtools: check Windows export files
Updating export files (supposed to disappear at some point, but still
there) might be missed when removing symbols in the API / map files.
Add a check for this case.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2020-10-16 14:01:37 +02:00
Louise Kilheeney
3f6f83626c support python 3 only
Changed scripts to explicitly use Python 3 only, to avoid
maintaining Python 2.
Removed deprecation notices.

Signed-off-by: Louise Kilheeney <louise.kilheeney@intel.com>
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Robin Jarry <robin.jarry@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
2020-10-02 13:51:00 +02:00
Ciara Power
4e2cf9af45 devtools: remove legacy flags from includes check
Make is no longer supported, the test script for make builds is no
longer required. Uses of make in other tool scripts are replaced.

Signed-off-by: Ciara Power <ciara.power@intel.com>
2020-10-01 16:41:20 +02:00
Ciara Power
ec260aa3ad config: remove default configs used with make
Make is not supported for compiling DPDK, the config files are no
longer needed.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2020-09-08 00:11:30 +02:00
Ciara Power
3cc6ecfdfe build: remove makefiles
A decision was made [1] to no longer support Make in DPDK, this patch
removes all Makefiles that do not make use of pkg-config, along with
the mk directory previously used by make.

[1] https://mails.dpdk.org/archives/dev/2020-April/162839.html

Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2020-09-08 00:09:50 +02:00
Thomas Monjalon
b9b10ddb42 switch default git branch name to main
The default git branch of the main DPDK repository has been renamed
from master to main.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2020-08-12 15:32:07 +02:00
Thomas Monjalon
a6fc38f34b devtools: fix ABI update in map files
The script was using the full ABI version, including the minor number,
to version the symbols in the map files.
It is fixed to use only the major number for symbol versioning.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
2020-08-12 11:32:21 +02:00
Thomas Monjalon
4f86c0ba19 version: 20.11-rc0
Start a new release cycle with empty release notes.

The ABI version becomes 21.0.
The ABI major is back to normal, having only one number (21 vs 20.0).
The map files are updated to the new ABI major number (21).
The ABI exceptions are dropped.
Travis ABI check is disabled because compatibility is not preserved.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
2020-08-12 11:32:16 +02:00
Adrian Moreno
fcea4c8e29 devtools: ignore Linux-style fallthrough warning
The PREFER_FALLTHROUGH check warns if a passthrough comment is found
because, in the kernel, the special macro "fallthrough" is preferred.

Since that keyword is not defined in DPDK, ignore the warning.

Ignoring this check does not affect the MISSING_BREAK check that will
warn if a switch case/default is not preceded by break or a fallthrough
comment.

Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Chenbo Xia <chenbo.xia@intel.com>
2020-08-07 13:33:54 +02:00
Ferruh Yigit
7539c73d96 devtools: add acronyms in dictionary for commit checks
GTPU  -> GPRS Tunnelling Protocol User Plane
MSI   -> Message Signalled Interrupts
MSI-X -> Message Signalled Interrupts (Extended)
TCAM  -> Ternary Content Addressable Memory
ULP   -> Upper Layer Protocol
XOR   -> Exclusive OR

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-08-07 13:04:55 +02:00
Stephen Hemminger
7ccf23c8f7 devtools: rename variables in maintainers file parsing
Change variable names in the shell script.
Replace whitelist with include_files and blacklist with exclude_files.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: John McNamara <john.mcnamara@intel.com>
2020-08-07 13:02:11 +02:00
Ciara Power
a8354c99a9 devtools: summarize git log check
When all checks are completed on the specified commit logs, the script
indicates if all are valid, or if there were some failures.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2020-07-31 01:09:26 +02:00
Ciara Power
b1214d9882 devtools: standardize script arguments
This patch modifies the arguments expected by the check-git-log script,
to match the format of arguments for the checkpatches script. Both
scripts now take certain argument options in the same format, making
them easier to use.
e.g. Both now take a commit ID range by "-r <range>"

The checkpatches help print is also updated to include the "-h" option.

The contributor's guide includes the usage of both the checkpatches and
check-git-log scripts, which needed to be updated to reflect the now
standardised format.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Thomas Monjalon <thomas@monjalon.net>
2020-07-31 01:09:26 +02:00
Stephen Hemminger
525d803185 devtools: add new SPDX license compliance checker
Simple script to look for drivers and scripts that
are missing requires SPDX header.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2020-07-31 01:09:26 +02:00
Thomas Monjalon
7dba4148ca devtools: add checkpatch spelling dictionary builder
The script checkpatch.pl (used in checkpatches.sh) can use a dictionary
from the codespell project to check spelling.
There are multiple dictionaries to be used.

The script build-dict.sh concatenate multiple dictionaries and remove
some annoying false positives.

The dictionary built by this script must be saved in a file which
is referenced with the environment variable DPDK_CHECKPATCH_CODESPELL.
The easiest is to export this variable in ~/.config/dpdk/devel.config.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2020-07-31 01:09:26 +02:00
David Marchand
b071f1fa88 devtools: avoid explicit experimental build flag
-DALLOW_EXPERIMENTAL_API is always set for in-tree compilation since
https://git.dpdk.org/dpdk/commit/?id=acec04c4b2f5

Warn people not to copy/paste this flag that was needed before.

Signed-off-by: David Marchand <david.marchand@redhat.com>
2020-07-30 23:44:49 +02:00
Louise Kilheeney
ea0dceba0f add python2 deprecation notice
Prepare for python2 removal in 20.11.

Signed-off-by: Louise Kilheeney <louise.kilheeney@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Nicolas Chautru <nicolas.chautru@intel.com>
2020-07-21 22:58:18 +02:00
Phil Yang
db48bae253 mbuf: use C11 atomic builtins for refcnt
Use C11 atomic builtins with explicit ordering instead of rte_atomic
ops which enforce unnecessary barriers on aarch64.

Suggested-by: Olivier Matz <olivier.matz@6wind.com>
Suggested-by: Dodji Seketeli <dodji@redhat.com>
Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2020-07-21 10:30:35 +02:00
Phil Yang
f1602b4a86 devtools: prevent use of legacy atomic API
In order to deprecate the rte_atomic and rte_smp barrier APIs [1], prevent
the patches from using these APIs and __sync builtins in new code.
Please use __atomic builtins instead of __sync builtins, rte_atomicNN_xxx
and rte_smp_[r/w]mb APIs.

On x86 the __atomic_thread_fence(__ATOMIC_SEQ_CST) is quite expensive for
SMP case. Flag the new code which use __atomic_thread_fence API.
Please use rte_thread_fence API instead of __atomic_thread_fence builtins.

1: Refer to the locks-and-atomic-operations section in
https://doc.dpdk.org/guides/prog_guide/writing_efficient_code.html

Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
2020-07-17 16:00:30 +02:00
David Marchand
cfe4ca1021 devtools: give some hints for ABI errors
abidiff can provide some more information about the ABI difference it
detected.
In all cases, a discussion on the mailing must happen but we can give
some hints to know if this is a problem with the script calling abidiff,
a potential ABI breakage or an unambiguous ABI breakage.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Aaron Conole <aconole@redhat.com>
2020-07-16 08:47:09 +02:00
Phil Yang
e0a439466b eal/linux: use C11 atomics for interrupt status
The event status is defined as a volatile variable and shared between
threads. Use C11 atomic built-ins with explicit ordering instead of
rte_atomic ops which enforce unnecessary barriers on aarch64.

The event status has been cleaned up by the compare-and-swap operation
when we free the event data, so there is no need to set it to invalid
after that.

Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Harman Kalra <hkalra@marvell.com>
2020-07-09 18:53:40 +02:00
Ferruh Yigit
db1162b458 devtools: add acronyms in dictionary for commit checks
Verbs ->
DevX  ->

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-07-07 23:38:26 +02:00
David Marchand
7762e0139b build: remove special versioning for non stable libraries
Having a special versioning for experimental/internal libraries put a
additional maintenance cost while this status is already announced in
MAINTAINERS and the library headers/documentation.
Following discussions and vote at 05/20 TB meeting [1], use a single
versioning for all libraries in DPDK.

Note: for the ABI check, an exception [2] had been added when tweaking
this special versioning [3].
Prefer explicit libabigail rules (which will be dropped in 20.11).

1: https://mails.dpdk.org/archives/dev/2020-May/168450.html
2: https://git.dpdk.org/dpdk/commit/?id=23d7ad5db41c
3: https://git.dpdk.org/dpdk/commit/?id=ec2b8cd7ed69

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2020-07-07 12:48:25 +02:00
David Marchand
4c4f839446 devtools: fix check of variable declaration inside for
An expression with a space is split by the awk script resulting in
false positive for any patch matching any of the two part of the
expression.
Fix this by using [[:space:]].

Fixes: 43e73483a4 ("devtools: forbid variable declaration inside for")

Signed-off-by: David Marchand <david.marchand@redhat.com>
2020-07-06 10:55:19 +02:00
David Marchand
8d4a222e12 devtools: fix path in forbidden token check
Fix displayed filename by adjusting the extraction from the patch.

Before:
Warning in /lib/librte_eal/linux/eal.c:

After:
Warning in lib/librte_eal/linux/eal.c:

Fixes: 7413e7f2ae ("devtools: alert on new calls to exit from libs")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
2020-07-06 10:55:19 +02:00
Thomas Monjalon
5a3f804159 devtools: allow ENOSYS in checkpatch
The Linux checkpatch default is warning on the use of ENOSYS.
This is allowed in DPDK API.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-07-03 10:40:18 +02:00
Thomas Monjalon
0b8086ce3f devtools: remove useless files from ABI reference
When building an ABI reference with meson, some static libraries
are built and linked in apps. They are useless and take a lot of space.
Those binaries, and other useless files (examples and doc files)
in the share/ directory, are removed after being installed.

In order to save time when building the ABI reference,
the examples (which are not installed anyway) are not compiled.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
2020-07-03 10:10:22 +02:00
Thomas Monjalon
43e73483a4 devtools: forbid variable declaration inside for
Some compilers raise an error when declaring a variable
in the middle of a function. This is a C99 allowance.
Even if DPDK switches globally to C99 or C11 standard,
the coding rules are for declarations at the beginning
of a block:
http://doc.dpdk.org/guides/contributing/coding_style.html#local-variables

This coding style is enforced by adding a check of
the common patterns like "for (int i;"

The occurrences of the checked pattern are fixed:
	'for *(\(char\|u\?int\|unsigned\|s\?size_t\)'
In the file dpaa2_sparser.c, the fix is to remove the unused macros.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
2020-07-03 10:04:15 +02:00
Bruce Richardson
ca39d3a801 devtools: test static linkage with pkg-config
The pkg-config file was tested by building some of the examples using make,
pulling the cflags and ldflags from the pkg-config file for DPDK. However,
this only tested the shared library linkage, and not the static, so this
patch updates it to test both.

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
Thomas Monjalon
3b6431396a devtools: add Windows cross-build test with MinGW
The Meson cross file is renamed from meson_mingw.txt to cross-mingw,
and is added to test-meson-builds.sh.

The only example supported on Windows so far is "helloworld",
that's why the default list of examples is overridden.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2020-06-30 01:18:35 +02:00
Thomas Monjalon
b2b3858a08 devtools: add ppc64 in meson build test
Add cross-compilation support of a PPC target in the build test matrix.
The CPU is defined as Power8, running as little endian.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
2020-06-30 01:18:35 +02:00
Thomas Monjalon
3932237f10 devtools: allow non-standard toolchain in meson test
If a compiler is not found in $PATH, the compilation test is skipped.
In some cases, the compiler could be found after extending $PATH
in an environment configuration script (called by load-devel-config).

The decision to skip is deferred to a later stage, after loading the
configuration script.

In such case, the variable DPDK_TARGET, used by the configuration script
as input, is the compiler name.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
2020-06-30 01:18:35 +02:00
Thomas Monjalon
444e556776 devtools: shrink cross-compilation test definition
Each cross-compilation case needs to define the target compiler
and the meson cross file.
Given the compiler is already defined in the cross file,
the latter is enough.

The function "build" is changed to accept a cross file alternatively
to the compiler name. In the case of a file (detected if readable),
the compiler is extracted with sed and tr, and the option --cross-file
is automatically added.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
2020-06-30 01:18:35 +02:00
David Marchand
3d4b2afb73 doc: prefer https when pointing to dpdk.org
for file in $(git grep -l http://.*dpdk.org doc/); do
  sed -i -e 's#http://\(.*dpdk.org\)#https://\1#g' $file;
done

Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
2020-05-24 23:42:36 +02:00
Ferruh Yigit
28ac1a4984 devtools: add acronyms in dictionary for commit checks
AltiVec ->
IOTLB   -> Input/Output Translation Lookaside Buffer
IPsec   -> Internet Protocol security
PPPoE   -> Point-to-Point Protocol over Ethernet
PVID    -> Port VLAN IDentifier

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-05-24 23:05:54 +02:00
Neil Horman
6735434917 devtools: remove old ABI validation script
Since we've moved away from our initial validate-abi.sh script,
in favor of check-abi.sh, which uses libabigail,
remove the old script from the tree, and update the docs accordingly.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2020-05-24 22:36:45 +02:00
Thomas Monjalon
ef5391b765 devtools: allow warnings in ABI reference build
There is no point in forcing warning-free compilation when building
an ABI reference. It is only preventing from compiling ABI reference
of old releases with recent compilers.

Note: DPDK 20.02 is built (with warnings) by GCC 10 if using -fcommon.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
2020-05-21 15:41:49 +02:00
Haiyue Wang
c2403cd79f devtools: preserve internal section on ABI bump
INTERNAL is a newly introduced version, update the script used to bump
ABI in all map files but leaving internal section exactly as it is.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
2020-05-19 19:12:49 +02:00
Haiyue Wang
2be668709c devtools: handle internal version in symbols check
INTERNAL is a newly introduced version, update the shell script that
checks whether built libraries are versioned with expected ABI
(current ABI, current ABI + 1, EXPERIMENTAL, or INTERNAL).

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
2020-05-19 19:12:18 +02:00
Jerin Jacob
8b9dae0cc3 doc: use globbing terminology
Glob is the terminology used in fnmatch man page.
Use glob terminology across DPDK for shell pattern.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2020-05-19 16:05:17 +02:00
Hemant Agrawal
6b6ca75191 drivers: mark internal NXP symbols
This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
2020-05-19 15:49:53 +02:00
Hemant Agrawal
4d1f7981b4 drivers/mempool: mark internal NXP symbols
This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
2020-05-19 15:49:53 +02:00
Hemant Agrawal
1e0f9b0775 bus/dpaa: mark internal symbols
This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

This patch also removes two symbols, which are not to be exported.
rte_dpaa_mem_ptov  - static inline in the headerfile
fman_ccsr_map_fd - local shared variable.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
2020-05-19 15:49:53 +02:00
Hemant Agrawal
c9da6cfa1c bus/fslmc: mark internal symbols
This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

This patch also removes two symbols, which were not used
anywhere else i.e. rte_fslmc_vfio_dmamap & dpaa2_get_qbman_swp

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
2020-05-19 15:49:53 +02:00
Hemant Agrawal
6ae4ce8942 common/dpaax: mark internal symbols
This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
2020-05-19 15:49:53 +02:00
Ophir Munk
64c563f8b1 common/mlx5: mark internal symbols
Move mlx5 symbols in the map file to the INTERNAL section and add
__internal tags to their definitions.
Those symbols were exported in 20.02 and now (20.05) they are removed.
Avoid ABI comparison issues between 20.05/20.08 and 20.02 by adding the
suppress_file directive to libabigail.abignore file. This directive will
prevent loading mlx5 common symbols and no comparison will be performed.

In addition move symbols from the EXPERIMENTAL section to the INTERNAL
section.

Fixes: 7b4f1e6bd3 ("common/mlx5: introduce common library")

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2020-05-18 20:35:56 +02:00
Pavan Nikhilesh
03a4e635cf mempool/octeontx2: mark internal symbols
Move the internal symbols to INTERNAL sections so that any
change in them is not reported as ABI breakage.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Signed-off-by: David Marchand <david.marchand@redhat.com>
2020-05-18 17:29:24 +02:00
Pavan Nikhilesh
8614cb6afd common/octeontx2: mark internal symbols
Move the internal symbols to INTERNAL sections so that any
change in them is not reported as ABI breakage.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Signed-off-by: David Marchand <david.marchand@redhat.com>
2020-05-18 17:29:20 +02:00
Arek Kusztal
a0f0de06d4 cryptodev: fix ABI compatibility for ChaCha20-Poly1305
This patch adds versioned function rte_cryptodev_info_get()
to prevent some issues with ABI policy.
Node v21 works in same way as before, returning driver capabilities
directly to the API caller. These capabilities may include new elements
not part of the v20 ABI.
Node v20 function maintains compatibility with v20 ABI releases
by stripping out elements not supported in v20 ABI. Because
rte_cryptodev_info_get is called by other API functions,
rte_cryptodev_sym_capability_get function is versioned the same way.

Fixes: b922dbd38c ("cryptodev: add ChaCha20-Poly1305 AEAD algorithm")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2020-05-11 13:17:43 +02:00
Kevin Laatz
dec44d4110 eal/x86: add more CPU flags
This patch adds CPU flags which will enable the detection of ISA
features available on more recent x86 based CPUs.

The CPUID leaf information can be found in
Table 1-2. "Information Returned by CPUID Instruction" of this document:
https://software.intel.com/sites/default/files/managed/c5/15/architecture-instruction-set-extensions-programming-reference.pdf

The following CPU flags are added in this patch:
    - AVX-512 doubleword and quadword instructions.
    - AVX-512 integer fused multiply-add instructions.
    - AVX-512 conflict detection instructions.
    - AVX-512 byte and word instructions.
    - AVX-512 vector length instructions.
    - AVX-512 vector bit manipulation instructions.
    - AVX-512 vector bit manipulation 2 instructions.
    - Galois field new instructions.
    - Vector AES instructions.
    - Vector carry-less multiply instructions.
    - AVX-512 vector neural network instructions.
    - AVX-512 for bit algorithm instructions.
    - AVX-512 vector popcount instructions.
    - Cache line demote instructions.
    - Direct store instructions.
    - Direct store 64B instructions.
    - AVX-512 two register intersection instructions.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
2020-05-07 14:51:06 +02:00
Ray Kinsella
105f3039c7 version: reference next ABI 21 for recent additions
Change references to ABI 20.0.1 to use ABI v21, see
https://doc.dpdk.org/guides/contributing/abi_policy.html#general-guidelines

"Major ABI versions are declared no more frequently than yearly.
Compatibility with the major ABI version is mandatory in subsequent
releases until a new major ABI version is declared."

Combined ABI policy and versioning in maintainers, add map files to the
filter to more closely monitor future ABI changes.

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
2020-05-05 00:25:34 +02:00
Haiyue Wang
2c32cfdee1 devtools: ignore internal ABI check
Ignore the internal version ABI check, this kind of ABI is used only
by drivers and libraries.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
2020-04-25 17:01:01 +02:00
Haiyue Wang
fba5af82ad eal: add internal ABI tag definition
Introduce the __rte_internal tag to mark internal ABI function which is
used only by the drivers or other libraries.
Like for __rte_experimental, this tag must be on a separate line before
function proprotypes.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
2020-04-25 17:01:00 +02:00
Thomas Monjalon
7b63fb3b84 devtools: fix tracepoint symbols check
The tracepoint symbols __rte_*_trace_* are defined via a macro,
adding prefix "__", so they cannot be found by map checker.
Those symbols defined by RTE_TRACE_POINT and RTE_TRACE_POINT_FP
are checked in source code without the generated prefix.

The same logic is applied to per core variables, previously skipped.

Fixes: 6c232fc44c ("trace: add generic tracepoints")
Fixes: 4931010619 ("trace: add alarm tracepoints")
Fixes: 52f409d614 ("trace: add memory tracepoints")
Fixes: 402321cfca ("trace: add memzone tracepoints")
Fixes: 0baa1e01c3 ("trace: add thread tracepoints")
Fixes: 05c4105738 ("trace: add interrupt tracepoints")
Fixes: 78d44153de ("ethdev: add tracepoints")
Fixes: 32e326869e ("eventdev: add tracepoints")
Fixes: 4cf30e3f3c ("cryptodev: add tracepoints")
Fixes: 40b75c73d1 ("mempool: add tracepoints")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
2020-04-24 15:04:25 +02:00
Dong Zhou
44bf3c796b ethdev: support flow aging
One of the reasons to destroy a flow is the fact that no packet matches
the flow for "timeout" time.
For example, when TCP\UDP sessions are suddenly closed.

Currently, there is not any DPDK mechanism for flow aging and the
applications use their own ways to detect and destroy aged-out flows.

The flow aging implementation need include:
- A new rte_flow action: RTE_FLOW_ACTION_TYPE_AGE to set the timeout and
  the application flow context for each flow.
- A new ethdev event: RTE_ETH_EVENT_FLOW_AGED for the driver to report
  that there are new aged-out flows.
- A new rte_flow API: rte_flow_get_aged_flows to get the aged-out flows
  contexts from the port.
- Support input flow aging command line in Testpmd.

The new event type addition in the enum is flagged as an ABI breakage,
so an ignore rule is added for these reasons:
- It is not changing value of existing types (except MAX)
- The new value is not used by existing API if the event is not
  registered
In general, it is safe adding new ethdev event types at the end of the
enum, because of event callback registration mechanism.

Signed-off-by: Dong Zhou <dongz@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2020-04-21 17:34:05 +02:00
Konstantin Ananyev
e6ba4731c0 ring: introduce RTS ring mode
Introduce relaxed tail sync (RTS) mode for MT ring synchronization.
Aim to reduce stall times in case when ring is used on
overcommited cpus (multiple active threads on the same cpu).
The main difference from original MP/MC algorithm is that
tail value is increased not by every thread that finished enqueue/dequeue,
but only by the last one.
That allows threads to avoid spinning on ring tail value,
leaving actual tail value change to the last thread in the update queue.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
2020-04-21 12:52:55 +02:00
Thomas Monjalon
4a4e0622eb devtools: skip ABI check in static builds
When running make with CONFIG_RTE_BUILD_SHARED_LIB=n,
no shared library is built.
In this case, no need to run ABI check.

With meson, both shared and static libraries are always built.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: David Marchand <david.marchand@redhat.com>
2020-04-21 11:17:42 +02:00
Thomas Monjalon
1cab496414 devtools: reduce examples in static builds
Static builds can take a lot of space, so reduce the number of examples
built when testing those static builds.

As makefile-based build is close to end of life, completely skip examples
in case of static linkage with make.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
2020-04-21 11:17:38 +02:00
Thomas Monjalon
2d20636989 devtools: check use of compiler attributes
The keyword __attribute__ will emit a warning,
because it is preferred to use or define a common __rte macro.
The centralized macros may help to control or workaround some compilers.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2020-04-16 18:30:58 +02:00
Thomas Monjalon
a1b6cda16a eal: move arch-specific header files
The arch-specific directories arm, ppc and x86 in common/include/arch/
are moved as include/ sub-directories of respective arch directories:
	- arm/include/
	- ppc/include/
	- x86/include/

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: David Marchand <david.marchand@redhat.com>
2020-03-31 13:08:55 +02:00
Thomas Monjalon
2a1991799e eal: move arch-specific C files
The arch-specific directories arm, ppc and x86 in common/arch/
are moved at the same level as the OS-specific directories.
It makes more clear that EAL is covering a matrix combining OS and arch.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: David Marchand <david.marchand@redhat.com>
2020-03-31 13:08:55 +02:00
David Marchand
0f96499d5d devtools: silence meson install
Installing with ninja is quite verbose by default, hide ninja output under
TEST_MESON_BUILD_VERBOSE and TEST_MESON_BUILD_VERY_VERBOSE options.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2020-03-23 14:19:45 +01:00
Nithin Dabilpuram
f08885494f devtools: fix symbol map change check
Fix check symbol change script to detect new diff file when
it is in between  "--- /dev/null" to "b/lib/...".
Current awk line expects line to start with "a/..."
which is not always true for all diffs.
As a result if in_map was '1' earlier, it will not be changed
to '0' and we get check patch errors which are not true.

Fixes: 4bec48184e ("devtools: add checks for ABI symbol addition")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
2020-03-23 14:19:45 +01:00
Ferruh Yigit
44c775feb4 devtools: add acronyms in dictionary for commit checks
BAR    -> Base Address Register
FDIR   -> Flow Director
GENEVE -> Generic Network Virtualization Encapsulation
IO     -> Input/Output
MPLS   -> Multiprotocol Label Switching
NEON
null
NVGRE  -> Network Virtualization using Generic Routing Encapsulation
RDMA   -> Remote Direct Memory Access
TC     -> Traffic Class
VFIO   -> Virtual Function I/O
VXLAN  -> Virtual Extensible LAN
XDP    -> eXpress Data Path

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-03-06 19:52:35 +01:00
Sean Morrissey
d448efa259 devtools: export dictionary for commit title check
Moved title syntax to a separate file so that it improves code
readability and allows easy addition.

Also logic changed from checking for bad pattern to checking good
pattern which documents the expected syntax more clearly, and does not
have gaps in the checks.

Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-02-25 21:24:31 +01:00
Kevin Traynor
8070d8fecb devtools: add fixes flag to commit listing
During backporting, if the fixes or stable tag are missing,
it usually requires some investigation by stable maintainer
as to why.

The presence of a fixes tag may be known from whether the
originating release of the issue is printed at the end of the
line but with variable line lengths and nested partial fixes
it doesn't catch the eye.

When there are a large amount of commits, adding an aligned column
indicating the presence of a fixes tag beside the stable one makes
it easier to quickly see the patches requiring further investigation.

e.g.
20.02 8f33cbcfa S F net/i40e/base: fix buffer address (16.04)
20.02 4b3da9415 S F net/i40e/base: fix error message (1.7.0)
20.02 1da546c39 - F net/i40e/base: fix missing link modes (17.08)
20.02 79bfe7808 S F net/i40e/base: fix Tx descriptors number (1.7.0)
20.02 50126939c - F net/i40e/base: fix retrying logic (18.02)
20.02 dcd05da0a S F app/testpmd: fix GENEVE flow item (18.02)
20.02 b0b9fdad2 S - net/bnx2x: support secondary process (N/A)
20.02 f8279f47d S F net/netvsc: fix crash in secondary process (18.08)

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
2020-02-25 17:24:49 +01:00
Lance Richardson
7b6875ba6f devtools: warn on C99-style comment
C99-style comments are not permitted according to DPDK coding
style guidelines, enable checking for these by checkpatch.pl.

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
2020-02-22 20:49:38 +01:00
Stephen Hemminger
6081c4be1d devtools: add SPDX license tag to config loader
Trivial file was missing any license.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2020-02-22 15:17:03 +01:00
David Marchand
23d7ad5db4 devtools: skip experimental libraries in ABI check
We don't provide ABI compatibility for experimental libraries.
Skip those libraries by catching a soname containing a version starting
with '0.'.

Align the special case for the glue libraries by using the soname too.
Once libabigail has support for it, we will have a single type of rule.

Fixes: 777014e56d ("devtools: add ABI checks")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2020-02-21 17:44:02 +01:00
Thomas Monjalon
80139e3549 fix Mellanox copyright and SPDX tag
Mellanox owns Tilera and EZchip, so the copyrights can be converted.
At the same time, the license header is switched to SPDX tag format,
and a typo is fixed in another copyright line.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2020-02-13 18:47:28 +01:00
Thomas Monjalon
924414410e devtools: enable more config options in build test
The Linux kernel modules kni and igb_uio were disabled by default
so they need a new option (+kmods) for testing compilation.

Some recent features were not enabled in compilation testing:
	- mlx5 vDPA (depends on libibverbs)
	- ifpga (depends on libfdt)
	- ipn3ke (depends on libfdt)
	- Arm WFE

Check on libfdt availability is added, and not considered as a fix.

Fixes: 91a861e541 ("config: disable Linux kernel modules by default")
Fixes: 95276abaaf ("vdpa/mlx5: introduce Mellanox vDPA driver")
Fixes: 1be7855d77 ("eal: add wait until equal API")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
2020-02-12 11:32:15 +01:00
Pablo de Lara
7c87e2d7b3 crypto/snow3g: use IPsec library
Link against Intel IPsec Multi-buffer library, which
added support for SNOW3G-UEA2 and SNOW3G-UIA2 from version v0.53,
moving from libSSO SNOW3G library.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2020-02-05 15:17:36 +01:00
Pablo de Lara
bf6eb2c22f crypto/kasumi: use IPsec library
Link against Intel IPsec Multi-buffer library, which
added support for KASUMI-F8 and KASUMI-F9 from version v0.53,
moving from libSSO KASUMI library.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2020-02-05 15:16:57 +01:00
Pablo de Lara
61f7c988e3 crypto/zuc: use IPsec library
Link against Intel IPsec Multi-buffer library, which
added support for ZUC-EEA3 and ZUC-EIA3 from version v0.53,
moving from libSSO ZUC library.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2020-02-05 15:15:32 +01:00
David Marchand
777014e56d devtools: add ABI checks
For normal developers, those checks are disabled.

Enabling them requires a configuration that will trigger the ABI dumps
generation as part of the existing devtools/test-build.sh and
devtools/test-meson-builds.sh scripts.

Those checks are enabled in the CI for the default meson options on x86
and aarch64 so that proposed patches are validated via our CI robot.
A cache of the ABI is stored in travis jobs to avoid rebuilding too
often.

Checks can be informational only, by setting ABI_CHECKS_WARN_ONLY when
breaking the ABI in a future release.

Explicit suppression rules have been added on internal structures
exposed to crypto drivers as the current ABI policy does not apply to
them.
This could be improved in the future by carefully splitting the headers
content with application and driver "users" in mind.

We currently have issues reported for librte_crypto recent changes for
which suppression rules have been added too.

Mellanox glue libraries are explicitly skipped as they are not part of
the application ABI.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2020-02-05 15:14:46 +01:00
David Marchand
d6f923ba4a devtools: split meson build helper
No functional change intended, prepare for reusing this code.
The config and compilation parts are separated in helpers.
Unsetting CC is moved to the caller of the helper.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2020-02-05 15:14:46 +01:00
Ruifeng Wang
aafc3ce7f2 devtools: add path to additional shared object files
Drivers librte_mempool_ring.so and librte_pmd_null.so are loaded by
librte_eal.so when running testpmd.
In Ubuntu Xenial, driver path is installed to RPATH on testpmd. This
allows librte_eal.so to find drivers by using the RPATH.
However, in Ubuntu Bionic, driver path is installed to RUNPATH instead.
The RUNPATH on testpmd is not available by librte_eal.so and therefore
lead to driver load failure:

EAL: Detected 32 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: librte_mempool_ring.so: cannot open shared object file:
					No such file or directory
EAL: FATAL: Cannot init plugins
EAL: Cannot init plugins

Add 'drivers' into LD_LIBRARY_PATH so that testpmd can find and make
use of these shared libraries.

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Aaron Conole <aconole@redhat.com>
2020-01-14 09:45:23 +01:00
Thomas Monjalon
924e55fb34 devtools: fix debug build test
When testing build with +debug options, the statistics are enabled.
It was wrongly matching CONFIG_RTE_IBVERBS_LINK_STATIC.
The pattern is fixed to match only statistics config options.

Fixes: 2c0dd7b69f ("config: add static linkage of mlx dependency")
Cc: stable@dpdk.org

Reported-by: Ali Alnubani <alialnu@mellanox.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2019-12-16 16:27:50 +01:00
Bruce Richardson
aa75995509 devtools: control location of test builds
By default, both test-build.sh and test-meson-builds.sh scripts create the
builds they generate in the current working directory, leading to a large
number of build directories being present when testing patches. This
patchset modifies both scripts to use a DPDK_BUILD_TEST_DIR environment
variable to control where the build outputs are put.

For example, doing:
    export DPDK_BUILD_TEST_DIR=__builds
    ./devtools/test-meson-builds.sh && ./devtools/test-build.sh \
            x86_64-native-linux-clang+shared i686-native-linux-gcc

gives a "__builds" directory with 14 meson and 2 make builds (with the
meson build count depending on compiler availability)

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
2019-11-28 22:31:53 +01:00
David Marchand
b09afc2ad8 devtools: move ABI scripts from buildtools
Those scripts are only used by developers and not part of the build
process.
Move them to devtools so they are not installed.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2019-11-28 16:36:11 +01:00