sctp: move hlist_node and hashent out of sctp_ep_common
Struct sctp_ep_common is included in both asoc and ep, but hlist_node
and hashent are only needed by ep after asoc_hashtable was dropped by
Commit b5eff71283 ("sctp: drop the old assoc hashtable of sctp").
So it is better to move hlist_node and hashent from sctp_ep_common to
sctp_endpoint, and it saves some space for each asoc.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
e087cba116
commit
3d3b2f57d4
@@ -510,8 +510,8 @@ static inline int sctp_ep_hashfn(struct net *net, __u16 lport)
|
||||
return (net_hash_mix(net) + lport) & (sctp_ep_hashsize - 1);
|
||||
}
|
||||
|
||||
#define sctp_for_each_hentry(epb, head) \
|
||||
hlist_for_each_entry(epb, head, node)
|
||||
#define sctp_for_each_hentry(ep, head) \
|
||||
hlist_for_each_entry(ep, head, node)
|
||||
|
||||
/* Is a socket of this style? */
|
||||
#define sctp_style(sk, style) __sctp_style((sk), (SCTP_SOCKET_##style))
|
||||
|
||||
Reference in New Issue
Block a user