DPDK-dev Archive mirror
 help / color / mirror / Atom feed
From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: <edwin.brossette@6wind.com>, <dev@dpdk.org>
Cc: <olivier.matz@6wind.com>, <stable@dpdk.org>
Subject: Re: [PATCH] net/ixgbe: don't create a delayed interrupt handler if one already exists
Date: Thu, 16 May 2024 13:41:22 +0200	[thread overview]
Message-ID: <9d70fe94-c1c1-4d78-beb7-0ee6278cb843@intel.com> (raw)
In-Reply-To: <20240418135307.3270094-1-edwin.brossette@6wind.com>

On 4/18/2024 3:53 PM, edwin.brossette@6wind.com wrote:
> From: Edwin Brossette <edwin.brossette@6wind.com>
> 
> Since link state may need some time to stabilize after a link state
> change, we cannot update the link state right after one occurs. So link
> state change interrupts (lsc) are handled after a delay. To do this, an
> alarm to call a delayed handler is programmed. This delayed handler is
> tasked with updating the link after a variable delay of one to four
> seconds which should be enough time for the link state to become stable
> again.
> 
> However, a problem can occur with some models of network cards. For
> example, ixgbe_mac_X550EM_x may trigger this interrupt twice because
> another interrupt signal is received on the General Purpose Interrupt
> pin SPD0, which has the same interrupt handler. In such a case, the
> delayed interrupt handler would be programmed to be executed twice.
> 
> Since we save the original interrupt mask value to restore it after the
> delayed handler is done with its work, we end up overwritting its value
> after the second alarm is programmed. Even worse: when restoring it the
> first time, the saved original mask variable is reset to 0, so we end up
> completely disabling all interrupts when trying to restore this mask
> after the second time the delayed handler is executed.
> 
> Add a check on the interrupt mask value when programming the alarm for
> the delayed handler. If the bit for lsc interrupts is unset, it means an
> alarm was already programmed for the delayed handler. In this case, skip
> the alarm creation.
> 
> Fixes: 9b667210700e ("net/ixgbe: fix blocked interrupts")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Edwin Brossette <edwin.brossette@6wind.com>
> ---
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>

-- 
Thanks,
Anatoly


  reply	other threads:[~2024-05-16 11:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-18 13:39 net/ixgbe: all interrupt disabled after enabling lsc on X552/X557-AT card Edwin Brossette
2024-04-18 13:53 ` [PATCH] net/ixgbe: don't create a delayed interrupt handler if one already exists edwin.brossette
2024-05-16 11:41   ` Burakov, Anatoly [this message]
2024-05-21 14:50     ` Bruce Richardson

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=9d70fe94-c1c1-4d78-beb7-0ee6278cb843@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=edwin.brossette@6wind.com \
    --cc=olivier.matz@6wind.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 read-only IMAP folder(s) and NNTP newsgroup(s).