{
uint64_t current_time, last_time = rte_rdtsc();
uint32_t lcore_id = rte_lcore_id();
{
uint64_t current_time, last_time = rte_rdtsc();
uint32_t lcore_id = rte_lcore_id();
/* parse hexadecimal string */
pm = strtoul(portmask, &end, 16);
if ((portmask[0] == '\0') || (end == NULL) || (*end != '\0'))
/* parse hexadecimal string */
pm = strtoul(portmask, &end, 16);
if ((portmask[0] == '\0') || (end == NULL) || (*end != '\0'))
if (ret < 0)
rte_exit(EXIT_FAILURE, "Port %d start error (%d)\n", port_tx, ret);
if (ret < 0)
rte_exit(EXIT_FAILURE, "Port %d start error (%d)\n", port_tx, ret);
- rte_eth_promiscuous_enable(port_rx);
+ ret = rte_eth_promiscuous_enable(port_rx);
+ if (ret != 0)
+ rte_exit(EXIT_FAILURE,
+ "Port %d promiscuous mode enable error (%s)\n",
+ port_rx, rte_strerror(-ret));
- rte_eth_promiscuous_enable(port_tx);
+ ret = rte_eth_promiscuous_enable(port_tx);
+ if (ret != 0)
+ rte_exit(EXIT_FAILURE,
+ "Port %d promiscuous mode enable error (%s)\n",
+ port_rx, rte_strerror(-ret));
rte_exit(EXIT_FAILURE, "Invalid configure flow table\n");
/* Launch per-lcore init on every lcore */
rte_exit(EXIT_FAILURE, "Invalid configure flow table\n");
/* Launch per-lcore init on every lcore */
- rte_eal_mp_remote_launch(main_loop, NULL, CALL_MASTER);
- RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+ rte_eal_mp_remote_launch(main_loop, NULL, CALL_MAIN);
+ RTE_LCORE_FOREACH_WORKER(lcore_id) {