* [PATCH] cryptodev: allow use of global variables from C++
@ 2024-12-19 16:35 Mattias Rönnblom
2025-01-08 9:55 ` [EXTERNAL] " Akhil Goyal
0 siblings, 1 reply; 2+ messages in thread
From: Mattias Rönnblom @ 2024-12-19 16:35 UTC (permalink / raw)
To: dev, Akhil Goyal, Fan Zhang
Cc: hofors, David Marchand, Thomas Monjalon, Mattias Rönnblom
Avoid C++ name mangling of the two global variables being exported
from <rte_crypto_asym.h>.
Suggested-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
lib/cryptodev/rte_crypto_asym.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h
index aeb46e688e..9787b710e7 100644
--- a/lib/cryptodev/rte_crypto_asym.h
+++ b/lib/cryptodev/rte_crypto_asym.h
@@ -25,6 +25,10 @@
struct rte_cryptodev_asym_session;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** asym key exchange operation type name strings */
extern const char *
rte_crypto_asym_ke_strings[];
@@ -33,6 +37,10 @@ rte_crypto_asym_ke_strings[];
extern const char *
rte_crypto_asym_op_strings[];
+#ifdef __cplusplus
+}
+#endif
+
#define RTE_CRYPTO_ASYM_FLAG_PUB_KEY_NO_PADDING RTE_BIT32(0)
/**<
* Flag to denote public key will be returned without leading zero bytes
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [EXTERNAL] [PATCH] cryptodev: allow use of global variables from C++
2024-12-19 16:35 [PATCH] cryptodev: allow use of global variables from C++ Mattias Rönnblom
@ 2025-01-08 9:55 ` Akhil Goyal
0 siblings, 0 replies; 2+ messages in thread
From: Akhil Goyal @ 2025-01-08 9:55 UTC (permalink / raw)
To: Mattias Rönnblom, dev, Fan Zhang
Cc: hofors, David Marchand, Thomas Monjalon
> Avoid C++ name mangling of the two global variables being exported
> from <rte_crypto_asym.h>.
>
> Suggested-by: David Marchand <david.marchand@redhat.com>
> Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
> ---
> lib/cryptodev/rte_crypto_asym.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h
> index aeb46e688e..9787b710e7 100644
> --- a/lib/cryptodev/rte_crypto_asym.h
> +++ b/lib/cryptodev/rte_crypto_asym.h
> @@ -25,6 +25,10 @@
>
> struct rte_cryptodev_asym_session;
>
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> /** asym key exchange operation type name strings */
> extern const char *
> rte_crypto_asym_ke_strings[];
> @@ -33,6 +37,10 @@ rte_crypto_asym_ke_strings[];
> extern const char *
> rte_crypto_asym_op_strings[];
>
> +#ifdef __cplusplus
> +}
> +#endif
> +
> #define RTE_CRYPTO_ASYM_FLAG_PUB_KEY_NO_PADDING
> RTE_BIT32(0)
It seems only these two variables are causing problem,
but shouldn't it be better to have this change for the complete file
like rte_crypto_sym.h.
This will avoid issues with any future additions.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-08 9:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-19 16:35 [PATCH] cryptodev: allow use of global variables from C++ Mattias Rönnblom
2025-01-08 9:55 ` [EXTERNAL] " Akhil Goyal
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).