app/crypto-perf: support lookaside IPsec
[dpdk.git] / examples / vm_power_manager / main.c
index 17b3840..e59fb7d 100644 (file)
@@ -121,10 +121,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 
        printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8
                           " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n",
-                       (unsigned int)port,
-                       addr.addr_bytes[0], addr.addr_bytes[1],
-                       addr.addr_bytes[2], addr.addr_bytes[3],
-                       addr.addr_bytes[4], addr.addr_bytes[5]);
+                       (unsigned int)port, RTE_ETHER_ADDR_BYTES(&addr));
 
        /* Enable RX in promiscuous mode for the Ethernet device. */
        retval = rte_eth_promiscuous_enable(port);
@@ -206,6 +203,7 @@ parse_args(int argc, char **argv)
                        }
                        if (branch_ratio <= 0.0 || branch_ratio > 100.0) {
                                printf("invalid branch ratio specified\n");
+                               free(oob_enable);
                                return -1;
                        }
                        for (i = 0; i < ci->core_count; i++) {
@@ -393,7 +391,7 @@ main(int argc, char **argv)
                                        "Cannot init port %"PRIu8 "\n",
                                        portid);
 
-                       for (w = 0; w < MAX_VFS; w++) {
+                       for (w = 0; w < RTE_POWER_MAX_VFS; w++) {
                                eth.addr_bytes[5] = w + 0xf0;
 
                                ret = -ENOTSUP;
@@ -467,5 +465,8 @@ main(int argc, char **argv)
 
        free(ci->cd);
 
+       /* clean up the EAL */
+       rte_eal_cleanup();
+
        return 0;
 }