app/testpmd: check not detaching device twice
authorThomas Monjalon <thomas@monjalon.net>
Thu, 25 Oct 2018 15:11:13 +0000 (17:11 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 26 Oct 2018 20:14:06 +0000 (22:14 +0200)
commitf8e5baa2662d2cc89af25e8b077e4a6ae073754a
treef5fb70e2109bfa9f7d7e37a774eed0e2720d4c2e
parentaa1e69aebb12a57038f7ed5664605b7bcccbbe20
app/testpmd: check not detaching device twice

The command "port detach" is removing the EAL rte_device
of the ethdev port specified as parameter.
The function name and some comments are updated to make clear
that we are detaching the whole device.

After detaching, the pointer, which maps a port to its device,
is reset. This way, it is possible to check whether a port
is still associated to a (not removed) device.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
app/test-pmd/cmdline.c
app/test-pmd/testpmd.c
app/test-pmd/testpmd.h