examples: take promiscuous mode switch result into account
[dpdk.git] / examples / ip_fragmentation / main.c
index 6b83244..70139ee 100644 (file)
@@ -1038,7 +1038,11 @@ main(int argc, char **argv)
                        rte_exit(EXIT_FAILURE, "rte_eth_dev_start: err=%d, port=%d\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=%d\n",
+                               rte_strerror(-ret), portid);
 
                if (check_ptype(portid) == 0) {
                        rte_eth_add_rx_callback(portid, 0, cb_parse_ptype, NULL);