From: Yuanhan Liu <yuanhan.liu@intel.com>
To: Qi Zhang <qi.z.zhang@intel.com>
Cc: stable@dpdk.org
Subject: Re: [dpdk-stable] [PATCH] net/ixgbe: fix blocked interrupts
Date: Mon, 20 Feb 2017 16:20:40 +0800 [thread overview]
Message-ID: <20170220082040.GR9046@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <1487541170-7859-1-git-send-email-qi.z.zhang@intel.com>
On Sun, Feb 19, 2017 at 04:52:50PM -0500, Qi Zhang wrote:
> [ backported from upstream commit 9b667210700e6b52a123cc5b36d0a3b0b3aa7c94 ]
Thanks for the packport, and applied to dpdk-stable/16.11.
--yliu
> While handling link status change (LSC) interrupt, all interrupts are
> blocked until delayed interrupt handler finishes.
> The wait duration is at least one second and this may cause timeouts in
> VF to PF mailbox.
> Make sure only LSC interrupt is blocked while waiting for delayed
> interrupt handler to finish.
>
> Fixes: 0a45657a6794 ("pci: rework interrupt handling")
>
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
> drivers/net/ixgbe/ixgbe_ethdev.c | 18 ++++++++----------
> drivers/net/ixgbe/ixgbe_ethdev.h | 2 ++
> 2 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
> index dbfb0c0..bac36e0 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -3474,7 +3474,6 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev *dev)
> IXGBE_DEV_PRIVATE_TO_INTR(dev->data->dev_private);
> int64_t timeout;
> struct rte_eth_link link;
> - int intr_enable_delay = false;
> struct ixgbe_hw *hw =
> IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
>
> @@ -3507,20 +3506,19 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev *dev)
> timeout = IXGBE_LINK_DOWN_CHECK_TIMEOUT;
>
> ixgbe_dev_link_status_print(dev);
> -
> - intr_enable_delay = true;
> - }
> -
> - if (intr_enable_delay) {
> + intr->mask_original = intr->mask;
> + /* only disable lsc interrupt */
> + intr->mask &= ~IXGBE_EIMS_LSC;
> if (rte_eal_alarm_set(timeout * 1000,
> ixgbe_dev_interrupt_delayed_handler, (void *)dev) < 0)
> PMD_DRV_LOG(ERR, "Error setting alarm");
> - } else {
> - PMD_DRV_LOG(DEBUG, "enable intr immediately");
> - ixgbe_enable_intr(dev);
> - rte_intr_enable(&(dev->pci_dev->intr_handle));
> + else
> + intr->mask = intr->mask_original;
> }
>
> + PMD_DRV_LOG(DEBUG, "enable intr immediately");
> + ixgbe_enable_intr(dev);
> + rte_intr_enable(&dev->pci_dev->intr_handle);
>
> return 0;
> }
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
> index 4ff6338..a4e2996 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.h
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.h
> @@ -165,6 +165,8 @@ struct ixgbe_hw_fdir_info {
> struct ixgbe_interrupt {
> uint32_t flags;
> uint32_t mask;
> + /*to save original mask during delayed handler */
> + uint32_t mask_original;
> };
>
> struct ixgbe_stat_mapping_registers {
> --
> 2.7.4
next prev parent reply other threads:[~2017-02-20 8:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-19 21:52 Qi Zhang
2017-02-20 8:20 ` Yuanhan Liu [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-02-19 20:50 Qi Zhang
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=20170220082040.GR9046@yliu-dev.sh.intel.com \
--to=yuanhan.liu@intel.com \
--cc=qi.z.zhang@intel.com \
--cc=stable@dpdk.org \
/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).