*/
uint8_t no_link_check = 0; /* check by default */
+/*
+ * Don't automatically start all ports in interactive mode.
+ */
+uint8_t no_device_start = 0;
+
/*
* Enable link status change notification
*/
signal(SIGINT, signal_handler);
signal(SIGTERM, signal_handler);
- diag = rte_eal_init(argc, argv);
- if (diag < 0)
- rte_panic("Cannot init EAL\n");
-
testpmd_logtype = rte_log_register("testpmd");
if (testpmd_logtype < 0)
rte_panic("Cannot register log type");
rte_log_set_level(testpmd_logtype, RTE_LOG_DEBUG);
+ diag = rte_eal_init(argc, argv);
+ if (diag < 0)
+ rte_panic("Cannot init EAL\n");
+
+ if (rte_eal_process_type() == RTE_PROC_SECONDARY)
+ rte_panic("Secondary process type not supported.\n");
+
ret = register_eth_event_callback();
if (ret != 0)
rte_panic("Cannot register for ethdev events");
}
}
- if (start_port(RTE_PORT_ALL) != 0)
+ if (!no_device_start && start_port(RTE_PORT_ALL) != 0)
rte_exit(EXIT_FAILURE, "Start ports failed\n");
/* set all ports to promiscuous mode by default */