crypto/aesni-mb: improve security instance setup
authorDavid Coyle <david.coyle@intel.com>
Mon, 20 Jul 2020 12:16:21 +0000 (13:16 +0100)
committerAkhil Goyal <akhil.goyal@nxp.com>
Tue, 28 Jul 2020 20:09:21 +0000 (22:09 +0200)
commitb2f58adb163402028335e68a333dc1515bd76813
treec07dd915834a1e93dbf3aa338ca70cc1b88f17f1
parent8688fcf030f746b07ecc70b382ca60b0f731b016
crypto/aesni-mb: improve security instance setup

This patch makes some improvements to the security instance setup for
the AESNI-MB PMD, as follows:
- fix potential memory leak where the security instance was not freed if
  an error occurred later in the device creation
- tidy-up security instance initialization code by moving it all,
  including enabling the RTE_CRYPTODEV_FF_SECURITY feature, into one
  '#ifdef AESNI_MB_DOCSIS_SEC_ENABLED' block

Fixes: fda5216fba55 ("crypto/aesni_mb: support DOCSIS protocol")

Signed-off-by: David Coyle <david.coyle@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c