#
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 ...
|
#
928b5c70 |
| 18-Oct-2023 |
Bruce Richardson <bruce.richardson@intel.com> |
eventdev: fix device pointer for vdev-based devices
The eventdevs based on vdevs, rather than on e.g. HW PCI devices, were, as a rule, not setting the ".dev" pointer in the eventdev structure. This
eventdev: fix device pointer for vdev-based devices
The eventdevs based on vdevs, rather than on e.g. HW PCI devices, were, as a rule, not setting the ".dev" pointer in the eventdev structure. This caused issues as a NULL pointer was returned in calls to info_get, triggering crashes if the pointer is passed unchecked to e.g. rte_dev_name() to print out the name of an event device.
Most effective, and future-proofed fix, is to not rely on the eventdev drivers to set the pointer themselves, but to change the vdev init function to take the vdev struct as parameter, and set the "dev" pointer centrally on init. This allows us to fix all drivers in one go, enforced by compiler error if the parameter is missing.
Fixes: aaa4a221da26 ("event/sw: add new software-only eventdev driver") Fixes: 46a186b1f0c5 ("event/dsw: add device registration and build system") Fixes: bbbb929da5e6 ("event/skeleton: add skeleton eventdev driver") Fixes: 3c7f3dcfb099 ("event/opdl: add PMD main body and helper function") Fixes: 9caac5dd1e7f ("event/dpaa: introduce PMD") Fixes: 8a5d7a8ec74b ("event/dpaa2: initialize device") Fixes: 34498de6000f ("event/octeontx: add octeontx eventdev driver") Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-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 ...
|
#
4851ef2b |
| 28-Jul-2022 |
David Marchand <david.marchand@redhat.com> |
bus/vdev: make driver-only headers private
The vdev 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 indentat
bus/vdev: make driver-only headers private
The vdev 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: Rosen Xu <rosen.xu@intel.com> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.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 ...
|
#
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 ...
|