Skip to contentSkip to conversation

ipv4: Add hash table of interface addresses.

PATCH New David Miller 1 participant 1 message Feb 18, 2011

Subsystems (3)
lore
Share & tools
lore

David Miller

author maintainer
#0 lore raw

PATCH v2 1/2 ipv4: Add hash table of interface addresses.

This will be used to optimize __ip_dev_find() and friends.

With help from Eric Dumazet.

---
 include/linux/inetdevice.h |    1 +
 net/ipv4/devinet.c         |   45 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+), 0 deletions(-)
include/linux/inetdevice.h +1 -0
index ae8fdc5..5f81466 100644
@@ -144,6 +144,7 @@ static inline void ipv4_devconf_setall(struct in_device *in_dev)
 #define IN_DEV_ARP_NOTIFY(in_dev)	IN_DEV_MAXCONF((in_dev), ARP_NOTIFY)
 
 struct in_ifaddr {
+	struct hlist_node	hash;
 	struct in_ifaddr	*ifa_next;
 	struct in_device	*ifa_dev;
 	struct rcu_head		rcu_head;
net/ipv4/devinet.c +45 -0

99 lines not on this page · raw message

Signature · 1 line
1.7.4.1