mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
ipv4: split inet_ehashfn to hash functions per compilation unit
This duplicates a bit of code but let's us easily introduce separate secret keys later. The separate compilation units are ipv4/inet_hashtabbles.o, ipv4/udp.o and rds/connection.o. Cc: Eric Dumazet <[email protected]> Cc: "David S. Miller" <[email protected]> Signed-off-by: Hannes Frederic Sowa <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
53481da372
commit
65cd8033ff
4 changed files with 42 additions and 23 deletions
|
|
@ -52,9 +52,9 @@ static struct kmem_cache *rds_conn_slab;
|
|||
static struct hlist_head *rds_conn_bucket(__be32 laddr, __be32 faddr)
|
||||
{
|
||||
/* Pass NULL, don't need struct net for hash */
|
||||
unsigned long hash = inet_ehashfn(NULL,
|
||||
be32_to_cpu(laddr), 0,
|
||||
be32_to_cpu(faddr), 0);
|
||||
unsigned long hash = __inet_ehashfn(be32_to_cpu(laddr), 0,
|
||||
be32_to_cpu(faddr), 0,
|
||||
inet_ehash_secret);
|
||||
return &rds_conn_hash[hash & RDS_CONNECTION_HASH_MASK];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue