diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-09-27 01:19:02 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-28 21:01:09 -0400 |
commit | 182777700d912a69824245e9ee99148ac0aa57d7 (patch) | |
tree | 027f34a2a3342d59a29dac0d1fef1974e3239f76 /net/ipv4/ip_fragment.c | |
parent | 53576d9b995605a9edc7414b900a9218c8f23b1f (diff) |
[IPV4]: ip_fragment.c 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/ipv4/ip_fragment.c')
-rw-r--r-- | net/ipv4/ip_fragment.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index 165d72859ddf..74046efdf875 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c | |||
@@ -77,9 +77,9 @@ struct ipq { | |||
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 | u32 user; | 79 | u32 user; |
80 | u32 saddr; | 80 | __be32 saddr; |
81 | u32 daddr; | 81 | __be32 daddr; |
82 | u16 id; | 82 | __be16 id; |
83 | u8 protocol; | 83 | u8 protocol; |
84 | u8 last_in; | 84 | u8 last_in; |
85 | #define COMPLETE 4 | 85 | #define COMPLETE 4 |
@@ -123,9 +123,10 @@ static __inline__ void ipq_unlink(struct ipq *ipq) | |||
123 | write_unlock(&ipfrag_lock); | 123 | write_unlock(&ipfrag_lock); |
124 | } | 124 | } |
125 | 125 | ||
126 | static unsigned int ipqhashfn(u16 id, u32 saddr, u32 daddr, u8 prot) | 126 | static unsigned int ipqhashfn(__be16 id, __be32 saddr, __be32 daddr, u8 prot) |
127 | { | 127 | { |
128 | return jhash_3words((u32)id << 16 | prot, saddr, daddr, | 128 | return jhash_3words((__force u32)id << 16 | prot, |
129 | (__force u32)saddr, (__force u32)daddr, | ||
129 | ipfrag_hash_rnd) & (IPQ_HASHSZ - 1); | 130 | ipfrag_hash_rnd) & (IPQ_HASHSZ - 1); |
130 | } | 131 | } |
131 | 132 | ||
@@ -387,8 +388,8 @@ out_nomem: | |||
387 | static inline struct ipq *ip_find(struct iphdr *iph, u32 user) | 388 | static inline struct ipq *ip_find(struct iphdr *iph, u32 user) |
388 | { | 389 | { |
389 | __be16 id = iph->id; | 390 | __be16 id = iph->id; |
390 | __u32 saddr = iph->saddr; | 391 | __be32 saddr = iph->saddr; |
391 | __u32 daddr = iph->daddr; | 392 | __be32 daddr = iph->daddr; |
392 | __u8 protocol = iph->protocol; | 393 | __u8 protocol = iph->protocol; |
393 | unsigned int hash; | 394 | unsigned int hash; |
394 | struct ipq *qp; | 395 | struct ipq *qp; |