diff options
author | fan.du <fan.du@windriver.com> | 2013-08-05 05:13:03 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-05 15:20:51 -0400 |
commit | 5a139296f872d438f17f7219411321b603c1622b (patch) | |
tree | 205c06b348c85194810033ec6f469f446ef385ab /include/net/sctp/structs.h | |
parent | e7f63f1dc4bd643d9249c653e60c530d4a438147 (diff) |
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>
Diffstat (limited to 'include/net/sctp/structs.h')
-rw-r--r-- | include/net/sctp/structs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index c0f4e29eedd5..d9c93a77b1a9 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -782,6 +782,7 @@ struct sctp_transport { | |||
782 | 782 | ||
783 | /* Has this transport moved the ctsn since we last sacked */ | 783 | /* Has this transport moved the ctsn since we last sacked */ |
784 | __u32 sack_generation; | 784 | __u32 sack_generation; |
785 | u32 dst_cookie; | ||
785 | 786 | ||
786 | struct flowi fl; | 787 | struct flowi fl; |
787 | 788 | ||
@@ -946,7 +947,6 @@ struct sctp_transport { | |||
946 | __u64 hb_nonce; | 947 | __u64 hb_nonce; |
947 | 948 | ||
948 | struct rcu_head rcu; | 949 | struct rcu_head rcu; |
949 | u32 dst_cookie; | ||
950 | }; | 950 | }; |
951 | 951 | ||
952 | struct sctp_transport *sctp_transport_new(struct net *, const union sctp_addr *, | 952 | struct sctp_transport *sctp_transport_new(struct net *, const union sctp_addr *, |