🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #16095

[PATCH net v5 0/2] net: sparx5/lan969x: fix RX ring stall on frames from inactive ports

#16095
From: memoriaru
Date: Fri, 13 Nov 2026 23:44
41 lines
11044 bytes
From: Zhang Hewei <memoriaru@foxmail.com>

The FDMA RX path on both sparx5 and its lan969x sibling stalls the RX
ring forever when the hardware delivers a frame whose source port does
not map to an active netdev: the inactive-port error branch in both
drivers leaves the FDMA software cursor untouched, while the DCB keeps
its hardware DONE bit - so every following NAPI poll picks the same
DCB again and RX traffic stalls on all ports until the module is
reloaded.

Patch 1 treats a bogus frame on sparx5 as consumed (free the skb, clear
the array slot, return true). Patch 2 unifies the NULL semantics on
lan969x: NULL always means "frame dropped, page recycled" (inactive
port or failed build_skb()), and the poll loop advances past such a DB
like it does for any other frame.

v5: add the testing status to the commit messages as requested for fix
series (patch 1 not tested - no hardware available; patch 2's
drop-and-advance form was verified on lan969x hardware by Daniel Machon
during review). No functional change since v4.

v4 lore link:
https://lore.kernel.org/netdev/20261113122429.26163-1-memoriaru@foxmail.com/

Found by code inspection; the stall needs the hardware to emit a frame
with an invalid source port, which cannot be triggered without hardware.
Review from someone with access to sparx5/lan969x systems would be
appreciated.


Zhang Hewei (2):
  net: sparx5: fix RX ring stall on frames from inactive ports
  net: lan969x: fix RX ring stall on frames from inactive ports

 .../microchip/sparx5/lan969x/lan969x_fdma.c        | 14 ++++++++------
 .../net/ethernet/microchip/sparx5/sparx5_fdma.c    |  8 +++++---
 2 files changed, 13 insertions(+), 9 deletions(-)

-- 
2.39.5 (Apple Git-154)
Technical Details
Message-ID: <tencent_D2451CD0D7B4B812CEBADB56DC722BC33406@qq.com>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362982-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362982-linux-kernel-netdev=dewy.ru
From: memoriaru@foxmail.com
Newsgroups: linux.kernel.netdev
Subject: [PATCH net v5 0/2] net: sparx5/lan969x: fix RX ring stall on frames from inactive ports
Date: Sat, 14 Nov 2026 07:44:34 +0800
Organization: Usenet Network
Message-ID: <tencent_D2451CD0D7B4B812CEBADB56DC722BC33406@qq.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1478850"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:tIwPHwN/zeZNaQZLqETSNtwVd38= sha256:OUm7/AD0I4LQm1foCXyph2rUB5h1/4sGbiQ95NEqxwY=
	sha1:eQycPWUfOdu/t9sAjvlteDvPSKo= sha256:N/sRLv8CKZb/EWCWfK7f80FkQbVaH2TCL3KQ4cSmP7M=
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 59BE1114715; Sat, 14 Nov 2026 03:52:37 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.048
X-Spam-Status: No, score=-3.048 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, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=foxmail.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 rHhRPLEmtVw3;
	Sat, 14 Nov 2026 03:52:31 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-362982-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=foxmail.com
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id A36A11146FF; Sat, 14 Nov 2026 03:52:22 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id D4C6C1450ED; Fri, 13 Nov 2026 23:44:54 +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=1794613493;
	b=XiznWmH9Gfo8zF/dTA4NEwNDMgb/WvSTZWQvvMqJ6mSXum393zdGrLdDGSxWiFGo0T8K
	 94ESNdGo6JF/oGfI8I4Iw0MXNskiuL7yPQM+wGOlWZWz1+8AHj7jRS7vqKly+jFmH6/P3
	 17H7bTHl2AbtOsVM9B9um6lcs+GQnQJ0IgZ5NEEKVOGn2VL5lG7A3WFLz2JSUrxEW66oF
	 aAOYM3/O3/a6T9F6E/uYZN0U/J7cvMcW9VFIteXRcBOo/DUDriYOdrlHwPpyxFSHdepvB
	 zelRSNE145m3C8Ht/cnV4/hIqWZRJhwnvZejsvPiNBR37dVLhDK1cn9rafTmwO+LELA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794613493;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:X-QQ-mid:
	 Message-ID:X-QQ-XMAILINFO:X-QQ-XMRINFO:From:To:Cc:Subject:Date:
	 X-OQ-MSGID:X-Mailer:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding;
	bh=sfSwd+E8hxZNGFEXtM/YBMJuQSoOay1IgE8bLxa0aoY=;
	b=DCq3CDKh29EGFwOTIMy/r0GFgi+MUXfy73VVvin+M7w3KE3HRcgMVUCKnyujh7ewPPLn
	 1081No/0TtVGT5rXbiLAB/ZRuSt/1yqSw4Dbu6tY/9WH7JCdHnik/RpghJdOHHVdn/IE9
	 y+6jEhuvbk0ufX+jTjiM3QOyfnpDY1PKPzyqo9lxoPj+LqgGjFuPlA4oN0NFGJDJAfsKQ
	 AwDq5D13T2DQkyTQC+xu6TZ6fierFP7GXH0Q8HD2CK6fKUjSrmpHx96X/IPK/8VLnmdif
	 2PnTMJroqeN+AuMM/F+IG4V5h3mwrn9v/I9Sbp3R8jcQUrmVwHxgmEf1efp3PHwPP+w==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=foxmail.com header.i=@foxmail.com header.a=rsa-sha256 header.s=s201512 header.b=EMvDeECf;
	dmarc=pass header.from=foxmail.com;
	spf=pass smtp.mailfrom=foxmail.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 39872606A327;
	Fri, 13 Nov 2026 23:44:53 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=foxmail.com header.i=@foxmail.com header.a=rsa-sha256 header.s=s201512 header.b=EMvDeECf
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=203.205.221.242
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794613492;
	b=wMStJbRFOPWUMTpIt9dtMaBaeVpIJUQL+KmNAj6YX4I//wcQNxuyC6t4iANAg7rx+cK+
	 GNGsKxRN/+Lo2mjO+AgozqPLNWsT9mkgUnH14EQiJP1HFWb2+yfbRHBcjyRfK5gbEBKlY
	 DXl9FQ4XMQl097EDY3IO64PlvzhYdlKIajCZE8ehIQIo0TwGVJQ8z+nLqGuTEtU4OmSqa
	 OARTxLvGlgNboGEXFUvL4kzheiroqzxU1ac076WNY0cxmbOvjcpaak9e8BNKV/EKpIFU2
	 zF+mNroDbzXjiIK84N+/JI6IimE+P3aAAlJv3Sdbvq1lv03kVKsVCn7ySNVk5DVJLrA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794613492;
	h=DMARC-Filter:DKIM-Signature:Received:X-QQ-mid:Message-ID:
	 X-QQ-XMAILINFO:X-QQ-XMRINFO:From:To:Cc:Subject:Date:X-OQ-MSGID:
	 X-Mailer:MIME-Version:Content-Transfer-Encoding;
	bh=sfSwd+E8hxZNGFEXtM/YBMJuQSoOay1IgE8bLxa0aoY=;
	b=p9UOYwQXDIftLoHWb4CYmL9zvI4qSCY9FD2ljX8SaBx986GcSvK5S4SLIwMJOe75xpDD
	 oG7NNrSj+Ojif/Ivrdk10lo4Hqxz/az0iVnAx3caOg8/H0NcL09wwHmyv4dk9gbjgHD/L
	 zIPa1WubepWNjNITrmvQI3HWY1gZsROD5mA0P9Ek6KX6n6LJvHJ+PEgXT8q0jhMbU53IP
	 F5X2dsL/6CN2fsKb/filRb1tZ7GKD/njmCnbW4yVpWpkYLFhCETUonBagX2bm5DMDLuB+
	 bBPkQtqXVEupf1MBApHNQSMt6B1c4mJnXosf5TMllqPTFso3662qraCKKdGFFaIQIsw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=foxmail.com;
	spf=pass smtp.mailfrom=foxmail.com;
	dkim=pass header.d=foxmail.com header.i=@foxmail.com header.a=rsa-sha256 header.s=s201512 header.b=EMvDeECf;
	arc=none smtp.remote-ip=203.205.221.242
