Article View: linux.kernel.netdev
Article #20492Re: [PATCH net v2 2/2] net: stmmac: dwmac-sun8i: Limit the MTU to 2018
From: Andrew Lunn
Date: Sun, 22 Nov 2026 18:56
Date: Sun, 22 Nov 2026 18:56
25 lines
9867 bytes
9867 bytes
> The STM32F4 reference manuals has this note: > > Even when the start address of a receive buffer is not aligned to the > system databus width > the system should allocate a receive buffer of a size aligned to the > system bus width. For > example, if the system allocates a 1024 byte (1 KB) receive buffer > starting from address > 0x1000, the software can program the buffer start address in the > receive descriptor to have > a 0x1002 offset. The receive DMA writes the frame to this buffer with > dummy data in the first > two locations (0x1000 and 0x1001). The actual frame is written from > location 0x1002. > So for normal descriptors the buffer size is bound to (2KB - bus width). There is a second use for this, unrelated to bus width. The ethernet header is 14 bytes in size, 2x 6 octet MAC address plus a 2 octet ethertype header. By offsetting the start address by two, it means the data after the ethernet header is then 4 byte aligned, making it more efficient to access fields in the IP, TCP UDP headers etc. Andrew
Technical Details
Message-ID:
<002c36a6-c049-4ad3-9b1f-18f2162eaa71@lunn.ch>Path:
mbox-mo1.pugleaf.net!news-can.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-368785-linux-kernel-netdev=dewy.ruReferences:
<20261122-sun8i-emac-mtu-limit-v2-0-c4081e5b83cf@gmail.com> <20261122-sun8i-emac-mtu-limit-v2-2-c4081e5b83cf@gmail.com> <CAGb2v65_vY86WqvKr1m=g0N1Qr2UhLC1v3OHKPG3x+oURUKp7Q@mail.gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-can.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-368785-linux-kernel-netdev=dewy.ru From: andrew@lunn.ch (Andrew Lunn) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v2 2/2] net: stmmac: dwmac-sun8i: Limit the MTU to 2018 Date: Sun, 22 Nov 2026 19:56:54 +0100 Organization: Usenet Network Message-ID: <002c36a6-c049-4ad3-9b1f-18f2162eaa71@lunn.ch> References: <20261122-sun8i-emac-mtu-limit-v2-0-c4081e5b83cf@gmail.com> <20261122-sun8i-emac-mtu-limit-v2-2-c4081e5b83cf@gmail.com> <CAGb2v65_vY86WqvKr1m=g0N1Qr2UhLC1v3OHKPG3x+oURUKp7Q@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="3702740"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:D6+gEBwGBXMaCOEaOX+i45cdWSk= sha256:OPPg3D/F1zSDmtEin9za/O2BSSizmWAykrHu/kU6U/A= sha1:9cZWvEW5ri+VSugn/OvkxUMuBfo= sha256:5gJ5KrKCum3QJdeAq8/8YHJxEf54t3Tq3Jpb7dPzmNc= 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 BB6C9125D81; Sun, 22 Nov 2026 21:57:33 +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 (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 ndKoRUcxZf1R; Sun, 22 Nov 2026 21:57:26 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-368785-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 BBD99125D7A; Sun, 22 Nov 2026 21:57:16 +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 CB05329509; Sun, 22 Nov 2026 18:57:13 +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=1795373833; b=ZZ5mF7NMQvNqlmGrv8JTumgmzM/jyb5O0/Qku4llExMTWFNQTj6kD987mtuBLceFj+fr Ri2NmfCqO8nDx3DnJvcUgp48sbIyQ67S6MT8lGsphRawm4fYxHMTH8xRVnImoDrIjFUOm Jq42+K3YFSk/FWG+vhCblksR5pbD2pc0Zp++Ux/23tj8bDV3KNkathrNw2atqbS5VgVSH 5V8qlt6ZsBoE3pHtDKgXD/g0383YKE9v4T2/SHxSb4134MN8JUNSAJNVKF4z41eYvrVjK jfNLv9lHz1u9S5QJ4+4+qB90prqkUtaLrFYcuaPvQSGZyph73/QTPXBD3ArbdD5eS+Q== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795373833; 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=8B8Z/Qk1nK5Bur2fvtAfwzJGSgXNSKiCnAjpMw2EVs8=; b=iU0/jLZ/27EjaoB1Xzdh8NRC8IJl96oySFLE8By5L9N1QKgd7y8aW3z/UE54y4H62Qre Fvgxma+kyYszsrCnA7H8amy01TVYWbzq9BJj3gVfqJ7kYZ9BRiyIgk1kX8m75IlAd4tJB 7MgTG0gO/0/QaXLD9MG7h2lCVZwTEGG+jVYXxn95X5hivZxH+toDZB1oce+AEXT4+nZlH owQkPWA3cqMQIQqNKF+IGpyR3ysWw4U4GXSZHikVtv51D/RKDcLBWSE/Y8kV4YpjnvDDA iffPHS8vwDXfoypk8s4KlQG6ofw1vSK1kD5QPmJFRG/kA/DgvYCIJDbWhXh5tZwlG1g== 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=U0uJ3VV2; 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 A2792606A338; Sun, 22 Nov 2026 18:57:13 +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=U0uJ3VV2 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=1795373832; b=qb3biJistaTA02AUacQ25m++en3SL9EZcdJn+YKrbtelzeSwDEf6yR9LKQuT6EEbB0lA kdRHWTH2TzzZGi/RjEuc0hdZp0SWvVUBuYgK4QQTSZgJmfHNnwEBm9UoS+/5YyA8SIQ5j 8nGanhNv/d30N8viE7aPS5ETmHfhSYN78akvycnYMctyH8CWM1PSFcmq8pBycB7X/lkYQ RvkRWkeRka20pS6oxDkj9EvJVOmA1/8ne4IpKdhJ3OQJztP278nN5Hk6Jwq/leXfYbB9q sRr7CXtZAKBdkMbwHHKmcLOmpT2fcpFyLaxSj7+KzPqZMxEc1OphLEEWRJjpWCIY46A== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795373832; h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; bh=8B8Z/Qk1nK5Bur2fvtAfwzJGSgXNSKiCnAjpMw2EVs8=; b=oUA06YiwJv791qVNpVprsAd6OHWzZHx/215sO8US8l9nr0QfZYzKPozqr9cDkWkvg//8 l3fFSk3HcM2q2/9lgQFMr41TOBN6L5s0Q/Lk1t2ycpDzmX8Q8B1m0WGsONSvzZvjOy39K mqWFqCelhca8t/fldd9rQzyVS59mltgLyabw++nag4snBHAA6S3bvELGr/t5cLGeZhDLf u1spOqYOTIjzGgzjEboin+AetC27GNjIZIHQJuAXYu+W8Y+yKj1F9v5eDjKx9YzvUyZDX aMFqWXUl5QveGfI9XGR8UbaMjQ1iK3nnD5VtWDs+Kd6aiWneOBsn8Nyl1tCgD5z4kyg== 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=U0uJ3VV2; 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 7E624606A320; Sun, 22 Nov 2026 18:57:12 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7E624606A320 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=8B8Z/Qk1nK5Bur2fvtAfwzJGSgXNSKiCnAjpMw2EVs8=; b=U0uJ3VV2VFvLy98r6f+U5S2PYJ aY6uIU5DawC2aNmwGsjQEQ/LQUylIdw7NupDyC7brvskQK5VDDZxee/2CjDaJRaPDrSfbF0reSgsK 2Pq66Jyz2qD35vyeU4FWOp7dUcKTwnFByWT8aRQIvGcBFWnwF8jfuvSiiYUgbvlNPMbQ=; X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from <andrew@lunn.ch>) id 1xVCkA-000bb1-BM; Sun, 22 Nov 2026 19:56:54 +0100 X-Cc: aiyengar1990@gmail.com, 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>, 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: <CAGb2v65_vY86WqvKr1m=g0N1Qr2UhLC1v3OHKPG3x+oURUKp7Q@mail.gmail.com>