net/ipv6: Add anycast addresses to a global hashtable
icmp6_send() function is expensive on systems with a large number of interfaces. Every time it’s called, it has to verify that the source address does not correspond to an existing anycast address by looping through every device and every anycast address on the device. This can result in significant delays for a CPU when there are a large number of neighbors and ND timers are frequently timing out and calling neigh_invalidate(). Add anycast addresses to a global hashtable to allow quick searching for matching anycast addresses. This is based on inet6_addr_lst in addrconf.c. Signed-off-by: Jeff Barnhill <0xeffeff@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
7b900ead6c
commit
2384d02520
@ -317,6 +317,8 @@ bool ipv6_chk_acast_addr(struct net *net, struct net_device *dev,
|
||||
const struct in6_addr *addr);
|
||||
bool ipv6_chk_acast_addr_src(struct net *net, struct net_device *dev,
|
||||
const struct in6_addr *addr);
|
||||
int ipv6_anycast_init(void);
|
||||
void ipv6_anycast_cleanup(void);
|
||||
|
||||
/* Device notifier */
|
||||
int register_inet6addr_notifier(struct notifier_block *nb);
|
||||
|
Reference in New Issue
Block a user