Hi,
Reviewed-by: Petri Savolainen <[email protected]>
API changes are OK and can be merged today.
Two things should be fixed then on top of that.
1) odp_hw_random_get()
This could be renamed to e.g. odp_rand() and moved out from crypto header
(odp_misc.h ?)
size_t odp_rand(uint8_t *buf, size_t len, odp_bool_t use_entropy);
Should it return number of bytes written, instead of output param *len?
2)
Correct sequences to free a compl event needs to be specified more clearly.
There seems to be only one right now?
compl = odp_crypto_compl_from_event(ev);
odp_crypto_compl_result(compl, &result);
odp_crypto_compl_free(compl);
if(result.pkt != ODP_PACKET_INVALID)
odp_packet_free(result.pkt)
Simple free call would result memory leak because the result packet would not
be freed:
compl = odp_crypto_compl_from_event(ev);
odp_crypto_compl_free(compl);
> +
> +/**
> + * Release crypto completion event
> + *
> + * @param completion_event Completion event we are done accessing
e.g.
@note User needs to free the potential result packet. This call frees the
completion event only.
> + */
> +void
> +odp_crypto_compl_free(odp_crypto_compl_t completion_event);
-Petri
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp