X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fvhost%2Fmain.c;h=312829e8b9301989b4f4b3eafe0b9635bab377ef;hb=0c0f5a98979e727dc7d7764a38d4784459bdb625;hp=794d12ba7e470ba3bdd82425d9680f2f94be107a;hpb=37fb306c1665efd52cdf2fc1fc99441b8e98aa9e;p=dpdk.git diff --git a/examples/vhost/main.c b/examples/vhost/main.c index 794d12ba7e..312829e8b9 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -336,10 +336,24 @@ port_init(uint16_t port) return retval; } - if (promiscuous) - rte_eth_promiscuous_enable(port); + if (promiscuous) { + retval = rte_eth_promiscuous_enable(port); + if (retval != 0) { + RTE_LOG(ERR, VHOST_PORT, + "Failed to enable promiscuous mode on port %u: %s\n", + port, rte_strerror(-retval)); + return retval; + } + } + + retval = rte_eth_macaddr_get(port, &vmdq_ports_eth_addr[port]); + if (retval < 0) { + RTE_LOG(ERR, VHOST_PORT, + "Failed to get MAC address on port %u: %s\n", + port, rte_strerror(-retval)); + return retval; + } - rte_eth_macaddr_get(port, &vmdq_ports_eth_addr[port]); RTE_LOG(INFO, VHOST_PORT, "Max virtio devices supported: %u\n", num_devices); RTE_LOG(INFO, VHOST_PORT, "Port %u MAC: %02"PRIx8" %02"PRIx8" %02"PRIx8 " %02"PRIx8" %02"PRIx8" %02"PRIx8"\n", @@ -1320,6 +1334,8 @@ print_stats(__rte_unused void *arg) } printf("===================================================\n"); + + fflush(stdout); } return NULL;