From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0DC6C217659; Mon, 9 Mar 2026 09:38:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773049134; cv=none; b=GELxI5p97aPNpN+8nk+65y3z2oOveqhxNhPAHCO5ZRqj+jNIkrjtreTy0uiunAlFh6Q3Ngg+XnvzVHvbWFi/6qFSYs5FVExK+u1VkwnXiIZV7CJi86tSbgTJH21OOO+DdljdzP08Ldhje8qvuJanYqgiAMs43ozkCLqq0vtKncY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773049134; c=relaxed/simple; bh=WG8MBAd1Px0KOMzPUr6Up1Cm9AP/gxg7IMkSJts1dd0=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=c40MHW7nx4fe5J5iahNECezY2FKXI+woGksY66XvH01hiJCZbkyB96i4dhAA+MTrKLzxNp4GuvkvQ5dRGUXC6S9iOhuFnqRxg6DyhrgbK8/75HIxMdwlbF7QG8JyLcI/MryXw1T1bcLAk7hvNdQAkDcZRiiN/xOxOXRyehhENLA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=XNO7P4n+; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="XNO7P4n+" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:Content-Type:MIME-Version: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Ten1uDei4vcUNTz7WaFaOkJ2TgTa4kazv/d2FQhK9d4=; b=XNO7P4n+74b32BXj8s7Erkc6iR C0gpgQ3CyJ/fgq5hADmRh8qc0DZ0ocPWj9/+H2R2K6aahQIQY3QGcjHPlpT5S+gsPrwlQ0dGegv7n qUb6c30OGZObfNHJgOh6lMlcnGBE7UpxUu6sWBr/fRAMdd3VTHiNLGVqh6VYvY9L0fYrIhq0peczM PRu0+AvWHLy/Xxojy3sws3OFrXBGpJLh7gNwGVXAfgIP7PS7oFtxA4v8/o/FFi/bSHhCODOMtvckY WrTniwza8Q9I7GAp99vMPoeGwgAIKWcHUJa05F/iQQR0usv09krwDaD+q90alxeh2zCCSbBsWVkG8 KKWQrpbg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:56676) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vzX4L-000000003TL-1Y7v; Mon, 09 Mar 2026 09:38:33 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.98.2) (envelope-from ) id 1vzX4E-000000004CG-0wpW; Mon, 09 Mar 2026 09:38:26 +0000 Date: Mon, 9 Mar 2026 09:38:26 +0000 From: "Russell King (Oracle)" To: Andrew Lunn Cc: Alexandre Torgue , Andrew Lunn , AngeloGioacchino Del Regno , Chen-Yu Tsai , "David S. Miller" , Eric Dumazet , Frank Li , imx@lists.linux.dev, Jakub Kicinski , Jan Petrous , Jonathan Hunter , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, Maxime Chevallier , Mohd Ayaan Anwar , netdev@vger.kernel.org, Paolo Abeni , Pengutronix Kernel Team , s32@nxp.com, Samuel Holland , Sascha Hauer , Yao Zi Subject: [PATCH net-next v2 0/7] net: stmmac: start to shrink memory usage Message-ID: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: Russell King (Oracle) Hi, Start shrinking stmmac's memory usage by avoiding using "int" for members that are only used for 0/1 (boolean) values, or values that can't be larger than 255. In addition, as struct stmmac_dma_cfg is approximately a cache line, shrinks below a cache line as a result of this patch set, and is required, there is no point separately allocating this from struct plat_stmmacenet_data. Embed it into the end of this struct and set the existing pointer to avoid large wide-spread changes. Lastly, add documentation for struct stmmac_dma_cfg, and document the stmmac clocks as best we can given the driver history. v2: - fix error in commit message for patch 5 - fix typo in comment in patch 6 drivers/net/ethernet/stmicro/stmmac/common.h | 4 +- .../ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 7 +- .../net/ethernet/stmicro/stmmac/dwmac-loongson.c | 6 +- .../net/ethernet/stmicro/stmmac/dwmac-mediatek.c | 8 +- .../net/ethernet/stmicro/stmmac/dwmac-motorcomm.c | 4 - .../ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 4 +- drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c | 2 +- .../net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 4 +- drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c | 2 +- .../net/ethernet/stmicro/stmmac/dwmac1000_core.c | 2 +- .../net/ethernet/stmicro/stmmac/dwmac100_core.c | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 4 +- .../net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 4 +- drivers/net/ethernet/stmicro/stmmac/hwif.h | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 227 +++++++++++---------- drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 11 +- .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 43 ++-- include/linux/stmmac.h | 93 +++++++-- 23 files changed, 239 insertions(+), 200 deletions(-) -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!