dpdk-cryptodev: reduce request to enable async 82/37082/2
authorGabriel Oginski <gabrielx.oginski@intel.com>
Tue, 6 Sep 2022 08:59:16 +0000 (08:59 +0000)
committerMatthew Smith <mgsmith@netgate.com>
Wed, 7 Sep 2022 18:51:23 +0000 (18:51 +0000)
Originally initialization cryptodev device(s) calls double request
to enabled async mode and increased ref count twice for async mode.
Due to this cannot be change any assigned async handlers to other
async crypto engine.

The fixes reduce double request to enable async mode in initialization
cryptodev device(s) and VPP can be change assigned async handlers
to other crypto engine after disabled all async feature, for example:
ipsec, wireguard.

Type: fix

Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: If22e682c3c10de781d05c2e09b5420f75be151c3

src/plugins/dpdk/cryptodev/cryptodev.c

index b1da6c2..c004e4c 100644 (file)
@@ -1201,7 +1201,6 @@ dpdk_cryptodev_init (vlib_main_t * vm)
   /* this engine is only enabled when cryptodev device(s) are presented in
    * startup.conf. Assume it is wanted to be used, turn on async mode here.
    */
-  vnet_crypto_request_async_mode (1);
   ipsec_set_async_mode (1);
 
   return 0;