DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ixgbe: fix link status when link is NACK
@ 2018-07-23  3:05 Yanglong Wu
  2018-07-24  7:30 ` [dpdk-dev] [PATCH v2] " Yanglong Wu
  0 siblings, 1 reply; 6+ messages in thread
From: Yanglong Wu @ 2018-07-23  3:05 UTC (permalink / raw)
  To: dev; +Cc: qi.z.zhang, dong1.wang, Yanglong Wu

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 <yanglong.wu@intel.com>
---
 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-07-26  5:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-23  3:05 [dpdk-dev] [PATCH] net/ixgbe: fix link status when link is NACK Yanglong Wu
2018-07-24  7:30 ` [dpdk-dev] [PATCH v2] " Yanglong Wu
2018-07-25  6:02   ` Zhang, Qi Z
2018-07-26  2:24   ` [dpdk-dev] [PATCH v3] net/ixgbe: fix ixgbevf link status Yanglong Wu
2018-07-26  2:49     ` Wang, Dong1
2018-07-26  5:17     ` Zhang, Qi Z

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).