1 /* SPDX-License-Identifier: GPL-2.0 */ << 2 #ifndef __NET_NS_HASH_H__ 1 #ifndef __NET_NS_HASH_H__ 3 #define __NET_NS_HASH_H__ 2 #define __NET_NS_HASH_H__ 4 3 5 #include <net/net_namespace.h> !! 4 #include <asm/cache.h> >> 5 >> 6 struct net; 6 7 7 static inline u32 net_hash_mix(const struct ne 8 static inline u32 net_hash_mix(const struct net *net) 8 { 9 { 9 return net->hash_mix; !! 10 #ifdef CONFIG_NET_NS >> 11 /* >> 12 * shift this right to eliminate bits, that are >> 13 * always zeroed >> 14 */ >> 15 >> 16 return (u32)(((unsigned long)net) >> L1_CACHE_SHIFT); >> 17 #else >> 18 return 0; >> 19 #endif 10 } 20 } 11 #endif 21 #endif 12 22
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.