🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #12589

[PATCH net 0/2] net: macb: two fixes for macb_tx_error_task()

#12589
From: Nicolai Buchwitz
Date: Sat, 07 Nov 2026 20:58
28 lines
9447 bytes
Both pre-existing bugs were flagged during the clashiko review of my
software FCS patch [1]. These are the promised follow-up patches.

Patch 1 credits the frames dropped on a TX error to BQL. Patch 2 takes
tx_ptr_lock in the task, as macb_start_xmit() moves the same pointers
under it.

Tested on a Raspberry Pi CM5 (RP1 GEM). The bugs are hard to reproduce
and the error path never fired there, but they are worth fixing anyway.

[1] https://lore.kernel.org/netdev/d1f02ab923c0464fa73cafa75a21943d@tipi-net.de/

Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
---
Nicolai Buchwitz (2):
      net: macb: credit unsent frames to BQL in macb_tx_error_task()
      net: macb: take tx_ptr_lock in macb_tx_error_task()

 drivers/net/ethernet/cadence/macb_main.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
---
base-commit: 30c71476d842b094651bd7712f6c8ee8716147d0
change-id: 20261107-nb-macb-tx-error-task-net-e8a553b4d138

Best regards,
--  
Nicolai Buchwitz <nb@tipi-net.de>
Technical Details
Message-ID: <20261107-nb-macb-tx-error-task-net-v1-0-a2aac5d64d52@tipi-net.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-358525-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-358525-linux-kernel-netdev=dewy.ru
From: nb@tipi-net.de (Nicolai Buchwitz)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net 0/2] net: macb: two fixes for macb_tx_error_task()
Date: Sat, 07 Nov 2026 21:58:46 +0100
Organization: Usenet Network
Message-ID: <20261107-nb-macb-tx-error-task-net-v1-0-a2aac5d64d52@tipi-net.de>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="4192606"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:Dx1DW+vRlm0FSi3d0jIoaGLpxn4= sha256:FX1h/jgPEhnnesb+7E0YL8s9xa3g6XMkWV44QHUpGzQ=
	sha1:RT2rqKuY0Fzi4YNSj1N8hXrkmvg= sha256:Rib2Op9aB/vMtve5B21gBtLJemlRLoc8OxeJyLv5ARo=
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 E28B91134B4; Sun,  8 Nov 2026 00:04:48 +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 7htVOu6o3hiC;
	Sun,  8 Nov 2026 00:04:45 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-358525-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 2504D1134B0; Sun,  8 Nov 2026 00:04:37 +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 7E27262C96; Sat,  7 Nov 2026 20:59:51 +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=1794085190;
	b=Xzs2YMyckN7QXX7YhJ+WEE8TvArsqFmSGQq11OTW9NH1eJCJzSLlwEKa5Q8XoValRbGa
	 1YEBcedQuON3nvYzABWbhlvxUxtX18sO+tn38lx1ZAn1iy7TOc62VFG47VbBvjaL3C9WE
	 KBBrkvF8SZ0WJu/btKKd/UVvnjYB6xZ9ZMht6zcsQDpQYgd8US8vbTuPgDAUimuULzGqO
	 QxGduT2M78F3siFhndnmenrLEiFRxhlB57e2efozKk6S+Xupin5TtN3en2ef/+VqSbugO
	 PuKkaLaCQrww8owUH5SvJ44YMUs1hCdjG4AFpSaeugoCrwQ/NCoKazRQy1rwX93Rw5w==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794085190;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:From:
	 Subject:Date:Message-Id:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Type:Content-Transfer-Encoding:X-B4-Tracking:X-Change-ID:To:
	 Cc:X-Mailer:X-Last-TLS-Session-Version;
	bh=QlC1oB+nHcJs9biss2U5Td+JhsQeCba93tiXoAemIAM=;
	b=C/HgV36d/XhQ6wsQcNW3TwL2Hlo+0dXXGimGxWRuh2zdtGyXGxIf7aaN7Qw2ClSMx9nc
	 G/RcMDWk3MUeaJBfbh9M6sM84vwKm9N1rARZCmSflbDrg9ltO+Q5lZH6nTvfPCZ/mGCXt
	 TPogLGMfCu0NIh9hM95ELcp/fcc/+vYUssL2HRGfukVjmEXpetluwevcoK2MwHDjL9yed
	 15W+s9aO2v49+Cr25BWoCsutZF38NoXIaMtvGEgrP46RPTdnT4hRCQ9+LHkIUYQdrgdJ8
	 8IDf6/hx8O93Elz1r4O5qpkgjxjeqJju3+aHeWe3U4795iHdWDDYglCNGjJFpnBn6rg==
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="vCBQXxg/";
	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 99BAA606D81A;
	Sat,  7 Nov 2026 20:59:50 +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=vCBQXxg/
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=1794085179;
	b=xn1CQfPCxzh7/TbIYAPRxfFx54Dfp6zkoqPStixKLgI34GL7o4m8kZjCJEQYPlQXEbjP
	 MWGSfA5qV3axCKvjs84ZxEuZEafmOKxYWWWjoXZ4KZgAeEm/3H2617SpUWJLx3YnjFMfb
	 ocASNyuBtiY7TTwWcF55FQt/2cRdK4IoZIaEEab0rXMdgBZ2dDstkdpRYE4ePR2hrGIvl
	 1CBFwfCnAlQ1a3qX6Sg0C/9gVc8s3XW3A+XJ2GWc1LIgS8PN3WRqQkCV8M6371Ria7fCA
	 k954s+QwAaaiuEj3seRde/ymZW6ecdpcaAUG6/9tHKBprnwiJUxoGCIa/DjoxpM7w5w==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794085179;
	h=DMARC-Filter:Received:DKIM-Signature:From:Subject:Date:Message-Id:
	 MIME-Version:Content-Type:Content-Transfer-Encoding:X-B4-Tracking:
	 X-Change-ID:To:Cc:X-Mailer:X-Last-TLS-Session-Version;
	bh=QlC1oB+nHcJs9biss2U5Td+JhsQeCba93tiXoAemIAM=;
	b=D/5XW7B22KA7huxeq2hQePpX+66fk4A9LVs7jihkXvX6ZfAlufiuTIpMaDbK5ijqT3Bd
	 r1bZyPN4fr47vAGVKRP5hVwKckHY5RhrgFgmE1WbrNj45pVoLgP272t0wvjQjnSCXwZ3P
	 fK/N/UNVL5J+SufvzUElCioe+zchfsZ6lZQ3uZH22NRX8WJ7af6QXF5plhcyUp1vStvg1
	 ZSbdRzQJk1oAUUvBJSEwjPWhcnw9D1FW6CrEYRtKctb4RJh9s8afY4Gcc/CmXLsqW0RoZ
	 Q2FR0ACNcoTmkydTZMXItb8r/yNhMuLYKCoqUDpFy6/vlILrRwqFstN4S7zfhlRkyEw==
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="vCBQXxg/";
	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 B5596606A326;
	Sat,  7 Nov 2026 20:59:37 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B5596606A326
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 35EE7A1631;
	Sat, 07 Nov 2026 21:59:15 +0100 (CET)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim;
	t=1794085175; h=from:subject:date:message-id:to:cc:mime-version:content-type:
	 content-transfer-encoding; bh=QlC1oB+nHcJs9biss2U5Td+JhsQeCba93tiXoAemIAM=;
	b=vCBQXxg//6xusQyfEQOMQXtiH/0GGiDZB34f8r2weOSDAqbde3VbyxJo5bjlSWufMTvFLu
	QIUKdayvVFfSNdZtkPJ2zdJfkR3LQfTLAXrb0i7K9urIZgPhK0PpdU01tSTc+d6cwQu//M
	GnIjde/F3I3PJuehOCO9OP1x4gvpTm4gMhKLJo0sy9cCSE/zJiizhythZ1rWMJD6tXcah8
	HpE2uHzpM1Sj8BmmauZlCt/CfrtbHsFXUnQPC6boKjXI53LgMRmUm7ZetkzGfCMroqOa+5
	kVkSD9ICe6lC6i86vsZhkzEqAQIjzKqwzwQOdvjil/v9dohe+sS2h/QWaKYObA==
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-B4-Tracking: v=1; b=H4sIAAAAAAAC/yWM0Q6CMBAEf4Xcs5dQECX+ivGhLauexmLuqiEh/
 DtFH2ezMzMZVGB0qmZSfMVkTAXcrqJ49+kGlqEwNXVzcK4+cgr88jFwnhiqo3L29uSEzOh917V
 hP7i2p+K/FVeZfu0zlQNd/qN9wgMxb1ValhWJWI+mggAAAA==
X-Change-ID: 20261107-nb-macb-tx-error-task-net-e8a553b4d138
X-Cc: Sean Anderson <sean.anderson@linux.dev>, 
 Robert Hancock <robert.hancock@calian.com>, netdev@vger.kernel.org, 
 linux-kernel@vger.kernel.org, Nicolai Buchwitz <nb@tipi-net.de>
X-Mailer: b4 0.16.0
X-Last-TLS-Session-Version: TLSv1.3