diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-11-14 23:56:00 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:22:52 -0500 |
commit | e69a4adc669fe210817ec50ae3f9a7a5ad62d4e8 (patch) | |
tree | de4666cd772f02aac4cbacf11251faeb54e99d1d /net/ipv6/reassembly.c | |
parent | b09b845ca6724c3bbdc00c0cb2313258c7189ca9 (diff) |
[IPV6]: Misc endianness annotations.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/reassembly.c')
-rw-r--r-- | net/ipv6/reassembly.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c index 3af0d5a6ceeb..6f9a9046510f 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c | |||
@@ -77,7 +77,7 @@ struct frag_queue | |||
77 | struct hlist_node list; | 77 | struct hlist_node list; |
78 | struct list_head lru_list; /* lru list member */ | 78 | struct list_head lru_list; /* lru list member */ |
79 | 79 | ||
80 | __u32 id; /* fragment id */ | 80 | __be32 id; /* fragment id */ |
81 | struct in6_addr saddr; | 81 | struct in6_addr saddr; |
82 | struct in6_addr daddr; | 82 | struct in6_addr daddr; |
83 | 83 | ||
@@ -125,28 +125,28 @@ static __inline__ void fq_unlink(struct frag_queue *fq) | |||
125 | * callers should be careful not to use the hash value outside the ipfrag_lock | 125 | * callers should be careful not to use the hash value outside the ipfrag_lock |
126 | * as doing so could race with ipfrag_hash_rnd being recalculated. | 126 | * as doing so could race with ipfrag_hash_rnd being recalculated. |
127 | */ | 127 | */ |
128 | static unsigned int ip6qhashfn(u32 id, struct in6_addr *saddr, | 128 | static unsigned int ip6qhashfn(__be32 id, struct in6_addr *saddr, |
129 | struct in6_addr *daddr) | 129 | struct in6_addr *daddr) |
130 | { | 130 | { |
131 | u32 a, b, c; | 131 | u32 a, b, c; |
132 | 132 | ||
133 | a = saddr->s6_addr32[0]; | 133 | a = (__force u32)saddr->s6_addr32[0]; |
134 | b = saddr->s6_addr32[1]; | 134 | b = (__force u32)saddr->s6_addr32[1]; |
135 | c = saddr->s6_addr32[2]; | 135 | c = (__force u32)saddr->s6_addr32[2]; |
136 | 136 | ||
137 | a += JHASH_GOLDEN_RATIO; | 137 | a += JHASH_GOLDEN_RATIO; |
138 | b += JHASH_GOLDEN_RATIO; | 138 | b += JHASH_GOLDEN_RATIO; |
139 | c += ip6_frag_hash_rnd; | 139 | c += ip6_frag_hash_rnd; |
140 | __jhash_mix(a, b, c); | 140 | __jhash_mix(a, b, c); |
141 | 141 | ||
142 | a += saddr->s6_addr32[3]; | 142 | a += (__force u32)saddr->s6_addr32[3]; |
143 | b += daddr->s6_addr32[0]; | 143 | b += (__force u32)daddr->s6_addr32[0]; |
144 | c += daddr->s6_addr32[1]; | 144 | c += (__force u32)daddr->s6_addr32[1]; |
145 | __jhash_mix(a, b, c); | 145 | __jhash_mix(a, b, c); |
146 | 146 | ||
147 | a += daddr->s6_addr32[2]; | 147 | a += (__force u32)daddr->s6_addr32[2]; |
148 | b += daddr->s6_addr32[3]; | 148 | b += (__force u32)daddr->s6_addr32[3]; |
149 | c += id; | 149 | c += (__force u32)id; |
150 | __jhash_mix(a, b, c); | 150 | __jhash_mix(a, b, c); |
151 | 151 | ||
152 | return c & (IP6Q_HASHSZ - 1); | 152 | return c & (IP6Q_HASHSZ - 1); |
@@ -370,7 +370,7 @@ static struct frag_queue *ip6_frag_intern(struct frag_queue *fq_in) | |||
370 | 370 | ||
371 | 371 | ||
372 | static struct frag_queue * | 372 | static struct frag_queue * |
373 | ip6_frag_create(u32 id, struct in6_addr *src, struct in6_addr *dst, | 373 | ip6_frag_create(__be32 id, struct in6_addr *src, struct in6_addr *dst, |
374 | struct inet6_dev *idev) | 374 | struct inet6_dev *idev) |
375 | { | 375 | { |
376 | struct frag_queue *fq; | 376 | struct frag_queue *fq; |
@@ -396,7 +396,7 @@ oom: | |||
396 | } | 396 | } |
397 | 397 | ||
398 | static __inline__ struct frag_queue * | 398 | static __inline__ struct frag_queue * |
399 | fq_find(u32 id, struct in6_addr *src, struct in6_addr *dst, | 399 | fq_find(__be32 id, struct in6_addr *src, struct in6_addr *dst, |
400 | struct inet6_dev *idev) | 400 | struct inet6_dev *idev) |
401 | { | 401 | { |
402 | struct frag_queue *fq; | 402 | struct frag_queue *fq; |