ixgbevf can't get right link status unless
it check PF link status in wait mode.

Fixes: dc66e5fd01b9 ("net/ixgbe: improve link state check on VF")

Signed-off-by: Yanglong Wu <[email protected]>
---
v3:
change to wait mode in ixgbevf
---
v2:
no need to set link status again
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 26b192737..b90b352e3 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4006,7 +4006,8 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
                wait = 0;
 
        if (vf)
-               diag = ixgbevf_check_link(hw, &link_speed, &link_up, wait);
+               /* ixgbevf need to wait to get link status */
+               diag = ixgbevf_check_link(hw, &link_speed, &link_up, 1);
        else
                diag = ixgbe_check_link(hw, &link_speed, &link_up, wait);
 
-- 
2.11.0

Reply via email to