[dpdk-dev] [PATCH] net/mlx5: fix link status initialization

Nélio Laranjeiro nelio.laranjeiro at 6wind.com
Wed Apr 4 09:30:09 CEST 2018


On Tue, Apr 03, 2018 at 07:48:17AM +0300, Shahaf Shuler wrote:
> Following commit 7ba5320baa32 ("net/mlx5: fix link status behavior")
> 
> The initial link status is no longer set as part of the port start.
> This may cause application to query the link as down while in fact it was
> already up before the DPDK application start.

There is something wrong in this explanation, the application should
query the link using this same callback, why the PMD should call it?

> Fixes: 7ba5320baa32 ("net/mlx5: fix link status behavior")
> Cc: nelio.laranjeiro at 6wind.com
> 
> Signed-off-by: Shahaf Shuler <shahafs at mellanox.com>
> Acked-by: Yongseok Koh <yskoh at mellanox.com>
> ---
>  drivers/net/mlx5/mlx5.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
> index 7d58d66bb9..f954ea2862 100644
> --- a/drivers/net/mlx5/mlx5.c
> +++ b/drivers/net/mlx5/mlx5.c
> @@ -961,6 +961,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
>  		DRV_LOG(DEBUG, "port %u forcing Ethernet interface up",
>  			eth_dev->data->port_id);
>  		mlx5_set_link_up(eth_dev);
> +		mlx5_link_update(eth_dev, 1);
>  		/* Store device configuration on private structure. */
>  		priv->config = config;
>  		continue;
> -- 
> 2.12.0


-- 
Nélio Laranjeiro
6WIND


More information about the dev mailing list