DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] ethdev: fix link with C++
@ 2024-10-24 20:25 David Marchand
  2024-10-24 20:31 ` Morten Brørup
  0 siblings, 1 reply; 2+ messages in thread
From: David Marchand @ 2024-10-24 20:25 UTC (permalink / raw)
  To: dev
  Cc: John Miller, Thomas Monjalon, Ferruh Yigit, Andrew Rybchenko,
	Mattias Rönnblom, Morten Brørup

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 <john.miller@atomicrules.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [PATCH] ethdev: fix link with C++
  2024-10-24 20:25 [PATCH] ethdev: fix link with C++ David Marchand
@ 2024-10-24 20:31 ` Morten Brørup
  0 siblings, 0 replies; 2+ messages in thread
From: Morten Brørup @ 2024-10-24 20:31 UTC (permalink / raw)
  To: David Marchand, dev
  Cc: John Miller, Thomas Monjalon, Ferruh Yigit, Andrew Rybchenko,
	Mattias Rönnblom

Acked-by: Morten Brørup <mb@smartsharesystems.com>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-10-24 20:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-24 20:25 [PATCH] ethdev: fix link with C++ David Marchand
2024-10-24 20:31 ` Morten Brørup

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).