From 0046ba5c27bd50edc695a6760355915b89bc60e0 Mon Sep 17 00:00:00 2001 From: Qiming Yang Date: Wed, 8 Feb 2017 17:14:24 +0800 Subject: [PATCH] net/i40e: fix link update delay Fix the redundant delay in function link update. There is no need to call rte_delay_ms and hold CPU for 100ms when link status is up. Fixes: 263333bbb7a9 ("i40e: fix link status timeout") Cc: stable@dpdk.org Signed-off-by: Qiming Yang Reviewed-by: Ferruh Yigit --- 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 9b506512e3..303027b6a5 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -2220,11 +2220,11 @@ i40e_dev_link_update(struct rte_eth_dev *dev, } link.link_status = link_status.link_info & I40E_AQ_LINK_UP; - if (!wait_to_complete) + if (!wait_to_complete || link.link_status) break; rte_delay_ms(CHECK_INTERVAL); - } while (!link.link_status && rep_cnt--); + } while (--rep_cnt); if (!link.link_status) goto out; -- 2.20.1