Some ethdev symbols were put out of extern "C" {} and became unavailable
when linking with C++ objects.
Fixes: 719834a6849e ("use C linkage where appropriate in headers")
Reported-by: John Miller <[email protected]>
Signed-off-by: David Marchand <[email protected]>
---
lib/ethdev/rte_ethdev.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index c4241d048c..a08ee7f2b8 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -171,6 +171,10 @@
#include "rte_ethdev_trace_fp.h"
#include "rte_dev_info.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern int rte_eth_dev_logtype;
#define RTE_LOGTYPE_ETHDEV rte_eth_dev_logtype
@@ -1460,9 +1464,17 @@ enum rte_eth_tunnel_type {
RTE_ETH_TUNNEL_TYPE_MAX,
};
+#ifdef __cplusplus
+}
+#endif
+
/* Deprecated API file for rte_eth_dev_filter_* functions */
#include "rte_eth_ctrl.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* UDP tunneling configuration.
*
@@ -6115,6 +6127,10 @@ int rte_eth_cman_config_set(uint16_t port_id, const
struct rte_eth_cman_config *
__rte_experimental
int rte_eth_cman_config_get(uint16_t port_id, struct rte_eth_cman_config
*config);
+#ifdef __cplusplus
+}
+#endif
+
#include <rte_ethdev_core.h>
#ifdef __cplusplus
--
2.46.2