Skip to content
  • fan.du's avatar
    sctp: Pack dst_cookie into 1st cacheline hole for 64bit host · 5a139296
    fan.du authored
    
    
    As dst_cookie is used in fast path sctp_transport_dst_check.
    
    Before:
    struct sctp_transport {
    	struct list_head           transports;           /*     0    16 */
    	atomic_t                   refcnt;               /*    16     4 */
    	__u32                      dead:1;               /*    20:31  4 */
    	__u32                      rto_pending:1;        /*    20:30  4 */
    	__u32                      hb_sent:1;            /*    20:29  4 */
    	__u32                      pmtu_pending:1;       /*    20:28  4 */
    
    	/* XXX 28 bits hole, try to pack */
    
    	__u32                      sack_generation;      /*    24     4 */
    
    	/* XXX 4 bytes hole, try to pack */
    
    	struct flowi               fl;                   /*    32    64 */
    	/* --- cacheline 1 boundary (64 bytes) was 32 bytes ago --- */
    	union sctp_addr            ipaddr;               /*    96    28 */
    
    After:
    struct sctp_transport {
    	struct list_head           transports;           /*     0    16 */
    	atomic_t                   refcnt;               /*    16     4 */
    	__u32                      dead:1;               /*    20:31  4 */
    	__u32                      rto_pending:1;        /*    20:30  4 */
    	__u32                      hb_sent:1;            /*    20:29  4 */
    	__u32                      pmtu_pending:1;       /*    20:28  4 */
    
    	/* XXX 28 bits hole, try to pack */
    
    	__u32                      sack_generation;      /*    24     4 */
    	u32                        dst_cookie;           /*    28     4 */
    	struct flowi               fl;                   /*    32    64 */
    	/* --- cacheline 1 boundary (64 bytes) was 32 bytes ago --- */
    	union sctp_addr            ipaddr;               /*    96    28 */
    
    Signed-off-by: default avatarFan Du <fan.du@windriver.com>
    Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    5a139296