fix ethdev port id validation
[dpdk.git] / examples / flow_classify / flow_classify.c
index a65ef20..d0e537e 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);