]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - include/net/netns/hash.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-bionic-kernel.git] / include / net / netns / hash.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
0b441916
PE
2#ifndef __NET_NS_HASH_H__
3#define __NET_NS_HASH_H__
4
5#include <asm/cache.h>
6
7struct net;
8
6eada011 9static inline u32 net_hash_mix(const struct net *net)
0b441916
PE
10{
11#ifdef CONFIG_NET_NS
12 /*
13 * shift this right to eliminate bits, that are
14 * always zeroed
15 */
16
6eada011 17 return (u32)(((unsigned long)net) >> L1_CACHE_SHIFT);
0b441916
PE
18#else
19 return 0;
20#endif
21}
22#endif