From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 6A1BA2C19 for ; Mon, 4 Sep 2017 12:38:36 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP; 04 Sep 2017 03:38:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,474,1498546800"; d="scan'208";a="1214452621" Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by fmsmga002.fm.intel.com with ESMTP; 04 Sep 2017 03:38:33 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.167]) by IRSMSX152.ger.corp.intel.com ([169.254.6.87]) with mapi id 14.03.0319.002; Mon, 4 Sep 2017 11:38:33 +0100 From: "Rybalchenko, Kirill" To: "De Lara Guarch, Pablo" , "Doherty, Declan" , "Trahe, Fiona" , "Jain, Deepak K" , "Griffin, John" , "jerin.jacob@caviumnetworks.com" , "akhil.goyal@nxp.com" , "hemant.agrawal@nxp.com" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v3] cryptodev: allocate driver structure statically Thread-Index: AQHTFnxQ79KacWaVFUOwKQVkASRmYqKkpURA Date: Mon, 4 Sep 2017 10:38:32 +0000 Message-ID: <696B43C21188DF4F9C9091AAE4789B824E29582B@IRSMSX108.ger.corp.intel.com> References: <20170731091817.41505-1-pablo.de.lara.guarch@intel.com> <20170816024151.15325-1-pablo.de.lara.guarch@intel.com> In-Reply-To: <20170816024151.15325-1-pablo.de.lara.guarch@intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNWIzZTEwZjQtOTBjMi00NTUzLWFiYjItZjM4MzAwZTVhMGY2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IjR1TnZiOTZNVElFcjVFdnF5VkRCY1NQbEd0MEgxNWg2YzV1SWZTTDRTaUU9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3] cryptodev: allocate driver structure statically 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: Mon, 04 Sep 2017 10:38:38 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara > Sent: Wednesday 16 August 2017 03:42 > To: Doherty, Declan ; Trahe, Fiona > ; Jain, Deepak K ; > Griffin, John ; jerin.jacob@caviumnetworks.com; > akhil.goyal@nxp.com; hemant.agrawal@nxp.com > Cc: dev@dpdk.org; De Lara Guarch, Pablo > Subject: [dpdk-dev] [PATCH v3] cryptodev: allocate driver structure stati= cally >=20 > When register a crypto driver, a cryptodev driver structure was being > allocated, using malloc. > Since this call may fail, it is safer to allocate this memory statically = in each > PMD, so driver registration will never fail. >=20 > Coverity issue: 158645 >=20 > Fixes: 7a364faef185 ("cryptodev: remove crypto device type enumeration") >=20 > Signed-off-by: Pablo de Lara > --- >=20 > Changes in v3: >=20 > - Added documentation (removed deprecation notice and added API > Change) > - Modified title to something more explicit >=20 > Changes in v2: >=20 > - Allocate statically the cryptodev driver structure, > instead of using malloc, that can potentially fail. >=20 > doc/guides/rel_notes/deprecation.rst | 6 ------ > doc/guides/rel_notes/release_17_11.rst | 5 +++++ > drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 5 ++++- > drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 6 +++++- > drivers/crypto/armv8/rte_armv8_pmd.c | 9 ++++++--- > drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 5 ++++- > drivers/crypto/kasumi/rte_kasumi_pmd.c | 5 ++++- > drivers/crypto/null/null_crypto_pmd.c | 5 ++++- > drivers/crypto/openssl/rte_openssl_pmd.c | 5 ++++- > drivers/crypto/qat/rte_qat_cryptodev.c | 7 +++++-- > drivers/crypto/scheduler/scheduler_pmd.c | 5 ++++- > drivers/crypto/snow3g/rte_snow3g_pmd.c | 5 ++++- > drivers/crypto/zuc/rte_zuc_pmd.c | 5 ++++- > lib/librte_cryptodev/rte_cryptodev.c | 18 +++++------------ > lib/librte_cryptodev/rte_cryptodev.h | 20 ------------------- > lib/librte_cryptodev/rte_cryptodev_pmd.h | 30 > +++++++++++++++++++++++++++++ > 16 files changed, 88 insertions(+), 53 deletions(-) >=20 Reviewed-by: Kirill Rybalchenko