examples: take promiscuous mode switch result into account
[dpdk.git] / examples / performance-thread / l3fwd-thread / main.c
index 00f5350..9e25f06 100644 (file)
@@ -3706,8 +3706,13 @@ main(int argc, char **argv)
                 * to itself through 2 cross-connected  ports of the
                 * target machine.
                 */
-               if (promiscuous_on)
-                       rte_eth_promiscuous_enable(portid);
+               if (promiscuous_on) {
+                       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);
+               }
        }
 
        for (i = 0; i < n_rx_thread; i++) {