]> git.droids-corp.org - dpdk.git/blobdiff - examples/l3fwd/main.c
examples: take promiscuous mode switch result into account
[dpdk.git] / examples / l3fwd / main.c
index 3294ac2dab9b32cb74d2f977ffa85db194020483..9ed495ee0104acd3a11b939b6848b89578c35a6b 100644 (file)
@@ -1035,8 +1035,13 @@ main(int argc, char **argv)
                 * to itself through 2 cross-connected  ports of the
                 * target machine.
                 */
                 * 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);
+               }
        }
 
        printf("\n");
        }
 
        printf("\n");