[dpdk-dev] [PATCH 05/11] net/bonding: check eth dev stop status

Ferruh Yigit ferruh.yigit at intel.com
Wed Oct 14 19:45:05 CEST 2020


On 10/14/2020 2:29 PM, Andrew Rybchenko wrote:
> From: Ivan Ilchenko <Ivan.Ilchenko at oktetlabs.ru>
> 
> rte_eth_dev_stop() return value was changed from void to int,
> so this patch modify usage of this function across net/bonding
> according to new return type.
> 
> Signed-off-by: Ivan Ilchenko <Ivan.Ilchenko at oktetlabs.ru>
> Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>

<...>

> index 1c404b2edd..6cb03d40d7 100644
> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
> @@ -1694,7 +1694,12 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
>   	struct bond_dev_private *internals = bonded_eth_dev->data->dev_private;
>   
>   	/* Stop slave */
> -	rte_eth_dev_stop(slave_eth_dev->data->port_id);
> +	errval = rte_eth_dev_stop(slave_eth_dev->data->port_id);
> +	if (errval != 0) {
> +		RTE_BOND_LOG(ERR, "rte_eth_dev_stop: port %u, err (%d)",
> +			     slave_eth_dev->data->port_id, errval);
> +		return errval;
> +	}

The 'return' part of this patch seems removed in 11/11, better to not return at 
first place in this patch.


More information about the dev mailing list