]> git.droids-corp.org - dpdk.git/blobdiff - examples/ptpclient/ptpclient.c
examples: take promiscuous mode switch result into account
[dpdk.git] / examples / ptpclient / ptpclient.c
index bc427a526c6524f4e60ad77a92d749b2eb36ac6d..6e273f644fad434bbef407bda8e16bb03c4c0787 100644 (file)
@@ -247,7 +247,12 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
        }
 
        /* Enable RX in promiscuous mode for the Ethernet device. */
-       rte_eth_promiscuous_enable(port);
+       retval = rte_eth_promiscuous_enable(port);
+       if (retval != 0) {
+               printf("Promiscuous mode enable failed: %s\n",
+                       rte_strerror(-retval));
+               return retval;
+       }
 
        return 0;
 }