🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #20170

Re: [PATCH net] net: stmmac: dwmac-sun8i: Limit the MTU to one descriptor buffer

#20170
From: Andrew Lunn
Date: Sat, 21 Nov 2026 18:02
21 lines
9562 bytes
On Sat, Nov 21, 2026 at 04:43:41AM +0000, Arun Iyengar via B4 Relay wrote:
> From: Arun Iyengar <aiyengar1990@gmail.com>
> 
> Russell King pointed out in [1] that max_mtu ignores the 11-bit buffer
> size of normal descriptors. dwmac-sun8i always uses them in chain mode,
> so a frame must fit one buffer, but max_mtu is SKB_MAX_HEAD() (3712 on
> arm64). Sashiko asked in [2] for this to go in as a fix.
> 
> On an H616 the RX DMA fills 2044 bytes of a buffer and
> ndesc_get_rx_status() drops a frame that spans two. On TX the MAC cuts
> a frame after 2048 bytes (TX_FRM_LEN_CTL is clear). At MTU 2033 no UDP
> datagram gets through in either direction.
> 
> Limit the MTU so that a frame with two VLAN tags and the FCS fits 2044
> bytes (MTU 2018). MTU 2019-2026, which worked without VLAN tags, is now
> refused.

Is this problem specific to the dwmac-sun8i?

   Andrew
Technical Details
Message-ID: <7dee2bac-9892-42df-b2d3-62d648af3452@lunn.ch>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-368380-linux-kernel-netdev=dewy.ru
References: <20261121-sun8i-emac-mtu-limit-v1-1-22492842d318@gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-368380-linux-kernel-netdev=dewy.ru
From: andrew@lunn.ch (Andrew Lunn)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] net: stmmac: dwmac-sun8i: Limit the MTU to one
 descriptor buffer
Date: Sat, 21 Nov 2026 19:02:38 +0100
Organization: Usenet Network
Message-ID: <7dee2bac-9892-42df-b2d3-62d648af3452@lunn.ch>
References: <20261121-sun8i-emac-mtu-limit-v1-1-22492842d318@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="3461335"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:dGDkDp4B2XNcCbkJ7IQOuOxmMKs= sha256:FKB7O/waSgcUzgbnu09wRVdu2czRgrjKqfJ5e0FUOtQ=
	sha1:Rjx8yr6P1HPNL/rAWJV3xjVJJCg= sha256:psjD3GhDbTxBGEze9kxBqFNsSvZDXJQopqkkLcJghOk=
