#
719834a6 |
| 20-Sep-2024 |
Mattias Rönnblom <mattias.ronnblom@ericsson.com> |
use C linkage where appropriate in headers
Assure that 'extern "C" { /../ }' do not cover files included from a particular header file, and address minor issues resulting from this change of order.
use C linkage where appropriate in headers
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 <mattias.ronnblom@ericsson.com> Acked-by: Morten Brørup <mb@smartsharesystems.com> Signed-off-by: David Marchand <david.marchand@redhat.com>
show more ...
|
#
1094dd94 |
| 28-Oct-2022 |
David Marchand <david.marchand@redhat.com> |
cleanup compat header inclusions
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 i
cleanup compat header inclusions
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 <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
show more ...
|
#
1f37cb2b |
| 28-Jul-2022 |
David Marchand <david.marchand@redhat.com> |
bus/pci: make driver-only headers private
The pci bus interface is for drivers only. Mark as internal and move the header in the driver headers list.
While at it, cleanup the code: - fix indentatio
bus/pci: make driver-only headers private
The pci bus interface is for drivers only. Mark as internal and move the header in the driver headers list.
While at it, cleanup the code: - fix indentation, - remove unneeded reference to bus specific singleton object, - remove unneeded list head structure type, - reorder the definitions and macro manipulating the bus singleton object, - remove inclusion of rte_bus.h and fix the code that relied on implicit inclusion,
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Acked-by: Rosen Xu <rosen.xu@intel.com>
show more ...
|
#
2c552933 |
| 16-Feb-2022 |
Brian Dooley <brian.dooley@intel.com> |
eventdev: add missing C++ guards
Some public header files were missing 'extern "C"' C++ guards, and couldn't be used by C++ applications. Add the missing guards.
Fixes: dc39e2f359b5 ("eventdev: add
eventdev: add missing C++ guards
Some public header files were missing 'extern "C"' C++ guards, and couldn't be used by C++ applications. Add the missing guards.
Fixes: dc39e2f359b5 ("eventdev: add ring structure for events") Fixes: 7a3357205755 ("lib: remove C++ include guard from private headers") Cc: stable@dpdk.org
Signed-off-by: Brian Dooley <brian.dooley@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
show more ...
|
#
d35e6132 |
| 18-Oct-2021 |
Pavan Nikhilesh <pbhagavatula@marvell.com> |
eventdev: move inline APIs into separate structure
Move fastpath inline function pointers from rte_eventdev into a separate structure accessed via a flat array. The intention is to make rte_eventdev
eventdev: move inline APIs into separate structure
Move fastpath inline function pointers from rte_eventdev into a separate structure accessed via a flat array. The intention is to make rte_eventdev and related structures private to avoid future API/ABI breakages.`
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com> Acked-by: Ray Kinsella <mdr@ashroe.eu>
show more ...
|
#
23d06e37 |
| 18-Oct-2021 |
Pavan Nikhilesh <pbhagavatula@marvell.com> |
eventdev: make driver interface as internal
Mark all the driver specific functions as internal, remove `rte` prefix from `struct rte_eventdev_ops`. Remove experimental tag from internal functions. R
eventdev: make driver interface as internal
Mark all the driver specific functions as internal, remove `rte` prefix from `struct rte_eventdev_ops`. Remove experimental tag from internal functions. Remove `eventdev_pmd.h` from non-internal header files.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
show more ...
|
#
7a335720 |
| 15-Sep-2021 |
Thomas Monjalon <thomas@monjalon.net> |
lib: remove C++ include guard from private headers
The private headers are compiled internally with a C compiler. Thus extern "C" declaration is useless in such files.
Signed-off-by: Thomas Monjalo
lib: remove C++ include guard from private headers
The private headers are compiled internally with a C compiler. Thus extern "C" declaration is useless in such files.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
show more ...
|
#
99a2dd95 |
| 20-Apr-2021 |
Bruce Richardson <bruce.richardson@intel.com> |
lib: remove librte_ prefix from directory names
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 m
lib: remove librte_ prefix from directory names
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 <bruce.richardson@intel.com>
show more ...
|