patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Zhang, Roy Fan" <roy.fan.zhang@intel.com>
To: "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [PATCH] net/i40e: fix link status update
Date: Tue, 29 May 2018 14:47:57 +0000	[thread overview]
Message-ID: <9F7182E3F746AB4EA17801C148F3C604333FBB2F@IRSMSX101.ger.corp.intel.com> (raw)
In-Reply-To: <20180529135443.85160-1-roy.fan.zhang@intel.com>

Please ignore this patch as I accidently sent it...
Sorry for any convenience I caused.

> -----Original Message-----
> From: Zhang, Roy Fan
> Sent: Tuesday, May 29, 2018 2:55 PM
> To: Zhang, Helin <helin.zhang@intel.com>; Zhang, Roy Fan
> <roy.fan.zhang@intel.com>
> Cc: stable@dpdk.org
> Subject: [PATCH] net/i40e: fix link status update
> 
> This patch fixes link status update problem in interrupt mode.
> 
> Fixes: eef2daf2e199 ("net/i40e: fix link update no wait")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
> ---
>  drivers/net/i40e/i40e_ethdev.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index 7d4f1c9da..13c5d3296 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -2522,7 +2522,7 @@ i40e_dev_set_link_down(struct rte_eth_dev
> *dev)  }
> 
>  static __rte_always_inline void
> -update_link_no_wait(struct i40e_hw *hw, struct rte_eth_link *link)
> +update_link_reg(struct i40e_hw *hw, struct rte_eth_link *link)
>  {
>  /* Link status registers and values*/
>  #define I40E_PRTMAC_LINKSTA		0x001E2420
> @@ -2576,8 +2576,8 @@ update_link_no_wait(struct i40e_hw *hw, struct
> rte_eth_link *link)  }
> 
>  static __rte_always_inline void
> -update_link_wait(struct i40e_hw *hw, struct rte_eth_link *link,
> -	bool enable_lse)
> +update_link_aq(struct i40e_hw *hw, struct rte_eth_link *link,
> +	bool enable_lse, int wait_to_complete)
>  {
>  #define CHECK_INTERVAL             100  /* 100ms */
>  #define MAX_REPEAT_TIME            10  /* 1s (10 * 100ms) in total */
> @@ -2601,7 +2601,7 @@ update_link_wait(struct i40e_hw *hw, struct
> rte_eth_link *link,
>  		}
> 
>  		link->link_status = link_status.link_info & I40E_AQ_LINK_UP;
> -		if (unlikely(link->link_status != 0))
> +		if (!wait_to_complete || link->link_status)
>  			break;
> 
>  		rte_delay_ms(CHECK_INTERVAL);
> @@ -2649,10 +2649,10 @@ i40e_dev_link_update(struct rte_eth_dev *dev,
>  	link.link_autoneg = !(dev->data->dev_conf.link_speeds &
>  			ETH_LINK_SPEED_FIXED);
> 
> -	if (!wait_to_complete)
> -		update_link_no_wait(hw, &link);
> +	if (!wait_to_complete && !enable_lse)
> +		update_link_reg(hw, &link);
>  	else
> -		update_link_wait(hw, &link, enable_lse);
> +		update_link_aq(hw, &link, enable_lse, wait_to_complete);
> 
>  	ret = rte_eth_linkstatus_set(dev, &link);
>  	i40e_notify_all_vfs_link_status(dev);
> --
> 2.13.6

  reply	other threads:[~2018-05-29 14:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-29 13:54 Fan Zhang
2018-05-29 14:47 ` Zhang, Roy Fan [this message]
2018-05-29 16:23 Fan Zhang

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=9F7182E3F746AB4EA17801C148F3C604333FBB2F@IRSMSX101.ger.corp.intel.com \
    --to=roy.fan.zhang@intel.com \
    --cc=stable@dpdk.org \
    /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).