DPDK patches and discussions
 help / color / mirror / Atom feed
From: lee.roberts@hp.com
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] ixgbe: logic change in ixgbe_check_mac_link_vf().
Date: Fri, 31 Oct 2014 15:34:49 -0600	[thread overview]
Message-ID: <1414791289-6260-1-git-send-email-lee.roberts@hp.com> (raw)

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

             reply	other threads:[~2014-10-31 21:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-31 21:34 lee.roberts [this message]
2014-12-19 10:31 ` Balazs Nemeth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1414791289-6260-1-git-send-email-lee.roberts@hp.com \
    --to=lee.roberts@hp.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).