[PATCH 0/7] Verify C++ compatibility of public headers
Bruce Richardson
bruce.richardson at intel.com
Fri Feb 4 18:42:02 CET 2022
This patchset expands upon the exiting chkincs infrastructure to build a
C++ test application as well as the existing C test app, which helps
catch any build errors when the public DPDK headers are included in C++
code. The rest of this patchset fixes the errors caught by this
additional check - mostly missing casts, but also one use of "new" as a
variable name, and one missing closing brace for an 'extern "C"' block.
NOTE: the most complicated changes are in the 6th patch, where there
were linux headers included which were not C++ compatible. This patch
moves the inclusion of those headers to non-public locations in the code
to remove those issues, but I am uncertain what the knock-on impacts of
this change may be. Therefore, I ask particular review from vhost/vdpa
maintainers to see if there is a better solution to this issue
Bruce Richardson (7):
eal: fix header build with C++
eventdev: fix header build with C++
graph: add explicit cast to allow C++ build
ipsec: : add explicit cast to allow C++ build
table: add explicit casts for C++ compatibility
vhost: remove non-C++ compatible includes
buildtools/chkincs: test headers for C++ compatibility
buildtools/chkincs/main.cpp | 4 +++
buildtools/chkincs/meson.build | 20 +++++++++++++++
drivers/net/vhost/rte_eth_vhost.c | 2 ++
drivers/vdpa/ifc/ifcvf_vdpa.c | 2 ++
drivers/vdpa/mlx5/mlx5_vdpa.h | 1 +
lib/eal/include/generic/rte_ticketlock.h | 14 +++++------
lib/eal/include/rte_trace_point.h | 2 +-
lib/eventdev/rte_event_timer_adapter.h | 3 +++
lib/eventdev/rte_eventdev.h | 2 +-
lib/graph/rte_graph_worker.h | 2 +-
lib/ipsec/rte_ipsec_group.h | 4 +--
lib/table/rte_table_hash_func.h | 32 ++++++++++++------------
lib/vhost/rte_vhost.h | 4 ---
13 files changed, 60 insertions(+), 32 deletions(-)
create mode 100644 buildtools/chkincs/main.cpp
--
2.32.0
More information about the dev
mailing list