Netdev List
 help / color / mirror / Atom feed
From: Kordian Chmielewski <kudzo51@gmail.com>
To: netdev@vger.kernel.org
Cc: "Florian Fainelli" <f.fainelli@gmail.com>,
	"Florian Fainelli" <florian.fainelli@broadcom.com>,
	"Rafał Miłecki" <rafal@milecki.pl>,
	bcm-kernel-feedback-list@broadcom.com,
	"Andrew Lunn" <andrew+netdev@lunn.ch>,
	"David S . Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@kernel.org>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH net 0/2] net: bcm4908_enet: RX buffer fixes
Date: Wed,  2 Dec 2026 10:56:09 +0100	[thread overview]
Message-ID: <20261202095611.156840-1-kudzo51@gmail.com> (raw)

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


             reply	other threads:[~2026-12-02  9:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02  9:56 Kordian Chmielewski [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261202095611.156840-1-kudzo51@gmail.com \
    --to=kudzo51@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rafal@milecki.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox