summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2026-03-09 12:39:28 +0300
committerJakub Kicinski <kuba@kernel.org>2026-03-11 05:54:06 +0300
commit3357642e65e9454c3da64b62c0ed987ee4010008 (patch)
tree6876734357152f1f7fa58f5ecb9b4684cc5c1044 /include/linux
parentc3d08424e025aaac8fb54134f76e611ef919cd08 (diff)
downloadlinux-3357642e65e9454c3da64b62c0ed987ee4010008.tar.xz
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>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/stmmac.h16
1 files 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 {