net/hns3: refactor queue info dump
[dpdk.git] / examples / packet_ordering / main.c
index ff67074..99e67ef 100644 (file)
@@ -294,10 +294,10 @@ configure_eth_port(uint16_t port_id)
                return 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)
                port_conf.txmode.offloads |=
-                       DEV_TX_OFFLOAD_MBUF_FAST_FREE;
-       ret = rte_eth_dev_configure(port_id, rxRings, txRings, &port_conf_default);
+                       RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE;
+       ret = rte_eth_dev_configure(port_id, rxRings, txRings, &port_conf);
        if (ret != 0)
                return ret;
 
@@ -335,10 +335,7 @@ configure_eth_port(uint16_t port_id)
 
        printf("Port %u MAC: %02"PRIx8" %02"PRIx8" %02"PRIx8
                        " %02"PRIx8" %02"PRIx8" %02"PRIx8"\n",
-                       port_id,
-                       addr.addr_bytes[0], addr.addr_bytes[1],
-                       addr.addr_bytes[2], addr.addr_bytes[3],
-                       addr.addr_bytes[4], addr.addr_bytes[5]);
+                       port_id, RTE_ETHER_ADDR_BYTES(&addr));
 
        ret = rte_eth_promiscuous_enable(port_id);
        if (ret != 0)
@@ -689,7 +686,7 @@ main(int argc, char **argv)
        if (ret < 0)
                rte_exit(EXIT_FAILURE, "Invalid packet_ordering arguments\n");
 
-       /* Check if we have enought cores */
+       /* Check if we have enough cores */
        if (rte_lcore_count() < 3)
                rte_exit(EXIT_FAILURE, "Error, This application needs at "
                                "least 3 logical cores to run:\n"
@@ -783,5 +780,9 @@ main(int argc, char **argv)
        }
 
        print_stats();
+
+       /* clean up the EAL */
+       rte_eal_cleanup();
+
        return 0;
 }