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: 263333bbb7 ("i40e: fix link status timeout")
Cc: stable@dpdk.org

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit is contained in:
Qiming Yang 2017-02-08 17:14:24 +08:00 committed by Ferruh Yigit
parent 76bf1574e3
commit 0046ba5c27

View File

@ -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;