mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-26 06:45:03 +07:00
95c9617472
Use of "unsigned int" is preferred to bare "unsigned" in net tree. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
22 lines
340 B
C
22 lines
340 B
C
#ifndef __NET_NS_HASH_H__
|
|
#define __NET_NS_HASH_H__
|
|
|
|
#include <asm/cache.h>
|
|
|
|
struct net;
|
|
|
|
static inline unsigned int net_hash_mix(struct net *net)
|
|
{
|
|
#ifdef CONFIG_NET_NS
|
|
/*
|
|
* shift this right to eliminate bits, that are
|
|
* always zeroed
|
|
*/
|
|
|
|
return (unsigned)(((unsigned long)net) >> L1_CACHE_SHIFT);
|
|
#else
|
|
return 0;
|
|
#endif
|
|
}
|
|
#endif
|