aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-dpdk
diff options
context:
space:
mode:
authorJanne Peltonen <janne.peltonen@nokia.com>2023-04-13 13:53:13 +0300
committerMatias Elo <matias.elo@nokia.com>2023-04-18 14:23:54 +0300
commite206291667f2b388a4dd739e21b2eda8730d6e4c (patch)
tree5ab06635dadad5fb1c8e3a301b91617743cdbc20 /platform/linux-dpdk
parente9b30faf553e1a361ce9713657b35799c680cc79 (diff)
Port 10b36be0d "linux-gen: crypto: remove deprecated odp_crypto_operation()"
Port original commit from linux-generic. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
Diffstat (limited to 'platform/linux-dpdk')
-rw-r--r--platform/linux-dpdk/odp_crypto.c96
-rw-r--r--platform/linux-dpdk/odp_event.c9
2 files changed, 0 insertions, 105 deletions
diff --git a/platform/linux-dpdk/odp_crypto.c b/platform/linux-dpdk/odp_crypto.c
index ec4a7b532..8885413f1 100644
--- a/platform/linux-dpdk/odp_crypto.c
+++ b/platform/linux-dpdk/odp_crypto.c
@@ -1599,43 +1599,6 @@ int _odp_crypto_term_global(void)
return rc;
}
-#if ODP_DEPRECATED_API
-odp_crypto_compl_t odp_crypto_compl_from_event(odp_event_t ev)
-{
- /* This check not mandated by the API specification */
- if (odp_event_type(ev) != ODP_EVENT_CRYPTO_COMPL)
- _ODP_ABORT("Event not a crypto completion");
- return (odp_crypto_compl_t)ev;
-}
-
-odp_event_t odp_crypto_compl_to_event(odp_crypto_compl_t completion_event)
-{
- return (odp_event_t)completion_event;
-}
-
-void odp_crypto_compl_result(odp_crypto_compl_t completion_event,
- odp_crypto_op_result_t *result)
-{
- (void)completion_event;
- (void)result;
-
- /* We won't get such events anyway, so there can be no result */
- _ODP_ASSERT(0);
-}
-
-void odp_crypto_compl_free(odp_crypto_compl_t completion_event)
-{
- odp_event_t ev = odp_crypto_compl_to_event(completion_event);
-
- odp_buffer_free(odp_buffer_from_event(ev));
-}
-
-uint64_t odp_crypto_compl_to_u64(odp_crypto_compl_t hdl)
-{
- return _odp_pri(hdl);
-}
-#endif
-
void odp_crypto_session_param_init(odp_crypto_session_param_t *param)
{
memset(param, 0, sizeof(odp_crypto_session_param_t));
@@ -2151,65 +2114,6 @@ int odp_crypto_int(const odp_packet_t pkt_in[],
return num_pkt;
}
-#if ODP_DEPRECATED_API
-int odp_crypto_operation(odp_crypto_op_param_t *param,
- odp_bool_t *posted,
- odp_crypto_op_result_t *result)
-{
- odp_crypto_packet_op_param_t packet_param;
- odp_packet_t out_pkt = param->out_pkt;
- odp_crypto_packet_result_t packet_result;
- odp_crypto_op_result_t local_result;
- int rc;
-
- if (((crypto_session_entry_t *)(intptr_t)param->session)->p.op_type !=
- ODP_CRYPTO_OP_TYPE_LEGACY)
- return -1;
-
- packet_param.session = param->session;
- packet_param.cipher_iv_ptr = param->cipher_iv_ptr;
- packet_param.auth_iv_ptr = param->auth_iv_ptr;
- packet_param.hash_result_offset = param->hash_result_offset;
- packet_param.aad_ptr = param->aad_ptr;
- packet_param.cipher_range = param->cipher_range;
- packet_param.auth_range = param->auth_range;
-
- rc = odp_crypto_int(&param->pkt, &out_pkt, &packet_param, 1);
- if (rc < 0)
- return rc;
-
- rc = odp_crypto_result(&packet_result, out_pkt);
- if (rc < 0) {
- /*
- * We cannot fail since odp_crypto_op() has already processed
- * the packet. Let's indicate error in the result instead.
- */
- packet_result.ok = false;
- }
-
- /* Indicate to caller operation was sync */
- *posted = 0;
-
- packet_subtype_set(out_pkt, ODP_EVENT_PACKET_BASIC);
-
- /* Fill in result */
- local_result.ctx = param->ctx;
- local_result.pkt = out_pkt;
- local_result.cipher_status = packet_result.cipher_status;
- local_result.auth_status = packet_result.auth_status;
- local_result.ok = packet_result.ok;
-
- /*
- * Be bug-to-bug compatible. Return output packet also through params.
- */
- param->out_pkt = out_pkt;
-
- *result = local_result;
-
- return 0;
-}
-#endif
-
int odp_crypto_op(const odp_packet_t pkt_in[],
odp_packet_t pkt_out[],
const odp_crypto_packet_op_param_t param[],
diff --git a/platform/linux-dpdk/odp_event.c b/platform/linux-dpdk/odp_event.c
index 625b6eefe..589defc5c 100644
--- a/platform/linux-dpdk/odp_event.c
+++ b/platform/linux-dpdk/odp_event.c
@@ -60,11 +60,6 @@ static inline void event_free(odp_event_t event, _odp_ev_id_t id)
case ODP_EVENT_TIMEOUT:
odp_timeout_free(odp_timeout_from_event(event));
break;
-#if ODP_DEPRECATED_API
- case ODP_EVENT_CRYPTO_COMPL:
- odp_crypto_compl_free(odp_crypto_compl_from_event(event));
- break;
-#endif
case ODP_EVENT_IPSEC_STATUS:
_odp_ipsec_status_free(_odp_ipsec_status_from_event(event));
break;
@@ -116,10 +111,6 @@ int odp_event_is_valid(odp_event_t event)
return !_odp_packet_validate(odp_packet_from_event(event), _ODP_EV_EVENT_IS_VALID);
case ODP_EVENT_TIMEOUT:
/* Fall through */
-#if ODP_DEPRECATED_API
- case ODP_EVENT_CRYPTO_COMPL:
- /* Fall through */
-#endif
case ODP_EVENT_IPSEC_STATUS:
/* Fall through */
case ODP_EVENT_PACKET_VECTOR: