🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #20524

Re: [PATCH net] net: stmmac: retry a failed RX refill from a timer

#20524
From: Nicolai Buchwitz
Date: Sun, 22 Nov 2026 21:09
35 lines
10015 bytes
Hi Sam

On 22.11.2026 22:02, Sam Edwards wrote:

> [...]

>> Do you mean "first as well" or "first instead"? Because "instead" can
>> cause avoidable packet loss:
>> 1) Initially, network is idle and ring is full of empty DMA buffers
>> 2) A burst of exactly one ring's worth of packets arrives
>> 3) The RX irq fires and stmmac_rx() attempts its refill-first (none
>> needed) then depletes the ring to the maximally-dirty state; the
>> refill timer is armed
> 
> Thinking about it more: the "unreachable packet" problem happens at
> this point too, even with the "first as well" behavior.
> 
> Maybe the best way to resolve it is to adopt stmmac_rx_zc()'s behavior
> of refilling during the loop?
> 

Only if the ring is no bigger than the NAPI budget, right?

Otherwise tne poll can't empty it unless a refill failed, and refill 
first
covers that.

Refill in the loop sounds good, but this would be IMHO a net-next 
follow-up.

> [...]

Regards
Nicolai
Technical Details
Message-ID: <3303844cdf7c00c5369453eb91027c1b@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-368822-linux-kernel-netdev=dewy.ru
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>

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-368822-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 22:09:40 +0100
Organization: Usenet Network
Message-ID: <3303844cdf7c00c5369453eb91027c1b@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>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="3724264"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:tVQPtu6PJCiRvS5HsiAqZPEYNq4= sha256:cjxFGo9aEFpzSNhw5/LGud+c2cqiI5XRh4YhkccZWZQ=
	sha1:8k81jZhASPJg/KNewJEItqu+8pc= sha256:3hMvYK9kWYehpVl6e8da3+4Bs5yr8u07pi7xKRjPqSU=
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 7D700125D84; Mon, 23 Nov 2026 00:10:19 +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 qyBsxIMc3FgO;
	Mon, 23 Nov 2026 00:10:12 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-368822-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 C6B1C125D82; Mon, 23 Nov 2026 00:10:02 +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 5BB8D232A5; Sun, 22 Nov 2026 21:10:00 +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=1795381800;
	b=EkUO7fK0H4KTdGP1MoHIUCQZu/TmYlSVpuTNcPG+kaDwZeUClNGu6wHbEtqkcov82fj6
	 6oKsMzuSY8hielJbdavq6WGAL6PYFVjg8TAk1qGVLKPGbc3FbidXTPP8whR7JtlZCkn9Y
	 63IBmPRK5/L2ZV+/aNeqBZptlmOQN9sgbl0W14rgPxisnfLYOqYLlZKdgMVaaY1Uyvn1I
	 ndyXUVejflksrDmvfsYZ7Q9KRiIEUOociz0uRzWCjMWfTmNReEAP2O2eSlaYxkqyzybzf
	 gQxIHHdFByEq2RrhGuoWLUNesVG5n4PgQrajS3vHOoMCKoWRonR1KoubHCmkzIRozIw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795381800;
	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=uxe+/upGUtn9RMUQNSI1VT9y02p7mp9sPqgPQ5Y4SGs=;
	b=Qsypq6NAHKkuV3vTPJJlctoPvnhGhlxFMTYovdDkUUcKllMjy3SlS4R+ApA4ZwB3+Oot
	 ntIUI/E6rwWnDRhluIgCYnPw1wyNfjMc0TPUoA1vIzalNjTjTi35XSn+MnPTohAXa1sjc
	 qd6Roq8wouwAKUopvyY7oQLp0eIJrCmh8fCMY9VvPll6YPfMjmjcaFyz2cT/amgWNEoSF
	 sm2NwiXK9Vk11Ev3VZwr+vo+f7jPG98zxYYwN0/ey0FiYc7Y06tGzQKg/Zewp6gdrUAP+
	 nGDJNcHZFl26ERPWSj795lyTcckld4BeKgSXke6IsvZwGuEDbmaBdcBar6wL8hziwtw==
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=frqHZnJk;
	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 2AD90606A32D;
	Sun, 22 Nov 2026 21:10:00 +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=frqHZnJk
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=1795381794;
	b=a17HjuXtnz2jTWQy1hdVosOwTQG+ByC4MwmkvTmVkRFcQZDVqztVoHCj9Yop/Bi5akXH
	 VvMDVsjYOH4erOkQwfMTf7V+oAobZ9sOX0C74c/bdfX8ohSakAJ3djWXrkSmfQGbOBag8
	 TGstt3vKW8A6lDaHR+MHrOYiOaN0zdwEM9SZk85WtdEHTETig298BYZ+p1boq/gVkst7h
	 QCi0ODCAlH6nFSWMgU2q/29fc2fdFHGO8K4v/5VPv3cYrn460s0gh6/wnO77Tj1ep4xMk
	 SyN1qB4wN81SDZIa3BpMZsaQKxfsyiBHyaaQQ0DnK84/XgkiBke5XipzN80kxdk6x4A==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795381794;
	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=uxe+/upGUtn9RMUQNSI1VT9y02p7mp9sPqgPQ5Y4SGs=;
	b=PyAshVQ1QyvLyrqgLHf2bm8Q+Js9URR82nFLKvWzSFDYfAhg76sn+zaAv1WUSjoLFE4I
	 gWLC+ruoH5TDSeYlRuE3ho34/SFjQBlYktvZyEBXUQRm6g7TWemn3iBoNp+XjaXmNJ6je
	 FhiWV1VrbsXx0iTObpOvQKxOfD3DiFm3aThuVf140c+TlfvJJlMYKFwle6nFNs8PJ0Z9I
	 tBL5yjpbmX5oRxE4HwEdIZcu5cOLoQi6yCywmM7Mm24j22Cu3j4U5v2PTULMgUrIWBRYU
	 3BXbBFvstK2gxXLL5RFLee6+hl4Bu7PHzsoe11AzJqlRpAl5r7rLkO/MCgABlr8kcCA==
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=frqHZnJk;
	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))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id CFDC1606A31A;
	Sun, 22 Nov 2026 21:09:53 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org CFDC1606A31A
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 B99AAA035D;
	Sun, 22 Nov 2026 22:09:40 +0100 (CET)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim;
	t=1795381785; h=from:subject:date:message-id:to:cc:mime-version:content-type:
	 content-transfer-encoding:in-reply-to:references;
	bh=uxe+/upGUtn9RMUQNSI1VT9y02p7mp9sPqgPQ5Y4SGs=;
	b=frqHZnJkTNxaPAjLmOsie2BAIg2lEWzgDqBSAagS74GBXq028DxAkyGhmH4Lc/UTP9h2/D
	ADmcniHun9j5JI2EcNeUlRI2sXkiP1oIHHQ6toy8xs3lN0UaVO5bzJDMcvdmi+aTbz/S50
	S8imbjTNZLaNYK3GEKUMvrNUwzLxzCGAxT8Tiyn169jjiBqwDaqRFSGzPXsvUqq5bmWbbR
	NJT4lhERRy1gmk2Qwaw3jqsaUKBO65i+SXIopcUp5yTebvsk7VF8qCOoyS8lVMKBbj5NOJ
	KT3DoYoxb+/tzUSxGEo5T5w0pyA7KbEWnxViY2IYi0nEV3xsBkdkaSKPnGR0RQ==
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: <CAH5Ym4jkX_tD58Gtd-mzruB+hqHK7s_9knNWh+gMqUjwuYyVPA@mail.gmail.com>
X-Sender: nb@tipi-net.de
X-Last-TLS-Session-Version: TLSv1.3