From: Ivan Vecera Date: Tue, 10 Jul 2018 20:59:45 +0000 (+0200) Subject: be2net: move txcp field in be_tx_obj to eliminate holes in the struct X-Git-Tag: v4.1.12-124.31.3~153 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ef2d11f62cfc47fa7a33afc5689759ad1e7f6feb;p=users%2Fjedix%2Flinux-maple.git be2net: move txcp field in be_tx_obj to eliminate holes in the struct Orabug: 29475071 Before patch: struct be_tx_obj { u32 db_offset; /* 0 4 */ /* XXX 4 bytes hole, try to pack */ struct be_queue_info q; /* 8 56 */ /* --- cacheline 1 boundary (64 bytes) --- */ struct be_queue_info cq; /* 64 56 */ struct be_tx_compl_info txcp; /* 120 4 */ /* XXX 4 bytes hole, try to pack */ /* --- cacheline 2 boundary (128 bytes) --- */ struct sk_buff * sent_skb_list[2048]; /* 128 16384 */ ... }: After patch: struct be_tx_obj { u32 db_offset; /* 0 4 */ struct be_tx_compl_info txcp; /* 4 4 */ struct be_queue_info q; /* 8 56 */ /* --- cacheline 1 boundary (64 bytes) --- */ struct be_queue_info cq; /* 64 56 */ struct sk_buff * sent_skb_list[2048]; /* 120 16384 */ ... }; Signed-off-by: Ivan Vecera Signed-off-by: David S. Miller Signed-off-by: Brian Maly Reviewed-by: John Donnelly Signed-off-by: Brian Maly --- diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h index e5fc065117bc..b74ea1212af4 100644 --- a/drivers/net/ethernet/emulex/benet/be.h +++ b/drivers/net/ethernet/emulex/benet/be.h @@ -241,9 +241,9 @@ struct be_tx_compl_info { struct be_tx_obj { u32 db_offset; + struct be_tx_compl_info txcp; struct be_queue_info q; struct be_queue_info cq; - struct be_tx_compl_info txcp; /* Remember the skbs that were transmitted */ struct sk_buff *sent_skb_list[TX_Q_LEN]; struct be_tx_stats stats;