]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - include/net/netns/hash.h
Merge tag 'platform-drivers-x86-v4.1-1' of git://git.infradead.org/users/dvhart/linux...
[mirror_ubuntu-bionic-kernel.git] / include / net / netns / hash.h
CommitLineData
0b441916
PE
1#ifndef __NET_NS_HASH_H__
2#define __NET_NS_HASH_H__
3
4#include <asm/cache.h>
5
6struct net;
7
6eada011 8static inline u32 net_hash_mix(const struct net *net)
0b441916
PE
9{
10#ifdef CONFIG_NET_NS
11 /*
12 * shift this right to eliminate bits, that are
13 * always zeroed
14 */
15
6eada011 16 return (u32)(((unsigned long)net) >> L1_CACHE_SHIFT);
0b441916
PE
17#else
18 return 0;
19#endif
20}
21#endif