aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2015-12-30 10:50:49 -0500
committerDavid S. Miller <davem@davemloft.net>2016-01-05 12:24:01 -0500
commitb5eff7128366c4a7a9b502097a968ec9cae2bea2 (patch)
tree7d82c07abe7e77d96983d3428697f2815e671204 /include/net
parent39f66a7dce3213fb0a0c6256929c816df27c7548 (diff)
sctp: drop the old assoc hashtable of sctp
transport hashtable will replace the association hashtable, so association hashtable is not used in sctp any more, so drop the codes about that. Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/sctp/sctp.h21
-rw-r--r--include/net/sctp/structs.h5
2 files changed, 0 insertions, 26 deletions
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 7bbdfbab2efa..835aa2ed9870 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -126,8 +126,6 @@ int sctp_primitive_ASCONF(struct net *, struct sctp_association *, void *arg);
126 */ 126 */
127int sctp_rcv(struct sk_buff *skb); 127int sctp_rcv(struct sk_buff *skb);
128void sctp_v4_err(struct sk_buff *skb, u32 info); 128void sctp_v4_err(struct sk_buff *skb, u32 info);
129void sctp_hash_established(struct sctp_association *);
130void sctp_unhash_established(struct sctp_association *);
131void sctp_hash_endpoint(struct sctp_endpoint *); 129void sctp_hash_endpoint(struct sctp_endpoint *);
132void sctp_unhash_endpoint(struct sctp_endpoint *); 130void sctp_unhash_endpoint(struct sctp_endpoint *);
133struct sock *sctp_err_lookup(struct net *net, int family, struct sk_buff *, 131struct sock *sctp_err_lookup(struct net *net, int family, struct sk_buff *,
@@ -530,25 +528,6 @@ static inline int sctp_ep_hashfn(struct net *net, __u16 lport)
530 return (net_hash_mix(net) + lport) & (sctp_ep_hashsize - 1); 528 return (net_hash_mix(net) + lport) & (sctp_ep_hashsize - 1);
531} 529}
532 530
533/* This is the hash function for the association hash table. */
534static inline int sctp_assoc_hashfn(struct net *net, __u16 lport, __u16 rport)
535{
536 int h = (lport << 16) + rport + net_hash_mix(net);
537 h ^= h>>8;
538 return h & (sctp_assoc_hashsize - 1);
539}
540
541/* This is the hash function for the association hash table. This is
542 * not used yet, but could be used as a better hash function when
543 * we have a vtag.
544 */
545static inline int sctp_vtag_hashfn(__u16 lport, __u16 rport, __u32 vtag)
546{
547 int h = (lport << 16) + rport;
548 h ^= vtag;
549 return h & (sctp_assoc_hashsize - 1);
550}
551
552#define sctp_for_each_hentry(epb, head) \ 531#define sctp_for_each_hentry(epb, head) \
553 hlist_for_each_entry(epb, head, node) 532 hlist_for_each_entry(epb, head, node)
554 533
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 4ab87d08e766..20e72129be1c 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -120,8 +120,6 @@ extern struct sctp_globals {
120 120
121 /* This is the hash of all endpoints. */ 121 /* This is the hash of all endpoints. */
122 struct sctp_hashbucket *ep_hashtable; 122 struct sctp_hashbucket *ep_hashtable;
123 /* This is the hash of all associations. */
124 struct sctp_hashbucket *assoc_hashtable;
125 /* This is the sctp port control hash. */ 123 /* This is the sctp port control hash. */
126 struct sctp_bind_hashbucket *port_hashtable; 124 struct sctp_bind_hashbucket *port_hashtable;
127 /* This is the hash of all transports. */ 125 /* This is the hash of all transports. */
@@ -129,7 +127,6 @@ extern struct sctp_globals {
129 127
130 /* Sizes of above hashtables. */ 128 /* Sizes of above hashtables. */
131 int ep_hashsize; 129 int ep_hashsize;
132 int assoc_hashsize;
133 int port_hashsize; 130 int port_hashsize;
134 131
135 /* Default initialization values to be applied to new associations. */ 132 /* Default initialization values to be applied to new associations. */
@@ -146,8 +143,6 @@ extern struct sctp_globals {
146#define sctp_address_families (sctp_globals.address_families) 143#define sctp_address_families (sctp_globals.address_families)
147#define sctp_ep_hashsize (sctp_globals.ep_hashsize) 144#define sctp_ep_hashsize (sctp_globals.ep_hashsize)
148#define sctp_ep_hashtable (sctp_globals.ep_hashtable) 145#define sctp_ep_hashtable (sctp_globals.ep_hashtable)
149#define sctp_assoc_hashsize (sctp_globals.assoc_hashsize)
150#define sctp_assoc_hashtable (sctp_globals.assoc_hashtable)
151#define sctp_port_hashsize (sctp_globals.port_hashsize) 146#define sctp_port_hashsize (sctp_globals.port_hashsize)
152#define sctp_port_hashtable (sctp_globals.port_hashtable) 147#define sctp_port_hashtable (sctp_globals.port_hashtable)
153#define sctp_transport_hashtable (sctp_globals.transport_hashtable) 148#define sctp_transport_hashtable (sctp_globals.transport_hashtable)