M7350/kernel/include/net/netns/hash.h

22 lines
332 B
C
Raw Normal View History

2024-09-09 08:52:07 +00:00
#ifndef __NET_NS_HASH_H__
#define __NET_NS_HASH_H__
#include <asm/cache.h>
struct net;
2024-09-09 08:57:42 +00:00
static inline u32 net_hash_mix(const struct net *net)
2024-09-09 08:52:07 +00:00
{
#ifdef CONFIG_NET_NS
/*
* shift this right to eliminate bits, that are
* always zeroed
*/
2024-09-09 08:57:42 +00:00
return (u32)(((unsigned long)net) >> L1_CACHE_SHIFT);
2024-09-09 08:52:07 +00:00
#else
return 0;
#endif
}
#endif