[dpdk-dev] [PATCH 02/11] net/failsafe: fix sub-device visibility

Gaëtan Rivet gaetan.rivet at 6wind.com
Wed May 9 14:13:20 CEST 2018


I think this patch should be swapped with the next commit
"ethdev: add doxygen comments for each state",
While the comment about "DEFERRED" would be edited in this one to become:
/** The deferred state is deprecated and replaced by ownership. */
                          ^^^^^^^^^^
Otherwise I agree that the device state is not to be used anymore.

On Wed, May 09, 2018 at 11:43:28AM +0200, Thomas Monjalon wrote:
> 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 at dpdk.org
> 
> Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
> Acked-by: Matan Azrad <matan at mellanox.com>

Acked-by: Gaetan Rivet <gaetan.rivet at 6wind.com>

> ---
>  drivers/net/failsafe/failsafe_eal.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/net/failsafe/failsafe_eal.c b/drivers/net/failsafe/failsafe_eal.c
> index ee89236f1..ce767703f 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;
> -- 
> 2.16.2
> 

-- 
Gaëtan Rivet
6WIND


More information about the dev mailing list