Add the rt linux 4.1.3-rt3 as base
[kvmfornfv.git] / kernel / include / net / netns / hash.h
diff --git a/kernel/include/net/netns/hash.h b/kernel/include/net/netns/hash.h
new file mode 100644 (file)
index 0000000..69a6715
--- /dev/null
@@ -0,0 +1,21 @@
+#ifndef __NET_NS_HASH_H__
+#define __NET_NS_HASH_H__
+
+#include <asm/cache.h>
+
+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);
+#else
+       return 0;
+#endif
+}
+#endif