Article View: linux.kernel.netdev
Article #25728[PATCH net 0/2] net: bcm4908_enet: RX buffer fixes
From: Kordian Chmielewski
Date: Wed, 02 Dec 2026 09:56
Date: Wed, 02 Dec 2026 09:56
46 lines
12848 bytes
12848 bytes
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
Technical Details
Message-ID:
<20261202095611.156840-1-kudzo51@gmail.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375709-linux-kernel-netdev=dewy.ruShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375709-linux-kernel-netdev=dewy.ru
From: kudzo51@gmail.com (Kordian Chmielewski)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net 0/2] net: bcm4908_enet: RX buffer fixes
Date: Wed, 2 Dec 2026 10:56:09 +0100
Organization: Usenet Network
Message-ID: <20261202095611.156840-1-kudzo51@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="1941482"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:3j6n2UL4MReLc1+b5JdzEv60NOA= sha256:p14lbGOuD8hvGrowIq0LwY6DxjPxS04SE9+QQlbBSbU=
sha1:UHGqd9GEXBv7tI+HxEMI+iH/DGU= sha256:cKcP1KNfywc+GSyPw/dvW6lQbnj0y0U7dvTkzPx+uHQ=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 252571175F3; Wed, 2 Dec 2026 12:56:51 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id EpSt7MX5Lr5J;
Wed, 2 Dec 2026 12:56:47 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-375709-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id 8A54C117590; Wed, 2 Dec 2026 12:56:39 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id C3A9F33E6C; Wed, 2 Dec 2026 09:56:28 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1796205387;
b=Q43j2BFPurWjZHrkBvSoeCdGjBV4MOZc0SBM4+i8bNQQilI9wNzpi4zFnQslwqzosDxz
Z75sRSq52X3iB7sjZjYOaXx5eAHB+JOVWL5zs7aVRcxZwWuSSTnwXY8PDIoi0vT1S/VTc
oDuKQIlru0OjoDPqRTBpH1TMz2202JUW/82rDRRaKfN9LD7cJQYOL4En+aczjBLazJqc3
9Fet2UQvt4fwYOzv96quiZQUivQzaB8N2cLEoe21kNZP2Ro+l0DBJwSzwlXXZ3lQD8ydS
0TDfz3MQxMdzVTSckSyajRGBGU3f18nl6yaw9C21KpjAChlSG/7axj2yrS6mQXcxwXQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796205387;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:X-Mailing-List:
List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
List-Owner:Precedence:MIME-Version:Content-Transfer-Encoding;
bh=xUJvNuw0Nz9tdh3jOfDwd24yd18cl8wo3hvvCwgyTaQ=;
b=hg8nHOnSBzX6gNg4Tao9lciVCj6ACbrBs9/xdL+2O1N584JQrQlp+GKtxNaorF9kMuC0
W/DhejqSMm3EUruwD2ghSXns3vz3ZDpNu87MQh5UMUs/oOB4ICrt3j9m8c5mz5sI+8hCL
2Kq6t1LCXDgw9FcFz5CGyx2fWfuvTiD8CfZHqD4k4dK6q4F/9M9Eo++Zr3oiDGr+jqTA6
DhKyC2cTVq3e9dqzkktIBCQYckd+I44VvewaAsitNBmr6KJCIK+DJ2qqpsEf/dFHxlcip
ZOpfqvRhWXmlYeH+lzaHoVuUG0YeRqsf/DD8pvw1CLKN7JV77zgrYPtiigYsOA56bXg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=xyxPfxoL;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 008A8606A688;
Wed, 2 Dec 2026 09:56:27 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=xyxPfxoL
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.218.44
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1796205381;
b=0sEgn9iCAzET54m12dkPaqzj7EWAkiwH1wCOY99lH55Fgk3EBc97THYItugKLTP9Y9jA
ARe9FFeBcHfbh5FpzaE+ir3nd/I/boRZ2Xv93jrW+VcXU5HJvTD11Swx794BjL/u2qvo8
gItgPXBiK3Gxhy0ha0JYGqaYKLJRDn2I/2DKpXXdxckifIUx8qmLq7NGg7xAlXkxv5GpB
2db46tZ92K2WX8l08zJKGV9deX1VO2qbwaUGr+2d5OxjlcR33Rkk5om4Ff+MlBstGnpOY
YXDSsyaOjj7ILL9XirmGoizavIY6pXQRhgJmx5SNfIad+PxIqI4ER11wMeLbD51OPWg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796205381;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:
Date:Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding;
bh=xUJvNuw0Nz9tdh3jOfDwd24yd18cl8wo3hvvCwgyTaQ=;
b=5Vm2bZugdG7+IF4YCjGHGj9ZMUSU2XGmJCaloNQ64d4jor9I7REKcorjrjP/IAMvLerg
5tMMP2Rkunz2stAT5d83bNAfq/IrtORMszgC69uVdcsuavCorqf1yMHzGBqgZqU8VpO6G
JJVWWIDgOBjo29xoIjS2trD1L45o+KzSlEDqoeyptAbu0HiAYfxzja3o31/kC/0IfC3oV
955Uv9Pxad8fK5IZXWEoJIw4ILb118/wTBnWDHWVA3MyagVDkv3qe7DQX+MTWWBFXZb+z
qjE7ZEbcm4nqNRGVfykE6KTk8Be13uPmUVGXryxRD1qcrk7Z/uN88dJRqDvD7Hbizyw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=xyxPfxoL;
arc=none smtp.remote-ip=209.85.218.44
X-Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC612606A31A
for <netdev@vger.kernel.org>; Wed, 2 Dec 2026 09:56:20 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BC612606A31A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-c51c294cef6so669415566b.3
for <netdev@vger.kernel.org>; Wed, 02 Dec 2026 01:56:20 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1796205379; x=1796810179; darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:from:to:cc:subject:date:message-id:reply-to:content-type;
bh=xUJvNuw0Nz9tdh3jOfDwd24yd18cl8wo3hvvCwgyTaQ=;
b=xyxPfxoLBBFKf/ZUq2cdvHm15bHO0sDDemZgc+cbyy+AzKb0TkI7sWlZ1IscVdpP3Q
nITVHrdMxez3OYEIBCwdF3lZRWXLMfc/7ovHBRwzr9q3g6Xh/Yn+0/FU6NDDAF3anBKw
JyTxqtPuto8swAugRZUtgZDLFqlrcU3eQ5Sv7h4mwVIRqmY2VjD3U4v+npTHtHkk+35G
g6jI3g1mCEei3BYmjdh5rrokyt3Y4+Th9Prgn1foi55i+iXd1m6hGC/QuSzAq4wRSR1l
6uxt2Ve1YbURHkIkFjc9DAaYBS98Wjn5TNGk3tPFAvnYqHcpsAay5R2mNx0T8LaL1Goz
VMSA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1796205379; x=1796810179;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=xUJvNuw0Nz9tdh3jOfDwd24yd18cl8wo3hvvCwgyTaQ=;
b=VvJ1OACzELzKje3BaIOV2OHd0mhTskZkHcChDPzfx0MzGkZnTdg5vFGI8b7IXoNnVM
W6DxLZ7hS1VLcw1KvuJTgB2YtPjNmPjl7uSXsNAV/lIahMVsrLIfNc5DBYGKrUVunQBR
ty6utXVOHLHJmga5yixugvtgkpd2FSJvPZAaX3zuZQxKGcKmEpkA1O+B03jwkWgiUCyA
oRM1GmTKCmZ2vF5z9v+Bp92M4APD0xWuHamJTDWi68YLI1TrN59C65B3lyXd7cq4RA3g
a4OA2BhCBxEFF3co/7XBbk+j7QAJVdXcliDN9cpbHHJ6MGGmr42Af7+o2qaXtCP1cecE
qRVw==
X-Gm-Message-State: APuU4Z/qBUNfkzBZn/uTuNlrpJ6mwzEttzQfEx5RwW++O9gkWcw/ddfA
nJ3zu5He2uTuTqGHqZxy7VMPfUUSB9E6odv65TTBkOP3EwdBBEa40+7fOcJeNbIU
X-Gm-Gg: AZFdTZdc3AxK8e9I0DU3LDP3vKXbbtvWJykFcGepHrsCub9vCoL2LRuey26kyJzRS+t
FJIAnqeFoZ8hHg+R0ajJF0IYXFRDDgL0TZUht2FMsQ4thH04Q335x6AW2nOhvrYbLIZdo/BppA8
QTavRVr64+61Z7ozRAfGmnSmS7ychSNl8HITi7ivXyfEBIxexWFzzLfbOGHUTwc/J4XqGFKAGxN
zTFuFN9x7Z7qPHUjRZmwHt4FO0nD6f04dOFCwcgrSPLvJy3U1MUwq88Sy/vC8U+OCUXE6HXDLHB
oZv0ChWXzjBET809GpnPuc9wtfrihVui0aXVQKF2FlxsQwoS8IgrrrcZR5iKDQteZiLi9aevWWL
KUdXEBjhCUOKiVpHBrtvNQMuzTgsR30Eiup6z4SmCj+wFPo30/QUfnXaZ2uUGpR/fSvLrEbUVm1
wQJFmu7bpSY7p7GSL/T3GYH5Bka3zOegEIS246c/P1n06unDmNaYVyDW2E1kTW2TNWXnwQAHZ2z
RWnZAHtRWeObfRKXwDJK+H8JlEfGLg3DcA5cweoWFFXbMYl8wQtLU5kH8jv/O+iZUX5xMyHW/qO
0/ZFM2oi6o5tQWMcJphVGrm2xakq4JRhvkV1TUwp
X-Received: by 2002:a17:906:9c8a:b0:c41:9228:baef with SMTP id a640c23a62f3a-c513aacec15mr3217672566b.8.1796205379012;
Wed, 02 Dec 2026 01:56:19 -0800 (PST)
X-Received: from kordpc.lan ([2a13:e746:396c:c600::8f9])
by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c513afdee82sm1186142766b.66.2026.12.02.01.56.18
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 02 Dec 2026 01:56:18 -0800 (PST)
X-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
X-Mailer: git-send-email 2.56.1
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list