X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest%2Ftest_event_eth_rx_adapter.c;h=dd3bce71b8761ca53a02214264d1dd879a36b91c;hb=f62093e7390d39c160205a4915ce0b4de116a0c3;hp=38f5c039fe18bfd2a6c2c02011660297f445b166;hpb=64fc990877cdfe1973a18f47e6887e8a141a6efb;p=dpdk.git diff --git a/app/test/test_event_eth_rx_adapter.c b/app/test/test_event_eth_rx_adapter.c index 38f5c039fe..dd3bce71b8 100644 --- a/app/test/test_event_eth_rx_adapter.c +++ b/app/test/test_event_eth_rx_adapter.c @@ -45,7 +45,9 @@ port_init_common(uint16_t port, const struct rte_eth_conf *port_conf, retval = rte_eth_dev_configure(port, 0, 0, port_conf); - rte_eth_dev_info_get(port, &dev_info); + retval = rte_eth_dev_info_get(port, &dev_info); + if (retval != 0) + return retval; default_params.rx_rings = RTE_MIN(dev_info.max_rx_queues, MAX_NUM_RX_QUEUE); @@ -78,8 +80,10 @@ port_init_common(uint16_t port, const struct rte_eth_conf *port_conf, return retval; /* Display the port MAC address. */ - struct ether_addr addr; - rte_eth_macaddr_get(port, &addr); + struct rte_ether_addr addr; + retval = rte_eth_macaddr_get(port, &addr); + if (retval < 0) + return retval; printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n", (unsigned int)port, @@ -88,7 +92,9 @@ port_init_common(uint16_t port, const struct rte_eth_conf *port_conf, addr.addr_bytes[4], addr.addr_bytes[5]); /* Enable RX in promiscuous mode for the Ethernet device. */ - rte_eth_promiscuous_enable(port); + retval = rte_eth_promiscuous_enable(port); + if (retval != 0) + return retval; return 0; }