writeback: safer lock nesting
[linux/fpc-iii.git] / include / net / netns / hash.h
blob24c78183a4c262e086c29cde1e61b7f397d8bab0
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __NET_NS_HASH_H__
3 #define __NET_NS_HASH_H__
5 #include <asm/cache.h>
7 struct net;
9 static inline u32 net_hash_mix(const struct net *net)
11 #ifdef CONFIG_NET_NS
13 * shift this right to eliminate bits, that are
14 * always zeroed
17 return (u32)(((unsigned long)net) >> L1_CACHE_SHIFT);
18 #else
19 return 0;
20 #endif
22 #endif