DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/ice: fix link status error when dev start
@ 2022-11-23 12:42 Shuang Han
  2022-12-13  1:50 ` Zhang, Qi Z
  0 siblings, 1 reply; 3+ messages in thread
From: Shuang Han @ 2022-11-23 12:42 UTC (permalink / raw)
  To: dev; +Cc: qiming.yang, qi.z.zhang, Shuang Han

ice_link_update get port link status and wait for one second when dev start.
If the device need almost one second for link up,
ice_link_update will enter the last rte_delay_ms(CHECK_INTERVAL) with link down,
in the meantime link interrupt raised,
the interrupt handler update dev->data->dev_link to up.
After a while the rte_delay_ms(CHECK_INTERVAL) finished
and update dev->data->dev_link to down.

Signed-off-by: Shuang Han <hanshuang87@gmail.com>
---
 drivers/net/ice/ice_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 0bc739d..316ba5a 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -4013,9 +4013,9 @@ static int ice_init_rss(struct ice_pf *pf)
 			      RTE_ETH_LINK_SPEED_FIXED);
 
 out:
-	ice_atomic_write_link_status(dev, &link);
 	if (link.link_status == old.link_status)
 		return -1;
+	ice_atomic_write_link_status(dev, &link);
 
 	return 0;
 }
-- 
1.8.3.1


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

end of thread, other threads:[~2022-12-13  3:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-23 12:42 [PATCH] net/ice: fix link status error when dev start Shuang Han
2022-12-13  1:50 ` Zhang, Qi Z
2022-12-13  3:12   ` Shuang Han

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