diff options
author | Janne Peltonen <janne.peltonen@nokia.com> | 2023-02-20 19:29:45 +0200 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2023-04-12 15:52:37 +0300 |
commit | 724ffd78bfa4f53a13d35f54ff350917a4e55bdf (patch) | |
tree | fd911dd7133d478885edc5faef4d219761371f50 /include | |
parent | 10b36be0d81e46181764334b9621396b61c6449b (diff) |
api: crypto: remove deprecated odp_crypto_operation()
Fully remove the deprecated odp_crypto_operation() function and
related functions data types that have been available if compiled
with deprecated API enabled.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Anoob Joseph <anoobj@marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/odp/api/abi-default/crypto_types.h | 4 | ||||
-rw-r--r-- | include/odp/api/abi-default/event_types.h | 3 | ||||
-rw-r--r-- | include/odp/api/spec/crypto.h | 91 | ||||
-rw-r--r-- | include/odp/api/spec/crypto_types.h | 122 | ||||
-rw-r--r-- | include/odp/api/spec/event_types.h | 2 |
5 files changed, 2 insertions, 220 deletions
diff --git a/include/odp/api/abi-default/crypto_types.h b/include/odp/api/abi-default/crypto_types.h index cc9155bfa..4fa9a63a4 100644 --- a/include/odp/api/abi-default/crypto_types.h +++ b/include/odp/api/abi-default/crypto_types.h @@ -14,9 +14,6 @@ extern "C" { #include <stdint.h> -/** @internal Dummy type for strong typing */ -typedef struct { char dummy; /**< @internal Dummy */ } _odp_abi_crypto_compl_t; - /** @ingroup odp_crypto * @{ */ @@ -24,7 +21,6 @@ typedef struct { char dummy; /**< @internal Dummy */ } _odp_abi_crypto_compl_t; #define ODP_CRYPTO_SESSION_INVALID (0xffffffffffffffffULL) typedef uint64_t odp_crypto_session_t; -typedef _odp_abi_crypto_compl_t *odp_crypto_compl_t; /** * @} diff --git a/include/odp/api/abi-default/event_types.h b/include/odp/api/abi-default/event_types.h index fc685cfd9..0fa20e692 100644 --- a/include/odp/api/abi-default/event_types.h +++ b/include/odp/api/abi-default/event_types.h @@ -30,9 +30,6 @@ typedef enum { ODP_EVENT_BUFFER = 1, ODP_EVENT_PACKET = 2, ODP_EVENT_TIMEOUT = 3, -#if ODP_DEPRECATED_API - ODP_EVENT_CRYPTO_COMPL = 4, -#endif ODP_EVENT_IPSEC_STATUS = 5, ODP_EVENT_PACKET_VECTOR = 6, ODP_EVENT_PACKET_TX_COMPL = 7, diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h index d9265c57e..a75f3be70 100644 --- a/include/odp/api/spec/crypto.h +++ b/include/odp/api/spec/crypto.h @@ -115,80 +115,6 @@ int odp_crypto_session_create(const odp_crypto_session_param_t *param, */ int odp_crypto_session_destroy(odp_crypto_session_t session); -#if ODP_DEPRECATED_API - -/** - * Return crypto completion handle that is associated with event - * - * @deprecated Used only with the deprecated odp_crypto_operation() - * - * Note: any invalid parameters will cause undefined behavior and may cause - * the application to abort or crash. - * - * @param ev An event of type ODP_EVENT_CRYPTO_COMPL - * - * @return crypto completion handle - */ -odp_crypto_compl_t odp_crypto_compl_from_event(odp_event_t ev); - -/** - * Convert crypto completion handle to event handle - * - * @deprecated Used only with the deprecated odp_crypto_operation() - * - * @param completion_event Completion event to convert to generic event - * - * @return Event handle - */ -odp_event_t odp_crypto_compl_to_event(odp_crypto_compl_t completion_event); - -/** - * Release crypto completion event - * - * @deprecated Used only with the deprecated odp_crypto_operation() - * - * @param completion_event Completion event we are done accessing - */ -void odp_crypto_compl_free(odp_crypto_compl_t completion_event); - -/** - * Crypto per packet operation - * - * @deprecated Use odp_crypto_op() or odp_crypto_op_enq() instead. - * - * This function may be called only for sessions configured with - * the ODP_CRYPTO_OP_TYPE_LEGACY operation type. - * - * Performs the cryptographic operations specified during session creation - * on the packet. If the operation is performed synchronously, "posted" - * will return FALSE and the result of the operation is immediately available. - * If "posted" returns TRUE the result will be delivered via the completion - * queue specified when the session was created. - * - * @param param Operation parameters - * @param posted Pointer to return posted, TRUE for async operation - * @param result Results of operation (when posted returns FALSE) - * - * @retval 0 on success - * @retval <0 on failure - */ -int odp_crypto_operation(odp_crypto_op_param_t *param, - odp_bool_t *posted, - odp_crypto_op_result_t *result); - -/** - * Crypto per packet operation query result from completion event - * - * @deprecated Used only with the deprecated odp_crypto_operation() - * - * @param completion_event Event containing operation results - * @param result Pointer to result structure - */ -void odp_crypto_compl_result(odp_crypto_compl_t completion_event, - odp_crypto_op_result_t *result); - -#endif /* ODP_DEPRECATED_API */ - /** * Get printable value for an odp_crypto_session_t * @@ -202,23 +128,6 @@ void odp_crypto_compl_result(odp_crypto_compl_t completion_event, */ uint64_t odp_crypto_session_to_u64(odp_crypto_session_t hdl); -#if ODP_DEPRECATED_API -/** - * Get printable value for an odp_crypto_compl_t - * - * @deprecated Used only with the deprecated odp_crypto_operation() - * - * @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_to_u64(odp_crypto_compl_t hdl); -#endif - /** * Initialize crypto session parameters * diff --git a/include/odp/api/spec/crypto_types.h b/include/odp/api/spec/crypto_types.h index 24b9fbbfd..8ea1f22c4 100644 --- a/include/odp/api/spec/crypto_types.h +++ b/include/odp/api/spec/crypto_types.h @@ -38,11 +38,6 @@ extern "C" { */ /** - * @typedef odp_crypto_compl_t -* @deprecated Crypto API completion event (platform dependent). -*/ - -/** * Crypto API operation mode */ typedef enum { @@ -516,8 +511,7 @@ typedef enum odp_crypto_op_type_t { /** * Input packet data and metadata are copied in the output packet * and then processed. Output packet is allocated by the caller - * or by ODP. odp_crypto_op(), odp_crypto_op_enq() and - * odp_crypto_operation() can be used. + * or by ODP. * * This is the default value but will be deprecated in the future. */ @@ -526,7 +520,6 @@ typedef enum odp_crypto_op_type_t { /** * Input packet data and metadata are copied in the output packet * and then processed. Output packet is allocated by ODP. - * odp_crypto_op() and odp_crypto_op_enq() can be used. */ ODP_CRYPTO_OP_TYPE_BASIC, @@ -541,8 +534,6 @@ typedef enum odp_crypto_op_type_t { * * Crypto output is the processed crypto_range, auth_range and * MAC/digest (in encode sessions) of the input packet. - * - * odp_crypto_op() and odp_crypto_op_enq() can be used. */ ODP_CRYPTO_OP_TYPE_OOP, } odp_crypto_op_type_t; @@ -598,14 +589,6 @@ typedef struct odp_crypto_session_param_t { */ odp_bool_t hash_result_in_auth_range; - /** Preferred sync vs. async for odp_crypto_operation() - * - * The default value is ODP_CRYPTO_SYNC. - * - * @deprecated Used only with deprecated odp_crypto_operation() - */ - odp_crypto_op_mode_t ODP_DEPRECATE(pref_mode); - /** Operation mode when using packet interface: sync or async * * The default value is ODP_CRYPTO_SYNC. @@ -675,8 +658,7 @@ typedef struct odp_crypto_session_param_t { /** Async mode completion event queue * * The completion queue is used to return completions from - * odp_crypto_op_enq() (and the deprecated odp_crypto_operation()) - * to the application. + * odp_crypto_op_enq() to the application. */ odp_queue_t compl_queue; @@ -694,83 +676,6 @@ typedef struct odp_crypto_session_param_t { } odp_crypto_session_param_t; /** - * Crypto API per packet operation parameters - * - * @deprecated Use odp_crypto_packet_op_param_t instead. - */ -typedef struct odp_crypto_op_param_t { - /** Session handle from creation */ - odp_crypto_session_t session; - - /** User context */ - void *ctx; - - /** Input packet - * - * Specifies the input packet for the crypto operation. When the - * 'out_pkt' variable is set to ODP_PACKET_INVALID (indicating a new - * packet should be allocated for the resulting packet). - */ - odp_packet_t pkt; - - /** Output packet - * - * Both "in place" (the original packet 'pkt' is modified) and - * "copy" (the packet is replicated to a new packet which contains - * the modified data) modes are supported. The "in place" mode of - * operation is indicated by setting 'out_pkt' equal to 'pkt'. - * For the copy mode of operation, setting 'out_pkt' to a valid packet - * value indicates the caller wishes to specify the destination packet. - * Setting 'out_pkt' to ODP_PACKET_INVALID indicates the caller wishes - * the destination packet be allocated from the output pool specified - * during session creation. - */ - odp_packet_t out_pkt; - - /** IV pointer for cipher */ - uint8_t *cipher_iv_ptr; - - /** Authentication IV pointer */ - uint8_t *auth_iv_ptr; - - /** Offset from start of packet for hash result - * - * In case of decode sessions, the expected hash will be read from - * this offset and compared with the calculated hash. After the - * operation the hash bytes will have undefined values. - * - * In case of encode sessions the calculated hash will be stored in - * this offset. - * - * If the hash_result_in_auth_range session parameter is true, - * the hash result location may overlap auth_range. In that case - * the result location will be zeroed in decode sessions before - * hash calculation. Zeroing is not done in encode sessions. - */ - uint32_t hash_result_offset; - - /** Pointer to AAD. AAD length is defined by 'auth_aad_len' - * session parameter. - */ - uint8_t *aad_ptr; - - /** Data range to be ciphered */ - odp_packet_data_range_t cipher_range; - - /** Data range to be authenticated - * - * The value is ignored with authenticated encryption algorithms, - * such as AES-GCM, which authenticate data in the cipher range - * and the AAD. - * - * As a special case AES-GMAC uses this field instead of aad_ptr - * for the data bytes to be authenticated. - */ - odp_packet_data_range_t auth_range; - -} ODP_DEPRECATE(odp_crypto_op_param_t); - -/** * Crypto packet API per packet operation parameters */ typedef struct odp_crypto_packet_op_param_t { @@ -933,29 +838,6 @@ typedef struct odp_crypto_op_status { } odp_crypto_op_status_t; /** - * Crypto API operation result - * - * @deprecated Use odp_crypto_packet_result_t instead. - */ -typedef struct odp_crypto_op_result { - /** Request completed successfully */ - odp_bool_t ok; - - /** User context from request */ - void *ctx; - - /** Output packet */ - odp_packet_t pkt; - - /** Cipher status */ - odp_crypto_op_status_t cipher_status; - - /** Authentication status */ - odp_crypto_op_status_t auth_status; - -} ODP_DEPRECATE(odp_crypto_op_result_t); - -/** * Crypto packet API operation result */ typedef struct odp_crypto_packet_result_t { diff --git a/include/odp/api/spec/event_types.h b/include/odp/api/spec/event_types.h index 529d031e7..489119247 100644 --- a/include/odp/api/spec/event_types.h +++ b/include/odp/api/spec/event_types.h @@ -52,8 +52,6 @@ extern "C" { * packet processing related metadata * - ODP_EVENT_TIMEOUT * - Timeout event (odp_timeout_t) from a timer - * - ODP_EVENT_CRYPTO_COMPL - * - Crypto completion event (odp_crypto_compl_t) * - ODP_EVENT_IPSEC_STATUS * - IPSEC status update event (odp_ipsec_status_t) * - ODP_EVENT_PACKET_VECTOR |