From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: "John Miller" <john.miller@atomicrules.com>,
"Thomas Monjalon" <thomas@monjalon.net>,
"Ferruh Yigit" <ferruh.yigit@amd.com>,
"Andrew Rybchenko" <andrew.rybchenko@oktetlabs.ru>,
"Mattias Rönnblom" <mattias.ronnblom@ericsson.com>,
"Morten Brørup" <mb@smartsharesystems.com>
Subject: [PATCH] ethdev: fix link with C++
Date: Thu, 24 Oct 2024 22:25:23 +0200 [thread overview]
Message-ID: <20241024202524.3347144-1-david.marchand@redhat.com> (raw)
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
next reply other threads:[~2024-10-24 20:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-24 20:25 David Marchand [this message]
2024-10-24 20:31 ` Morten Brørup
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241024202524.3347144-1-david.marchand@redhat.com \
--to=david.marchand@redhat.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=john.miller@atomicrules.com \
--cc=mattias.ronnblom@ericsson.com \
--cc=mb@smartsharesystems.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).