Hi Akhil,

Please see inline.

Thanks,
Anoob

> -----Original Message-----
> From: Akhil Goyal <[email protected]>
> Sent: Tuesday, October 1, 2019 6:27 PM
> To: Anoob Joseph <[email protected]>; Pablo de Lara
> <[email protected]>
> Cc: Kanaka Durga Kotamarthy <[email protected]>; Jerin Jacob
> Kollanukkaran <[email protected]>; Narayana Prasad Raju Athreya
> <[email protected]>; Fiona Trahe <[email protected]>; Shally Verma
> <[email protected]>; Sunila Sahu <[email protected]>; [email protected]
> Subject: RE: [PATCH 3/8] crypto/octeontx: add asymmetric session operations
> 
> Hi Anoob,
> 
> Just a couple of nits
> 
> > +
> > +static __rte_always_inline void
> > +cpt_modex_param_normalize(uint8_t **data, size_t *len) {
> > +   size_t i;
> > +
> > +   /* Strip leading NUL bytes */
> 
> Typo NULL

[Anoob] It is intentional.

"NUL is a ASCII character which ascii value is 0 whereas NULL is a macro 
defined in stddef.h and several more header file with value of ((void *)0)."
 
> 
> > +
> > +   for (i = 0; i < *len; i++) {
> > +           if ((*data)[i] != 0)
> > +                   break;
> > +   }
> > +
> > +   *data += i;
> > +   *len -= i;
> > +}
> > +
> 
> <.snip.>
> 
> > +static __rte_always_inline void
> > +cpt_free_asym_session_parameters(struct cpt_asym_sess_misc *sess) {
> > +   struct rte_crypto_modex_xform *mod;
> > +   struct rte_crypto_rsa_xform *rsa;
> > +
> > +   switch (sess->xfrm_type) {
> > +   case RTE_CRYPTO_ASYM_XFORM_RSA:
> > +           rsa = &sess->rsa_ctx;
> > +           if (rsa->n.data)
> > +                   rte_free(rsa->n.data);
> > +           break;
> > +   case RTE_CRYPTO_ASYM_XFORM_MODEX:
> > +           mod = &sess->mod_ctx;
> > +           if (mod->modulus.data)
> > +                   rte_free(mod->modulus.data);
> > +           break;
> > +   default:
> > +           break;
> 
> 
> Do we need an error print here?

[Anoob] I'll add DP logs here.
 
> 
> > +   }
> > +}
> > +

Reply via email to