ethdev: simplify port state comparisons
authorThomas Monjalon <thomas@monjalon.net>
Mon, 1 Apr 2019 02:26:57 +0000 (04:26 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 5 Apr 2019 15:45:22 +0000 (17:45 +0200)
commita52aa40b4161a027ce1b31bde7c6f47b93bb26b7
tree568440dd7af051a75039cc3a0eb850f256f7bdb3
parent0b259b8e965575cdbd622c48b6ae5b04bed7aa73
ethdev: simplify port state comparisons

There are three states for an ethdev port.
Checking that the port is unused looks simpler than
checking it is neither attached nor removed.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Tested-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
lib/librte_ethdev/rte_ethdev.c