examples: take promiscuous mode switch result into account
[dpdk.git] / examples / quota_watermark / qw / init.c
index 1916438..5ebcc83 100644 (file)
@@ -24,7 +24,6 @@
 static struct rte_eth_conf port_conf = {
                .rxmode = {
                        .split_hdr_size = 0,
-                       .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
                },
                .txmode = {
                        .mq_mode = ETH_DCB_NONE,
@@ -104,7 +103,11 @@ void configure_eth_port(uint16_t port_id)
                                (unsigned int) port_id, ret);
 
        /* Put it in promiscuous mode */
-       rte_eth_promiscuous_enable(port_id);
+       ret = rte_eth_promiscuous_enable(port_id);
+       if (ret != 0)
+               rte_exit(EXIT_FAILURE,
+                       "Failed to enable promiscuous mode for port %u: %s\n",
+                       port_id, rte_strerror(-ret));
 }
 
 void