aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-08 03:20:00 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:21:10 -0500
commitd2ecd9ccd0694278a8c1fa179d1d058ee66e2297 (patch)
treec754502286939d64e53f51e6192d256d436463d0 /include
parent5a874db4d9bfd8a4c6324d844a4d1c7cfa5cf2c4 (diff)
[IPV6]: annotate inet6_hashtables
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/inet6_hashtables.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/net/inet6_hashtables.h b/include/net/inet6_hashtables.h
index bc6a71dce984..c28e424f53d9 100644
--- a/include/net/inet6_hashtables.h
+++ b/include/net/inet6_hashtables.h
@@ -26,11 +26,11 @@ struct inet_hashinfo;
26 26
27/* I have no idea if this is a good hash for v6 or not. -DaveM */ 27/* I have no idea if this is a good hash for v6 or not. -DaveM */
28static inline unsigned int inet6_ehashfn(const struct in6_addr *laddr, const u16 lport, 28static inline unsigned int inet6_ehashfn(const struct in6_addr *laddr, const u16 lport,
29 const struct in6_addr *faddr, const u16 fport) 29 const struct in6_addr *faddr, const __be16 fport)
30{ 30{
31 unsigned int hashent = (lport ^ fport); 31 unsigned int hashent = (lport ^ (__force u16)fport);
32 32
33 hashent ^= (laddr->s6_addr32[3] ^ faddr->s6_addr32[3]); 33 hashent ^= (__force u32)(laddr->s6_addr32[3] ^ faddr->s6_addr32[3]);
34 hashent ^= hashent >> 16; 34 hashent ^= hashent >> 16;
35 hashent ^= hashent >> 8; 35 hashent ^= hashent >> 8;
36 return hashent; 36 return hashent;
@@ -43,7 +43,7 @@ static inline int inet6_sk_ehashfn(const struct sock *sk)
43 const struct in6_addr *laddr = &np->rcv_saddr; 43 const struct in6_addr *laddr = &np->rcv_saddr;
44 const struct in6_addr *faddr = &np->daddr; 44 const struct in6_addr *faddr = &np->daddr;
45 const __u16 lport = inet->num; 45 const __u16 lport = inet->num;
46 const __u16 fport = inet->dport; 46 const __be16 fport = inet->dport;
47 return inet6_ehashfn(laddr, lport, faddr, fport); 47 return inet6_ehashfn(laddr, lport, faddr, fport);
48} 48}
49 49
@@ -57,7 +57,7 @@ extern void __inet6_hash(struct inet_hashinfo *hashinfo, struct sock *sk);
57 */ 57 */
58extern struct sock *__inet6_lookup_established(struct inet_hashinfo *hashinfo, 58extern struct sock *__inet6_lookup_established(struct inet_hashinfo *hashinfo,
59 const struct in6_addr *saddr, 59 const struct in6_addr *saddr,
60 const u16 sport, 60 const __be16 sport,
61 const struct in6_addr *daddr, 61 const struct in6_addr *daddr,
62 const u16 hnum, 62 const u16 hnum,
63 const int dif); 63 const int dif);
@@ -69,7 +69,7 @@ extern struct sock *inet6_lookup_listener(struct inet_hashinfo *hashinfo,
69 69
70static inline struct sock *__inet6_lookup(struct inet_hashinfo *hashinfo, 70static inline struct sock *__inet6_lookup(struct inet_hashinfo *hashinfo,
71 const struct in6_addr *saddr, 71 const struct in6_addr *saddr,
72 const u16 sport, 72 const __be16 sport,
73 const struct in6_addr *daddr, 73 const struct in6_addr *daddr,
74 const u16 hnum, 74 const u16 hnum,
75 const int dif) 75 const int dif)
@@ -83,8 +83,8 @@ static inline struct sock *__inet6_lookup(struct inet_hashinfo *hashinfo,
83} 83}
84 84
85extern struct sock *inet6_lookup(struct inet_hashinfo *hashinfo, 85extern struct sock *inet6_lookup(struct inet_hashinfo *hashinfo,
86 const struct in6_addr *saddr, const u16 sport, 86 const struct in6_addr *saddr, const __be16 sport,
87 const struct in6_addr *daddr, const u16 dport, 87 const struct in6_addr *daddr, const __be16 dport,
88 const int dif); 88 const int dif);
89#endif /* defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) */ 89#endif /* defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) */
90#endif /* _INET6_HASHTABLES_H */ 90#endif /* _INET6_HASHTABLES_H */