aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
Diffstat (limited to 'include/net')
-rw-r--r--include/net/sctp/sctp.h3
-rw-r--r--include/net/sctp/structs.h10
2 files changed, 7 insertions, 6 deletions
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 70827305f501..67c997cecf58 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -665,6 +665,9 @@ static inline int sctp_vtag_hashfn(__u16 lport, __u16 rport, __u32 vtag)
665 return (h & (sctp_assoc_hashsize-1)); 665 return (h & (sctp_assoc_hashsize-1));
666} 666}
667 667
668#define sctp_for_each_hentry(epb, node, head) \
669 hlist_for_each_entry(epb, node, head, node)
670
668/* Is a socket of this style? */ 671/* Is a socket of this style? */
669#define sctp_style(sk, style) __sctp_style((sk), (SCTP_SOCKET_##style)) 672#define sctp_style(sk, style) __sctp_style((sk), (SCTP_SOCKET_##style))
670static inline int __sctp_style(const struct sock *sk, sctp_socket_type_t style) 673static inline int __sctp_style(const struct sock *sk, sctp_socket_type_t style)
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 44f2672859e2..eb3113c38a94 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -100,20 +100,19 @@ struct crypto_hash;
100struct sctp_bind_bucket { 100struct sctp_bind_bucket {
101 unsigned short port; 101 unsigned short port;
102 unsigned short fastreuse; 102 unsigned short fastreuse;
103 struct sctp_bind_bucket *next; 103 struct hlist_node node;
104 struct sctp_bind_bucket **pprev;
105 struct hlist_head owner; 104 struct hlist_head owner;
106}; 105};
107 106
108struct sctp_bind_hashbucket { 107struct sctp_bind_hashbucket {
109 spinlock_t lock; 108 spinlock_t lock;
110 struct sctp_bind_bucket *chain; 109 struct hlist_head chain;
111}; 110};
112 111
113/* Used for hashing all associations. */ 112/* Used for hashing all associations. */
114struct sctp_hashbucket { 113struct sctp_hashbucket {
115 rwlock_t lock; 114 rwlock_t lock;
116 struct sctp_ep_common *chain; 115 struct hlist_head chain;
117} __attribute__((__aligned__(8))); 116} __attribute__((__aligned__(8)));
118 117
119 118
@@ -1230,8 +1229,7 @@ typedef enum {
1230 1229
1231struct sctp_ep_common { 1230struct sctp_ep_common {
1232 /* Fields to help us manage our entries in the hash tables. */ 1231 /* Fields to help us manage our entries in the hash tables. */
1233 struct sctp_ep_common *next; 1232 struct hlist_node node;
1234 struct sctp_ep_common **pprev;
1235 int hashent; 1233 int hashent;
1236 1234
1237 /* Runtime type information. What kind of endpoint is this? */ 1235 /* Runtime type information. What kind of endpoint is this? */