eal: fix race condition in multi-process startup
[dpdk.git] / lib / librte_eal / linuxapp / eal / eal.c
index ceac435..364f303 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2016 Intel Corporation. All rights reserved.
  *   Copyright(c) 2012-2014 6WIND S.A.
  *   All rights reserved.
  *
@@ -821,8 +821,6 @@ rte_eal_init(int argc, char **argv)
 
        eal_check_mem_on_local_socket();
 
-       rte_eal_mcfg_complete();
-
        if (eal_plugins_init() < 0)
                rte_panic("Cannot init plugins\n");
 
@@ -880,6 +878,8 @@ rte_eal_init(int argc, char **argv)
        if (rte_eal_pci_probe())
                rte_panic("Cannot probe PCI\n");
 
+       rte_eal_mcfg_complete();
+
        return fctret;
 }