Staging
v0.5.1
https://github.com/torvalds/linux
Raw File
Tip revision: 14ccee78fc82f5512908f4424f541549a5705b89 authored by Linus Torvalds on 20 August 2017, 21:13:52 UTC
Linux 4.13-rc6
Tip revision: 14ccee7
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