regex/mlx5: remove RXP CSR file
[dpdk.git] / examples / l2fwd-keepalive / main.c
index d0d979f..bd0aa7e 100644 (file)
@@ -24,7 +24,6 @@
 #include <rte_memcpy.h>
 #include <rte_eal.h>
 #include <rte_launch.h>
-#include <rte_atomic.h>
 #include <rte_cycles.h>
 #include <rte_prefetch.h>
 #include <rte_lcore.h>
@@ -83,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,
        },
 };
 
@@ -177,11 +176,11 @@ l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid)
        eth = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
 
        /* 02:00:00:00:00:xx */
-       tmp = &eth->d_addr.addr_bytes[0];
+       tmp = &eth->dst_addr.addr_bytes[0];
        *((uint64_t *)tmp) = 0x000000000002 + ((uint64_t)dst_port << 40);
 
        /* src addr */
-       rte_ether_addr_copy(&l2fwd_ports_eth_addr[dst_port], &eth->s_addr);
+       rte_ether_addr_copy(&l2fwd_ports_eth_addr[dst_port], &eth->src_addr);
 
        buffer = tx_buffer[dst_port];
        sent = rte_eth_tx_buffer(dst_port, 0, buffer, m);
@@ -478,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;
                        }
@@ -507,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");
@@ -650,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,