version.map are now optional for drivers if no symbol is exported.
Having no symbol exported from a library does not make sense.
Catch all empty maps and warn about them.
Example:
$ ./devtools/check-symbol-maps.sh
Found empty maps:
drivers/crypto/uadk/version.map
drivers/net/gve/version.map
drivers/net/idpf/version.map
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>
The devtools that check Python code are Black and Isort to format the
code and Pylama to do static analysis.
Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
The script devtools/parse-flow-support.sh uses the git-grep
option (-o, --only-matching), which is only supported from
git version 2.19 and onwards.[1]
The script now exits early providing a clear message to the user
about the required git version instead of showing the following
error messages multiple times:
error: unknown switch `o'
usage: git grep [<options>] [-e] <pattern> [<rev>...] [[--] <path>...]
[..]
[1] https://github.com/git/git/blob/v2.19.0/Documentation/RelNotes/2.19.0.txt
Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Chaoyong He <chaoyong.he@corigine.com>
Try and find the script in the sources of the currently running kernel
so that users do not have to specify DPDK_CHECKPATCH_PATH which might
well be the same location found by the educated guess.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
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>
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>
Those macros have no real value and are easily replaced with a simple
if() block.
Existing users have been converted using a new cocci script.
Deprecate them.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Let's be good citizens and enforce not using driver only headers in our
own examples.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Start a new release cycle with empty release notes.
The ABI version becomes 23.0.
The map files are updated to the new ABI major number (23).
The ABI exceptions are dropped and CI ABI checks are disabled because
compatibility is not preserved.
Special handling of removed drivers is also dropped in check-abi.sh and
a note has been added in libabigail.abignore as a reminder.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
There are more functions in DPDK which have the semantics
as free() when passed NULL pointer. Also, put the checks
in alphabetical order.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Rather than explicitly clearing any setting of undefined values in our
rte_config.h file, it's better to instead just add a comment that the
value is not set. Using a comment allows the user to set the value using
CFLAGS or similar mechanism without the config file clearing the value
again.
The text used "<VALUE> is not set" is modelled after the kernel approach
of doing the same thing.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
By default, ccache is not used for cross build[1].
Update all cross files to use ccache if it is available
in build machine.
Also, updated devtools/test-meson-builds.sh
script to find the correct DPDK_TARGET due to
change in cross file syntax.
[1]
https://mesonbuild.com/Machine-files.html
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Stanislaw Kardach <kda@semihalf.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reduce the number of Arm builds from 3 to 1:
only generic armv8 with GCC.
The specific PPC builds on Ubuntu are skipped.
The build directories for PPC and RISC-V
are also renamed for consistency:
- build-arm64-generic-gcc
- build-ppc64-power8-gcc
- build-riscv64-generic-gcc
The cross file is always saved in variable "f" for readability.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
A new event RTE_ETH_EVENT_RX_AVAIL_THRESH should be generated by HW
when number of available descriptors in Rx queue goes below the
threshold.
The threshold is defined as a percentage of an Rx queue size with valid
values from 0 to 99 (inclusive). Zero (default) value disables it.
There is no capability reporting for the feature. Application should
simply try to set required threshold value and handle result.
Add testpmd commands to control the threshold:
set port <port_id> rxq <rxq_id> avail_thresh <avail_thresh_num>
Signed-off-by: Spike Du <spiked@nvidia.com>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Validate RISC-V compilation when test-meson-builds.sh is called. The
check will be only performed if appropriate toolchain is present on the
system (same as with other architectures).
Sponsored-by: Frank Zhao <frank.zhao@starfivetech.com>
Sponsored-by: Sam Grove <sam.grove@sifive.com>
Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Add script to replace [0] with [] when used at the end of a struct.
The script also includes an additional struct member to match against so
as to avoid issues with arrays with only a single zero-length element.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Add a new telemetry command /ethdev/module_eeprom to dump the module
EEPROM of each port. The format of module EEPROM information follows
the SFF(Small Form Factor) Committee specifications.
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
Signed-off-by: Kevin Liu <kevinx.liu@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
- Added elliptic curve Diffie-Hellman parameters.
Point multiplication allows the user to process every phase of
ECDH, but for phase 1, user should not really care about the generator.
The user does not even need to know what the generator looks like,
therefore setting ec xform would make this work.
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
On NUMA systems, default cores (0 and 1) might be on different memory
nodes. Double the amount of memory.
Fixes: 9e6b36c34c ("app/testpmd: reduce memory consumption")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
With DMA devices supported as a separate flavor of devices,
the DPAA2 QDMA driver is moved in the DMA devices.
This change removes the DPAA2 QDMA driver from raw devices.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
All OS implementations provide the same main loop.
Introduce helpers (shared for Linux and FreeBSD) to handle synchronisation
between main and threads and factorize the rest as common code.
Thread id are now logged as string in a common format across OS.
Note:
- this change also fixes Windows EAL: worker threads cpu affinity was
incorrectly reported in log.
- libabigail flags this change as breaking ABI in clang builds:
1 function with some indirect sub-type change:
[C] 'function int rte_eal_remote_launch(int (void*)*, void*, unsigned
int)' at eal_common_launch.c:35:1 has some indirect sub-type
changes:
parameter 1 of type 'int (void*)*' changed:
in pointed to type 'function type int (void*)' at rte_launch.h:31:1:
entity changed from 'function type int (void*)' to 'typedef
lcore_function_t' at rte_launch.h:31:1
type size hasn't changed
This is being investigated on libabigail side.
For now, we don't have much choice but to waive reports on this symbol.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Suppression rules are being added during the life of an ABI and cleaned
when bumping the major version.
Sort and document those rules to avoid pruning rules that should be kept.
Signed-off-by: David Marchand <david.marchand@redhat.com>
In some environments, the check of local symbols catch-all
was failing. Note: this script is called during the build.
The reason is that grep returns an error if nothing is found.
The option -e of the shell script makes this error fatal.
It is not always fatal because the grep is in a command substitution.
Fixes: b403498e14 ("build: hide local symbols in shared libraries")
Reported-by: Usama Arif <usama.arif@bytedance.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
The symbols which are not listed in the version script
are exported by default.
Adding a local section with a wildcard make non-listed functions
and variables as hidden, as it should be in all version.map files.
These are the changes done in the shared libraries:
- DF .text Base auxiliary_add_device
- DF .text Base auxiliary_dev_exists
- DF .text Base auxiliary_dev_iterate
- DF .text Base auxiliary_insert_device
- DF .text Base auxiliary_is_ignored_device
- DF .text Base auxiliary_match
- DF .text Base auxiliary_on_scan
- DF .text Base auxiliary_scan
- DO .bss Base auxiliary_bus_logtype
- DO .data Base auxiliary_bus
- DO .bss Base gpu_logtype
There is no impact on regexdev library.
Because these local symbols were exported as non-internal
in DPDK 21.11, any change in these functions would break the ABI.
Exception rules are added for these experimental libraries,
so the ABI check will skip them until the next ABI version.
A check is added to avoid such miss in future.
Fixes: 1afce3086c ("bus/auxiliary: introduce auxiliary bus")
Fixes: 8b8036a66e ("gpudev: introduce GPU device class library")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
The functions used by the drivers must be internal,
while the function and variables used in inline functions
must be experimental.
These are the changes done in the shared library:
- DF .text Base rte_regexdev_get_device_by_name
+ DF .text INTERNAL rte_regexdev_get_device_by_name
- DF .text Base rte_regexdev_register
+ DF .text INTERNAL rte_regexdev_register
- DF .text Base rte_regexdev_unregister
+ DF .text INTERNAL rte_regexdev_unregister
- DF .text Base rte_regexdev_is_valid_dev
+ DF .text EXPERIMENTAL rte_regexdev_is_valid_dev
- DO .bss Base rte_regex_devices
+ DO .bss EXPERIMENTAL rte_regex_devices
- DO .bss Base rte_regexdev_logtype
+ DO .bss EXPERIMENTAL rte_regexdev_logtype
Because these symbols were exported in the default section in DPDK 21.11,
any change in these functions would be seen as incompatible
by the ABI compatibility check.
An exception rule is added for this experimental library,
so the ABI check will skip it until the next ABI version.
Fixes: bab9497ef7 ("regexdev: introduce API")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ori Kam <orika@nvidia.com>
Convert the existing exception in the ABI script into a libabigail
suppression rule.
Note: file_name_regexp could be used to achieve the same with versions of
libabigail < 1.7 but soname_regexp has been preferred here since it is
already used with a recent change on common/mlx5.
While at it, fix indent from a recent change.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
The event/dlb driver exception can be removed, as this rule made sense
for changes in DPDK_21 ABI and is obsolete for DPDK_22.
Fixes: fdab8f2e17 ("version: 21.11-rc0")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Changed the filter from ETH_SPEED to ETH_SPEED_NUM to make the match
more specific. Added check for ETH_TUNNEL_FILTER and ETH_RSS_RETA
as these were missed before.
Signed-off-by: Aman Singh <aman.deep.singh@intel.com>
No need to explicitly enable drivers bus/vdev and mempool/ring.
bus/vdev is always enabled since
commit 2e33309ebe ("config: enable/disable drivers in Arm builds")
mempool/ring is always enabled since
commit 81c2337e04 ("build: make ring mempool driver mandatory")
The driver net/null is kept to allow running test-null.sh.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
The functions which are not explicitly marked as internal
were exported because the local catch-all rule was missing in the
version script.
After adding the missing rule, all local functions are hidden.
The function mlx5_get_device_guid is used in another library,
so it needs to be exported (as internal).
Because the local functions were exported as non-internal
in DPDK 21.11, any change in these functions would break the ABI.
An ABI exception is added for this library, considering that all
functions are either local or internal.
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
This script can be used for removing headers flagged for removal by the
include-what-you-use (IWYU) tool. The script has the ability to remove
headers from specified sub-directories or dpdk as a whole and tests the
build after each removal by calling meson compile.
example usages:
Remove headers flagged by iwyu_tool output file
$ ./devtools/process_iwyu.py iwyu.out -b build
Remove headers flagged by iwyu_tool output file from sub-directory
$ ./devtools/process_iwyu.py iwyu.out -b build -d lib/kvargs
Remove headers directly piped from the iwyu_tool
$ iwyu_tool -p build | ./devtools/process_iwyu.py - -b build
Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
Signed-off-by: Conor Fogarty <conor.fogarty@intel.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
This commit adds random number 'k' to DSA
op param struct for asymmetric crypto ops.
This parameter is crucial in stiuations where:
- PMD cannot generate random number
- User would like to provide random source
Additionally, it makes DSA consistent with ECDSA
in terms of 'k' which includes this parameter.
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
This script is based on the idea of the nullfree script
in the Linux kernel. It finds cases where a check for null
pointer is done, but is unnecessary because the function
already handles NULL pointer.
Basic example:
if (x->buf)
rte_free(x->buf);
can be reduced to:
rte_free(x->buf);
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
After a comment section was detected, passing to a new hunk was not seen
as ending the section and all subsequent hunks were ignored.
Fixes: 7413e7f2ae ("devtools: alert on new calls to exit from libs")
Cc: stable@dpdk.org
Reported-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Linux kernel 'get_maintainer.pl' script supports running out of Linux
tree since commit
31bb82c9caa9 ("get_maintainer: allow usage outside of kernel tree")
As commit is a few years old now, integrating it to DPDK and removing
ugly workaround for it.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
As per the deprecation notice, In the view of enabling unified driver
for octeontx2(cn9k)/octeontx3(cn10k), removing drivers/octeontx2
drivers and replace with drivers/cnxk/ which
supports both octeontx2(cn9k) and octeontx3(cn10k) SoCs.
This patch does the following
- Replace drivers/common/octeontx2/ with drivers/common/cnxk/
- Replace drivers/mempool/octeontx2/ with drivers/mempool/cnxk/
- Replace drivers/net/octeontx2/ with drivers/net/cnxk/
- Replace drivers/event/octeontx2/ with drivers/event/cnxk/
- Replace drivers/crypto/octeontx2/ with drivers/crypto/cnxk/
- Rename config/arm/arm64_octeontx2_linux_gcc as
config/arm/arm64_cn9k_linux_gcc
- Update the documentation and MAINTAINERS to reflect the same.
- Change the reference to OCTEONTX2 as OCTEON 9. Old release notes and
the kernel related documentation is not accounted for this change.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
update driver to use the REE cnxk code
replace octeontx2/otx2 with cn9k
Signed-off-by: Liron Himi <lironh@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
__reserved is a reserved keyword in Windows system headers.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Conor Walsh <conor.walsh@intel.com>
The cocci script is to help add prefix 'RTE_ETH' namespace to enum
& macro of ethdev library. It helps in automating these changes for
applications. The script won't make changes in the code comment part.
Usage: spatch <script path> <app path>
Signed-off-by: Aman Singh <aman.deep.singh@intel.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Current version of Linux kernel checkpatch now complains about
usages of strlcpy because the Linux kernel prefers strscpy.
WARNING:STRLCPY: Prefer strscpy over strlcpy
But DPDK project allows strlcpy, therefore suppress the warning.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Update word list with Marvell specific acronyms.
CPT -> Cryptographic Accelerator Unit
CQ -> Completion Queue
LBK -> Loopback Interface Unit
LMT -> Large Atomic Store Unit
MCAM -> Match Content Addressable Memory
NIX -> Network Interface Controller Unit
NPA -> Network Pool Allocator
NPC -> Network Parser and CAM Unit
ROC -> Rest Of Chip
RQ -> Receive Queue
RVU -> Resource Virtualization Unit
SQ -> Send Queue
SSO -> Schedule Synchronize Order Unit
TIM -> Timer Unit
Suggested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Since we allow line lengths of up to 100, and the CI checkpatches job
only check for that amount, the rest of our tooling and docs should
reflect this reality. Therefore we can:
* adjust the editorconfig to use that value, to save editors (e.g. vim)
from automatically wrapping lines at 80 characters when typing.
[Since python checkers all seem to expect 79 character lines max, add
for python only a 79-char max line length.]
* change the default line length setting in checkpatches script to 100
so as it matches CI and pre-merge checks.
* update the docs to clarify that while 80 chars is recommended, up to
100 characters is acceptable.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Chenbo Xia <chenbo.xia@intel.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>