Article View: linux.kernel.netdev
Article #20553Re: [PATCH net] net: stmmac: retry a failed RX refill from a timer
From: Nicolai Buchwitz
Date: Sun, 22 Nov 2026 22:14
Date: Sun, 22 Nov 2026 22:14
31 lines
10038 bytes
10038 bytes
On 22.11.2026 22:34, Sam Edwards wrote:
> [...]
>> Only if the ring is no bigger than the NAPI budget, right?
>
> Right, but as pointed out in b6cb4541853c7 ("net: stmmac: avoid rx
> queue overrun" -- the commit that introduced the "leave one behind"
> behavior) the ring can be as small as 64 and that commit's author was
> seeing budgets larger than that.
Fair, a 64 entry ring is enough to hit it.
>
> Perhaps NAPI should only be told to stop polling if we either:
> a) Reach the clean tail of the ring (so we *know* there are no further
> packets for us)
> b) Run out of memory and have to arm the retry timer
>
> Thoughts?
Agreed, simpler than refill in the loop. If stmmac_rx() stopped at
dirty_rx and the refill worked, return the full budget so NAPI polls
again.
Anandu, could you fold that into v2?
> [...]
Regards
Nicolai
Technical Details
Message-ID:
<8e7b5bd372934d85ff890a6da7ca93b8@tipi-net.de>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-368852-linux-kernel-netdev=dewy.ruReferences:
<MA0PR01MB921746F36D90C7080287ACC9FD782@MA0PR01MB9217.INDPRD01.PROD.OUTLOOK.COM> <9d8cdde77beedce76aaaa1c5a7a788dc@tipi-net.de> <CAH5Ym4h8-1mc+DX0Si7XROeGn9M72bQC+ooM05Y7ZmgTo+ON4w@mail.gmail.com> <CAH5Ym4jkX_tD58Gtd-mzruB+hqHK7s_9knNWh+gMqUjwuYyVPA@mail.gmail.com> <3303844cdf7c00c5369453eb91027c1b@tipi-net.de> <CAH5Ym4ijMNSAWZ8k3GmwOoLDBVTy32B1uhS_fE-dGhsPkgozeQ@mail.gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-368852-linux-kernel-netdev=dewy.ru From: nb@tipi-net.de (Nicolai Buchwitz) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net] net: stmmac: retry a failed RX refill from a timer Date: Sun, 22 Nov 2026 23:14:05 +0100 Organization: Usenet Network Message-ID: <8e7b5bd372934d85ff890a6da7ca93b8@tipi-net.de> References: <MA0PR01MB921746F36D90C7080287ACC9FD782@MA0PR01MB9217.INDPRD01.PROD.OUTLOOK.COM> <9d8cdde77beedce76aaaa1c5a7a788dc@tipi-net.de> <CAH5Ym4h8-1mc+DX0Si7XROeGn9M72bQC+ooM05Y7ZmgTo+ON4w@mail.gmail.com> <CAH5Ym4jkX_tD58Gtd-mzruB+hqHK7s_9knNWh+gMqUjwuYyVPA@mail.gmail.com> <3303844cdf7c00c5369453eb91027c1b@tipi-net.de> <CAH5Ym4ijMNSAWZ8k3GmwOoLDBVTy32B1uhS_fE-dGhsPkgozeQ@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="3735382"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:sSwPAmTVpfxa94hKet3H6lfFWQw= sha256:KmCEC6OyuB0pxJGxUN6Tacug3f0OeE2QBvcb/hN+0Qc= sha1:qq7fAKp+ptxATBW/B+H9Xsc4IZU= sha256:r7Mzwga0VVo7mEFF5rCOvjdR/i9VWr7Yl6rrDO+1l0I= 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 464CF125D87; Mon, 23 Nov 2026 01:14:36 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.05 X-Spam-Status: No, score=-3.05 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, 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, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=tipi-net.de 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 b0kppuAPMidt; Mon, 23 Nov 2026 01:14:28 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-368852-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=tipi-net.de X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id DC296125D86; Mon, 23 Nov 2026 01:14:18 +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 8CF0C283F9; Sun, 22 Nov 2026 22:14:15 +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=1795385654; b=jTM1hC3qpPB6fIgcNmB2Iw0y/7AS1ZT+E5WbqMDtwxuH4PBw4fhYLlLWiHEd+qnIjlnA AB5AgltFe/SYUnBlFRH+1QSlvYd6NUIn/eTOahC8krmLSRJIV+b4pOf8qYJniM8k5BU5b x/thny8d5FG5W8qXbsF/Bq84KjjMvXfm4Hb1q6T2HxLLsefrSrV9gT8wIsNsSAYfcNkhH UPUo7AoONszVaRtW2uLCgV2O1jhG2yikmc4glKqDUzdBT6Nd2qs5xGCwy0WrINP+apWev t6xOFxdjiazQ228r153x1s5YU+8BdTqOaUaw2gxMXde20qNH/jAxAwfrMGK+NriGl7Q== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795385654; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:Date:From:To:Cc: Subject:In-Reply-To:References:Message-ID:X-Sender:Content-Type: Content-Transfer-Encoding:X-Last-TLS-Session-Version; bh=jvCxwlOVxvnKYhMHTmlKe3u7SgksgRLz0kN7w/QcZLA=; b=jfC7jfg1VktvEUKw90Crwusai7RUEqOjGTZBAwfcHkly6fxaeD5uY0dvu0pV6wAtU6PQ dMyhuiIBnaiOaEQwPk8fCDG/+ArPuIZELebDM/5bKc2Umypk8hvajmkz3Ltiys5I8xuen fpt/P31jVwT08hq7+X8vmrLNyPWrp9mUUOZiXB+EzSGCrIrRVV3H9YeWZk9Oml29v3Ffc xdcBnQLHI5fdklCPdWnUWlHnIOEpKPr3tx+U4ZK92CtcTs/aJDMJdnMLUKWiv4ODhNN7+ EgK7yKvB+ZqTVQRCZfqGI7ecs99kBCUsIR97snvy2VuX0tHZZfex4WLk3cGF6gc1/Ew== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=PlUv11zu; dmarc=none header.from=tipi-net.de; spf=pass smtp.mailfrom=tipi-net.de; 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 D04F5606A335; Sun, 22 Nov 2026 22:14:14 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=PlUv11zu X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=194.13.80.246 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795385654; b=bvuDq6rws1AzbtT0HOJz3jsQO/gvQ7xeeKE4t+qqkAqjz8IJAPyZMB9SFJ1nRrs5EqqF 6ob28U3RTMz6Df69PsLlE+1u9chm5p6ESk28thBkwN4koqSturvBZvvIqKMah2WycLQoy C9WcDxccjNWjxTtgC/KbV7qzlxsUN2I31BdzZfJqC7/0HWmy9Rw1W7eD22scdGCymfUq0 j9i2x08TMZrLZF3IdJDB9/g1zhg1sfUZo1nC+5wpg+LGVo1wrT6Ms1ahGB2W1RcVkWWiS nWOZR+bDvCMTYRur0Cd3Z0RbkOXrXQEGPwVv9rRuuhuhAmZprkT2CMDi1qktQAhLA9Q== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795385654; h=DMARC-Filter:Received:DKIM-Signature:MIME-Version:Date:From:To:Cc: Subject:In-Reply-To:References:Message-ID:X-Sender:Content-Type: Content-Transfer-Encoding:X-Last-TLS-Session-Version; bh=jvCxwlOVxvnKYhMHTmlKe3u7SgksgRLz0kN7w/QcZLA=; b=gKUJykB5NgK9aCbTuWHtLxCWep84fU7/1xJxyAJjZFiXZGI6SK8YZPSAMkH60uZmmpLm gmTZ48fKaJJZLwUKhS8YgbAxtZewLt6ZBtNx6fsnhBz2zFCSq5x0qfB6NhPhhqEIPfwbh ccelq+dfNFmvLW9bekMywK84GM7m0wLG2iHrxr4l7PCoL67H3MLc9zZ/Ls47ADhEuDotN /I5mH9jOaSjbuCWN/qIRsVEiFn6RY1ns1QOVrURMTYmbTYHFtqJUeDGXWL/MuEQmrDYoX uuYdCAXbGqKc91x1ynzhdsZ7UyclLj0rGgh/u869noMySY+vxFraYsED5a9s2KxLiSg== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=tipi-net.de; spf=pass smtp.mailfrom=tipi-net.de; dkim=pass header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=PlUv11zu; arc=none smtp.remote-ip=194.13.80.246 X-Received: from mail.tipi-net.de (mail.tipi-net.de [194.13.80.246]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C70B4606A31A; Sun, 22 Nov 2026 22:14:12 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C70B4606A31A X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tipi-net.de X-Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 660FCA1583; Sun, 22 Nov 2026 23:14:05 +0100 (CET) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim; t=1795385649; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=jvCxwlOVxvnKYhMHTmlKe3u7SgksgRLz0kN7w/QcZLA=; b=PlUv11zuZmjCQ9XkkO0TWMYVaLHEBdR/ZEwNEQwGvaTjoK2mf3tmATDiyebZKtUBELRIbr C78c7ckRSlxFK2m+88dWVkS63z4qDLMgW/Pm15Jw9IsbWwzPCNWZCw0V1ghfzATIcrV7pI mzoHTGvMTV20Z/ktP0eVnAIyP0osVNs5UreK4vEkbC2bDd3qzcMWtsn0wcpl6Mqv/xOjMU BxSsXhcvF6bmc2zN2h94JOjZDVVHRxJ6Bb5XFU+ZTU0+9R1yIqD9Q/NlBiNSe92L+O/ix2 Wd0OiBjCjSJSi1gn2oELSg2xWcUhpZ62fvwUxIUxOTDDeVTeqxPE5UosZMPyAw== 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 X-Cc: Anandu Padinhare <Anandu.Padinhare@electrifex.com>, maxime.chevallier@bootlin.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, Alexei Starovoitov <ast@kernel.org>, Daniel Borkmann <daniel@iogearbox.net>, Jesper Dangaard Brouer <hawk@kernel.org>, John Fastabend <john.fastabend@gmail.com>, Stanislav Fomichev <sdf@fomichev.me>, "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>, David Wu <david.wu@rock-chips.com>, stable@vger.kernel.org, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, bpf@vger.kernel.org X-In-Reply-To: <CAH5Ym4ijMNSAWZ8k3GmwOoLDBVTy32B1uhS_fE-dGhsPkgozeQ@mail.gmail.com> X-Sender: nb@tipi-net.de X-Last-TLS-Session-Version: TLSv1.3