sctp: Pack dst_cookie into 1st cacheline hole for 64bit host
authorfan.du <fan.du@windriver.com>
Mon, 5 Aug 2013 09:13:03 +0000 (17:13 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Aug 2013 19:20:51 +0000 (12:20 -0700)
commit5a139296f872d438f17f7219411321b603c1622b
tree205c06b348c85194810033ec6f469f446ef385ab
parente7f63f1dc4bd643d9249c653e60c530d4a438147
sctp: Pack dst_cookie into 1st cacheline hole for 64bit host

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: Fan Du <fan.du@windriver.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sctp/structs.h