X-Received: from out203-205-221-242.mail.qq.com (out203-205-221-242.mail.qq.com [203.205.221.242])
	(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 43F60606A323
	for <netdev@vger.kernel.org>; Fri, 13 Nov 2026 23:44:49 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 43F60606A323
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foxmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=foxmail.com
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com;
	s=s201512; t=1794613482;
	bh=sfSwd+E8hxZNGFEXtM/YBMJuQSoOay1IgE8bLxa0aoY=;
	h=From:To:Cc:Subject:Date;
	b=EMvDeECfLE7cvE7kdUR2aYZGWeN70rssobxE27OiFhNnXT32Zksy4i/7y+tY9JJtw
	 YHB66MjKMQRNHVRfa1xB7dmjJKk+NaC1MnqslugNDGppkSbBoc+v99PIrYvBtsaGnq
	 yOrPlPPxNVGN0Mdy8mm320JvmepBMf3wG0ohmryQ=
X-Received: from localhost.localdomain ([240e:3bb:3032:791:1c66:e624:37fc:2222])
	by newxmesmtplogicsvrszb43-0.qq.com (NewEsmtp) with SMTP
	id B2594C56; Sat, 14 Nov 2026 07:44:37 +0800
X-QQ-mid: xmsmtpt1794613477tmeedlg0v
X-QQ-XMAILINFO: N7NMbzIEsXzdiw2d/4uwoMFvoN/1Asv48GiXFyLkwGuWV6FBdpujzDocOVk57Z
	 2ZQ83Bvuow2SzNR7ptDGUmQhepe2ifxU7WoBUfrCQdkKus5iOtc8+c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UnmD8n7FBbrbJ+mUckWjWS849ZvPGBoliVrf7djDXwjIUzkWrWFMzPCNQGt
X-QQ-XMRINFO: NS+P29fieYNwqS3WCnRCOn9D1NpZuCnCRA==
X-Cc: daniel.machon@microchip.com,
	Steen.Hegelund@microchip.com,
	UNGLinuxDriver@microchip.com,
	kuba@kernel.org,
	memoriaru@foxmail.com
X-OQ-MSGID: <20261113234436.75276-1-memoriaru@foxmail.com>
X-Mailer: git-send-email 2.39.5 (Apple Git-154)
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