inet: convert inet_ehash_secret and ipv6_hash_secret to net_get_random_once
Initialize the ehash and ipv6_hash_secrets with net_get_random_once. Each compilation unit gets its own secret now: ipv4/inet_hashtables.o ipv4/udp.o ipv6/inet6_hashtables.o ipv6/udp.o rds/connection.o The functions still get inlined into the hashing functions. In the fast path we have at most two (needed in ipv6) if (unlikely(...)). Cc: Eric Dumazet <edumazet@google.com> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by:Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- include/net/inet_sock.h 0 additions, 4 deletionsinclude/net/inet_sock.h
- net/ipv4/af_inet.c 0 additions, 27 deletionsnet/ipv4/af_inet.c
- net/ipv4/inet_hashtables.c 4 additions, 0 deletionsnet/ipv4/inet_hashtables.c
- net/ipv4/udp.c 5 additions, 1 deletionnet/ipv4/udp.c
- net/ipv6/af_inet6.c 0 additions, 5 deletionsnet/ipv6/af_inet6.c
- net/ipv6/inet6_hashtables.c 12 additions, 3 deletionsnet/ipv6/inet6_hashtables.c
- net/ipv6/udp.c 14 additions, 3 deletionsnet/ipv6/udp.c
- net/rds/connection.c 9 additions, 3 deletionsnet/rds/connection.c
Loading
Please register or sign in to comment