|
@@ -79,6 +79,7 @@
|
|
#include <linux/cpu.h>
|
|
#include <linux/cpu.h>
|
|
#include <linux/types.h>
|
|
#include <linux/types.h>
|
|
#include <linux/kernel.h>
|
|
#include <linux/kernel.h>
|
|
|
|
+#include <linux/hash.h>
|
|
#include <linux/sched.h>
|
|
#include <linux/sched.h>
|
|
#include <linux/mutex.h>
|
|
#include <linux/mutex.h>
|
|
#include <linux/string.h>
|
|
#include <linux/string.h>
|
|
@@ -196,7 +197,7 @@ EXPORT_SYMBOL(dev_base_lock);
|
|
static inline struct hlist_head *dev_name_hash(struct net *net, const char *name)
|
|
static inline struct hlist_head *dev_name_hash(struct net *net, const char *name)
|
|
{
|
|
{
|
|
unsigned hash = full_name_hash(name, strnlen(name, IFNAMSIZ));
|
|
unsigned hash = full_name_hash(name, strnlen(name, IFNAMSIZ));
|
|
- return &net->dev_name_head[hash & (NETDEV_HASHENTRIES - 1)];
|
|
|
|
|
|
+ return &net->dev_name_head[hash_32(hash, NETDEV_HASHBITS)];
|
|
}
|
|
}
|
|
|
|
|
|
static inline struct hlist_head *dev_index_hash(struct net *net, int ifindex)
|
|
static inline struct hlist_head *dev_index_hash(struct net *net, int ifindex)
|