[dpdk-dev] [PATCH v3] cryptodev: allocate driver structure statically
De Lara Guarch, Pablo
pablo.de.lara.guarch at intel.com
Wed Sep 6 12:27:36 CEST 2017
> -----Original Message-----
> From: Rybalchenko, Kirill
> Sent: Monday, September 4, 2017 11:39 AM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch at intel.com>; Doherty,
> Declan <declan.doherty at intel.com>; Trahe, Fiona <fiona.trahe at intel.com>;
> Jain, Deepak K <deepak.k.jain at intel.com>; Griffin, John
> <john.griffin at intel.com>; jerin.jacob at caviumnetworks.com;
> akhil.goyal at nxp.com; hemant.agrawal at nxp.com
> Cc: dev at dpdk.org
> Subject: RE: [dpdk-dev] [PATCH v3] cryptodev: allocate driver structure
> statically
>
>
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Pablo de Lara
> > Sent: Wednesday 16 August 2017 03:42
> > To: Doherty, Declan <declan.doherty at intel.com>; Trahe, Fiona
> > <fiona.trahe at intel.com>; Jain, Deepak K <deepak.k.jain at intel.com>;
> > Griffin, John <john.griffin at intel.com>;
> > jerin.jacob at caviumnetworks.com; akhil.goyal at nxp.com;
> > hemant.agrawal at nxp.com
> > Cc: dev at dpdk.org; De Lara Guarch, Pablo
> > <pablo.de.lara.guarch at intel.com>
> > Subject: [dpdk-dev] [PATCH v3] cryptodev: allocate driver structure
> > statically
> >
> > 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.
> >
> > Coverity issue: 158645
> >
> > Fixes: 7a364faef185 ("cryptodev: remove crypto device type
> > enumeration")
> >
> > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch at intel.com>
> > ---
> >
> > Changes in v3:
> >
> > - Added documentation (removed deprecation notice and added API
> > Change)
> > - Modified title to something more explicit
> >
> > Changes in v2:
> >
> > - Allocate statically the cryptodev driver structure,
> > instead of using malloc, that can potentially fail.
> >
> > 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(-)
> >
>
> Reviewed-by: Kirill Rybalchenko <kirill.rybalchenko at intel.com>
>
Applied to dpdk-next-crypto.
Pablo
More information about the dev
mailing list