Here's the relevant code from odp_crypto.c:
/* If specified during creation post event to completion queue */
if (ODP_QUEUE_INVALID != session->compl_queue) {
odp_event_t completion_event;
odp_crypto_generic_op_result_t *op_result;
/* Linux generic will always use packet for completion event */
completion_event = odp_packet_to_event(params->out_pkt);
_odp_buffer_event_type_set(
odp_buffer_from_event(completion_event),
ODP_EVENT_CRYPTO_COMPL);
/* Asynchronous, build result (no HW so no errors) and send it*/
op_result = get_op_result_from_event(completion_event);
op_result->magic = OP_RESULT_MAGIC;
op_result->result = local_result;
if (odp_queue_enq(session->compl_queue, completion_event)) {
odp_event_free(completion_event);
return -1;
}
/* Indicate to caller operation was async */
*posted = 1;
} else {
/* Synchronous, simply return results */
if (!result)
return -1;
*result = local_result;
/* Indicate to caller operation was sync */
*posted = 0;
}
return 0;
So crypto completion events are piggybacked onto packets since you need a
packet as the result of the operation. odp_event_type() should return
ODP_CRYPTO_COMPL for this event.
Do you have the snippet of code that's seeing something different you can
share?
On Mon, Nov 23, 2015 at 1:48 AM, Christophe Milard <
[email protected]> wrote:
> Hi,
> A colleague at Ericsson is having the following issue. It sounds quite
> similar to the one I have reported earlyer (
> https://patches.linaro.org/49661), But I have honestlely not digged
> deeply into it... Bill, does it ring a bell to you?
>
> /Christophe.
>
> >Here is a short description of the ODP bug I run into:
> >
> >After async decryption I get a packet event instead of crypto
> >completition.
> >
> >- I use ODP 1.4 (checked out from git, the 1.4.0.0 tag) linux-generic
> >- Set up a crypto session: async, 3DES-CBC, decrypt, no authentication
> >- When a packet arrives: set up in-place decryption and call to
> >odp_crypto_operation()
> >- The odp_crypto_operation() call returns, and indicates posted
> >operation, the packet is decrypted, but no ODP_EVENT_CRYPTO_COMPL event
> >received.
> >- But an ODP_EVENT_PACKET arrives with the decrypted packet, on the
> >completion queue.
>
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp