From: Yanglong Wu Subject: [PATCH] net/ixgbe: fix link status when link is NACK Date: Mon, 23 Jul 2018 11:05:57 +0800 Message-ID: <20180723030557.5815-1-yanglong.wu@intel.com> Cc: qi.z.zhang@intel.com, dong1.wang@intel.com, Yanglong Wu To: dev@dpdk.org Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 613EE98 for ; Mon, 23 Jul 2018 05:15:42 +0200 (CEST) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- drivers/net/ixgbe/ixgbe_ethdev.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 997683d3b..378ead4b4 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 @@ -4013,6 +4011,7 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev, if (diag != 0) { link.link_speed = ETH_SPEED_NUM_100M; link.link_duplex = ETH_LINK_FULL_DUPLEX; + link.link_status = ETH_LINK_DOWN; return rte_eth_linkstatus_set(dev, &link); } -- 2.11.0