* [dpdk-dev] [PATCH] ixgbe: logic change in ixgbe_check_mac_link_vf().
@ 2014-10-31 21:34 lee.roberts
2014-12-19 10:31 ` Balazs Nemeth
0 siblings, 1 reply; 2+ messages in thread
From: lee.roberts @ 2014-10-31 21:34 UTC (permalink / raw)
To: dev
From: Lee Roberts <lee.roberts@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-19 10:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-31 21:34 [dpdk-dev] [PATCH] ixgbe: logic change in ixgbe_check_mac_link_vf() lee.roberts
2014-12-19 10:31 ` Balazs Nemeth
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).