raw/ifpga: fix file handle leak
[dpdk.git] / examples / l2fwd-keepalive / main.c
index af59d51..bd0aa7e 100644 (file)
@@ -82,7 +82,7 @@ static struct rte_eth_conf port_conf = {
                .split_hdr_size = 0,
        },
        .txmode = {
-               .mq_mode = ETH_MQ_TX_NONE,
+               .mq_mode = RTE_ETH_MQ_TX_NONE,
        },
 };
 
@@ -477,7 +477,7 @@ check_all_ports_link_status(uint32_t port_mask)
                                continue;
                        }
                        /* clear all_ports_up flag if any link down */
-                       if (link.link_status == ETH_LINK_DOWN) {
+                       if (link.link_status == RTE_ETH_LINK_DOWN) {
                                all_ports_up = 0;
                                break;
                        }
@@ -506,8 +506,7 @@ dead_core(__rte_unused void *ptr_data, const int id_core)
        if (terminate_signal_received)
                return;
        printf("Dead core %i - restarting..\n", id_core);
-       if (rte_eal_get_lcore_state(id_core) == FINISHED) {
-               rte_eal_wait_lcore(id_core);
+       if (rte_eal_get_lcore_state(id_core) == WAIT) {
                rte_eal_remote_launch(l2fwd_launch_one_lcore, NULL, id_core);
        } else {
                printf("..false positive!\n");
@@ -649,9 +648,9 @@ main(int argc, char **argv)
                                "Error during getting device (port %u) info: %s\n",
                                portid, strerror(-ret));
 
-               if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
+               if (dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE)
                        local_port_conf.txmode.offloads |=
-                               DEV_TX_OFFLOAD_MBUF_FAST_FREE;
+                               RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE;
                ret = rte_eth_dev_configure(portid, 1, 1, &local_port_conf);
                if (ret < 0)
                        rte_exit(EXIT_FAILURE,