| Age | Commit message (Collapse) | Author |
|
Assure that 'extern "C" { /../ }' do not cover files included from a
particular header file, and address minor issues resulting from this
change of order.
Dealing with C++ should delegate to the individual include file level,
rather than being imposed by the user of that file. For example,
forcing C linkage prevents __Generic macros being replaced with
overloaded static inline functions in C++ translation units.
Eliminate 'extern "C"' from files which do not declare any symbols
(e.g., only macros or struct types).
On the other hand, the headers check is too naive in assuming that all
headers must contain a 'extern "C"'. Such a check was added in commit
1ee492bdc4ff ("buildtools/chkincs: check missing C++ guards").
Since this current change results in many headers not containing such
a token, remove the check for 'extern "C"' until we have a better
implementation.
Signed-off-by: Mattias Rönnblom <[email protected]>
Acked-by: Morten Brørup <[email protected]>
Signed-off-by: David Marchand <[email protected]>
|
|
Start a new release cycle with empty release notes.
The ABI version becomes 25.0.
The map files are updated to the new ABI major number (25).
The ABI exceptions are dropped and CI ABI checks are disabled because
compatibility is not preserved.
Signed-off-by: David Marchand <[email protected]>
Acked-by: Thomas Monjalon <[email protected]>
|
|
The current location used for __rte_aligned(a) for alignment of types
is not compatible with MSVC. There is only a single location accepted
by both toolchains.
The standard offers no alignment facility that compatibly interoperates
with C and C++ but it may be achieved by relocating the placement of
__rte_aligned(a) to the aforementioned location accepted by all currently
supported toolchains.
To allow alignment for both compilers, do the following:
* Expand __rte_aligned(a) to __declspec(align(a)) when building
with MSVC.
* Move __rte_aligned from the end of {struct,union} definitions to
be between {struct,union} and tag.
The placement between {struct,union} and the tag allows the desired
alignment to be imparted on the type regardless of the toolchain being
used for all of GCC, LLVM, MSVC compilers building both C and C++.
Note: this move has an additional benefit as Doxygen is not confused
anymore like for the rte_event_vector struct definition.
Signed-off-by: Tyler Retzlaff <[email protected]>
Acked-by: Morten Brørup <[email protected]>
Acked-by: Bruce Richardson <[email protected]>
Acked-by: Konstantin Ananyev <[email protected]>
Acked-by: Chengwen Feng <[email protected]>
Reviewed-by: Maxime Coquelin <[email protected]>
Signed-off-by: David Marchand <[email protected]>
|
|
Use RTE_LOG_LINE_PREFIX instead of RTE_LOG_LINE in macro expansions
which allows a prefix and arguments to be inserted into the log line
without the need to use the ## args variadic argument pack extension.
Signed-off-by: Tyler Retzlaff <[email protected]>
Acked-by: Morten Brørup <[email protected]>
Acked-by: Stephen Hemminger <[email protected]>
Acked-by: Konstantin Ananyev <[email protected]>
|
|
Use RTE_LOG_LINE in existing macros that append a \n.
This will help catching unwanted newline character or multilines
in log messages.
Signed-off-by: David Marchand <[email protected]>
Reviewed-by: Chengwen Feng <[email protected]>
Reviewed-by: Andrew Rybchenko <[email protected]>
|
|
Fix places where two newline characters may be logged.
Cc: [email protected]
Signed-off-by: David Marchand <[email protected]>
Acked-by: Stephen Hemminger <[email protected]>
Reviewed-by: Chengwen Feng <[email protected]>
Acked-by: Mattias Rönnblom <[email protected]>
|
|
The compressdev was added back in 2018.
Remove the experimental flag and make ABI stable.
Signed-off-by: Stephen Hemminger <[email protected]>
Acked-by: Bruce Richardson <[email protected]>
|
|
At the end of a comment, no need for an extra line.
This pattern was fixed with the following command:
git ls lib | xargs sed -i '/^ *\* *$/{N;/ *\*\/ *$/D;}'
Signed-off-by: Thomas Monjalon <[email protected]>
Acked-by: Bruce Richardson <[email protected]>
Reviewed-by: Ruifeng Wang <[email protected]>
|
|
The rte_kvargs_process() was used to parse KV pairs, it also supports
to parse 'only keys' (e.g. socket_id) type. And the callback function
parameter 'value' is NULL when parsed 'only keys'.
This patch fixes segment fault in rte_compressdev_pmd_parse_uint_arg()
when parse input args with 'only keys' (e.g. socket_id).
For a similar reason, this patch fixes
rte_compressdev_pmd_parse_name_arg().
Fixes: ed7dd94f7f66 ("compressdev: add basic device management")
Cc: [email protected]
Signed-off-by: Chengwen Feng <[email protected]>
|
|
Add support for LZ4 algorithm:
- Add Lz4 param structure to XFORM structures.
- Add capabilities flags for LZ4 params.
- Add xxHash-32 checksum and capabilities flag.
Signed-off-by: Michael Baum <[email protected]>
|
|
The both "RTE_COMP_ALGO_LIST_END" and "RTE_COMP_HASH_ALGO_LIST_END" are
useless. This patch removes them from the library.
Signed-off-by: Michael Baum <[email protected]>
Acked-by: Akhil Goyal <[email protected]>
|
|
The "rte_compressdev_info_get()" function retrieves the contextual
information of a device.
The output structure "dev_info" contains a list of devices supported
capabilities for each supported algorithm.
In this function description, it says the element after the last valid
element has op field set to "RTE_COMP_ALGO_LIST_END".
On the other hand, when this function used by
"rte_compressdev_capability_get()" function, it uses
"RTE_COMP_ALGO_UNSPECIFIED" as end of list as same as the
"RTE_COMP_END_OF_CAPABILITIES_LIST()".
The mlx5 and qat PMDs use "RTE_COMP_ALGO_LIST_END" as the end of
capabilities list. When "rte_compressdev_capability_get()" function is
called with unsupported algorithm, it might read memory out of bound.
This patch change the "rte_compressdev_info_get()" function description
to say using "RTE_COMP_ALGO_UNSPECIFIED" as the end of capabilities
list.
In addition, it moves both mlx5 and qat PMDs to use
"RTE_COMP_ALGO_UNSPECIFIED" through
"RTE_COMP_END_OF_CAPABILITIES_LIST()" macro.
Fixes: 5d432f364078 ("compressdev: add device capabilities")
Fixes: 2d148597ce76 ("compress/qat: add gen-specific implementation")
Fixes: 384bac8d6555 ("compress/mlx5: add supported capabilities")
Cc: [email protected]
Signed-off-by: Michael Baum <[email protected]>
Acked-by: Akhil Goyal <[email protected]>
|
|
With symbols going though experimental/stable stages, we accumulated
a lot of discrepancies about inclusion of the rte_compat.h header.
Some headers are including it where unneeded, while others rely on
implicit inclusion.
Fix unneeded inclusions:
$ git grep -l include..rte_compat.h |
xargs grep -LE '__rte_(internal|experimental)' |
xargs sed -i -e '/#include..rte_compat.h/d'
Fix missing inclusion, by inserting rte_compat.h before the first
inclusion of a DPDK header:
$ git grep -lE '__rte_(internal|experimental)' |
xargs grep -L include..rte_compat.h |
xargs sed -i -e \
'0,/#include..\(rte_\|.*pmd.h.$\)/{
s/\(#include..\(rte_\|.*pmd.h.$\)\)/#include <rte_compat.h>\n\1/
}'
Fix missing inclusion, by inserting rte_compat.h after the last
inclusion of a non DPDK header:
$ for file in $(git grep -lE '__rte_(internal|experimental)' |
xargs grep -L include..rte_compat.h); do
tac $file > $file.$$
sed -i -e \
'0,/#include../{
s/\(#include..*$\)/#include <rte_compat.h>\n\n\1/
}' $file.$$
tac $file.$$ > $file
rm $file.$$
done
Fix missing inclusion, by inserting rte_compat.h after the header guard:
$ git grep -lE '__rte_(internal|experimental)' |
xargs grep -L include..rte_compat.h |
xargs sed -i -e \
'0,/#define/{
s/\(#define .*$\)/\1\n\n#include <rte_compat.h>/
}'
And finally, exclude rte_compat.h itself.
$ git checkout lib/eal/include/rte_compat.h
At the end of all this, we have a clean tree:
$ git grep -lE '__rte_(internal|experimental)' |
xargs grep -L include..rte_compat.h
buildtools/check-symbols.sh
devtools/checkpatches.sh
doc/guides/contributing/abi_policy.rst
doc/guides/rel_notes/release_20_11.rst
lib/eal/include/rte_compat.h
Signed-off-by: David Marchand <[email protected]>
Acked-by: Bruce Richardson <[email protected]>
Acked-by: Andrew Rybchenko <[email protected]>
|
|
Make rte_driver opaque for non internal users.
This will make extending this object possible without breaking the ABI.
Introduce a new driver header and move rte_driver definition.
Update drivers and library to use the internal header.
Some applications may have been dereferencing rte_driver objects, mark
this object's accessors as stable.
Signed-off-by: David Marchand <[email protected]>
Acked-by: Bruce Richardson <[email protected]>
Acked-by: Jay Jayatheerthan <[email protected]>
Acked-by: Ajit Khaparde <[email protected]>
Acked-by: Akhil Goyal <[email protected]>
Acked-by: Abhinandan Gujjar <[email protected]>
|
|
iova enum definition does not need to be defined as part of the bus API.
Move it to rte_eal.h.
With this step, rte_eal.h does not depend on rte_bus.h and rte_dev.h.
Fix existing code that was relying on these implicit inclusions.
Signed-off-by: David Marchand <[email protected]>
Acked-by: Bruce Richardson <[email protected]>
|
|
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 <[email protected]>
|
|
Do not include <ctype.h>, <errno.h>, and <stdlib.h> from <rte_common.h>,
because they are not used by this file.
Include the needed headers directly from the files that need them.
Signed-off-by: Dmitry Kozlyuk <[email protected]>
Acked-by: Bruce Richardson <[email protected]>
|
|
Make sure all functions which use the convention that XXX_free(NULL)
is a nop are all documented.
The wording is chosen to match the documentation of free(3).
"If ptr is NULL, no operation is performed."
Signed-off-by: Stephen Hemminger <[email protected]>
Acked-by: Chengwen Feng <[email protected]>
[David: squashed with other series updates, unified wording]
|
|
Building with clang on FreeBSD with chkincs enabled, we get the
following error about a missing space:
lib/compressdev/rte_compressdev_internal.h:25:58: error:
invalid suffix on literal;
C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
rte_log(RTE_LOG_ ## level, compressdev_logtype, "%s(): "fmt "\n", \
Adding in a space between the '"' and 'fmt' removes the error.
Fixes: ed7dd94f7f66 ("compressdev: add basic device management")
Cc: [email protected]
Signed-off-by: Bruce Richardson <[email protected]>
|
|
The headers rte_compressdev_pmd.h and rte_compressdev_internal.h are,
as the filenames suggest, headers for building drivers using the
compressdev APIs. As such they should be marked as
"driver_sdk_headers" rather than just "headers" in the meson.build
file.
Signed-off-by: Bruce Richardson <[email protected]>
|
|
Socket ID is used and interpreted as integer, one of the possible
values for socket id is -1 (SOCKET_ID_ANY).
here socket_id is defined as unsigned 8 bit integer, so when putting
-1, it is interpreted as 255, which causes allocation errors when
trying to allocate from socket_id (255).
change socket_id from unsigned 8 bit integer to integer.
Fixes: ed7dd94f7f66 ("compressdev: add basic device management")
Cc: [email protected]
Signed-off-by: Raja Zidane <[email protected]>
Acked-by: Matan Azrad <[email protected]>
|
|
Some public header files were missing 'extern "C"' C++ guards,
and couldn't be used by C++ applications. Add the missing guards.
Fixes: ed7dd94f7f66 ("compressdev: add basic device management")
Cc: [email protected]
Signed-off-by: Brian Dooley <[email protected]>
Acked-by: Bruce Richardson <[email protected]>
Acked-by: Tyler Retzlaff <[email protected]>
|
|
These header includes have been flagged by the iwyu_tool
and removed.
Signed-off-by: Sean Morrissey <[email protected]>
|
|
Functions like free, rte_free, and rte_mempool_free
already handle NULL pointer so the checks here are not necessary.
Remove redundant NULL pointer checks before free functions
found by nullfree.cocci
Signed-off-by: Stephen Hemminger <[email protected]>
|
|
Removing the use of driver following PMD as its unnecessary.
Cc: [email protected]
Signed-off-by: Sean Morrissey <[email protected]>
Signed-off-by: Conor Fogarty <[email protected]>
Acked-by: John McNamara <[email protected]>
Reviewed-by: Conor Walsh <[email protected]>
Reviewed-by: Ferruh Yigit <[email protected]>
|
|
Remove the use of double "the" as it does not make sense.
Cc: [email protected]
Signed-off-by: Sean Morrissey <[email protected]>
Signed-off-by: Conor Fogarty <[email protected]>
Acked-by: John McNamara <[email protected]>
Reviewed-by: Conor Walsh <[email protected]>
Acked-by: Somnath Kotur <[email protected]>
Reviewed-by: Ferruh Yigit <[email protected]>
|
|
Rather than maintaining a separate list of libraries which are to be
built on windows, use the standard library list and explicitly add to
each library that is not to be built a check for windows and disable
the library at that per-lib level. As well as shortening the main
lib/meson.build file, this also leads to the build summary at the end of
the meson config run correctly listing the libraries which are not to be
built.
Signed-off-by: Bruce Richardson <[email protected]>
|
|
Let's try to enforce the convention where most drivers use a pmd. logtype
with their class reflected in it, and libraries use a lib. logtype.
Introduce two new macros:
- RTE_LOG_REGISTER_DEFAULT can be used when a single logtype is
used in a component. It is associated to the default name provided
by the build system,
- RTE_LOG_REGISTER_SUFFIX can be used when multiple logtypes are used,
and then the passed name is appended to the default name,
RTE_LOG_REGISTER is left untouched for existing external users
and for components that do not comply with the convention.
There is a new Meson variable log_prefix to adapt the default name
for baseband (pmd.bb.), bus (no pmd.) and mempool (no pmd.) classes.
Note: achieved with below commands + reverted change on net/bonding +
edits on crypto/virtio, compress/mlx5, regex/mlx5
$ git grep -l RTE_LOG_REGISTER drivers/ |
while read file; do
pattern=${file##drivers/};
class=${pattern%%/*};
pattern=${pattern#$class/};
drv=${pattern%%/*};
case "$class" in
baseband) pattern=pmd.bb.$drv;;
bus) pattern=bus.$drv;;
mempool) pattern=mempool.$drv;;
*) pattern=pmd.$class.$drv;;
esac
sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
done
$ git grep -l RTE_LOG_REGISTER lib/ |
while read file; do
pattern=${file##lib/};
pattern=lib.${pattern%%/*};
sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
done
Signed-off-by: David Marchand <[email protected]>
Signed-off-by: Thomas Monjalon <[email protected]>
Acked-by: Bruce Richardson <[email protected]>
|
|
There is no reason for the DPDK libraries to all have 'librte_' prefix on
the directory names. This prefix makes the directory names longer and also
makes it awkward to add features referring to individual libraries in the
build - should the lib names be specified with or without the prefix.
Therefore, we can just remove the library prefix and use the library's
unique name as the directory name, i.e. 'eal' rather than 'librte_eal'
Signed-off-by: Bruce Richardson <[email protected]>
|