From 7996a3d79d55b7f879dfd62e202bbfe2963718d3 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 27 Jul 2013 22:15:01 +0000 Subject: really properly move files --- libdde-linux26/contrib/include/net/netns/hash.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 libdde-linux26/contrib/include/net/netns/hash.h (limited to 'libdde-linux26/contrib/include/net/netns/hash.h') diff --git a/libdde-linux26/contrib/include/net/netns/hash.h b/libdde-linux26/contrib/include/net/netns/hash.h new file mode 100644 index 00000000..548d78f2 --- /dev/null +++ b/libdde-linux26/contrib/include/net/netns/hash.h @@ -0,0 +1,21 @@ +#ifndef __NET_NS_HASH_H__ +#define __NET_NS_HASH_H__ + +#include + +struct net; + +static inline unsigned net_hash_mix(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 +} +#endif -- cgit v1.2.3