🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #17721

Re: [PATCH net-next v7 6/9] net: bcmgenet: split frames that end just past the transmit threshold

#17721
From: Nicolai Buchwitz
Date: Tue, 17 Nov 2026 09:05
66 lines
10999 bytes
On 15.11.2026 14:01, netdev-bot+sashiko@kernel.org wrote:
> [...]

> [Severity: Medium]
> The commit message says the window "is one DMA transfer wide". The TX
> DMA burst size, though, is set per platform in bcmgenet_dma_init():
> 
> 	bcmgenet_tdma_writel(priv, priv->dma_max_burst_length,
> 			     DMA_SCB_BURST_SIZE);
> 
> bcm2711_plat_data uses .dma_max_burst_length = 0x08. The v2, v3, v4, v5
> and bcm7712 platform data use DMA_MAX_BURST_LENGTH (0x10).
> 
> Suppose the window grows with the programmed burst. On the 0x10 burst
> parts, a frame could end 64 bytes or more past tx_thld_len and still
> fall inside one transfer. Would bcmgenet_xmit() then skip the split for
> it? That would leave the Tx DMA stall and the bcmgenet_init_dma()
> failure in place on those cores.
> 
> The measurements in the message come from one v5. Once "net: bcmgenet:
> allow the MTU to be changed" raises max_mtu on every non-v1 core, this
> case becomes reachable.
> 
> Should the window be derived from dma_max_burst_length, or has 64 been
> checked on a core with a 0x10 burst?

Right, bcm2711 has the reduced burst length. I don't know the details 
why
this is required, but my tests with 0x10 have confirmed that this quirk 
is
needed. I will derive it from burst length in v8.

> [...]

> [Severity: Medium]
> Does ENET_THLD_MAX (3840 bytes) fit in the TBUF of every GENET version
> that gets it here? bcmgenet_tx_pkt_rdy_thld() returns the same value
> for all versions. bcmgenet_set_mtu_regs() then writes it on v2 and
> later, with no clamp per version.
> 
> init_umac() programs the TBUF size control only on v3 and later:
> 
> 	if (!GENET_IS_V1(priv) && !GENET_IS_V2(priv))
> 		bcmgenet_rbuf_writel(priv, 1, RBUF_TBUF_SIZE_CTRL);
> 
> So v2 has different TBUF sizing but gets the same threshold. The
> measurements in the commit message are from a v5 only.
> 
> Suppose a core's TBUF cannot hold 3840 bytes. Could a frame longer than
> that TBUF then never reach the threshold and stall the transmitter?
> 
> "net: bcmgenet: allow the MTU to be changed" later sets
> dev->max_mtu = ENET_MAX_MTU for every non-v1 core. That would make this
> setting reachable on v2 through v4.

I only have tested with v5 (bcm2711).

Florian / Justin: Can you test with older versions or confirm that they 
will
behave the same. Otherwise I can also cap max_mtu to v5 only.

> [ ... ]

--
pw-bot: cr
Technical Details
Message-ID: <3d17930b465b31cee713aa4c690d490e@tipi-net.de>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365083-linux-kernel-netdev=dewy.ru
References: <20261112-nb-genet-mtu-nn-v2-v7-6-43a5d90b3256@tipi-net.de> <179474771225.2199510.15415138115246393692@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365083-linux-kernel-netdev=dewy.ru
From: nb@tipi-net.de (Nicolai Buchwitz)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v7 6/9] net: bcmgenet: split frames that end just
 past the transmit threshold
