dpdk: Enhancement to call crypto start api at initialization 82/13182/4
authorSachin Saxena <sachin.saxena@nxp.com>
Fri, 22 Jun 2018 06:50:20 +0000 (12:20 +0530)
committerFlorin Coras <florin.coras@gmail.com>
Mon, 25 Jun 2018 20:22:53 +0000 (20:22 +0000)
 - Some crypto devices rely on rte_cryptodev_start() API to be called by
   application to enable a pre-configured H/W Crypto device.
 - NXP dpaa2 is one of the example.

Change-Id: I2ad8ca0060604fb4e0541161e91bdebc6642f4da
Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
src/plugins/dpdk/ipsec/ipsec.c

index 731613b..b2d8611 100644 (file)
@@ -652,6 +652,10 @@ crypto_dev_conf (u8 dev, u16 n_qp, u8 numa)
        return clib_error_return (0, error_str, dev, qp);
     }
 
+  error_str = "failed to start crypto device %u";
+  if (rte_cryptodev_start (dev))
+    return clib_error_return (0, error_str, dev);
+
   return 0;
 }