From: Lee Roberts <lee.robe...@hp.com>

This patch corrects an issue where "testpmd" run against
ixgbevf ports in the host OS reports speed as 100 Mbps
and half-duplex.

If the link status is still needed, set speed to zero,
change ret_val and goto quick exit.  Otherwise, continue
processing to get the correct link speed.

Signed-off by: Lee Roberts <lee.roberts at hp.com>
---
 lib/librte_pmd_ixgbe/ixgbe/ixgbe_vf.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_vf.c 
b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_vf.c
index e6b6c51..04a962b 100644
--- a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_vf.c
+++ b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_vf.c
@@ -550,11 +550,12 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, 
ixgbe_link_speed *speed,
        UNREFERENCED_1PARAMETER(autoneg_wait_to_complete);

        /* If we were hit with a reset drop the link */
-       if (!mbx->ops.check_for_rst(hw, 0) || !mbx->timeout)
+       if (!mbx->ops.check_for_rst(hw, 0) || !mbx->timeout) {
                mac->get_link_status = true;
-
-       if (!mac->get_link_status)
+               *speed = 0;
+               ret_val = -1;
                goto out;
+       }

        /* if link status is down no point in checking to see if pf is up */
        links_reg = IXGBE_READ_REG(hw, IXGBE_VFLINKS);
-- 
1.7.10.4

Reply via email to