]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: stmmac: rearrange stmmac_tx_info members to pack better
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Sat, 14 Mar 2026 09:42:24 +0000 (09:42 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 18 Mar 2026 03:32:07 +0000 (20:32 -0700)
Rearrange the struct stmmac_tx_info members to pack better, essentially
by sorting by type size:

xsk_meta embeds only a pointer - 32 or 64 bit
buf dma address, 32 or 64 bit
len normally 32 bit
buf_type dependent on arch
map_as_page normally 8 bit
last_segment normally 8 bit
is_jumbo normally 8 bit

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1w1LVo-0000000DGRl-44lt@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/stmmac.h

index 7a66edba8f66d845f481831d7c20c044903c8847..a2dc167adb6c278cbc1b417dacf899f6441c751c 100644 (file)
@@ -47,13 +47,13 @@ enum stmmac_txbuf_type {
 };
 
 struct stmmac_tx_info {
+       struct xsk_tx_metadata_compl xsk_meta;
        dma_addr_t buf;
-       bool map_as_page;
        unsigned len;
+       enum stmmac_txbuf_type buf_type;
+       bool map_as_page;
        bool last_segment;
        bool is_jumbo;
-       enum stmmac_txbuf_type buf_type;
-       struct xsk_tx_metadata_compl xsk_meta;
 };
 
 #define STMMAC_TBS_AVAIL       BIT(0)