netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net PATCH v2 0/8] fbnic: FW IPC Mailbox fixes
@ 2025-05-06 15:59 Alexander Duyck
  2025-05-06 15:59 ` [net PATCH v2 1/8] fbnic: Fix initialization of mailbox descriptor rings Alexander Duyck
                   ` (9 more replies)
  0 siblings, 10 replies; 22+ messages in thread
From: Alexander Duyck @ 2025-05-06 15:59 UTC (permalink / raw)
  To: netdev; +Cc: davem, kuba, pabeni, horms

This series is meant to address a number of issues that have been found in
the FW IPC mailbox over the past several months.

The main issues addressed are:
1. Resolve a potential race between host and FW during initialization that
can cause the FW to only have the lower 32b of an address.
2. Block the FW from issuing DMA requests after we have closed the mailbox
and before we have started issuing requests on it.
3. Fix races in the IRQ handlers that can cause the IRQ to unmask itself if
it is being processed while we are trying to disable it.
4. Cleanup the Tx flush logic so that we actually lock down the Tx path
before we start flushing it instead of letting it free run while we are
shutting it down.
5. Fix several memory leaks that could occur if we failed initialization.
6. Cleanup the mailbox completion if we are flushing Tx since we are no
longer processing Rx.
7. Move several allocations out of a potential IRQ/atomic context.

There have been a few optimizations we also picked up since then. Rather
than split them out I just folded them into these diffs. They mostly 
address minor issues such as how long it takes to initialize and/or fail so
I thought they could probably go in with the rest of the patches. They
consist of:
1. Do not sleep more than 20ms waiting on FW to respond as the 200ms value 
likely originated from simulation/emulation testing.
2. Use jiffies to determine timeout instead of sleep * attempts for better
accuracy.

v2:
Added Reviewed-by for patches 1-4
Updated patch 5 to focus on the single completion case
Updated patch 6 to split it into patches 6-8
	Split out responsiveness fixes to patch 6
	Moved fbnic_fw_xmit_cap_msg out of interrupt/polling context in patch 7
	Moved init to ready out of interrupt/polling context in patch 8
	Dropped change that was focused on verifying capabilities version

---

Alexander Duyck (8):
      fbnic: Fix initialization of mailbox descriptor rings
      fbnic: Gate AXI read/write enabling on FW mailbox
      fbnic: Add additional handling of IRQs
      fbnic: Actually flush_tx instead of stalling out
      fbnic: Cleanup handling of completions
      fbnic: Improve responsiveness of fbnic_mbx_poll_tx_ready
      fbnic: Pull fbnic_fw_xmit_cap_msg use out of interrupt context
      fbnic: Do not allow mailbox to toggle to ready outside fbnic_mbx_poll_tx_ready


 drivers/net/ethernet/meta/fbnic/fbnic.h       |   8 +-
 drivers/net/ethernet/meta/fbnic/fbnic_csr.h   |   2 +
 drivers/net/ethernet/meta/fbnic/fbnic_fw.c    | 197 +++++++++++-------
 drivers/net/ethernet/meta/fbnic/fbnic_irq.c   | 142 +++++++++----
 drivers/net/ethernet/meta/fbnic/fbnic_mac.c   |   6 -
 .../net/ethernet/meta/fbnic/fbnic_netdev.c    |   5 +-
 drivers/net/ethernet/meta/fbnic/fbnic_pci.c   |  14 +-
 7 files changed, 231 insertions(+), 143 deletions(-)

--


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2025-05-08  9:49 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).