test/bonding: fix MAC assignment for re-run
[dpdk.git] / lib / librte_eal / linux / eal / eal.c
index 13f4016..1613996 100644 (file)
@@ -320,7 +320,7 @@ rte_eal_config_create(void)
                rte_mem_cfg_addr = NULL;
 
        if (mem_cfg_fd < 0){
-               mem_cfg_fd = open(pathname, O_RDWR | O_CREAT, 0660);
+               mem_cfg_fd = open(pathname, O_RDWR | O_CREAT, 0600);
                if (mem_cfg_fd < 0)
                        rte_panic("Cannot open '%s' for rte_mem_config\n", pathname);
        }
@@ -1005,6 +1005,12 @@ rte_eal_init(int argc, char **argv)
                return -1;
        }
 
+       if (rte_eal_alarm_init() < 0) {
+               rte_eal_init_alert("Cannot init interrupt-handling thread");
+               /* rte_eal_alarm_init sets rte_errno on failure. */
+               return -1;
+       }
+
        /* Put mp channel init before bus scan so that we can init the vdev
         * bus through mp channel in the secondary process before the bus scan.
         */
@@ -1125,12 +1131,6 @@ rte_eal_init(int argc, char **argv)
                return -1;
        }
 
-       if (rte_eal_alarm_init() < 0) {
-               rte_eal_init_alert("Cannot init interrupt-handling thread");
-               /* rte_eal_alarm_init sets rte_errno on failure. */
-               return -1;
-       }
-
        if (rte_eal_timer_init() < 0) {
                rte_eal_init_alert("Cannot init HPET or TSC timers");
                rte_errno = ENOTSUP;
@@ -1253,7 +1253,7 @@ mark_freeable(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
        return 0;
 }
 
-int __rte_experimental
+int
 rte_eal_cleanup(void)
 {
        /* if we're in a primary process, we need to mark hugepages as freeable