All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: Alexander Duyck <alexander.duyck@gmail.com>, <netdev@vger.kernel.org>
Cc: <davem@davemloft.net>, <kuba@kernel.org>, <pabeni@redhat.com>,
	<horms@kernel.org>
Subject: Re: [net PATCH v2 3/8] fbnic: Add additional handling of IRQs
Date: Tue, 6 May 2025 11:47:58 -0700	[thread overview]
Message-ID: <4c437280-dc4b-414b-af6a-fa8fd2ace523@intel.com> (raw)
In-Reply-To: <174654719271.499179.3634535105127848325.stgit@ahduyck-xeon-server.home.arpa>



On 5/6/2025 8:59 AM, Alexander Duyck wrote:
> From: Alexander Duyck <alexanderduyck@fb.com>
> 
> We have two issues that need to be addressed in our IRQ handling.
> 
> One is the fact that we can end up double-freeing IRQs in the event of an
> exception handling error such as a PCIe reset/recovery that fails. To
> prevent that from becoming an issue we can use the msix_vector values to
> indicate that we have successfully requested/freed the IRQ by only setting
> or clearing them when we have completed the given action.
> 
> The other issue is that we have several potential races in our IRQ path due
> to us manipulating the mask before the vector has been truly disabled. In
> order to handle that in the case of the FW mailbox we need to not
> auto-enable the IRQ and instead will be enabling/disabling it separately.
> In the case of the PCS vector we can mitigate this by unmapping it and
> synchronizing the IRQ before we clear the mask.
> 
> The general order of operations after this change is now to request the
> interrupt, poll the FW mailbox to ready, and then enable the interrupt. For
> the shutdown we do the reverse where we disable the interrupt, flush any
> pending Tx, and then free the IRQ. I am renaming the enable/disable to
> request/free to be equivilent with the IRQ calls being used. We may see
> additions in the future to enable/disable the IRQs versus request/free them
> for certain use cases.
> 
> Fixes: da3cde08209e ("eth: fbnic: Add FW communication mechanism")
> Fixes: 69684376eed5 ("eth: fbnic: Add link detection")
> Signed-off-by: Alexander Duyck <alexanderduyck@fb.com>
> Reviewed-by: Simon Horman <horms@kernel.org>
> ---

The function renames make the diff quite noisy, but I agree they make
the new implementation easier to understand.

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>

  reply	other threads:[~2025-05-06 18:48 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-06 15:59 [net PATCH v2 0/8] fbnic: FW IPC Mailbox fixes Alexander Duyck
2025-05-06 15:59 ` [net PATCH v2 1/8] fbnic: Fix initialization of mailbox descriptor rings Alexander Duyck
2025-05-06 18:44   ` Jacob Keller
2025-05-06 15:59 ` [net PATCH v2 2/8] fbnic: Gate AXI read/write enabling on FW mailbox Alexander Duyck
2025-05-06 18:45   ` Jacob Keller
2025-05-06 15:59 ` [net PATCH v2 3/8] fbnic: Add additional handling of IRQs Alexander Duyck
2025-05-06 18:47   ` Jacob Keller [this message]
2025-05-06 15:59 ` [net PATCH v2 4/8] fbnic: Actually flush_tx instead of stalling out Alexander Duyck
2025-05-06 18:52   ` Jacob Keller
2025-05-06 20:31     ` Alexander Duyck
2025-05-06 22:03       ` Jacob Keller
2025-05-06 16:00 ` [net PATCH v2 5/8] fbnic: Cleanup handling of completions Alexander Duyck
2025-05-06 18:53   ` Jacob Keller
2025-05-06 16:00 ` [net PATCH v2 6/8] fbnic: Improve responsiveness of fbnic_mbx_poll_tx_ready Alexander Duyck
2025-05-06 18:54   ` Jacob Keller
2025-05-06 16:00 ` [net PATCH v2 7/8] fbnic: Pull fbnic_fw_xmit_cap_msg use out of interrupt context Alexander Duyck
2025-05-06 18:56   ` Jacob Keller
2025-05-06 20:14     ` Alexander Duyck
2025-05-06 16:00 ` [net PATCH v2 8/8] fbnic: Do not allow mailbox to toggle to ready outside fbnic_mbx_poll_tx_ready Alexander Duyck
2025-05-06 18:57   ` Jacob Keller
2025-05-08  1:41 ` [net PATCH v2 0/8] fbnic: FW IPC Mailbox fixes Jakub Kicinski
2025-05-08  9:50 ` patchwork-bot+netdevbpf

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=4c437280-dc4b-414b-af6a-fa8fd2ace523@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=alexander.duyck@gmail.com \
    --cc=davem@davemloft.net \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.