DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: "Mike Manning" <mmanning@vyatta.att-mail.com>,
	"Nélio Laranjeiro" <nelio.laranjeiro@6wind.com>,
	matan@mellanox.com, viacheslavo@mellanox.com,
	shahafs@mellanox.com, rasland@mellanox.com
Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix eagain on admin down
Date: Thu, 12 Dec 2019 23:30:38 +0100	[thread overview]
Message-ID: <1868349.qFeMPqzfeV@xps> (raw)
In-Reply-To: <20191209182314.4698-1-mmanning@vyatta.att-mail.com>

+Cc maintainers

09/12/2019 19:23, Mike Manning:
> The check in mlx5_link_update_unlocked_gs() returns -EAGAIN if link
> status does not correspond to link speed. If status is DOWN, the speed
> is expected to be ETH_SPEED_NUM_NONE (0). But as the link speed is -1
> on admin down, modify the check to account for this.
> 
> Fixes: cfee94752b8f ("net/mlx5: fix link status to use wait to complete")
> Cc: Nélio Laranjeiro <nelio.laranjeiro@6wind.com>
> 
> Signed-off-by: Mike Manning <mmanning@vyatta.att-mail.com>
> ---
>  drivers/net/mlx5/mlx5_ethdev.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
> index d80ae458b..6ef2dfd74 100644
> --- a/drivers/net/mlx5/mlx5_ethdev.c
> +++ b/drivers/net/mlx5/mlx5_ethdev.c
> @@ -1031,8 +1031,8 @@ mlx5_link_update_unlocked_gs(struct rte_eth_dev *dev,
>  				ETH_LINK_HALF_DUPLEX : ETH_LINK_FULL_DUPLEX);
>  	dev_link.link_autoneg = !(dev->data->dev_conf.link_speeds &
>  				  ETH_LINK_SPEED_FIXED);
> -	if (((dev_link.link_speed && !dev_link.link_status) ||
> -	     (!dev_link.link_speed && dev_link.link_status))) {
> +	if ((((int)dev_link.link_speed > 0 && !dev_link.link_status) ||
> +	     ((int)dev_link.link_speed <= 0 && dev_link.link_status))) {
>  		rte_errno = EAGAIN;
>  		return -rte_errno;
>  	}
> 






  reply	other threads:[~2019-12-12 22:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-09 18:23 Mike Manning
2019-12-12 22:30 ` Thomas Monjalon [this message]
2019-12-13 14:43   ` Slava Ovsiienko
2019-12-13 15:11     ` Mike Manning
2019-12-14  9:40       ` Slava Ovsiienko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1868349.qFeMPqzfeV@xps \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=matan@mellanox.com \
    --cc=mmanning@vyatta.att-mail.com \
    --cc=nelio.laranjeiro@6wind.com \
    --cc=rasland@mellanox.com \
    --cc=shahafs@mellanox.com \
    --cc=viacheslavo@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).