examples: take promiscuous mode switch result into account
[dpdk.git] / examples / exception_path / main.c
index d7f3598..f3c0206 100644 (file)
@@ -473,7 +473,10 @@ init_port(uint16_t port)
        if (ret < 0)
                FATAL_ERROR("Could not start port%u (%d)", port, ret);
 
-       rte_eth_promiscuous_enable(port);
+       ret = rte_eth_promiscuous_enable(port);
+       if (ret != 0)
+               FATAL_ERROR("Could not enable promiscuous mode for port%u (%s)",
+                           port, rte_strerror(-ret));
 }
 
 /* Check the link status of all ports in up to 9s, and print them finally */