One comment about dropping the error inline.

Thanks,
Alex

On 26 January 2015 at 02:12, Taras Kondratiuk <[email protected]>
wrote:

> On 01/15/2015 05:55 PM, Robbie King wrote:
> > @@ -210,6 +211,21 @@ typedef struct odp_crypto_compl_status {
> >       enum crypto_hw_err  hw_err;   /**< Hardware specific return code */
> >  } odp_crypto_compl_status_t;
> >
> > +/**
> > + * Cryto API completion event
> > + */
> > +typedef odp_buffer_t odp_crypto_compl_event_t;
> > +
> > +/**
> > + * Crypto API operation result
> > + */
> > +typedef struct odp_crypto_op_result {
> > +     odp_bool_t  ok;                  /**< Request completed
> successfully */
> > +     void *ctx;                       /**< User context from request */
> > +     odp_packet_t pkt;                /**< Output packet */
> > +     odp_crypto_compl_status_t cipher_status; /**< Cipher status */
> > +     odp_crypto_compl_status_t auth_status;   /**< Authentication
> status */
>
> Detailed status is usually needed only in case of failure. Can we say
> *_status fields are valid (filled) only when ok == false?
>
> Actually even in case of failure application will usually drop the
> packet without deep analysis,

[Alex] Do I remember correctly from the crypto sprint (Cisco feature) that
in case of ICV check failure the computed ICV should be passed to the
application together with the failed one?

> so it seems reasonable to move detailed
> status into a separate query.
>
> typedef struct odp_crypto_op_errors {
>         odp_crypto_compl_status_t cipher_status; /**< Cipher status */
>         odp_crypto_compl_status_t auth_status;   /**< Authentication
> status */
> } odp_crypto_op_errors_t;
>
> odp_crypto_compl_errors(odp_crypto_compl_event_t completion_event,
> odp_crypto_op_errors_t *errors);
>
> > +} odp_crypto_op_result_t;
> >
> >  /**
> >   * Crypto session creation (synchronous)
>
> --
> Taras Kondratiuk
>
> _______________________________________________
> lng-odp mailing list
> [email protected]
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to