DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Zhao1, Wei" <wei.zhao1@intel.com>
To: wangyunjian <wangyunjian@huawei.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "i.maximets@samsung.com" <i.maximets@samsung.com>,
	"xudingke@huawei.com" <xudingke@huawei.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: fix cancel link handler when port is	being removed
Date: Fri, 10 May 2019 03:14:27 +0000	[thread overview]
Message-ID: <A2573D2ACFCADC41BB3BE09C6DE313CA07EE5561@PGSMSX103.gar.corp.intel.com> (raw)
Message-ID: <20190510031427.M870AazO6w635GNI7fcxLGlr-w92q1AKq4Zy76rXdDw@z> (raw)
In-Reply-To: <1557319898-9588-1-git-send-email-wangyunjian@huawei.com>

Hi,  wangyunjian

 	May I ask some more info about it?
Sure, we may this handler in ixgbe_dev_link_update_share (),  but we have  "rte_eal_alarm_cancel(ixgbe_dev_setup_link_alarm_handler, dev)" 
in function ixgbe_dev_stop() and ixgbevf_dev_stop() to  cancel this handler. If you want to remove dev, you will call ixgbe_dev_stop() first, RIGHT?
Maybe there is an accidental situation that some interrupt like LSC trigger ixgbe_dev_link_update() to set setup_link_alarm_handler just after dev stop?
Then we need to cancel it in eth_ixgbe_dev_uninit().
Is you issue the same as above or other?


> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of wangyunjian
> Sent: Wednesday, May 8, 2019 8:52 PM
> To: dev@dpdk.org
> Cc: i.maximets@samsung.com; xudingke@huawei.com; Yunjian Wang
> <wangyunjian@huawei.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/ixgbe: fix cancel link handler when port is
> being removed
> 
> From: Yunjian Wang <wangyunjian@huawei.com>
> 
> The nic's interrupt source has some active handler, which maybe call
> ixgbe_dev_link_update() to set link handler. We should cancel the link handler
> before remove dev to prevent executing the link handler.
> It triggers segfault.
> 
> Fixes: 0408f47ba4d6 ("net/ixgbe: fix busy polling while fiber link update")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> ---
>  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 975fa47..2470c89 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -1344,6 +1344,9 @@ struct rte_ixgbe_xstats_name_off {
>  	/* cancel the delay handler before remove dev */
>  	rte_eal_alarm_cancel(ixgbe_dev_interrupt_delayed_handler, eth_dev);
> 
> +	/* cancel the link handler before remove dev */
> +	rte_eal_alarm_cancel(ixgbe_dev_setup_link_alarm_handler, eth_dev);
> +
>  	/* uninitialize PF if max_vfs not zero */
>  	ixgbe_pf_host_uninit(eth_dev);
> 
> --
> 1.8.3.1
> 


  parent reply	other threads:[~2019-05-10  3:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-08 12:51 wangyunjian
2019-05-08 12:51 ` wangyunjian
2019-05-10  3:14 ` Zhao1, Wei [this message]
2019-05-10  3:14   ` Zhao1, Wei
2019-05-10 11:37   ` wangyunjian
2019-05-10 11:37     ` wangyunjian
2019-05-13  1:56     ` Zhao1, Wei
2019-05-13  1:56       ` Zhao1, Wei
2019-05-14 14:01       ` Zhang, Qi Z
2019-05-14 14:01         ` 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=A2573D2ACFCADC41BB3BE09C6DE313CA07EE5561@PGSMSX103.gar.corp.intel.com \
    --to=wei.zhao1@intel.com \
    --cc=dev@dpdk.org \
    --cc=i.maximets@samsung.com \
    --cc=stable@dpdk.org \
    --cc=wangyunjian@huawei.com \
    --cc=xudingke@huawei.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).