cryptodev: allocate driver structure statically
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Wed, 16 Aug 2017 02:41:51 +0000 (03:41 +0100)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Thu, 12 Oct 2017 14:10:40 +0000 (15:10 +0100)
commiteffd3b9fcf3841869e5035ac08ff25b1807c3f15
tree00e6186d59325b86431292d4f6410099070b2f5b
parent41d2437f7c679dcbfc8b7697fde0b17765eea1ed
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@intel.com>
Reviewed-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
16 files changed:
doc/guides/rel_notes/deprecation.rst
doc/guides/rel_notes/release_17_11.rst
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
drivers/crypto/armv8/rte_armv8_pmd.c
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
drivers/crypto/kasumi/rte_kasumi_pmd.c
drivers/crypto/null/null_crypto_pmd.c
drivers/crypto/openssl/rte_openssl_pmd.c
drivers/crypto/qat/rte_qat_cryptodev.c
drivers/crypto/scheduler/scheduler_pmd.c
drivers/crypto/snow3g/rte_snow3g_pmd.c
drivers/crypto/zuc/rte_zuc_pmd.c
lib/librte_cryptodev/rte_cryptodev.c
lib/librte_cryptodev/rte_cryptodev.h
lib/librte_cryptodev/rte_cryptodev_pmd.h