common/sfc_efx/base: allow creating invalid mport selectors
[dpdk.git] / examples / l2fwd-keepalive / main.c
index bc160c6..af59d51 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>
@@ -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);
@@ -732,12 +731,7 @@ main(int argc, char **argv)
                printf("Port %u, MAC address: "
                        RTE_ETHER_ADDR_PRT_FMT "\n\n",
                        portid,
-                       l2fwd_ports_eth_addr[portid].addr_bytes[0],
-                       l2fwd_ports_eth_addr[portid].addr_bytes[1],
-                       l2fwd_ports_eth_addr[portid].addr_bytes[2],
-                       l2fwd_ports_eth_addr[portid].addr_bytes[3],
-                       l2fwd_ports_eth_addr[portid].addr_bytes[4],
-                       l2fwd_ports_eth_addr[portid].addr_bytes[5]);
+                       RTE_ETHER_ADDR_BYTES(&l2fwd_ports_eth_addr[portid]));
 
                /* initialize port stats */
                memset(&port_statistics, 0, sizeof(port_statistics));