From: Bernard Iremonger Date: Mon, 30 Apr 2018 13:43:54 +0000 (+0100) Subject: examples/flow_classify: fix validation in port init X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=211992f3b7df5d6d8f1dbefc48bc37a6d5398fbc;p=dpdk.git examples/flow_classify: fix validation in port init The port_init function calls the rte_eth_dev_is_valid_port function. This function now returns 1 if the port state is attached. A return value of 1 now means a valid port. Fixes: a9dbe1802226 ("fix ethdev port id validation") Signed-off-by: Bernard Iremonger --- diff --git a/examples/flow_classify/flow_classify.c b/examples/flow_classify/flow_classify.c index 3b087ce768..6412fe4403 100644 --- a/examples/flow_classify/flow_classify.c +++ b/examples/flow_classify/flow_classify.c @@ -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 (rte_eth_dev_is_valid_port(port)) + if (!rte_eth_dev_is_valid_port(port)) return -1; rte_eth_dev_info_get(port, &dev_info);