From mboxrd@z Thu Jan 1 00:00:00 1970 From: "De Lara Guarch, Pablo" Subject: Re: [PATCH v8 11/13] crypto/dpaa2_sec: add crypto operation support Date: Wed, 19 Apr 2017 17:36:20 +0000 Message-ID: References: <20170410123108.26305-1-akhil.goyal@nxp.com> <1492616268-6307-1-git-send-email-akhil.goyal@nxp.com> <1492616268-6307-12-git-send-email-akhil.goyal@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "Doherty, Declan" , "Mcnamara, John" , "hemant.agrawal@nxp.com" To: "akhil.goyal@nxp.com" , "dev@dpdk.org" Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id E7A7A5920 for ; Wed, 19 Apr 2017 19:36:40 +0200 (CEST) In-Reply-To: <1492616268-6307-12-git-send-email-akhil.goyal@nxp.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of > akhil.goyal@nxp.com > Sent: Wednesday, April 19, 2017 4:38 PM > To: dev@dpdk.org > Cc: Doherty, Declan; Mcnamara, John; hemant.agrawal@nxp.com > Subject: [dpdk-dev] [PATCH v8 11/13] crypto/dpaa2_sec: add crypto > operation support >=20 > From: Akhil Goyal >=20 > Signed-off-by: Akhil Goyal > Signed-off-by: Hemant Agrawal > --- > drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 1236 > +++++++++++++++++++++++++++ > drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h | 143 ++++ > 2 files changed, 1379 insertions(+) >=20 > 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 =3D (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 l= ooks like it is happening below). Unless there are other changes required (I am currently reviewing the patch= set), I can make this and the change from the other email myself, when applying the patchset. Thanks, Pablo