Staging
v0.5.1
https://github.com/torvalds/linux
Raw File
Tip revision: cbfe8fa6cd672011c755c3cd85c9ffd4e2d10a6f authored by Linus Torvalds on 26 July 2015, 19:26:21 UTC
Linux 4.2-rc4
Tip revision: cbfe8fa
hash.h
#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
back to top