summaryrefslogtreecommitdiff
path: root/include/linux/root_dev.h
diff options
context:
space:
mode:
authorDaniel Zahka <daniel.zahka@gmail.com>2026-10-01 09:39:01 -0700
committerJakub Kicinski <kuba@kernel.org>2026-10-05 16:51:17 -0700
commit56f2178ff7f6c1f458eeb5f79ab2385028ae8a02 (patch)
tree89e9d6fbcab431adc1ff0cd39d5fd1aa45e9f19f /include/linux/root_dev.h
parent9e072eda51cadc944c7c0d6b64d9c7169d43a5ad (diff)
eth: mpnic: add a NAPI depletion check
The Rx path can wedge if page pool allocations fail in __mpnic_fill_bdq(). The problematic sequence is: page pool allocations fail, bdq rings are empty, device receives packet from the network, but drops it for lack of buffer space and does not raise interrupt, mpnic_poll() does not run, so page pool allocations are not retried. To break out of this cycle, we can add a depletion check to our service task. The depletion check checks if posted buffers are under a low watermark, and raises a completion queue interrupt, so that mpnic_poll will run on the corresponding napi vector. A note about the lock free reads: We don't bother synchronizing the ring head and tail reads with mpnic_poll(), because a false positive signal would simply raise a spurious interrupt scheduling mpnic_poll(), and a false negative signal will result in a retry, where if mpnic_poll() has truly not been running, should then report accurately whether or not posted Rx buffers are low. Signed-off-by: Daniel Zahka <daniel.zahka@gmail.com> Reviewed-by: Harshitha Ramamurthy <hramamurthy@google.com> Link: https://patch.msgid.link/20261001-linux-mpnic-v1-4-6422ee74233a@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/root_dev.h')
0 files changed, 0 insertions, 0 deletions