From: Thomas Monjalon Date: Thu, 10 May 2018 23:58:27 +0000 (+0200) Subject: net/failsafe: fix sub-device visibility X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=195814264037593031fbec73d3b989c71e149768;p=dpdk.git 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 Acked-by: Matan Azrad Acked-by: Gaetan Rivet Reviewed-by: Andrew Rybchenko Reviewed-by: Stephen Hemminger --- diff --git a/drivers/net/failsafe/failsafe_eal.c b/drivers/net/failsafe/failsafe_eal.c index ee89236f1a..ce767703f7 100644 --- a/drivers/net/failsafe/failsafe_eal.c +++ b/drivers/net/failsafe/failsafe_eal.c @@ -98,7 +98,6 @@ fs_bus_init(struct rte_eth_dev *dev) SUB_ID(sdev) = i; sdev->fs_dev = dev; sdev->dev = ETH(sdev)->device; - ETH(sdev)->state = RTE_ETH_DEV_DEFERRED; sdev->state = DEV_PROBED; } return 0;