examples: take promiscuous mode switch result into account
[dpdk.git] / examples / l2fwd-keepalive / main.c
index a051390..708f44e 100644 (file)
@@ -709,7 +709,11 @@ main(int argc, char **argv)
                                "rte_eth_dev_start:err=%d, port=%u\n",
                                  ret, portid);
 
-               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);
 
                printf("Port %u, MAC address: "
                        "%02X:%02X:%02X:%02X:%02X:%02X\n\n",