From 8a6d48c0542876eb3acfc0970c0ab7872db08d5f Mon Sep 17 00:00:00 2001 From: Zheng Da Date: Sun, 6 Dec 2009 05:26:23 +0100 Subject: check in the original version of dde linux26. --- 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