app/testpmd: reset port status on close notification
authorThomas Monjalon <thomas@monjalon.net>
Mon, 28 Sep 2020 23:14:33 +0000 (01:14 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 30 Sep 2020 17:19:14 +0000 (19:19 +0200)
commit85c6571c91031fcf0671580be32c7dcb61977270
tree5996869cae417308a4e070b96761bf3c15e9ca63
parentf820adfcb0b6d644dbc22794e4972f9749643960
app/testpmd: reset port status on close notification

Since rte_eth_dev_release_port() is called on all port close operations,
the event RTE_ETH_EVENT_DESTROY can be reliably used for resetting
the port status on the application side.

The intermediate state RTE_PORT_HANDLING is removed in close_port()
because a port can also be closed by a PMD in a device remove operation.

In case multiple ports are closed, calling remove_invalid_ports()
only once is enough.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
app/test-pmd/testpmd.c