Commit 5a139296 authored by fan.du's avatar fan.du Committed by David S. Miller

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: 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>
parent e7f63f1d
...@@ -782,6 +782,7 @@ struct sctp_transport { ...@@ -782,6 +782,7 @@ struct sctp_transport {
/* Has this transport moved the ctsn since we last sacked */ /* Has this transport moved the ctsn since we last sacked */
__u32 sack_generation; __u32 sack_generation;
u32 dst_cookie;
struct flowi fl; struct flowi fl;
...@@ -946,7 +947,6 @@ struct sctp_transport { ...@@ -946,7 +947,6 @@ struct sctp_transport {
__u64 hb_nonce; __u64 hb_nonce;
struct rcu_head rcu; struct rcu_head rcu;
u32 dst_cookie;
}; };
struct sctp_transport *sctp_transport_new(struct net *, const union sctp_addr *, struct sctp_transport *sctp_transport_new(struct net *, const union sctp_addr *,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment