From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: stable@dpdk.org, "Zhigang Hu" <zhigang.hu@intel.com>,
"Akhil Goyal" <gakhil@marvell.com>,
"Fan Zhang" <fanzhang.oss@gmail.com>,
"Morten Brørup" <mb@smartsharesystems.com>,
"David Marchand" <david.marchand@redhat.com>,
"Mattias Rönnblom" <mattias.ronnblom@ericsson.com>
Subject: [PATCH v2] cryptodev: fix C++ include
Date: Thu, 19 Dec 2024 14:30:50 +0100 [thread overview]
Message-ID: <20241219133139.420001-1-thomas@monjalon.net> (raw)
In-Reply-To: <PH0PR11MB57845FF3ACDF02982A05C0A588062@PH0PR11MB5784.namprd11.prod.outlook.com>
Some cryptodev functions were not included in an extern "C" block.
There are 2 blocks, the second one being fast path inline functions,
preceded with an include of the required rte_cryptodev_core.h file.
Fixes: 719834a6849e ("use C linkage where appropriate in headers")
Cc: stable@dpdk.org
Reported-by: Zhigang Hu <zhigang.hu@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
v2: keep rte_cryptodev_core.h include at the same place
---
.mailmap | 1 +
lib/cryptodev/rte_cryptodev.h | 12 ++++++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/.mailmap b/.mailmap
index 2bf38f9e8c..1e4bb06d6e 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1794,6 +1794,7 @@ Zhenghua Zhou <zhenghuax.zhou@intel.com>
Zhenning Xiao <zhenning.xiao@intel.com>
Zhe Tao <zhe.tao@intel.com>
Zhichao Zeng <zhichaox.zeng@intel.com>
+Zhigang Hu <zhigang.hu@intel.com>
Zhigang Lu <zlu@ezchip.com>
Zhiguang He <hezhiguang3@huawei.com>
Zhihong Peng <zhihongx.peng@intel.com>
diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h
index c64d2f83a0..071ff3dbdf 100644
--- a/lib/cryptodev/rte_cryptodev.h
+++ b/lib/cryptodev/rte_cryptodev.h
@@ -22,6 +22,10 @@
#include "rte_cryptodev_trace_fp.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* @internal Logtype used for cryptodev related messages.
*/
@@ -1928,11 +1932,16 @@ int rte_cryptodev_remove_deq_callback(uint8_t dev_id,
uint16_t qp_id,
struct rte_cryptodev_cb *cb);
-#include <rte_cryptodev_core.h>
+#ifdef __cplusplus
+}
+#endif
+
+#include "rte_cryptodev_core.h"
#ifdef __cplusplus
extern "C" {
#endif
+
/**
*
* Dequeue a burst of processed crypto operations from a queue on the crypto
@@ -2125,7 +2134,6 @@ rte_cryptodev_qp_depth_used(uint8_t dev_id, uint16_t qp_id)
return rc;
}
-
#ifdef __cplusplus
}
#endif
--
2.47.1
next prev parent reply other threads:[~2024-12-19 13:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-19 10:41 The question for the modification against (lib/cryptodev/rte_cryptodev.h) in commit 719834a6 Hu, Zhigang
2024-12-19 11:45 ` [PATCH] cryptodev: fix C++ include Thomas Monjalon
2024-12-19 12:24 ` [EXTERNAL] " Akhil Goyal
2024-12-19 12:36 ` Thomas Monjalon
2024-12-19 11:48 ` The question for the modification against (lib/cryptodev/rte_cryptodev.h) in commit 719834a6 Thomas Monjalon
2024-12-19 13:30 ` Thomas Monjalon [this message]
2024-12-19 15:37 ` [PATCH v2] cryptodev: fix C++ include David Marchand
2024-12-19 16:36 ` Mattias Rönnblom
2024-12-19 16:34 ` Mattias Rönnblom
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=20241219133139.420001-1-thomas@monjalon.net \
--to=thomas@monjalon.net \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=fanzhang.oss@gmail.com \
--cc=gakhil@marvell.com \
--cc=mattias.ronnblom@ericsson.com \
--cc=mb@smartsharesystems.com \
--cc=stable@dpdk.org \
--cc=zhigang.hu@intel.com \
/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).