Date: Tue, 17 Nov 2026 10:05:49 +0100
Organization: Usenet Network
Message-ID: <3d17930b465b31cee713aa4c690d490e@tipi-net.de>
References: <20261112-nb-genet-mtu-nn-v2-v7-6-43a5d90b3256@tipi-net.de>
 <179474771225.2199510.15415138115246393692@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="2286440"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:FEDaxqBdo1fDDEogN7Glt441B+E= sha256:zhYVI82Aj906pv1ibTTDXR/gS7+1RioVsQHGDFMk4Qg=
	sha1:h43C0lE784pDUf1DNTkOerHtrNY= sha256:I9zVf6yp10Jz44XIlr6FFi/aHj9psuCEZL8MeYGX9cQ=
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 0EE89114EB1; Tue, 17 Nov 2026 12:06:22 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.051
X-Spam-Status: No, score=-3.051 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] 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 q1kSgjrd2Z5V;
	Tue, 17 Nov 2026 12:06:19 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-365083-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id A3412114EAB; Tue, 17 Nov 2026 12:06:10 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id EBDDD2F869; Tue, 17 Nov 2026 09:06:06 +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=1794906366;
	b=NIQD1Xp65FAovexjjqadRnD5/ydZU5JkobVUwUXRDdeLJ14Gfi8SCWFDbOmyFEjYMvMU
	 3WCRAjP9+Ehon2VhV3Dab9rCELb91O8/m4T5D62Pawsto7cNNrb9vJTFK7ajojdk+z7Yh
	 7PQua+UI42isK/C07Tg1BRhd1lo0cLVZePpxCY0HLkLpSjyKRWS2fPM5lXQoqoPVUMewf
	 uoLuYL0r1FdncwmuMJAW3MvyWsLPfUyI9FrrivMXYHPgre+X0FPy8Rxy7m+EngERXCITg
	 A6DvIo+NUH7sjAE5WAaIFFb5iR5aeZA+5Tbs9qbU6T1cdWH1O9ocXgJinaP9+zF4LNg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794906366;
	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=ehnUiJwedFsDrAATUReQKnLArX2RJeKTYfe7cGHZo7I=;
	b=YvMhJOusGy5U9ipZHo0QjwQTh9eeZudQHhVYUHYTtyGbTeRDYTzBSA4fr8CNkcSBPJg1
	 LMk/AruKg6gvd7PNJkvN88O8kWUugZY3VV1FKiFgJpck1CJuw1D1Z9uoj2kXY9cxD8uJd
	 vzqSRyg0lv3xDQThw7Pa8n9TjeBrjdt5dPOkwao44Flyk3GZwzpJCbMop6cSt6UfygFu7
	 Q4MrA0uWIDARrVOZPARnVQxXy9VDiDdaNEdgm5bPYSqEeNUPxfZypF4GwFXZP5xi/wWqT
	 KYmrI2gzecEiTLgU8h5MtcqwvRFgEUINAbjoQCTa1MN7zvOZJonFE9LYFsUQc8gntMg==
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=iuUcHZ8b;
	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 8688A606A334;
	Tue, 17 Nov 2026 09:06:06 +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=iuUcHZ8b
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=1794906360;
	b=L1sCYBc2ls6rWA20S49vsGMQU0By5u6NdKvIHeNAfVtZ/czXm+u8vqiJERu/8j8g8oFM
	 94kOw+Zf/8NpT/MR1SBzbXm/NnPFZHQ42JgfWekAcHjG4yWQfGz89eI4wvR5unPUK+Sft
	 8wec/qmzX2ec0rURrY/ZBF8Ox+czxcfhE0KrGtvAzYwaZqxhac0sgUbZPgagF5hZ78WgF
	 LMA9DL32LmI+YZWtWJXunVLIGsCst0H6Odikgn5uJngyQMZSgUvbT9L7SMk4/nIJbUyVd
	 x3zNX/l1aPMIEMcRguC7qZFAKpYzyM8Am7ExS4DF5/AbXN/Cw2W9IyUHc9/VE5bmzaA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794906360;
	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=ehnUiJwedFsDrAATUReQKnLArX2RJeKTYfe7cGHZo7I=;
	b=1FV08X/N0MkgQ3gn7mUPpUBJPutp4N1wzDOUcn3i27vBzbEz7xKgXC0+BdGUNkO16gGV
	 LWg4LDUY2/1642frOMavn0a75EXsqszoL/M8cViw1jGSFXTM72diGz8+FcX1uf/rzVquA
	 CwPXLfdjvTaDmGZSJfHuigCq8QswCiH0sRQx0yZ5PO5xuR7PrMM12aPDJ5FgkFRivyVOc
	 NcO4L2oLHf+Vr7uvzmzJpBq4/GW3gL/2Zo0XIEC09YuSamkRBgA/qZYZrdNPfrFjbwV2M
	 hiJihlkgkQ9QRdlGBCMX8LywtYnnpep94bZY0Twl98MFcBEw2IZC2uGAxWKG9JBWBFA==
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=iuUcHZ8b;
	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 90653606A329;
	Tue, 17 Nov 2026 09:05:59 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 90653606A329
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 27A00A02C3;
	Tue, 17 Nov 2026 10:05:49 +0100 (CET)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim;
	t=1794906351; h=from:subject:date:message-id:to:cc:mime-version:content-type:
	 content-transfer-encoding:in-reply-to:references;
	bh=ehnUiJwedFsDrAATUReQKnLArX2RJeKTYfe7cGHZo7I=;
	b=iuUcHZ8btS/bwWKTtjcsF5tmxeXys+hM3WNg/PMk0jXn0eyPUM3kW1qYRgK+TgspjDMmj+
	awxTlJsUcAvlrrMAphVh/FeQwTmHCaA4cvJ8EJ+vb8NGj3hk205AYTO27KEPOE4hcKIPMU
	IA0vJC1qpe0dM4oipUHisRlCK+RaoXdpDFH1voDKUkL5cxcOiWfRl1UB5OUln1U/GkyReU
	tSX6iuk6iKyUi2i4kOxE5oktMBjtQdEGXt8uwV0IXL6bgbdzC+VG7AbT76uXB2yPIRAyBj
	xP9inhTqXfMMRdoTSqa0CWpn2u3zoP7N9W60RWXWCHEBrSBinby2S5v5UdmQ6Q==
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: opendmb@gmail.com, bcm-kernel-feedback-list@broadcom.com,
 andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org,
 kuba@kernel.org, pabeni@redhat.com, f.fainelli@gmail.com,
 netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
 pierremarinleclercq88@gmail.com, dave.stevenson@raspberrypi.com
X-In-Reply-To: <179474771225.2199510.15415138115246393692@kernel.org>
X-Sender: nb@tipi-net.de
X-Last-TLS-Session-Version: TLSv1.3