[dpdk-dev] [PATCH 3/8] crypto/octeontx: add asymmetric session operations
Anoob Joseph
anoobj at marvell.com
Wed Oct 2 13:18:13 CEST 2019
Hi Akhil,
Please see inline.
Thanks,
Anoob
> -----Original Message-----
> From: Akhil Goyal <akhil.goyal at nxp.com>
> Sent: Tuesday, October 1, 2019 6:27 PM
> To: Anoob Joseph <anoobj at marvell.com>; Pablo de Lara
> <pablo.de.lara.guarch at intel.com>
> Cc: Kanaka Durga Kotamarthy <kkotamarthy at marvell.com>; Jerin Jacob
> Kollanukkaran <jerinj at marvell.com>; Narayana Prasad Raju Athreya
> <pathreya at marvell.com>; Fiona Trahe <fiona.trahe at intel.com>; Shally Verma
> <shallyv at marvell.com>; Sunila Sahu <ssahu at marvell.com>; dev at 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.
>
> > + }
> > +}
> > +
More information about the dev
mailing list