@@ -344,6 +344,32 @@ int
odp_hw_random_get(uint8_t *buf, size_t *len, odp_bool_t use_entropy);
/**
+ * Get printable value for an odp_crypto_session_t
+ *
+ * @param hdl odp_crypto_session_t handle to be printed
+ * @return uint64_t value that can be used to print/display this
+ * handle
+ *
+ * @note This routine is intended to be used for diagnostic purposes
+ * to enable applications to generate a printable value that represents
+ * an odp_crypto_session_t handle.
+ */
+uint64_t odp_crypto_session_t_print(odp_crypto_session_t hdl);
+
+/**
+ * Get printable value for an odp_crypto_compl_t
+ *
+ * @param hdl odp_crypto_compl_t handle to be printed
+ * @return uint64_t value that can be used to print/display this
+ * handle
+ *
+ * @note This routine is intended to be used for diagnostic purposes
+ * to enable applications to generate a printable value that represents
+ * an odp_crypto_compl_t handle.
+ */
+uint64_t odp_crypto_compl_t_print(odp_crypto_compl_t hdl);
+
+/**
* @}
*/
@@ -25,7 +25,7 @@ extern "C" {
#define ODP_CRYPTO_SESSION_INVALID (0xffffffffffffffffULL)
typedef uint64_t odp_crypto_session_t;
-typedef odp_packet_t odp_crypto_compl_t;
+typedef odp_handle_t odp_crypto_compl_t;
enum odp_crypto_op_mode {
ODP_CRYPTO_SYNC,
@@ -68,6 +68,17 @@ enum crypto_hw_err {
ODP_CRYPTO_HW_ERR_BP_DEPLETED,
};
+/** Get printable format of odp_crypto_session_t */
+static inline uint64_t odp_crypto_session_t_print(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_t_print(odp_crypto_compl_t hdl)
+{
+ return _odp_pri(hdl);
+}
/**
* @}
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> --- include/odp/api/crypto.h | 26 ++++++++++++++++++++++ .../linux-generic/include/odp/plat/crypto_types.h | 13 ++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-)