]> git.droids-corp.org - dpdk.git/blobdiff - examples/l2fwd-keepalive/main.c
examples: take promiscuous mode switch result into account
[dpdk.git] / examples / l2fwd-keepalive / main.c
index a0513906884638a4a164f7264c2ad98f66194950..708f44ee0d5146ce34a8438ddf5f2d919a91c3c3 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",