ARP/API:protect against identical registrations
[vpp.git] / src / vpp / vnet / main.c
index 4a96ca9..d6a1232 100644 (file)
@@ -25,6 +25,8 @@
 static void
 vpe_main_init (vlib_main_t * vm)
 {
+  void vat_plugin_hash_create (void);
+
   if (CLIB_DEBUG > 0)
     vlib_unix_cli_set_prompt ("DBGvpp# ");
   else
@@ -33,6 +35,10 @@ vpe_main_init (vlib_main_t * vm)
   /* Turn off network stack components which we don't want */
   vlib_mark_init_function_complete (vm, srp_init);
 
+  /*
+   * Create the binary api plugin hashes before loading plugins
+   */
+  vat_plugin_hash_create ();
 }
 
 /*
@@ -193,9 +199,6 @@ defaulted:
     {
       vm->init_functions_called = hash_create (0, /* value bytes */ 0);
       vpe_main_init (vm);
-#if DPDK == 0
-      unix_physmem_init (vm, 0 /* fail_if_physical_memory_not_present */ );
-#endif
       return vlib_unix_main (argc, argv);
     }
   else