app/testpmd: fix port validation
authorMatan Azrad <matan@mellanox.com>
Tue, 30 Jan 2018 14:13:39 +0000 (14:13 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 31 Jan 2018 19:58:29 +0000 (20:58 +0100)
commit1ae1b8c72d33a1d11ba82178c924ee7df3fd6c9a
tree2ba292e6f678b07403a1f725363a49b58c7fef5a
parentdcd0c9c32b8d6c360af1fc8ff2f92bb713faae8e
app/testpmd: fix port validation

rte_eth_dev_is_valid_port() API validates each valid port from ethdev
point of view and may validate ports which should not be used by the
application.

Testpmd should use only the ports available through the
RTE_ETH_FOREACH_DEV iterator.

Replace rte_eth_dev_is_valid_port() usage by RTE_ETH_FOREACH_DEV
iterator usage for testpmd ports validation.

Fixes: 7d89b2610353 ("app/testpmd: use ethdev iterator to list devices")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
app/test-pmd/config.c