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.h18
1 files changed, 4 insertions, 14 deletions
diff --git a/include/net/netns/hash.h b/include/net/netns/hash.h
index c06ac58ca107..d9b665151f3d 100644
--- a/include/net/netns/hash.h
+++ b/include/net/netns/hash.h
@@ -1,21 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __NET_NS_HASH_H__
#define __NET_NS_HASH_H__
-#include <asm/cache.h>
+#include <net/net_namespace.h>
-struct net;
-
-static inline unsigned int net_hash_mix(struct net *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 (unsigned)(((unsigned long)net) >> L1_CACHE_SHIFT);
-#else
- return 0;
-#endif
+ return net->hash_mix;
}
#endif