DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/i40e: fix link status update error
@ 2018-05-10  2:26 Beilei Xing
  2018-05-10  2:36 ` Zhang, Qi Z
  0 siblings, 1 reply; 3+ messages in thread
From: Beilei Xing @ 2018-05-10  2:26 UTC (permalink / raw)
  To: roy.fan.zhang, qi.z.zhang; +Cc: dev, echaudro, stable, Keith Wiles

Link status is not updated correctly, link speed is 0
when link is up and link speed is not 0 when link is
down. This patch fixes the issue.

Fixes: eef2daf2e199 ("net/i40e: fix link update no wait")
Cc: echaudro@redhat.com
Cc: stable@dpdk.org

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 894505f..a563561 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2513,7 +2513,7 @@ update_link_no_wait(struct i40e_hw *hw, struct rte_eth_link *link)
 	reg_val &= I40E_REG_LINK_UP;
 	link->link_status = (reg_val == I40E_REG_LINK_UP) ? 1 : 0;
 
-	if (unlikely(link->link_status != 0))
+	if (unlikely(link->link_status == 0))
 		return;
 
 	/* Parse the link status */
@@ -2572,7 +2572,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))
-			return;
+			break;
 
 		rte_delay_ms(CHECK_INTERVAL);
 	} while (--rep_cnt);
-- 
2.5.5

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] net/i40e: fix link status update error
  2018-05-10  2:26 [dpdk-dev] [PATCH] net/i40e: fix link status update error Beilei Xing
@ 2018-05-10  2:36 ` Zhang, Qi Z
  2018-05-10 22:33   ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Zhang, Qi Z @ 2018-05-10  2:36 UTC (permalink / raw)
  To: Xing, Beilei, Zhang, Roy Fan; +Cc: dev, echaudro, stable, Wiles, Keith

> -----Original Message-----
> From: Xing, Beilei
> Sent: Thursday, May 10, 2018 10:26 AM
> To: Zhang, Roy Fan <roy.fan.zhang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; echaudro@redhat.com; stable@dpdk.org; Wiles, Keith
> <keith.wiles@intel.com>
> Subject: [PATCH] net/i40e: fix link status update error
> 
> Link status is not updated correctly, link speed is 0 when link is up and link
> speed is not 0 when link is down. This patch fixes the issue.
> 
> Fixes: eef2daf2e199 ("net/i40e: fix link update no wait")
> Cc: echaudro@redhat.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Keith Wiles <keith.wiles@intel.com>
> Signed-off-by: Beilei Xing <beilei.xing@intel.com>

Acked-by Qi Zhang <qi.z.zhang@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH] net/i40e: fix link status update error
  2018-05-10  2:36 ` Zhang, Qi Z
@ 2018-05-10 22:33   ` Ferruh Yigit
  0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2018-05-10 22:33 UTC (permalink / raw)
  To: Zhang, Qi Z, Xing, Beilei, Zhang, Roy Fan
  Cc: dev, echaudro, stable, Wiles, Keith

On 5/10/2018 3:36 AM, Zhang, Qi Z wrote:
>> -----Original Message-----
>> From: Xing, Beilei
>> Sent: Thursday, May 10, 2018 10:26 AM
>> To: Zhang, Roy Fan <roy.fan.zhang@intel.com>; Zhang, Qi Z
>> <qi.z.zhang@intel.com>
>> Cc: dev@dpdk.org; echaudro@redhat.com; stable@dpdk.org; Wiles, Keith
>> <keith.wiles@intel.com>
>> Subject: [PATCH] net/i40e: fix link status update error
>>
>> Link status is not updated correctly, link speed is 0 when link is up and link
>> speed is not 0 when link is down. This patch fixes the issue.
>>
>> Fixes: eef2daf2e199 ("net/i40e: fix link update no wait")
>> Cc: echaudro@redhat.com
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Keith Wiles <keith.wiles@intel.com>
>> Signed-off-by: Beilei Xing <beilei.xing@intel.com>
> 
> Acked-by Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-10 22:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-10  2:26 [dpdk-dev] [PATCH] net/i40e: fix link status update error Beilei Xing
2018-05-10  2:36 ` Zhang, Qi Z
2018-05-10 22:33   ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit

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).