🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #13314

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

#13314
From: memoriaru
Date: Mon, 09 Nov 2026 16:40
38 lines
10814 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 splits the two NULL meanings on
lan969x (allocation failure keeps its retry-later break; a bogus frame
returns ERR_PTR(-EINVAL)) and advances past it in the poll loop.

v3: address Daniel's review of v2 (pw-bot: cr) - drop the extraction
FIFO flush and the redundant comments, use dev_err_ratelimited()
instead of dev_err()/WARN_ON() (per Daniel's testing the splats slow
RX to a crawl), and drop the now-unneeded err.h include. No change to
the fix mechanics.

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     | 17 +++++++++++++++--
 .../net/ethernet/microchip/sparx5/sparx5_fdma.c |  8 +++++---
 2 files changed, 20 insertions(+), 5 deletions(-)

-- 
2.39.5 (Apple Git-154)
Technical Details
Message-ID: <tencent_6BAC076E552C6F338052FC02794D9B28ED0A@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-359447-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-359447-linux-kernel-netdev=dewy.ru
From: memoriaru@foxmail.com
Newsgroups: linux.kernel.netdev
Subject: [PATCH net v3 0/2] net: sparx5/lan969x: fix RX ring stall on frames from inactive ports
Date: Tue, 10 Nov 2026 00:40:58 +0800
Organization: Usenet Network
Message-ID: <tencent_6BAC076E552C6F338052FC02794D9B28ED0A@qq.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="404314"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:XvlASwy4JOGU+AGpeNXyW4VpKwI= sha256:UTNoIpTDpXbnTv+5Pt6mddynvS4/hcJzpGa+PP71RpY=
	sha1:2Fry7ic/WXdMR2Nb0ELY7dKFhtY= sha256:/wh4Ar5wTzkbErR9NIiLi7nN0zHdAC5GDgYDWib84tU=
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 4DA75113894; Mon,  9 Nov 2026 19:52:18 +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 (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 1xY-cF3w6ls5;
	Mon,  9 Nov 2026 19:52:15 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-359447-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 3BC1F11378E; Mon,  9 Nov 2026 19:52:06 +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 75AD5C5E9C; Mon,  9 Nov 2026 16:41:14 +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=1794242472;
	b=0SEDwO+sQTloBazKV88/7jQ8GECO2CmoqPfM8sa5mzbPzln3k0LD3mpfB40hlvpkU/Yi
	 2vT10gh2bCUeXsvAsqcjAksnmNaEizbspTJ44HTf91wEEl8S9Ex7RVvHdTxRe+ky3j0OP
	 nOHqJOHSdJiCD4jBo7XuCjgJqT2Yc60nMhArgvYE/GAwR0fobrCER1Z18XgrVFmBKpbL3
	 2nRU8riF6ZKNGxxKt7p0sdv88Za+zrAiZOS+mmApQcMlEImBxgY7AewMrxTjS4goZ2yDJ
	 Nany150OxjPNSd1RVa0AmVJMJFMqJJZwaehDCHwIOQbAhGEqsoe1/3+7cNrUUSEO/fg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794242472;
	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=V+X7IEFTcG0ZrnplJcNIA2UecbDUOL9zjh/xRk24TaQ=;
	b=4f6In6s0yi4ZOgetXdKxV72ukdG6MZR+BG26JBomdTQ4RudewdajoogKL+Qmz+0m6m15
	 tD4jDA9sSVJoVJ3JYkLXEPzyT+tpAgYTHNi2aQvra4X47kAlkYTxFCOCmItNwlui/re4+
	 q0EpNJ5KNXaMsyw4AzMoCZ9uBJoKDzbGtV/GMXhpF7DaYeBY7kRIuZt+0r76vWF3L2xfM
	 1LNAUpEl5ZnwYSIPBtDnExqRl+ElBI8ueMMEmrjme7cpKUMKLQz4sea/PTXM4dl8V9e5U
	 Wf4xL8MBj3RuTzPAdoUj1fC5nEfyLKVGdLyzrXCt5kKpgW+ABUEDx/hlWuSKQVDB1ZA==
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=SlSm8EaO;
	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 96B33606A337;
	Mon,  9 Nov 2026 16:41:12 +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=SlSm8EaO
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=162.62.57.137
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794242471;
	b=vwqRLg5ow9spfrn9+coLYHD86cYXgy+0HYrWXkTMmemC7cQ/iUo9f7opeIYM6wrEiasp
	 kn5QSE1iX6J5TqVMsGpdCEk/XVxx+7bK9ItpEWQTCcB1YBALwm1negfvYCsUcv8LJMdnJ
	 qAWIPIw/d5QkFZpfOKEycSvM8AGY3uSDTMXMsLP94IjhBo3fcxznGR1fzYEFNKXwQBn/1
	 HgA+xhKTOM53zAaqcKpTD4nNfZ8vncI6xucxhUmUA75K3TOp5iiWnHSbkNbqCjMR2FruY
	 EpPkM/r71K0tqvuYRBH5c6rZLrlMivIttg2chuMll/ysm4pYfGDeSB8Hl2MpHXNo3cA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794242471;
	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=V+X7IEFTcG0ZrnplJcNIA2UecbDUOL9zjh/xRk24TaQ=;
	b=Fw8aXH19Yq9K7126lXZ71kby00tkzxWwEiCWkHU2GB7m+9yJq5gkPWkQbdlJN7svBTw3
	 wrML8IXBbshQIdnK2OE99V2cYitDwYU7Sn31PHH6eOaFnGAaRSoyFZW9tEc7i0nkvVWwC
	 K86wACNugbHqlb5XjfB0JCfARdz03wiLkKgstLRTLuPbUqfJfvUxH/jIY+FtJHoytH5QK
	 eMJcYtXqx2hKHIrGw80ix//9RcowikE7vxyalllcIMrn/g/1lo6sbSowy82YWra7TNcGQ
	 KCF8AmJFe3KuCHZvWDft5Lok1y8ov64e6H9yw1NDwYYUeoU1EXYri9/zfYSw6wQA8vg==
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=SlSm8EaO;
	arc=none smtp.remote-ip=162.62.57.137
X-Received: from out162-62-57-137.mail.qq.com (out162-62-57-137.mail.qq.com [162.62.57.137])
	(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 6FD14606A31C
	for <netdev@vger.kernel.org>; Mon,  9 Nov 2026 16:41:08 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6FD14606A31C
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=1794242464;
	bh=V+X7IEFTcG0ZrnplJcNIA2UecbDUOL9zjh/xRk24TaQ=;
	h=From:To:Cc:Subject:Date;
	b=SlSm8EaO+ufW+TrhRoO54Qn5oa8R1Hh+xuTv+BsS+BaL83GKQ8IeYvFYhTDoG0PCX
	 6ITXxUBu0WLuIBNrigO5BWIlq184OQaCDZxiJ1pHwc4CJm8bWP7eU1gkk7PdIeNK/4
	 Kd96O41CvivoBrh2drN3s1UiUBwIRxAPnHx12OP8=
X-Received: from localhost.localdomain ([183.23.108.92])
	by newxmesmtplogicsvrsza53-0.qq.com (NewEsmtp) with SMTP
	id A413CE3C; Tue, 10 Nov 2026 00:41:01 +0800
X-QQ-mid: xmsmtpt1794242461tm7ib9yvw
X-QQ-XMAILINFO: M/NR0wiIuy70ISTSzmCZ1jczkDN/6Vf0mJqpV7bfVQt1pUnVpABKDExRbOB51R
	 1T00JcHDfyc8Lqcjk/uNr92SI6aTxHF78RN/FI/KZnHE2R02BuC/YDLfcrgThPxTuY7XAo5HK/Uh
	 4DDPy1f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Tk3gLg==
X-Cc: Steen.Hegelund@microchip.com,
	daniel.machon@microchip.com,
	UNGLinuxDriver@microchip.com,
	memoriaru@foxmail.com
X-OQ-MSGID: <20261109164100.8947-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