Loading include/linux/udp.h +1 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ static inline struct udphdr *inner_udp_hdr(const struct sk_buff *skb) #define UDP_HTABLE_SIZE_MIN (CONFIG_BASE_SMALL ? 128 : 256) static inline int udp_hashfn(struct net *net, unsigned num, unsigned mask) static inline u32 udp_hashfn(const struct net *net, u32 num, u32 mask) { return (num + net_hash_mix(net)) & mask; } Loading include/net/inet_hashtables.h +3 −3 Original line number Diff line number Diff line Loading @@ -221,8 +221,8 @@ inet_bind_bucket_create(struct kmem_cache *cachep, struct net *net, void inet_bind_bucket_destroy(struct kmem_cache *cachep, struct inet_bind_bucket *tb); static inline int inet_bhashfn(struct net *net, const __u16 lport, const int bhash_size) static inline u32 inet_bhashfn(const struct net *net, const __u16 lport, const u32 bhash_size) { return (lport + net_hash_mix(net)) & (bhash_size - 1); } Loading @@ -231,7 +231,7 @@ void inet_bind_hash(struct sock *sk, struct inet_bind_bucket *tb, const unsigned short snum); /* These can have wildcards, don't try too hard. */ static inline int inet_lhashfn(struct net *net, const unsigned short num) static inline u32 inet_lhashfn(const struct net *net, const unsigned short num) { return (num + net_hash_mix(net)) & (INET_LHTABLE_SIZE - 1); } Loading include/net/netns/hash.h +2 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ struct net; static inline unsigned int net_hash_mix(struct net *net) static inline u32 net_hash_mix(const struct net *net) { #ifdef CONFIG_NET_NS /* Loading @@ -13,7 +13,7 @@ static inline unsigned int net_hash_mix(struct net *net) * always zeroed */ return (unsigned)(((unsigned long)net) >> L1_CACHE_SHIFT); return (u32)(((unsigned long)net) >> L1_CACHE_SHIFT); #else return 0; #endif Loading net/ipv4/devinet.c +1 −1 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ static const struct nla_policy ifa_ipv4_policy[IFA_MAX+1] = { static struct hlist_head inet_addr_lst[IN4_ADDR_HSIZE]; static u32 inet_addr_hash(struct net *net, __be32 addr) static u32 inet_addr_hash(const struct net *net, __be32 addr) { u32 val = (__force u32) addr ^ net_hash_mix(net); Loading net/ipv4/inet_hashtables.c +3 −3 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ #include <net/secure_seq.h> #include <net/ip.h> static unsigned int inet_ehashfn(struct net *net, const __be32 laddr, static u32 inet_ehashfn(const struct net *net, const __be32 laddr, const __u16 lport, const __be32 faddr, const __be16 fport) { Loading Loading
include/linux/udp.h +1 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ static inline struct udphdr *inner_udp_hdr(const struct sk_buff *skb) #define UDP_HTABLE_SIZE_MIN (CONFIG_BASE_SMALL ? 128 : 256) static inline int udp_hashfn(struct net *net, unsigned num, unsigned mask) static inline u32 udp_hashfn(const struct net *net, u32 num, u32 mask) { return (num + net_hash_mix(net)) & mask; } Loading
include/net/inet_hashtables.h +3 −3 Original line number Diff line number Diff line Loading @@ -221,8 +221,8 @@ inet_bind_bucket_create(struct kmem_cache *cachep, struct net *net, void inet_bind_bucket_destroy(struct kmem_cache *cachep, struct inet_bind_bucket *tb); static inline int inet_bhashfn(struct net *net, const __u16 lport, const int bhash_size) static inline u32 inet_bhashfn(const struct net *net, const __u16 lport, const u32 bhash_size) { return (lport + net_hash_mix(net)) & (bhash_size - 1); } Loading @@ -231,7 +231,7 @@ void inet_bind_hash(struct sock *sk, struct inet_bind_bucket *tb, const unsigned short snum); /* These can have wildcards, don't try too hard. */ static inline int inet_lhashfn(struct net *net, const unsigned short num) static inline u32 inet_lhashfn(const struct net *net, const unsigned short num) { return (num + net_hash_mix(net)) & (INET_LHTABLE_SIZE - 1); } Loading
include/net/netns/hash.h +2 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ struct net; static inline unsigned int net_hash_mix(struct net *net) static inline u32 net_hash_mix(const struct net *net) { #ifdef CONFIG_NET_NS /* Loading @@ -13,7 +13,7 @@ static inline unsigned int net_hash_mix(struct net *net) * always zeroed */ return (unsigned)(((unsigned long)net) >> L1_CACHE_SHIFT); return (u32)(((unsigned long)net) >> L1_CACHE_SHIFT); #else return 0; #endif Loading
net/ipv4/devinet.c +1 −1 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ static const struct nla_policy ifa_ipv4_policy[IFA_MAX+1] = { static struct hlist_head inet_addr_lst[IN4_ADDR_HSIZE]; static u32 inet_addr_hash(struct net *net, __be32 addr) static u32 inet_addr_hash(const struct net *net, __be32 addr) { u32 val = (__force u32) addr ^ net_hash_mix(net); Loading
net/ipv4/inet_hashtables.c +3 −3 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ #include <net/secure_seq.h> #include <net/ip.h> static unsigned int inet_ehashfn(struct net *net, const __be32 laddr, static u32 inet_ehashfn(const struct net *net, const __be32 laddr, const __u16 lport, const __be32 faddr, const __be16 fport) { Loading