patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Cui, LunyuanX" <lunyuanx.cui@intel.com>
To: "Ye, Xiaolong" <xiaolong.ye@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"Lu, Wenzhuo" <wenzhuo.lu@intel.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v4] net/ixgbe: fix link status
Date: Tue, 19 Nov 2019 06:39:17 +0000	[thread overview]
Message-ID: <D03A2340CBF5CC478EBBD0ABAE6ADB152F22AB@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20191119062749.GA101220@intel.com>

Hi, xiaolong

> -----Original Message-----
> From: Ye, Xiaolong
> Sent: Tuesday, November 19, 2019 2:28 PM
> To: Cui, LunyuanX <lunyuanx.cui@intel.com>
> Cc: dev@dpdk.org; Lu, Wenzhuo <wenzhuo.lu@intel.com>;
> stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v4] net/ixgbe: fix link status
> 
> On 11/18, Lunyuan Cui wrote:
> >The link status for 82599eb got from link status register was not
> >correct. Check the enable/disable flag of tx laser, set the link status
> >down if tx laser disabled. Then, we can get correct status.
> >But after port reset, tx laser register will be reset enable.
> >Link status will always be up. So set tx laser disable when port resets.
> 
> So you call ixgbe_dev_set_link_down to disable tx laser, but
> ixgbe_dev_set_link_down is more than just disable tx laser, will it has some
> side effects?

There are not side effects.
I call ixgbe_dev_set_link_down when port init.
When port starts, It will deal with follows:
	if (hw->mac.ops.get_media_type(hw) == ixgbe_media_type_copper) {
		/* Turn on the copper */
		ixgbe_set_phy_power(hw, true);
	} else {
		/* Turn on the laser */
		ixgbe_enable_tx_laser(hw);
	}

So I think there are not side effects.

> 
> >
> >When hw->mac.autotry_restart is true, whether tx laser is disable or
> >enable, it will be set enable in ixgbe_flap_tx_laser_multispeed_fiber().
> >hw->mac.autotry_restart can be set true in both port init and port start.
> >Because we don't need this treatment before port starts, set
> >hw->mac.autotry_restart false when port init.
> >
> >Fixes: 0408f47ba4d6 ("net/ixgbe: fix busy polling while fiber link
> >update")
> >Cc: stable@dpdk.org
> >
> >Signed-off-by: Lunyuan Cui <lunyuanx.cui@intel.com>
> >---
> >v4:
> >* modifier commit log
> >	Describe the problem in more detail.
> >
> >v3:
> >* Correct countermeasure
> >	Don't delete ixgbe_dev_setup_link_alarm_handler().
> >
> >v2:
> >* modifier commit log
> >	Add a log why I delete ixgbe_dev_setup_link_alarm_handler().
> >---
> > drivers/net/ixgbe/ixgbe_ethdev.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> >diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> >b/drivers/net/ixgbe/ixgbe_ethdev.c
> >index 8c1caac18..260484fbf 100644
> >--- a/drivers/net/ixgbe/ixgbe_ethdev.c
> >+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> >@@ -1188,6 +1188,7 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev,
> void *init_params __rte_unused)
> > 	diag = ixgbe_bypass_init_hw(hw);
> > #else
> > 	diag = ixgbe_init_hw(hw);
> >+	hw->mac.autotry_restart = false;
> > #endif /* RTE_LIBRTE_IXGBE_BYPASS */
> >
> > 	/*
> >@@ -1298,6 +1299,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev,
> void *init_params __rte_unused)
> > 	/* enable support intr */
> > 	ixgbe_enable_intr(eth_dev);
> >
> >+	ixgbe_dev_set_link_down(eth_dev);
> >+
> > 	/* initialize filter info */
> > 	memset(filter_info, 0,
> > 	       sizeof(struct ixgbe_filter_info));
> >--
> >2.17.1
> >

  reply	other threads:[~2019-11-19  6:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13 12:55 [dpdk-stable] [PATCH] " Cui LunyuanX
2019-11-13  7:17 ` [dpdk-stable] [dpdk-dev] " Ye Xiaolong
2019-11-13 16:34 ` [dpdk-stable] [PATCH v2] " Cui LunyuanX
2019-11-13 15:06   ` [dpdk-stable] [dpdk-dev] " Ilya Maximets
2019-11-14  3:45     ` Cui, LunyuanX
2019-11-14 11:03       ` Ilya Maximets
2019-11-18 10:13   ` [dpdk-stable] [PATCH v3] " Lunyuan Cui
2019-11-18  3:25     ` [dpdk-stable] [dpdk-dev] " Ye Xiaolong
2019-11-18 15:37     ` [dpdk-stable] [PATCH v4] " Lunyuan Cui
2019-11-19  6:27       ` [dpdk-stable] [dpdk-dev] " Ye Xiaolong
2019-11-19  6:39         ` Cui, LunyuanX [this message]
2019-11-26  2:05       ` [dpdk-stable] " Lu, Wenzhuo
2019-11-26  2:27         ` [dpdk-stable] [dpdk-dev] " Ye Xiaolong

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=D03A2340CBF5CC478EBBD0ABAE6ADB152F22AB@SHSMSX101.ccr.corp.intel.com \
    --to=lunyuanx.cui@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=wenzhuo.lu@intel.com \
    --cc=xiaolong.ye@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).