examples: take promiscuous mode switch result into account
[dpdk.git] / examples / l2fwd-jobstats / main.c
index 5fcba5c..3dd6e45 100644 (file)
@@ -916,7 +916,14 @@ main(int argc, char **argv)
 
                printf("done:\n");
 
-               rte_eth_promiscuous_enable(portid);
+               ret = rte_eth_promiscuous_enable(portid);
+               if (ret != 0) {
+                       rte_exit(EXIT_FAILURE,
+                                "rte_eth_promiscuous_enable:err=%s, port=%u\n",
+                                rte_strerror(-ret), portid);
+                       return ret;
+
+               }
 
                printf("Port %u, MAC address: %02X:%02X:%02X:%02X:%02X:%02X\n\n",
                                portid,