From: Ye Xiaolong <xiaolong.ye@intel.com>
To: Xiao Zhang <xiao.zhang@intel.com>
Cc: dev@dpdk.org, wei.zhao1@intel.com, stable@dpdk.org
Subject: Re: [dpdk-dev] [v2] net/ixgbe:fix wrong link status
Date: Mon, 4 Nov 2019 13:32:09 +0800 [thread overview]
Message-ID: <20191104053209.GW11315@intel.com> (raw)
In-Reply-To: <1572327203-32298-1-git-send-email-xiao.zhang@intel.com>
On 10/29, Xiao Zhang wrote:
>The link status for 82599eb got from link status register was not correct,
>check the enable/disable flag of tx laser when getting the link status,
>set the link status down if tx laser disabled since the tx laser flag
>could be set correctly when up/down the link status.
>
>Fixes: dc66e5fd01b9 ("net/ixgbe: improve link state check on VF")
>Cc: stable@dpdk.org
>
>Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
>Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
>---
>v2
>Rebase the patch to latest master code.
>---
> drivers/net/ixgbe/ixgbe_ethdev.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
>diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
>index dbce7a8..3202c28 100644
>--- a/drivers/net/ixgbe/ixgbe_ethdev.c
>+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
>@@ -2904,6 +2904,7 @@ ixgbe_dev_set_link_up(struct rte_eth_dev *dev)
> } else {
> /* Turn on the laser */
> ixgbe_enable_tx_laser(hw);
>+ ixgbe_dev_link_update(dev, 0);
> }
>
> return 0;
>@@ -2934,6 +2935,7 @@ ixgbe_dev_set_link_down(struct rte_eth_dev *dev)
> } else {
> /* Turn off the laser */
> ixgbe_disable_tx_laser(hw);
>+ ixgbe_dev_link_update(dev, 0);
> }
>
> return 0;
>@@ -4108,6 +4110,7 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
> int link_up;
> int diag;
> int wait = 1;
>+ u32 esdp_reg;
>
> memset(&link, 0, sizeof(link));
> link.link_status = ETH_LINK_DOWN;
>@@ -4135,6 +4138,10 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
> return rte_eth_linkstatus_set(dev, &link);
> }
>
>+ esdp_reg = IXGBE_READ_REG(hw, IXGBE_ESDP);
>+ if ((esdp_reg & IXGBE_ESDP_SDP3))
>+ link_up = 0;
>+
> if (link_up == 0) {
> if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {
> intr->flags |= IXGBE_FLAG_NEED_LINK_CONFIG;
>--
>2.7.4
>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Applied to dpdk-next-net-intel. Thanks.
prev parent reply other threads:[~2019-11-04 5:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-02 11:52 [dpdk-dev] net/ixgbe:fix wrong link status Zhang Xiao
2019-09-02 3:28 ` Zhao1, Wei
2019-09-02 9:00 ` Ye Xiaolong
2019-09-02 9:54 ` Ye Xiaolong
2019-10-29 5:33 ` [dpdk-dev] [v2] " Xiao Zhang
2019-11-04 5:32 ` Ye Xiaolong [this message]
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=20191104053209.GW11315@intel.com \
--to=xiaolong.ye@intel.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
--cc=wei.zhao1@intel.com \
--cc=xiao.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.