net/failsafe: fix sub-device visibility
authorThomas Monjalon <thomas@monjalon.net>
Thu, 10 May 2018 23:58:27 +0000 (01:58 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 14 May 2018 21:31:52 +0000 (22:31 +0100)
commit195814264037593031fbec73d3b989c71e149768
tree1e4587bc7b88c4e0be9ecdc66ce2fdb2e6c80a83
parent444e2b78295d340cc33ea8f3bf24d1222ef8e824
net/failsafe: fix sub-device visibility

The iterator function rte_eth_find_next_owned_by(), used by the
iterator macro RTE_ETH_FOREACH_DEV_OWNED_BY, are ignoring the devices
which are neither ATTACHED nor REMOVED. Thus sub-devices, having
the state DEFERRED, cannot be seen with the ethdev iterator.
The state RTE_ETH_DEV_DEFERRED can be replaced by
RTE_ETH_DEV_ATTACHED + owner.

Fixes: dcd0c9c32b8d ("net/failsafe: use ownership mechanism for slaves")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
drivers/net/failsafe/failsafe_eal.c