diff options
| author | Dmitry Torokhov <[email protected]> | 2023-05-01 15:20:08 -0700 | 
|---|---|---|
| committer | Dmitry Torokhov <[email protected]> | 2023-05-01 15:20:08 -0700 | 
| commit | 9a87ffc99ec8eb8d35eed7c4f816d75f5cc9662e (patch) | |
| tree | d57f3a63479a07b4e0cece029886e76e04feb984 /include/net/raw.h | |
| parent | 5dc63e56a9cf8df0b59c234a505a1653f1bdf885 (diff) | |
| parent | 53bea86b5712c7491bb3dae12e271666df0a308c (diff) | |
Merge branch 'next' into for-linus
Prepare input updates for 6.4 merge window.
Diffstat (limited to 'include/net/raw.h')
| -rw-r--r-- | include/net/raw.h | 13 | 
1 files changed, 11 insertions, 2 deletions
diff --git a/include/net/raw.h b/include/net/raw.h index 5e665934ebc7..2c004c20ed99 100644 --- a/include/net/raw.h +++ b/include/net/raw.h @@ -15,6 +15,8 @@  #include <net/inet_sock.h>  #include <net/protocol.h> +#include <net/netns/hash.h> +#include <linux/hash.h>  #include <linux/icmp.h>  extern struct proto raw_prot; @@ -29,13 +31,20 @@ int raw_local_deliver(struct sk_buff *, int);  int raw_rcv(struct sock *, struct sk_buff *); -#define RAW_HTABLE_SIZE	MAX_INET_PROTOS +#define RAW_HTABLE_LOG	8 +#define RAW_HTABLE_SIZE	(1U << RAW_HTABLE_LOG)  struct raw_hashinfo {  	spinlock_t lock; -	struct hlist_nulls_head ht[RAW_HTABLE_SIZE]; + +	struct hlist_nulls_head ht[RAW_HTABLE_SIZE] ____cacheline_aligned;  }; +static inline u32 raw_hashfunc(const struct net *net, u32 proto) +{ +	return hash_32(net_hash_mix(net) ^ proto, RAW_HTABLE_LOG); +} +  static inline void raw_hashinfo_init(struct raw_hashinfo *hashinfo)  {  	int i;  |