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: a9dbe18022 ("fix ethdev port id validation")

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
This commit is contained in:
Bernard Iremonger 2018-04-30 14:43:54 +01:00 committed by Thomas Monjalon
parent 3eb9af3416
commit 211992f3b7

View 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 (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);