From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 517C3EFCD70 for ; Mon, 9 Mar 2026 09:38:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id: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-Owner; bh=Ten1uDei4vcUNTz7WaFaOkJ2TgTa4kazv/d2FQhK9d4=; b=NGH0VGex5I/adCG5Yjq7F1um+K W+eykGED2JRkp+hjZAEiCMTb/JimB+yRPgzKh+Vjk/qCtGbidP3RFj1yScV7ssL9vTt/Z0fFegbo0 P2UzlwaYz6s4xx02YERzh4zQtGrgu8xiucfORCNbqKo3uokGsbB6Z7Mp9A1B8zRa4pvIX33gfevpk ik+CIk2rZTZ/jDBaDMrM/Y4sx496oBPVwaMMQrd2+R7NUuMB9ItV5Fu0sfA+RJ7IoFZfAtNXfjjcQ BR7fIXFRxt0J88uS2pSGp2VkGBbeaqNysMC2NCeO2DYW3sGyXK+N952mlkM92w86Dn280T+uinx42 boXCGH7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vzX4i-00000006z2V-2aNP; Mon, 09 Mar 2026 09:38:56 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vzX4f-00000006z0w-0kT6; Mon, 09 Mar 2026 09:38:54 +0000 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: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260309_023853_214573_1BD41667 X-CRM114-Status: GOOD ( 10.98 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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!