Staging
v0.5.1
https://github.com/torvalds/linux
Raw File
Tip revision: 4ef7675344d687a0ef5b0d7c0cee12da005870c0 authored by Linus Torvalds on 21 December 2015, 00:06:09 UTC
Linux 4.4-rc6
Tip revision: 4ef7675
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