Hi Akhil,

Please see inline.

Thanks,
Anoob

> -----Original Message-----
> From: Akhil Goyal <akhil.go...@nxp.com>
> Sent: Tuesday, October 1, 2019 6:27 PM
> To: Anoob Joseph <ano...@marvell.com>; Pablo de Lara
> <pablo.de.lara.gua...@intel.com>
> Cc: Kanaka Durga Kotamarthy <kkotamar...@marvell.com>; Jerin Jacob
> Kollanukkaran <jer...@marvell.com>; Narayana Prasad Raju Athreya
> <pathr...@marvell.com>; Fiona Trahe <fiona.tr...@intel.com>; Shally Verma
> <shal...@marvell.com>; Sunila Sahu <ss...@marvell.com>; dev@dpdk.org
> 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