From: Yanglong Wu <yanglong.wu@intel.com>
To: dev@dpdk.org
Cc: qi.z.zhang@intel.com, dong1.wang@intel.com,
Yanglong Wu <yanglong.wu@intel.com>
Subject: [dpdk-dev] [PATCH] net/ixgbe: fix link status when link is NACK
Date: Mon, 23 Jul 2018 11:05:57 +0800 [thread overview]
Message-ID: <20180723030557.5815-1-yanglong.wu@intel.com> (raw)
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
next reply other threads:[~2018-07-23 3:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-23 3:05 Yanglong Wu [this message]
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
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=20180723030557.5815-1-yanglong.wu@intel.com \
--to=yanglong.wu@intel.com \
--cc=dev@dpdk.org \
--cc=dong1.wang@intel.com \
--cc=qi.z.zhang@intel.com \
/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).