mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next 0/4] mpnic: add NAPI buffer depletion check
@ 2026-10-01 16:38 Daniel Zahka
  2026-10-01 16:38 ` [PATCH net-next 1/4] eth: mpnic: use WRITE_ONCE() for BDQ head and tail updates Daniel Zahka
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Daniel Zahka @ 2026-10-01 16:38 UTC (permalink / raw)
  To: Alexander Duyck, Jakub Kicinski, kernel-team, Andrew Lunn,
	David S. Miller, Eric Dumazet, Paolo Abeni
  Cc: netdev, linux-kernel

This series provides a buffer depletion check to unwedge Rx processing
when page pool allocations have failed. Patch 4 has a more detailed
description of the events that lead to the wedge, but the high level
idea is that when page pool allocations fail, the buffer descriptor ring
can run low, and when that happens the device will drop Rx packets and
not raise interrupts, which causes the NAPI event loop not to be
scheduled, so new buffers are not posted.

There are three setup patches for the depletion check:

Patch 1: convert writes to BDQ ring head and tail to WRITE_ONCE(), so
the depletion check, which is not synchronized with the NAPI event loop,
can READ_ONCE() those same fields.

Patch 2: introduce the driver level service task that runs once per
second while the netif is running.

Patch 3: set the minimum Rx buffers needed per packet based on page size
and max MTU.

With those in place, we have everything we need to watch the buffer ring
head and tail positions from the service task, compare posted buffers to
programmed Rx drop thresholds, and then force mpnic_poll() to run if
needed.

Signed-off-by: Daniel Zahka <daniel.zahka@gmail.com>
---
Daniel Zahka (4):
      eth: mpnic: use WRITE_ONCE() for BDQ head and tail updates
      eth: mpnic: add a service task
      eth: mpnic: set Rx buffer minimums using page size and mtu
      eth: mpnic: add a NAPI depletion check

 drivers/net/ethernet/meta/mpnic/mpnic.h        |  3 +++
 drivers/net/ethernet/meta/mpnic/mpnic_init.c   | 13 ++++++---
 drivers/net/ethernet/meta/mpnic/mpnic_netdev.c |  3 +++
 drivers/net/ethernet/meta/mpnic/mpnic_pci.c    | 21 +++++++++++++++
 drivers/net/ethernet/meta/mpnic/mpnic_txrx.c   | 37 +++++++++++++++++++++++---
 drivers/net/ethernet/meta/mpnic/mpnic_txrx.h   |  7 +++++
 6 files changed, 77 insertions(+), 7 deletions(-)
---
base-commit: eb0c18404c8943356f4aa164e5db9067b79ea93c
change-id: 20260929-linux-mpnic-428998421ffc

Best regards,
-- 
Daniel Zahka <daniel.zahka@gmail.com>


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

end of thread, other threads:[~2026-10-01 18:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-01 16:38 [PATCH net-next 0/4] mpnic: add NAPI buffer depletion check Daniel Zahka
2026-10-01 16:38 ` [PATCH net-next 1/4] eth: mpnic: use WRITE_ONCE() for BDQ head and tail updates Daniel Zahka
2026-10-01 16:38 ` [PATCH net-next 2/4] eth: mpnic: add a service task Daniel Zahka
2026-10-01 16:39 ` [PATCH net-next 3/4] eth: mpnic: set Rx buffer minimums using page size and mtu Daniel Zahka
2026-10-01 16:39 ` [PATCH net-next 4/4] eth: mpnic: add a NAPI depletion check Daniel Zahka
2026-10-01 16:45 ` [PATCH net-next 0/4] mpnic: add NAPI buffer " netdev-bot+sinfo
2026-10-01 18:26   ` Daniel Zahka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®