[dpdk-dev] [PATCH v3 14/54] net/failsafe: check status of getting ethdev info

Gaëtan Rivet gaetan.rivet at 6wind.com
Fri Sep 6 11:28:54 CEST 2019


Hi Andrew, Ivan,

On Fri, Sep 06, 2019 at 08:30:26AM +0100, Andrew Rybchenko wrote:
> From: Ivan Ilchenko <Ivan.Ilchenko at oktetlabs.ru>
> 
> rte_eth_dev_info_get() return value was changed from void to
> int, so this patch modify rte_eth_dev_info_get() usage across
> net/failsafe according to its new return type.
> 
> Signed-off-by: Ivan Ilchenko <Ivan.Ilchenko at oktetlabs.ru>
> Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>
> Acked-by: Gaetan Rivet <gaetan.rivet at 6wind.com>
> ---
>  drivers/net/failsafe/failsafe_ops.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c
> index 96e05d4dc4..b3df626aaa 100644
> --- a/drivers/net/failsafe/failsafe_ops.c
> +++ b/drivers/net/failsafe/failsafe_ops.c
> @@ -866,6 +866,7 @@ fs_dev_infos_get(struct rte_eth_dev *dev,
>  {
>  	struct sub_device *sdev;
>  	uint8_t i;
> +	int ret;
>  
>  	/* Use maximum upper bounds by default */
>  	infos->max_rx_pktlen = UINT32_MAX;
> @@ -933,7 +934,9 @@ fs_dev_infos_get(struct rte_eth_dev *dev,
>  	FOREACH_SUBDEV_STATE(sdev, i, dev, DEV_PROBED) {
>  		struct rte_eth_dev_info sub_info;
>  
> -		rte_eth_dev_info_get(PORT_ID(sdev), &sub_info);
> +		ret = rte_eth_dev_info_get(PORT_ID(sdev), &sub_info);
> +		if (ret != 0)
> +			return;

Similar to the promiscuous thread, I actually forgot about fs_err();
You should use it here as well.

>  
>  		fs_dev_merge_info(infos, &sub_info);
>  	}
> -- 
> 2.17.1
> 

-- 
Gaëtan Rivet
6WIND


More information about the dev mailing list