]> git.droids-corp.org - dpdk.git/blobdiff - examples/quota_watermark/qw/init.c
examples: take promiscuous mode switch result into account
[dpdk.git] / examples / quota_watermark / qw / init.c
index 19164385a4e70e0dc5b2c713f22a5ee2801b4084..5ebcc83ac31bf1b65d5fa7d120f50ef33458f422 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