new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp/arch/default/api/abi/crypto.h>
new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp/arch/default/api/abi/crypto.h>
new file mode 100644
@@ -0,0 +1,36 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef ODP_ABI_CRYPTO_H_
+#define ODP_ABI_CRYPTO_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdint.h>
+
+/** @internal Dummy type for strong typing */
+typedef struct { char dummy; /**< @internal Dummy */ } _odp_abi_crypto_compl_t;
+
+/** @ingroup odp_crypto
+ * @{
+ */
+
+#define ODP_CRYPTO_SESSION_INVALID (0xffffffffffffffffULL)
+
+typedef uint64_t odp_crypto_session_t;
+typedef _odp_abi_crypto_compl_t *odp_crypto_compl_t;
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp/arch/default/api/abi/crypto.h>
new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp/arch/default/api/abi/crypto.h>
new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp/arch/default/api/abi/crypto.h>
new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp/arch/default/api/abi/crypto.h>
@@ -64,12 +64,14 @@ odpapiabidefaultincludedir= $(includedir)/odp/arch/default/api/abi
odpapiabidefaultinclude_HEADERS = \
$(top_srcdir)/include/odp/arch/default/api/abi/buffer.h \
$(top_srcdir)/include/odp/arch/default/api/abi/classification.h \
+ $(top_srcdir)/include/odp/arch/default/api/abi/crypto.h \
$(top_srcdir)/include/odp/arch/default/api/abi/event.h
odpapiabiarchincludedir= $(includedir)/odp/arch/@ARCH_ABI@/odp/api/abi
odpapiabiarchinclude_HEADERS = \
$(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/buffer.h \
$(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/classification.h \
+ $(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/crypto.h \
$(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/event.h
EXTRA_DIST = \
@@ -18,7 +18,12 @@
extern "C" {
#endif
-/** @addtogroup odp_crypto
+#include <odp/api/plat/static_inline.h>
+#if ODP_ABI_COMPAT == 1
+#include <odp/api/abi/crypto.h>
+#else
+
+/** @ingroup odp_crypto
* @{
*/
@@ -27,22 +32,12 @@ extern "C" {
typedef uint64_t odp_crypto_session_t;
typedef ODP_HANDLE_T(odp_crypto_compl_t);
-/** Get printable format of odp_crypto_session_t */
-static inline uint64_t odp_crypto_session_to_u64(odp_crypto_session_t hdl)
-{
- return (uint64_t)hdl;
-}
-
-/** Get printable format of odp_crypto_compl_t_t */
-static inline uint64_t odp_crypto_compl_to_u64(odp_crypto_compl_t hdl)
-{
- return _odp_pri(hdl);
-}
-
/**
* @}
*/
+#endif
+
#ifdef __cplusplus
}
#endif
@@ -1120,3 +1120,13 @@ void odp_crypto_session_param_init(odp_crypto_session_param_t *param)
{
memset(param, 0, sizeof(odp_crypto_session_param_t));
}
+
+uint64_t odp_crypto_session_to_u64(odp_crypto_session_t hdl)
+{
+ return (uint64_t)hdl;
+}
+
+uint64_t odp_crypto_compl_to_u64(odp_crypto_compl_t hdl)
+{
+ return _odp_pri(hdl);
+}
Initially, use the same default ABI file for all architectures. Default values match those defined in odp-linux implementation to minimize changes in this phase. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> --- include/odp/arch/arm32-linux/odp/api/abi/crypto.h | 7 +++++ include/odp/arch/arm64-linux/odp/api/abi/crypto.h | 7 +++++ include/odp/arch/default/api/abi/crypto.h | 36 ++++++++++++++++++++++ include/odp/arch/mips64-linux/odp/api/abi/crypto.h | 7 +++++ .../odp/arch/power64-linux/odp/api/abi/crypto.h | 7 +++++ include/odp/arch/x86_32-linux/odp/api/abi/crypto.h | 7 +++++ include/odp/arch/x86_64-linux/odp/api/abi/crypto.h | 7 +++++ platform/Makefile.inc | 2 ++ .../include/odp/api/plat/crypto_types.h | 21 +++++-------- platform/linux-generic/odp_crypto.c | 10 ++++++ 10 files changed, 98 insertions(+), 13 deletions(-) create mode 100644 include/odp/arch/arm32-linux/odp/api/abi/crypto.h create mode 100644 include/odp/arch/arm64-linux/odp/api/abi/crypto.h create mode 100644 include/odp/arch/default/api/abi/crypto.h create mode 100644 include/odp/arch/mips64-linux/odp/api/abi/crypto.h create mode 100644 include/odp/arch/power64-linux/odp/api/abi/crypto.h create mode 100644 include/odp/arch/x86_32-linux/odp/api/abi/crypto.h create mode 100644 include/odp/arch/x86_64-linux/odp/api/abi/crypto.h -- 2.8.1