examples: take promiscuous mode switch result into account
[dpdk.git] / examples / qos_sched / init.c
index cf9e8f4..dbdbdef 100644 (file)
@@ -163,7 +163,11 @@ app_init_port(uint16_t portid, struct rte_mempool *mp)
        } else {
                printf(" Link Down\n");
        }
-       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=%u\n",
+                       rte_strerror(-ret), portid);
 
        /* mark port as initialized */
        app_inited_port_mask |= 1u << portid;