mirror of
https://github.com/torvalds/linux.git
synced 2024-11-18 18:11:56 +00:00
6eada0110c
const qualifiers ease code review by making clear which objects are not written in a function. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
22 lines
332 B
C
22 lines
332 B
C
#ifndef __NET_NS_HASH_H__
|
|
#define __NET_NS_HASH_H__
|
|
|
|
#include <asm/cache.h>
|
|
|
|
struct net;
|
|
|
|
static inline u32 net_hash_mix(const struct net *net)
|
|
{
|
|
#ifdef CONFIG_NET_NS
|
|
/*
|
|
* shift this right to eliminate bits, that are
|
|
* always zeroed
|
|
*/
|
|
|
|
return (u32)(((unsigned long)net) >> L1_CACHE_SHIFT);
|
|
#else
|
|
return 0;
|
|
#endif
|
|
}
|
|
#endif
|