[dpdk-dev] [PATCH v8 11/13] crypto/dpaa2_sec: add crypto operation support

Hemant Agrawal hemant.agrawal at nxp.com
Wed Apr 19 19:47:41 CEST 2017


Hi Pablo,

> -----Original Message-----
> From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch at intel.com]
> > -----Original Message-----
> > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of
> > akhil.goyal at nxp.com
> > Sent: Wednesday, April 19, 2017 4:38 PM
> > To: dev at dpdk.org
> > Cc: Doherty, Declan; Mcnamara, John; hemant.agrawal at nxp.com
> > Subject: [dpdk-dev] [PATCH v8 11/13] crypto/dpaa2_sec: add crypto
> > operation support
> >
> > From: Akhil Goyal <akhil.goyal at nxp.com>
> >
> > Signed-off-by: Akhil Goyal <akhil.goyal at nxp.com>
> > Signed-off-by: Hemant Agrawal <hemant.agrawal at nxp.com>
> > ---
> >  drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 1236
> > +++++++++++++++++++++++++++
> >  drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h   |  143 ++++
> >  2 files changed, 1379 insertions(+)
> >
> > diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> > b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> > index e0e8cfb..7c497c0 100644
> > --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> > +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> 
> ...
> 
> > +/** Clear the memory of session so it doesn't leave key material
> > +behind */ static void dpaa2_sec_session_clear(struct rte_cryptodev
> > +*dev __rte_unused, void
> > *sess)
> > +{
> > +	PMD_INIT_FUNC_TRACE();
> > +	dpaa2_sec_session *s = (dpaa2_sec_session *)sess;
> > +
> > +	if (s) {
> > +		if (s->ctxt)
> > +			rte_free(s->ctxt);
> > +		if (&s->cipher_key)
> > +			rte_free(s->cipher_key.data);
> > +		if (&s->auth_key)
> > +			rte_free(s->auth_key.data);
> 
> No need for these checks, rte_free can handle NULL pointers (assuming that the
> structure is initialized to all 0s when created, which looks like it is happening
> below).
> 
> Unless there are other changes required (I am currently reviewing the patchset),
> I can make this and the change from the other email myself, when applying the
> patchset.

[Hemant] No, we are not expecting other changes. 

If you want,  I can send the new patchset or you can make the changes - either way is fine with us.
(2nd is preferred 😊)
> 
> Thanks,
> Pablo



More information about the dev mailing list