summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2004-08-18 00:43:08 -0700
committerDavid S. Miller <davem@kernel.bkbits.net>2004-08-18 00:43:08 -0700
commit1126996a1f42e82a334339ff099a1580888d3a9a (patch)
tree1cda9be0904a6d9769a39ec93ffd51e3ebf35c86 /include
parent592b64d7d5a06d9855ea7b039a898328109e606d (diff)
[XFRM]: Kill unused flow_hash
This patch removes a left-over from the days when the flow cache lived in xfrm_policy.c. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/net/xfrm.h41
1 files changed, 0 insertions, 41 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index aaf74999a1f3..fdf3409b9209 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -304,47 +304,6 @@ extern int xfrm_register_km(struct xfrm_mgr *km);
extern int xfrm_unregister_km(struct xfrm_mgr *km);
-#define XFRM_FLOWCACHE_HASH_SIZE 1024
-
-static inline u32 __flow_hash4(struct flowi *fl)
-{
- u32 hash = fl->fl4_src ^ fl->fl_ip_sport;
-
- hash = ((hash & 0xF0F0F0F0) >> 4) | ((hash & 0x0F0F0F0F) << 4);
-
- hash ^= fl->fl4_dst ^ fl->fl_ip_dport;
- hash ^= (hash >> 10);
- hash ^= (hash >> 20);
- return hash & (XFRM_FLOWCACHE_HASH_SIZE-1);
-}
-
-static inline u32 __flow_hash6(struct flowi *fl)
-{
- u32 hash = fl->fl6_src.s6_addr32[2] ^
- fl->fl6_src.s6_addr32[3] ^
- fl->fl_ip_sport;
-
- hash = ((hash & 0xF0F0F0F0) >> 4) | ((hash & 0x0F0F0F0F) << 4);
-
- hash ^= fl->fl6_dst.s6_addr32[2] ^
- fl->fl6_dst.s6_addr32[3] ^
- fl->fl_ip_dport;
- hash ^= (hash >> 10);
- hash ^= (hash >> 20);
- return hash & (XFRM_FLOWCACHE_HASH_SIZE-1);
-}
-
-static inline u32 flow_hash(struct flowi *fl, unsigned short family)
-{
- switch (family) {
- case AF_INET:
- return __flow_hash4(fl);
- case AF_INET6:
- return __flow_hash6(fl);
- }
- return 0; /*XXX*/
-}
-
extern struct xfrm_policy *xfrm_policy_list[XFRM_POLICY_MAX*2];
static inline void xfrm_pol_hold(struct xfrm_policy *policy)