summaryrefslogtreecommitdiff
path: root/include/net/netns/hash.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/netns/hash.h')
-rw-r--r--include/net/netns/hash.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/include/net/netns/hash.h b/include/net/netns/hash.h
index 24c78183a4c2..16a842456189 100644
--- a/include/net/netns/hash.h
+++ b/include/net/netns/hash.h
@@ -9,12 +9,7 @@ struct net;
static inline u32 net_hash_mix(const struct net *net)
{
#ifdef CONFIG_NET_NS
- /*
- * shift this right to eliminate bits, that are
- * always zeroed
- */
-
- return (u32)(((unsigned long)net) >> L1_CACHE_SHIFT);
+ return (u32)(((unsigned long)net) >> ilog2(sizeof(*net)));
#else
return 0;
#endif