From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Apr 2017 10:36:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,222,1488873600"; d="scan'208";a="91451408" Received: from irsmsx107.ger.corp.intel.com ([163.33.3.99]) by fmsmga005.fm.intel.com with ESMTP; 19 Apr 2017 10:36:22 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.239]) by IRSMSX107.ger.corp.intel.com ([169.254.10.107]) with mapi id 14.03.0319.002; Wed, 19 Apr 2017 18:36:21 +0100 From: "De Lara Guarch, Pablo" To: "akhil.goyal@nxp.com" , "dev@dpdk.org" CC: "Doherty, Declan" , "Mcnamara, John" , "hemant.agrawal@nxp.com" Thread-Topic: [dpdk-dev] [PATCH v8 11/13] crypto/dpaa2_sec: add crypto operation support Thread-Index: AQHSuSN2EakGMH5SwEmNY9mzp4RGZ6HM8K0w 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> In-Reply-To: <1492616268-6307-12-git-send-email-akhil.goyal@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzU0OGJlNWYtZWMyNy00OGQ4LTkxZDctYWI4MWY0Y2I2NzUzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkdHSEFiSGpXU1NaQ0Jzb0VXWUhZZDNLRnRnbE1MUnY0QUxkaXVhVGQzWkE9In0= x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v8 11/13] crypto/dpaa2_sec: add crypto operation support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2017 17:36:41 -0000 > -----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