aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic
diff options
context:
space:
mode:
authorTaras Kondratiuk <taras.kondratiuk@linaro.org>2014-12-16 16:19:30 +0200
committerMaxim Uvarov <maxim.uvarov@linaro.org>2014-12-18 16:45:14 +0300
commitf6047c5cbe2d833635523b474017d415599fb810 (patch)
treed968fdd1cc73974bd3ad78e6f20e67ad0718cc15 /platform/linux-generic
parent6dfafd8aeabd74dbb1546dcd991d84a66fed3f23 (diff)
linux-generic: crypto: implement odp_crypto_get_operation_compl_packet()
Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Reviewed-by: Robbie King <robking@cisco.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform/linux-generic')
-rw-r--r--platform/linux-generic/include/odp_crypto_internal.h1
-rw-r--r--platform/linux-generic/odp_crypto.c11
2 files changed, 9 insertions, 3 deletions
diff --git a/platform/linux-generic/include/odp_crypto_internal.h b/platform/linux-generic/include/odp_crypto_internal.h
index 7ea1f5c8c..2e5a71ce4 100644
--- a/platform/linux-generic/include/odp_crypto_internal.h
+++ b/platform/linux-generic/include/odp_crypto_internal.h
@@ -70,6 +70,7 @@ typedef struct odp_crypto_generic_op_result {
odp_crypto_compl_status_t cipher;
odp_crypto_compl_status_t auth;
void *op_context;
+ odp_packet_t out_pkt;
} odp_crypto_generic_op_result_t;
/**
diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c
index 881ddc251..13c555691 100644
--- a/platform/linux-generic/odp_crypto.c
+++ b/platform/linux-generic/odp_crypto.c
@@ -387,6 +387,7 @@ odp_crypto_operation(odp_crypto_op_params_t *params,
result->cipher.hw_err = ODP_CRYPTO_HW_ERR_NONE;
result->auth.alg_err = rc_auth;
result->auth.hw_err = ODP_CRYPTO_HW_ERR_NONE;
+ result->out_pkt = params->out_pkt;
/* If specified during creation post event to completion queue */
if (ODP_QUEUE_INVALID != session->compl_queue) {
@@ -473,8 +474,12 @@ void
}
odp_packet_t
-odp_crypto_get_operation_compl_packet(odp_buffer_t completion_event ODP_UNUSED)
+odp_crypto_get_operation_compl_packet(odp_buffer_t completion_event)
{
- ODP_UNIMPLEMENTED();
- return ODP_PACKET_INVALID;
+ odp_crypto_generic_op_result_t *result;
+
+ result = get_op_result_from_buffer(completion_event);
+ ODP_ASSERT(OP_RESULT_MAGIC == result->magic, "Bad completion magic");
+
+ return result->out_pkt;
}