diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-09-27 21:39:29 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-28 21:02:22 -0400 |
commit | 114c7844f34c1608aec20ae7ff85cec471ac90ae (patch) | |
tree | f1cd7e413187004d6af8bdd62f20ffa6252d4a0b | |
parent | 1b620154273d5cc57690e0d199282c6bb9e56974 (diff) |
[IPV4]: mroute annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/linux/mroute.h | 10 | ||||
-rw-r--r-- | net/ipv4/ipmr.c | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/include/linux/mroute.h b/include/linux/mroute.h index c7dd4c11f667..7da2cee8e132 100644 --- a/include/linux/mroute.h +++ b/include/linux/mroute.h | |||
@@ -142,7 +142,7 @@ struct vif_device | |||
142 | unsigned long rate_limit; /* Traffic shaping (NI) */ | 142 | unsigned long rate_limit; /* Traffic shaping (NI) */ |
143 | unsigned char threshold; /* TTL threshold */ | 143 | unsigned char threshold; /* TTL threshold */ |
144 | unsigned short flags; /* Control flags */ | 144 | unsigned short flags; /* Control flags */ |
145 | __u32 local,remote; /* Addresses(remote for tunnels)*/ | 145 | __be32 local,remote; /* Addresses(remote for tunnels)*/ |
146 | int link; /* Physical interface index */ | 146 | int link; /* Physical interface index */ |
147 | }; | 147 | }; |
148 | 148 | ||
@@ -151,8 +151,8 @@ struct vif_device | |||
151 | struct mfc_cache | 151 | struct mfc_cache |
152 | { | 152 | { |
153 | struct mfc_cache *next; /* Next entry on cache line */ | 153 | struct mfc_cache *next; /* Next entry on cache line */ |
154 | __u32 mfc_mcastgrp; /* Group the entry belongs to */ | 154 | __be32 mfc_mcastgrp; /* Group the entry belongs to */ |
155 | __u32 mfc_origin; /* Source of packet */ | 155 | __be32 mfc_origin; /* Source of packet */ |
156 | vifi_t mfc_parent; /* Source interface */ | 156 | vifi_t mfc_parent; /* Source interface */ |
157 | int mfc_flags; /* Flags on line */ | 157 | int mfc_flags; /* Flags on line */ |
158 | 158 | ||
@@ -179,9 +179,9 @@ struct mfc_cache | |||
179 | #define MFC_LINES 64 | 179 | #define MFC_LINES 64 |
180 | 180 | ||
181 | #ifdef __BIG_ENDIAN | 181 | #ifdef __BIG_ENDIAN |
182 | #define MFC_HASH(a,b) ((((a)>>24)^((b)>>26))&(MFC_LINES-1)) | 182 | #define MFC_HASH(a,b) (((((__force u32)(__be32)a)>>24)^(((__force u32)(__be32)b)>>26))&(MFC_LINES-1)) |
183 | #else | 183 | #else |
184 | #define MFC_HASH(a,b) (((a)^((b)>>2))&(MFC_LINES-1)) | 184 | #define MFC_HASH(a,b) ((((__force u32)(__be32)a)^(((__force u32)(__be32)b)>>2))&(MFC_LINES-1)) |
185 | #endif | 185 | #endif |
186 | 186 | ||
187 | #endif | 187 | #endif |
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index ba49588da242..97cfa97c8abb 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -462,7 +462,7 @@ static int vif_add(struct vifctl *vifc, int mrtsock) | |||
462 | return 0; | 462 | return 0; |
463 | } | 463 | } |
464 | 464 | ||
465 | static struct mfc_cache *ipmr_cache_find(__u32 origin, __u32 mcastgrp) | 465 | static struct mfc_cache *ipmr_cache_find(__be32 origin, __be32 mcastgrp) |
466 | { | 466 | { |
467 | int line=MFC_HASH(mcastgrp,origin); | 467 | int line=MFC_HASH(mcastgrp,origin); |
468 | struct mfc_cache *c; | 468 | struct mfc_cache *c; |
@@ -1097,7 +1097,7 @@ static struct notifier_block ip_mr_notifier={ | |||
1097 | * important for multicast video. | 1097 | * important for multicast video. |
1098 | */ | 1098 | */ |
1099 | 1099 | ||
1100 | static void ip_encap(struct sk_buff *skb, u32 saddr, u32 daddr) | 1100 | static void ip_encap(struct sk_buff *skb, __be32 saddr, __be32 daddr) |
1101 | { | 1101 | { |
1102 | struct iphdr *iph = (struct iphdr *)skb_push(skb,sizeof(struct iphdr)); | 1102 | struct iphdr *iph = (struct iphdr *)skb_push(skb,sizeof(struct iphdr)); |
1103 | 1103 | ||