X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fdistributor%2Fmain.c;fp=examples%2Fdistributor%2Fmain.c;h=2e6b09d215684cde84d31245861e4bb44635ab5f;hb=a9dbe180222680edf8c49e86791f972549ce5be3;hp=62831a05c7a73fcf7008ef7dc6aaf8abae0c3211;hpb=8728ccf37615904cf23fb8763895b05c9a3c6b0c;p=dpdk.git diff --git a/examples/distributor/main.c b/examples/distributor/main.c index 62831a05c7..2e6b09d215 100644 --- a/examples/distributor/main.c +++ b/examples/distributor/main.c @@ -116,7 +116,7 @@ port_init(uint16_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);