On 2024-12-19 14:30, Thomas Monjalon wrote:
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: [email protected]

Reported-by: Zhigang Hu <[email protected]>
Signed-off-by: Thomas Monjalon <[email protected]>
---
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 <[email protected]>
  Zhenning Xiao <[email protected]>
  Zhe Tao <[email protected]>
  Zhichao Zeng <[email protected]>
+Zhigang Hu <[email protected]>
  Zhigang Lu <[email protected]>
  Zhiguang He <[email protected]>
  Zhihong Peng <[email protected]>
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

Reviewed-by: Mattias Rönnblom <[email protected]>

Reply via email to