DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: SteveX Yang <stevex.yang@intel.com>, dev@dpdk.org
Cc: qiming.yang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com
Subject: Re: [dpdk-dev] [PATCH v3 2/6] net/iavf: fix incorrect link status when speed is undefined
Date: Mon, 7 Sep 2020 15:39:35 +0100
Message-ID: <807d9e91-5366-22e4-fb18-c83b014c08d1@intel.com> (raw)
In-Reply-To: <20200904072907.10648-3-stevex.yang@intel.com>

On 9/4/2020 8:29 AM, SteveX Yang wrote:
> When PF is put in no-carrier state, iavf VFs will switch to
> "in carrier" state due to a link up + a link speed set to 0
> (default value if no speed detected).
> 
> To be consistent with linux drivers on which PF and VFs are in
> same carrier state, updates a link status of VF only if link is up
> and speed is different from undefined.
> 
> Fixes: 48de41ca11f0 ("net/avf: enable link status update")
> 
> Signed-off-by: SteveX Yang <stevex.yang@intel.com>
> ---
>  drivers/net/iavf/iavf_ethdev.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
> index f9dd5710c..ae508f2f0 100644
> --- a/drivers/net/iavf/iavf_ethdev.c
> +++ b/drivers/net/iavf/iavf_ethdev.c
> @@ -620,8 +620,9 @@ iavf_dev_link_update(struct rte_eth_dev *dev,
>  	}
>  
>  	new_link.link_duplex = ETH_LINK_FULL_DUPLEX;
> -	new_link.link_status = vf->link_up ? ETH_LINK_UP :
> -					     ETH_LINK_DOWN;
> +	new_link.link_status = (vf->link_up &&
> +				new_link.link_speed != ETH_SPEED_NUM_NONE)
> +				? ETH_LINK_UP : ETH_LINK_DOWN;
>  	new_link.link_autoneg = !(dev->data->dev_conf.link_speeds &
>  				ETH_LINK_SPEED_FIXED);
>  
> 

Hi Steve,

There is a new 'ETH_SPEED_NUM_UNKNOWN' macro, and can you please check how it is
used for 'i40e' [1], can same done here?


[1]
https://git.dpdk.org/next/dpdk-next-net/commit/?id=bd1868e46d1b

  reply	other threads:[~2020-09-07 14:39 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-11  7:59 [dpdk-dev] [PATCH 0/7] Bugs Porting from I40evf For IAVF Feature SteveX Yang
2020-08-11  7:59 ` [dpdk-dev] [PATCH 1/7] net/iavf: fix scattered Rx enabling SteveX Yang
2020-08-11  7:59 ` [dpdk-dev] [PATCH 2/7] net/iavf: set speed to undefined for default case SteveX Yang
2020-08-11  7:59 ` [dpdk-dev] [PATCH 3/7] net/iavf: fix port start during configuration restore SteveX Yang
2020-08-11  7:59 ` [dpdk-dev] [PATCH 4/7] net/iavf: fix setting of MAC address on iavf SteveX Yang
2020-08-11  7:59 ` [dpdk-dev] [PATCH 5/7] net/iavf: fix multiple interrupts for VF SteveX Yang
2020-08-11  7:59 ` [dpdk-dev] [PATCH 6/7] net/iavf: downgrade error log SteveX Yang
2020-08-11  7:59 ` [dpdk-dev] [PATCH 7/7] net/iavf: fix port close SteveX Yang
2020-08-12  2:57   ` Wu, Jingjing
2020-08-27  1:01 ` [dpdk-dev] [PATCH v2 0/6] These patches are bugs porting from i40evf to SteveX Yang
2020-08-27  1:14 ` SteveX Yang
2020-08-27  1:14   ` [dpdk-dev] [PATCH v2 1/6] net/iavf: fix scattered Rx enabling SteveX Yang
2020-08-27  2:49     ` Xing, Beilei
2020-08-27  1:14   ` [dpdk-dev] [PATCH v2 2/6] net/iavf: set speed to undefined for default case SteveX Yang
2020-08-27  6:46     ` Xing, Beilei
2020-08-27  1:14   ` [dpdk-dev] [PATCH v2 3/6] net/iavf: fix port start during configuration restore SteveX Yang
2020-08-27  1:14   ` [dpdk-dev] [PATCH v2 4/6] net/iavf: fix setting of MAC address on iavf SteveX Yang
2020-08-27  1:14   ` [dpdk-dev] [PATCH v2 5/6] net/iavf: fix multiple interrupts for VF SteveX Yang
2020-08-27  1:14   ` [dpdk-dev] [PATCH v2 6/6] net/iavf: downgrade error log SteveX Yang
2020-09-04  7:29   ` [dpdk-dev] [PATCH v3 0/6] Bugs Porting from I40evf For IAVF Feature SteveX Yang
2020-09-04  7:29     ` [dpdk-dev] [PATCH v3 1/6] net/iavf: fix scattered Rx enabling SteveX Yang
2020-09-04  7:29     ` [dpdk-dev] [PATCH v3 2/6] net/iavf: fix incorrect link status when speed is undefined SteveX Yang
2020-09-07 14:39       ` Ferruh Yigit [this message]
2020-09-04  7:29     ` [dpdk-dev] [PATCH v3 3/6] net/iavf: fix port start during configuration restore SteveX Yang
2020-09-04  7:29     ` [dpdk-dev] [PATCH v3 4/6] net/iavf: fix setting of MAC address on iavf SteveX Yang
2020-09-04  7:29     ` [dpdk-dev] [PATCH v3 5/6] net/iavf: fix multiple interrupts for VF SteveX Yang
2020-09-08  7:53       ` Xu, Ting
2020-09-11  9:04       ` Zhang, Qi Z
2020-09-11 12:07         ` Ferruh Yigit
2020-09-04  7:29     ` [dpdk-dev] [PATCH v3 6/6] net/iavf: downgrade error log SteveX Yang
2020-09-04  8:17     ` [dpdk-dev] [PATCH v3 0/6] Bugs Porting from I40evf For IAVF Feature Xing, Beilei
2020-09-07  5:58       ` Zhang, Qi Z
2020-09-07 15:23         ` Ferruh Yigit

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=807d9e91-5366-22e4-fb18-c83b014c08d1@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=stevex.yang@intel.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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git