From patchwork Fri Oct 31 21:34:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: lee.roberts@hp.com X-Patchwork-Id: 1079 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id DBF8B6835; Fri, 31 Oct 2014 22:25:56 +0100 (CET) Received: from g2t2352.austin.hp.com (g2t2352.austin.hp.com [15.217.128.51]) by dpdk.org (Postfix) with ESMTP id 27519677B for ; Fri, 31 Oct 2014 22:25:53 +0100 (CET) Received: from g2t2360.austin.hp.com (g2t2360.austin.hp.com [16.197.8.247]) by g2t2352.austin.hp.com (Postfix) with ESMTP id B4ECA82 for ; Fri, 31 Oct 2014 21:34:54 +0000 (UTC) Received: from laptop.lroberts (unknown [16.79.29.249]) by g2t2360.austin.hp.com (Postfix) with ESMTP id A594663; Fri, 31 Oct 2014 21:34:54 +0000 (UTC) Received: by laptop.lroberts (Postfix, from userid 1000) id 3AF442C266C; Fri, 31 Oct 2014 15:34:52 -0600 (MDT) From: lee.roberts@hp.com To: dev@dpdk.org Date: Fri, 31 Oct 2014 15:34:49 -0600 Message-Id: <1414791289-6260-1-git-send-email-lee.roberts@hp.com> X-Mailer: git-send-email 1.9.1 Subject: [dpdk-dev] [PATCH] ixgbe: logic change in ixgbe_check_mac_link_vf(). X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Lee Roberts 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 --- 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);