patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ilya Maximets <i.maximets@ovn.org>
To: "Cui, LunyuanX" <lunyuanx.cui@intel.com>,
	Ilya Maximets <i.maximets@ovn.org>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>,
	"Yang, Qiming" <qiming.yang@intel.com>,
	"stable@dpdk.org" <stable@dpdk.org>,
	Laurent Hardy <laurent.hardy@6wind.com>,
	"Ye, Xiaolong" <xiaolong.ye@intel.com>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v2] net/ixgbe: fix link status
Date: Thu, 14 Nov 2019 12:03:46 +0100	[thread overview]
Message-ID: <3917fed0-ae35-8be7-277b-c9166174eeae@ovn.org> (raw)
In-Reply-To: <D03A2340CBF5CC478EBBD0ABAE6ADB152F0D93@SHSMSX101.ccr.corp.intel.com>

On 14.11.2019 4:45, Cui, LunyuanX wrote:
> Hi, Ilya Maximets
> 
> Before my patch, original treatment is as follows:
> 	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;
> 			rte_eal_alarm_set(10,
> 				ixgbe_dev_setup_link_alarm_handler, dev);
> 		}
> 		return rte_eth_linkstatus_set(dev, &link);
> 	}
> 
> ixgbe_dev_setup_link_alarm_handler() can cause link status change from down to up.
> When port stops, link status should always be down. When bug which you fixed occur, link status is down.
> But this treatment can't confirm whether the reason is. I thank port status should be used as judgment.
> If port stops, we don’t need to ensure link status is updated.
> 
> If I change patch like this, will it affect your bug?

At first, your 'Fixes' tag is not correct because patch 0408f47ba4d6
only changed direct ixgbe_setup_link() call to delayed alarm handler.

You may add some more conditions in order to not schedule the handler
if adapter is stopped, but don't remove the workaround completely.

Best regards, Ilya Maximets.

> 
> Looking forward to your reply.
> Thanks
> Lunyuan.
> 
>> -----Original Message-----
>> From: Ilya Maximets [mailto:i.maximets@ovn.org]
>> Sent: Wednesday, November 13, 2019 11:07 PM
>> To: Cui, LunyuanX <lunyuanx.cui@intel.com>; dev@dpdk.org
>> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Yang, Qiming
>> <qiming.yang@intel.com>; stable@dpdk.org; Laurent Hardy
>> <laurent.hardy@6wind.com>; Wei Dai <wei.dai@intel.com>; Ye, Xiaolong
>> <xiaolong.ye@intel.com>
>> Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix link status
>>
>> On 13.11.2019 17:34, Cui LunyuanX wrote:
>>> After ports reset, tx laser register will be reset. The link status
>>> for 82599eb got from link status register was not correct.
>>> Set tx laser disabled after ports reset.
>>>
>>> ixgbe_dev_setup_link_alarm_handler() will set tx laser enabled when
>>> show port information. The purpose of the function has already
>>> implemented in ixgbe_dev_start(). There is no need to reuse it in
>>> ixgbe_dev_link_update_share().
>>
>> The reason why the alarm handler stays there is the one described in
>> following commit:
>>
>> commit c12d22f65b132c56db7b4fdbfd5ddce27d1e9572
>> Author: Laurent Hardy <laurent.hardy@6wind.com>
>> Date:   Thu Apr 27 17:03:42 2017 +0200
>>
>>     net/ixgbe: ensure link status is updated
>>
>>     In case of fiber and link speed set to 1Gb at peer side (with autoneg
>>     or with defined speed), link status could be not properly updated at
>>     time cable is plugged-in.
>>     Indeed if cable was not plugged when device has been configured and
>>     started then link status will not be updated properly with new speed
>>     as no link setup will be triggered.
>>
>>     To avoid this issue, IXGBE_FLAG_NEED_LINK_CONFIG is set to try a link
>>     setup each time link_update() is triggered and current link status is
>>     down. When cable is plugged-in, link setup will be performed via
>>     ixgbe_setup_link().
>>
>>     Signed-off-by: Laurent Hardy <laurent.hardy@6wind.com>
>>     Acked-by: Wei Dai <wei.dai@intel.com>
>>
>> Does it fixed?
>> If not, you should not touch the alarm handler or implement a different
>> workaround.
>>
>> Best regards, Ilya Maximets.

  reply	other threads:[~2019-11-14 11:03 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 [this message]
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
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=3917fed0-ae35-8be7-277b-c9166174eeae@ovn.org \
    --to=i.maximets@ovn.org \
    --cc=dev@dpdk.org \
    --cc=laurent.hardy@6wind.com \
    --cc=lunyuanx.cui@intel.com \
    --cc=qiming.yang@intel.com \
    --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).