From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Chen-Yu Tsai <wens@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>, Frank Li <Frank.Li@nxp.com>,
imx@lists.linux.dev, Jakub Kicinski <kuba@kernel.org>,
Jan Petrous <jan.petrous@oss.nxp.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
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 <maxime.chevallier@bootlin.com>,
Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>,
netdev@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
s32@nxp.com, Samuel Holland <samuel@sholland.org>,
Sascha Hauer <s.hauer@pengutronix.de>, Yao Zi <me@ziyao.cc>
Subject: [PATCH net-next v2 3/7] net: stmmac: reorder structs to reduce memory consumption
Date: Mon, 09 Mar 2026 09:39:28 +0000 [thread overview]
Message-ID: <E1vzX5E-0000000CVs8-40w4@rmk-PC.armlinux.org.uk> (raw)
In-Reply-To: <aa6VEsmBK-S9eNYU@shell.armlinux.org.uk>
Reorder some of the stmmac structures to allow them to pack better,
thereby using less memory. On aarch64, sizeof(struct stmmac_priv)
was 880, and with this change becomes 816, saving 64 bytes, which
is an 8% saving.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
include/linux/stmmac.h | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
index 9420da96a4ff..411cdd3ea034 100644
--- a/include/linux/stmmac.h
+++ b/include/linux/stmmac.h
@@ -108,37 +108,37 @@ struct stmmac_dma_cfg {
#define AXI_BLEN 7
struct stmmac_axi {
- bool axi_lpi_en;
- bool axi_xit_frm;
u32 axi_wr_osr_lmt;
u32 axi_rd_osr_lmt;
- bool axi_kbbe;
u32 axi_blen_regval;
+ bool axi_lpi_en;
+ bool axi_xit_frm;
+ bool axi_kbbe;
bool axi_fb;
bool axi_mb;
bool axi_rb;
};
struct stmmac_rxq_cfg {
- u8 mode_to_use;
u32 chan;
+ u32 prio;
+ u8 mode_to_use;
u8 pkt_route;
bool use_prio;
- u32 prio;
};
struct stmmac_txq_cfg {
u32 weight;
- bool coe_unsupported;
- u8 mode_to_use;
/* Credit Base Shaper parameters */
u32 send_slope;
u32 idle_slope;
u32 high_credit;
u32 low_credit;
- bool use_prio;
u32 prio;
int tbs_en;
+ bool use_prio;
+ bool coe_unsupported;
+ u8 mode_to_use;
};
struct stmmac_safety_feature_cfg {
--
2.47.3
next prev parent reply other threads:[~2026-03-09 9:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-09 9:38 [PATCH net-next v2 0/7] net: stmmac: start to shrink memory usage Russell King (Oracle)
2026-03-09 9:39 ` [PATCH net-next v2 1/7] net: stmmac: provide plat_dat->dma_cfg in stmmac_plat_dat_alloc() Russell King (Oracle)
2026-03-09 11:08 ` Mohd Ayaan Anwar
2026-03-09 9:39 ` [PATCH net-next v2 2/7] net: stmmac: convert plat_stmmacenet_data booleans to type bool Russell King (Oracle)
2026-03-09 11:09 ` Mohd Ayaan Anwar
2026-03-09 9:39 ` Russell King (Oracle) [this message]
2026-03-09 9:39 ` [PATCH net-next v2 4/7] net: stmmac: use u8 for ?x_queues_to_use and number_?x_queues Russell King (Oracle)
2026-03-09 11:19 ` Mohd Ayaan Anwar
2026-03-09 9:39 ` [PATCH net-next v2 5/7] net: stmmac: use u8 for host_dma_width and similar struct members Russell King (Oracle)
2026-03-09 11:10 ` Mohd Ayaan Anwar
2026-03-09 9:39 ` [PATCH net-next v2 6/7] net: stmmac: add documentation for stmmac_dma_cfg members Russell King (Oracle)
2026-03-09 9:39 ` [PATCH net-next v2 7/7] net: stmmac: add documentation for clocks Russell King (Oracle)
2026-03-09 11:06 ` [PATCH net-next v2 0/7] net: stmmac: start to shrink memory usage Mohd Ayaan Anwar
2026-03-11 3:00 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1vzX5E-0000000CVs8-40w4@rmk-PC.armlinux.org.uk \
--to=rmk+kernel@armlinux.org.uk \
--cc=Frank.Li@nxp.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=angelogioacchino.delregno@collabora.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=imx@lists.linux.dev \
--cc=jan.petrous@oss.nxp.com \
--cc=jonathanh@nvidia.com \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux-sunxi@lists.linux.dev \
--cc=linux-tegra@vger.kernel.org \
--cc=maxime.chevallier@bootlin.com \
--cc=me@ziyao.cc \
--cc=mohd.anwar@oss.qualcomm.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=s.hauer@pengutronix.de \
--cc=s32@nxp.com \
--cc=samuel@sholland.org \
--cc=wens@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox