examples: take promiscuous mode switch result into account
[dpdk.git] / examples / qos_meter / main.c
index 13c85e9..e8112c8 100644 (file)
@@ -439,9 +439,17 @@ main(int argc, char **argv)
        if (ret < 0)
                rte_exit(EXIT_FAILURE, "Port %d start error (%d)\n", port_tx, ret);
 
-       rte_eth_promiscuous_enable(port_rx);
+       ret = rte_eth_promiscuous_enable(port_rx);
+       if (ret != 0)
+               rte_exit(EXIT_FAILURE,
+                       "Port %d promiscuous mode enable error (%s)\n",
+                       port_rx, rte_strerror(-ret));
 
-       rte_eth_promiscuous_enable(port_tx);
+       ret = rte_eth_promiscuous_enable(port_tx);
+       if (ret != 0)
+               rte_exit(EXIT_FAILURE,
+                       "Port %d promiscuous mode enable error (%s)\n",
+                       port_rx, rte_strerror(-ret));
 
        /* App configuration */
        ret = app_configure_flow_table();