]> git.droids-corp.org - dpdk.git/blobdiff - examples/performance-thread/l3fwd-thread/main.c
examples: take promiscuous mode switch result into account
[dpdk.git] / examples / performance-thread / l3fwd-thread / main.c
index 00f535053c862b59b71be54e97207662bbb068a3..9e25f064ed1e8fbed634b9a2f8ae3ee197d41e05 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++) {