Content-Disposition: inline
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 D1DF9115BA4; Sat, 21 Nov 2026 21:03:17 +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 (1024-bit key)
	header.d=lunn.ch
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 JuVJHoS8DIxt;
	Sat, 21 Nov 2026 21:03:10 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-368380-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lunn.ch
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 8040C115B50; Sat, 21 Nov 2026 21:03:00 +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 B10ED37381; Sat, 21 Nov 2026 18:02:58 +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=1795284177;
	b=2S4nyf0aaCoomoMEmVa4rkuF2YxP3APk9RVc7L6cQvJ/RwAIQ3RLfl/2mU76CqjgSMHi
	 uxyPXpI7+31FqGD8EXHys9oBaXnWykYhkWe/Xh+yht8jJXvul3u0zUl0z0b0sn2qiHfuP
	 GaNBb/O9d2ehE4pI16uuT3u3jRWIF1gr2s/HJyt/d1ElfNkt1AqFqlB4QELiWsRqiUMJs
	 krCg6Uy/Z733f61g7rzJVgzYAEDWDlCovnpGdu5naKZeXYqLab5DR9f7cZlNH/nw0DNor
	 OkB0XQi3ck8hw1rbyS22XjfMR9Wgcv+4xkbuqxUHL9Cjd7vUND/M5NzY6O+LE+VnDhQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795284177;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date:
	 From:To:Cc:Subject:Message-ID:References:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=ZjOww6Av4TYuUIUrHXUPGTFtUR3yqkQIr555NuUOYP4=;
	b=dqhL7HO7/Dj3gYo3f8h++AAjSv8ITXEnTBTiNNxJiIDlg/n/b0fcBiZWhC6+tT+izHLI
	 KcPk+ZbbMKTsSF6yZRQJWXP3kj0vmWNwGBLImT3vUdwcAZN5qYNi9Ze5UiMZGy2y6Bu5D
	 dwTdlyin2wkNWwTffcjIQekM9S8hyzdLiQs1W2ZQ06hOpFMedeEOF2HRfv2PJBXZkIXsx
	 scTUaLwASUYjYyM54jzwU741fCFVK3HGsa+MtWRhtvA3HHo1znYlX4t5cdMZ3x12RX6jr
	 6lU41Vw19CisKtjAE0mfQyE/4pd9prN+9OP6posn0QNiuHMiLgYsP+ALoC5W6Tk4wYA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=NQy5ayoe;
	dmarc=pass header.from=lunn.ch;
	spf=pass smtp.mailfrom=lunn.ch;
	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 BA515606A331;
	Sat, 21 Nov 2026 18:02:57 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=NQy5ayoe
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=156.67.10.101
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795284176;
	b=lnm//N/i42Fw9mLmKGfQ3a2oXqi/vwfT4BbyOEa44L7UGjlK/Rt3PwYGzpllHN5GR4Qx
	 j+KhTkj4ooCxwvrSHinbbpA9s0la2muFgYHG1v8MQpgk/w4XFm/x3KLwHIxApJTptX87x
	 30T18aApasjbJdLfjGpTlNznsHif1cF9E0q8r/dDh9JYLVwzcoWsrtk6j99lWB9zVNOhL
	 BZRqhKNa2CA9+xNpbC/Ixw9c7CM8SM8wVd4B/lQsu1uubZM4RudGGi38duTUTIWGwn8hH
	 prGiy7RWhcYoNVqsQ9drWJvRO3uLaguiY9fTcNVWAMcfne6227aOBvZzBS8HZRMt1ew==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795284176;
	h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject:
	 Message-ID:References:MIME-Version:Content-Type:Content-Disposition:
	 In-Reply-To;
	bh=ZjOww6Av4TYuUIUrHXUPGTFtUR3yqkQIr555NuUOYP4=;
	b=LfTCDYTj0duGugKfQEpl/GtaL9oqAOSpFGbx5NjfCahgytUuKYILSuWjqwxRrejSQhBe
	 ZWb1sfO0IBmiDKjdo2UpgAHh1ZHeTP6pNRg+x0JFQEEN0I/eez2LE7PH2thIDYgepmZtR
	 jtF0Ym9wtj4pzOHI3nJxGTehIJ9J222AcKtvFBlCDkBIeYKOON8/EO9/oF8uAfSjn0+5X
	 LBi9EItiGXZVbUccCwlm3yZz4Iw5DVZUCb62gFyKxMyGfc/Tg1JpqH42zoK5DuNWRnuDv
	 oaoI4jq3uweVXS6B1m+kUm0cOlUkp3FUBpQRUpeSIJyNfx6gu+On039TQf8R135aUFQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=lunn.ch;
	spf=pass smtp.mailfrom=lunn.ch;
	dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=NQy5ayoe;
	arc=none smtp.remote-ip=156.67.10.101
X-Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 96557606A32C;
	Sat, 21 Nov 2026 18:02:56 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 96557606A32C
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch
X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch;
	s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version:
	References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject:
	Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:
	Content-ID:Content-Description:Content-Disposition:In-Reply-To:References;
	bh=ZjOww6Av4TYuUIUrHXUPGTFtUR3yqkQIr555NuUOYP4=; b=NQy5ayoerTWJL/iw2Dp7R0pY/8
	9OYzjOKz3wZJGygM/bkvVNRK6RArDIz2w9i8ryW+/3jGc+ENmmttk+4SA12zROqWAiPKx+ezFx6Xe
	A10j5IRJj8/yXoTScm0agc9zOEk+yptuWcZ8jaCz0lFFE8tHTvpiuizaw3acnuc1d5XY=;
X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2)
	(envelope-from <andrew@lunn.ch>)
	id 1xUpQ6-000TX2-Q4; Sat, 21 Nov 2026 19:02:38 +0100
X-Cc: Maxime Chevallier <maxime.chevallier@bootlin.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Chen-Yu Tsai <wens@kernel.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Samuel Holland <samuel@sholland.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	LABBE Corentin <clabbe.montjoie@gmail.com>, netdev@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev,
	Russell King <rmk+kernel@armlinux.org.uk>,
	Nicolai Buchwitz <nb@tipi-net.de>, stable@vger.kernel.org
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-In-Reply-To: <20261121-sun8i-emac-mtu-limit-v1-1-22492842d318@gmail.com>