]> git.droids-corp.org - dpdk.git/blobdiff - examples/flow_classify/flow_classify.c
fix ethdev port id validation
[dpdk.git] / examples / flow_classify / flow_classify.c
index a65ef20f9f1473f4b1808915eae605e6814f44a0..d0e537e7d5ce37a9b078fa55e64c3bfdb9988edd 100644 (file)
@@ -200,7 +200,7 @@ port_init(uint8_t port, struct rte_mempool *mbuf_pool)
        struct rte_eth_dev_info dev_info;
        struct rte_eth_txconf txconf;
 
-       if (port >= rte_eth_dev_count())
+       if (rte_eth_dev_is_valid_port(port))
                return -1;
 
        rte_eth_dev_info_get(port, &dev_info);