net/i40e: replace license text with SPDX tag
[dpdk.git] / examples / l2fwd-cat / l2fwd-cat.c
index ed48780..b34b40a 100644 (file)
@@ -20,7 +20,7 @@
 #define BURST_SIZE 32
 
 static const struct rte_eth_conf port_conf_default = {
-       .rxmode = { .max_rx_pkt_len = ETHER_MAX_LEN }
+       .rxmode = { .max_rx_pkt_len = RTE_ETHER_MAX_LEN }
 };
 
 /* l2fwd-cat.c: CAT enabled, basic DPDK skeleton forwarding example. */
@@ -73,7 +73,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
                return retval;
 
        /* Display the port MAC address. */
-       struct ether_addr addr;
+       struct rte_ether_addr addr;
        rte_eth_macaddr_get(port, &addr);
        printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8
                           " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n",
@@ -173,7 +173,7 @@ main(int argc, char *argv[])
        argv += ret;
 
        /* Check that there is an even number of ports to send/receive on. */
-       nb_ports = rte_eth_dev_count();
+       nb_ports = rte_eth_dev_count_avail();
        if (nb_ports < 2 || (nb_ports & 1))
                rte_exit(EXIT_FAILURE, "Error: number of ports must be even\n");