net: stmmac: reorder structs to reduce memory consumption

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>
Tested-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
Link: https://patch.msgid.link/E1vzX5E-0000000CVs8-40w4@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Russell King (Oracle) 2026-03-09 09:39:28 +00:00 committed by Jakub Kicinski
parent c3d08424e0
commit 3357642e65

View File

@ -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 {