[PATCH net 0/2] net: bcm4908_enet: RX buffer fixes
From: Kordian Chmielewski
Date: Wed Dec 02 2026 - 04:56:33 EST
Two follow-ups to the TX ring series that is now in net [1]. Both are
about RX buffers, and Sashiko's reviews of that series pointed out both.
Patch 1 keeps the old buffer in its slot when the RX refill fails, so
that a failed allocation drops one frame instead of leaving the slot
without a buffer.
Patch 2 makes stop() leave the RX buffers to the DMA when the RX channel
does not stop in time, as that series did for the TX buffers. It also
waits for the channel with read_poll_timeout(), because the 2 ms
deadline in jiffies can pass after a single read at HZ=100 or 250.
Tested on an Archer AX6000 with OpenWrt and Linux 6.18.55, with the LAN
going through this driver, whose code differs from net with this series
only in one tree-wide change, two test-only module parameters and two
comments. TX and RX ran at line rate (941 Mbit/s TCP). With every 50th
RX buffer allocation made to fail, RX averaged 787 Mbit/s over 30 s and
dropped 41579 of 2079029 frames (2.0%), with no errors in the counters
or in the kernel log. With the RX stop made to report a timeout after
the channel had stopped, each of 45 down/up cycles of the conduit
logged the "Timeout waiting for DMA RX stop" warning once. Five of them
were made while the router was receiving at line rate, and RX came back
after each. 45 cycles without that parameter did not log it. I have not
seen the RX channel time out for real, and the parameter does not make
the DMA keep writing.
Fixes for some other points from those reviews will follow separately:
open() ignores a failure to fill the RX ring and calls napi_alloc_frag()
outside NAPI, the driver does not work without its optional TX
interrupt, and a TX completion can still be missed.
[1] https://lore.kernel.org/netdev/20261113235847.517308-1-kudzo51@xxxxxxxxx/
Kordian Chmielewski (2):
net: bcm4908_enet: keep the RX buffer when the refill fails
net: bcm4908_enet: keep the RX buffers when the RX channel does not
stop
drivers/net/ethernet/broadcom/bcm4908_enet.c | 114 +++++++++++++------
1 file changed, 81 insertions(+), 33 deletions(-)
base-commit: 4d67cf2fd2352f130c42494a933ba9158b925c65
--
2.56.1