mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net 0/2] net: bcm4908_enet: RX buffer fixes
@ 2026-12-02  9:56 Kordian Chmielewski
  2026-12-02  9:56 ` [PATCH net 1/2] net: bcm4908_enet: keep the RX buffer when the refill fails Kordian Chmielewski
  2026-12-02  9:56 ` [PATCH net 2/2] net: bcm4908_enet: keep the RX buffers when the RX channel does not stop Kordian Chmielewski
  0 siblings, 2 replies; 3+ messages in thread
From: Kordian Chmielewski @ 2026-12-02  9:56 UTC (permalink / raw)
  To: netdev
  Cc: Florian Fainelli, Florian Fainelli, Rafał Miłecki,
	bcm-kernel-feedback-list, Andrew Lunn, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, linux-kernel

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@gmail.com/

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


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

end of thread, other threads:[~2026-12-02  9:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-02  9:56 [PATCH net 0/2] net: bcm4908_enet: RX buffer fixes Kordian Chmielewski
2026-12-02  9:56 ` [PATCH net 1/2] net: bcm4908_enet: keep the RX buffer when the refill fails Kordian Chmielewski
2026-12-02  9:56 ` [PATCH net 2/2] net: bcm4908_enet: keep the RX buffers when the RX channel does not stop Kordian Chmielewski

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®