init / exit function ordering
[vpp.git] / src / plugins / crypto_ipsecmb / ipsecmb.c
index b826700..fccc697 100644 (file)
@@ -475,8 +475,8 @@ crypto_ipsecmb_init (vlib_main_t * vm)
   u32 eidx;
   u8 *name;
 
-  if ((error = vlib_call_init_function (vm, vnet_crypto_init)))
-    return error;
+  if (!clib_cpu_supports_aes ())
+    return 0;
 
   /*
    * A priority that is better than OpenSSL but worse than VPP natvie
@@ -544,13 +544,18 @@ crypto_ipsecmb_init (vlib_main_t * vm)
   return (NULL);
 }
 
-VLIB_INIT_FUNCTION (crypto_ipsecmb_init);
+/* *INDENT-OFF* */
+VLIB_INIT_FUNCTION (crypto_ipsecmb_init) =
+{
+  .runs_after = VLIB_INITS ("vnet_crypto_init"),
+};
+/* *INDENT-ON* */
 
 /* *INDENT-OFF* */
 VLIB_PLUGIN_REGISTER () =
 {
   .version = VPP_BUILD_VER,
-  .description = "Intel IPSEC multi-buffer",
+  .description = "Intel IPSEC Multi-buffer Crypto Engine",
 };
 /* *INDENT-ON* */