From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id E12663195 for ; Tue, 24 Jul 2018 09:40:10 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jul 2018 00:40:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,397,1526367600"; d="scan'208";a="60167665" Received: from wuyanglong.sh.intel.com ([10.67.111.89]) by orsmga006.jf.intel.com with ESMTP; 24 Jul 2018 00:40:07 -0700 From: Yanglong Wu To: dev@dpdk.org Cc: qi.z.zhang@intel.com, dong1.wang@intel.com, Yanglong Wu Date: Tue, 24 Jul 2018 15:30:32 +0800 Message-Id: <20180724073032.33332-1-yanglong.wu@intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180723030557.5815-1-yanglong.wu@intel.com> References: <20180723030557.5815-1-yanglong.wu@intel.com> Subject: [dpdk-dev] [PATCH v2] net/ixgbe: fix link status when link is NACK X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jul 2018 07:40:11 -0000 Link status should be set as down when link is NACK. Fixes: dc66e5fd01b9 ("net/ixgbe: improve link state check on VF") Signed-off-by: Yanglong Wu --- v2: no need to set link status again --- drivers/net/ixgbe/ixgbe_ethdev.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 997683d3b..3ffc72b40 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -3933,12 +3933,10 @@ ixgbevf_check_link(struct ixgbe_hw *hw, ixgbe_link_speed *speed, } if (no_pflink_check) { - if (*speed == IXGBE_LINK_SPEED_UNKNOWN) + if (*speed == IXGBE_LINK_SPEED_UNKNOWN) { mac->get_link_status = true; - else - mac->get_link_status = false; - - goto out; + goto out; + } } /* if the read failed it could just be a mailbox collision, best wait * until we are called again and don't report an error -- 2.11.0