sctp: add the rhashtable apis for sctp global transport hashtable
authorXin Long <lucien.xin@gmail.com>
Wed, 30 Dec 2015 15:50:46 +0000 (23:50 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Jan 2016 17:24:00 +0000 (12:24 -0500)
commitd6c0256a60e685214cc8cc2b886809f11efc0084
tree03e8c0a111ac179ee0c5351969921994408eec14
parent6a5ef90c58daada158ba16ba330558efc3471491
sctp: add the rhashtable apis for sctp global transport hashtable

tranport hashtbale will replace the association hashtable to do the
lookup for transport, and then get association by t->assoc, rhashtable
apis will be used because of it's resizable, scalable and using rcu.

lport + rport + paddr will be the base hashkey to locate the chain,
with net to protect one netns from another, then plus the laddr to
compare to get the target.

this patch will provider the lookup functions:
- sctp_epaddr_lookup_transport
- sctp_addrs_lookup_transport

hash/unhash functions:
- sctp_hash_transport
- sctp_unhash_transport

init/destroy functions:
- sctp_transport_hashtable_init
- sctp_transport_hashtable_destroy

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>
include/net/sctp/sctp.h
include/net/sctp/structs.h
net/sctp/input.c